diff --git a/pkg/apis/crd/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/crd/v1alpha1/zz_generated.deepcopy.go index 6c8f9f77e2..feb45b9835 100644 --- a/pkg/apis/crd/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/crd/v1alpha1/zz_generated.deepcopy.go @@ -13,7 +13,7 @@ func (in *ENIConfig) DeepCopyInto(out *ENIConfig) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status return } @@ -72,6 +72,11 @@ func (in *ENIConfigList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ENIConfigSpec) DeepCopyInto(out *ENIConfigSpec) { *out = *in + if in.SecurityGroups != nil { + in, out := &in.SecurityGroups, &out.SecurityGroups + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/pkg/eniconfig/eniconfig.go b/pkg/eniconfig/eniconfig.go index 2ad661566c..da38303d27 100644 --- a/pkg/eniconfig/eniconfig.go +++ b/pkg/eniconfig/eniconfig.go @@ -26,12 +26,9 @@ import ( "github.com/aws/amazon-vpc-cni-k8s/pkg/apis/crd/v1alpha1" - corev1 "k8s.io/api/core/v1" - - "github.com/operator-framework/operator-sdk/pkg/util/k8sutil" - sdkVersion "github.com/operator-framework/operator-sdk/version" - log "github.com/cihub/seelog" + sdkVersion "github.com/operator-framework/operator-sdk/version" + corev1 "k8s.io/api/core/v1" ) const ( @@ -152,13 +149,9 @@ func (eniCfg *ENIConfigController) Start() { resource := "crd.k8s.amazonaws.com/v1alpha1" kind := "ENIConfig" - namespace, err := k8sutil.GetWatchNamespace() - if err != nil { - log.Errorf("failed to get watch namespace: %v", err) - } resyncPeriod := time.Second * 5 - log.Infof("Watching %s, %s, %s, every %d s", resource, kind, namespace, resyncPeriod.Seconds()) - sdk.Watch(resource, kind, namespace, resyncPeriod) + log.Infof("Watching %s, %s, every %v s", resource, kind, resyncPeriod.Seconds()) + sdk.Watch(resource, kind, "", resyncPeriod) sdk.Watch("/v1", "Node", corev1.NamespaceAll, resyncPeriod) sdk.Handle(NewHandler(eniCfg)) sdk.Run(context.TODO()) @@ -178,7 +171,6 @@ func (eniCfg *ENIConfigController) Getter() *ENIConfigInfo { for name, val := range eniCfg.eni { output.ENI[name] = *val } - return output } diff --git a/vendor/gopkg.in/yaml.v2/go.mod b/vendor/gopkg.in/yaml.v2/go.mod index 1934e87694..ee8918f563 100644 --- a/vendor/gopkg.in/yaml.v2/go.mod +++ b/vendor/gopkg.in/yaml.v2/go.mod @@ -1,5 +1,3 @@ -module "gopkg.in/yaml.v2" +module gopkg.in/yaml.v2 -require ( - "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405 -) +require gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405