Skip to content

Commit

Permalink
updates for code review
Browse files Browse the repository at this point in the history
  • Loading branch information
cadmuxe committed Nov 14, 2019
1 parent eded2fa commit 04c02b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/cmconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (

// NewConfig returns a Conifg instances with default values.
func NewConfig() Config {
return Config{ASMServiceNEGSkipNamespaces: []string{"kube-system", "istio-system"}}
return Config{EnableASM: false, ASMServiceNEGSkipNamespaces: []string{"kube-system", "istio-system"}}
}

// Equals returns true if c equals to other.
Expand Down
6 changes: 3 additions & 3 deletions pkg/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func NewControllerContext(

// Init inits the Context, so that we can defers some config until the main thread enter actually get the leader lock.
func (ctx *ControllerContext) Init() {
klog.Info("Init ControllerContext...")
klog.V(2).Info("Controller Context initializing with %v", ctx.ControllerContextConfig)
// Initialize controller context internals based on ASMConfigMap
if ctx.EnableASMConfigMap {
configMapInformer := informerv1.NewConfigMapInformer(ctx.KubeClient, ctx.Namespace, ctx.ResyncPeriod, utils.NewNamespaceIndexer())
Expand Down Expand Up @@ -187,8 +187,8 @@ func (ctx *ControllerContext) initEnableASM() {
return
}

klog.Info("The DestinationRule group version is v1alpha3 in group networking.istio.io. Need to update as istio API graduates.")
destrinationGVR := schema.GroupVersionResource{Group: "networking.istio.io", Version: "v1alpha3", Resource: "destinationrules"}
klog.V(2).Infof("The supported DestinationRule group version is %s in group %s. Need to update as istio API graduates.", destinationRuleAPIVersion, destinationRuleGroup)
destrinationGVR := schema.GroupVersionResource{Group: destinationRuleGroup, Version: destinationRuleAPIVersion, Resource: destinationRulePlural}
drDynamicInformer := dynamicinformer.NewFilteredDynamicInformer(dynamicClient, destrinationGVR, ctx.Namespace, ctx.ResyncPeriod,
cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc},
nil)
Expand Down

0 comments on commit 04c02b2

Please sign in to comment.