From 1978e511c62809557ade7885ec5ae77721e61454 Mon Sep 17 00:00:00 2001 From: Pedro Coutinho Date: Tue, 11 Jul 2023 17:34:54 -0700 Subject: [PATCH] Fix static checks --- hack/gen-versions/calico.go.tpl | 1 - hack/gen-versions/enterprise.go.tpl | 2 +- pkg/components/calico.go | 13 ++++++----- pkg/components/enterprise.go | 2 -- pkg/controller/utils/utils_test.go | 1 - .../operator.tigera.io_installations.yaml | 22 +++++++++++++++++++ 6 files changed, 30 insertions(+), 11 deletions(-) diff --git a/hack/gen-versions/calico.go.tpl b/hack/gen-versions/calico.go.tpl index 0007772e61..2da153e4d3 100644 --- a/hack/gen-versions/calico.go.tpl +++ b/hack/gen-versions/calico.go.tpl @@ -158,7 +158,6 @@ var ( ComponentOperatorInit, ComponentCalicoAPIServer, ComponentCalicoAPIServerFIPS, - ComponentWindowsUpgrade, ComponentCalicoCSI, ComponentCalicoCSIFIPS, ComponentCalicoCSIRegistrar, diff --git a/hack/gen-versions/enterprise.go.tpl b/hack/gen-versions/enterprise.go.tpl index cdc8ade306..38f26a14fd 100644 --- a/hack/gen-versions/enterprise.go.tpl +++ b/hack/gen-versions/enterprise.go.tpl @@ -355,7 +355,7 @@ var ( Registry: "{{ .Registry }}", } {{- end }} -{pkg/components/calico.go{ with index .Components "flexvol" }} +{{ with index .Components "flexvol" }} ComponentFlexVolumePrivate = component{ Version: "{{ .Version }}", Image: "{{ .Image }}", diff --git a/pkg/components/calico.go b/pkg/components/calico.go index 910de286d9..6d408af033 100644 --- a/pkg/components/calico.go +++ b/pkg/components/calico.go @@ -28,17 +28,17 @@ var ( Registry: "", } - ComponentCalicoCNIWindows = component{ - Version: "master", - Image: "calico/cni-windows", - } - ComponentCalicoCNIFIPS = component{ Version: "master-fips", Image: "calico/cni", Registry: "", } + ComponentCalicoCNIWindows = component{ + Version: "master", + Image: "calico/cni-windows", + } + ComponentCalicoKubeControllers = component{ Version: "master", Image: "calico/kube-controllers", @@ -128,12 +128,13 @@ var ( CalicoImages = []component{ ComponentCalicoCNI, - ComponentCalicoCNIFIPS, ComponentCalicoCNIWindows, + ComponentCalicoCNIFIPS, ComponentCalicoKubeControllers, ComponentCalicoKubeControllersFIPS, ComponentCalicoNode, ComponentCalicoNodeFIPS, + ComponentCalicoNodeWindows, ComponentCalicoTypha, ComponentCalicoTyphaFIPS, ComponentFlexVolume, diff --git a/pkg/components/enterprise.go b/pkg/components/enterprise.go index 59b06e8d16..143e52185b 100644 --- a/pkg/components/enterprise.go +++ b/pkg/components/enterprise.go @@ -361,11 +361,9 @@ var ( ComponentQueryServer, ComponentTigeraKubeControllers, ComponentTigeraNode, - ComponentTigeraNodeWindows, ComponentTigeraTypha, ComponentTigeraCNI, ComponentTigeraCNIFIPS, - ComponentTigeraCNIWindows, ComponentCloudControllers, ComponentElasticsearchMetrics, ComponentESGateway, diff --git a/pkg/controller/utils/utils_test.go b/pkg/controller/utils/utils_test.go index 77eb8b7e02..9253680563 100644 --- a/pkg/controller/utils/utils_test.go +++ b/pkg/controller/utils/utils_test.go @@ -300,7 +300,6 @@ var _ = Describe("GetK8sServiceEndPoint", func() { type fakeClient struct { discovery discovery.DiscoveryInterface kubernetes.Interface - objects map[client.ObjectKey]client.Object } type fakeDiscovery struct { diff --git a/pkg/crds/operator/operator.tigera.io_installations.yaml b/pkg/crds/operator/operator.tigera.io_installations.yaml index 740cc8e37a..b9d143a4e6 100644 --- a/pkg/crds/operator/operator.tigera.io_installations.yaml +++ b/pkg/crds/operator/operator.tigera.io_installations.yaml @@ -2957,6 +2957,7 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic weight: description: Weight associated with matching the corresponding nodeSelectorTerm, @@ -3076,10 +3077,12 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic type: array required: - nodeSelectorTerms type: object + x-kubernetes-map-type: atomic type: object podAffinity: description: Describes pod affinity scheduling @@ -3177,6 +3180,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: description: A label query over the set of namespaces that the @@ -3249,6 +3253,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaces: description: namespaces specifies a static list of namespace names @@ -3373,6 +3378,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies @@ -3440,6 +3446,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaces: description: namespaces specifies a static list of namespace names that @@ -3565,6 +3572,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: description: A label query over the set of namespaces that the @@ -3637,6 +3645,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaces: description: namespaces specifies a static list of namespace names @@ -3761,6 +3770,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: description: A label query over the set of namespaces that the term applies @@ -3828,6 +3838,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaces: description: namespaces specifies a static list of namespace names that @@ -10623,6 +10634,7 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic weight: description: Weight associated with matching the corresponding nodeSelectorTerm, @@ -10754,10 +10766,12 @@ spec: type: object type: array type: object + x-kubernetes-map-type: atomic type: array required: - nodeSelectorTerms type: object + x-kubernetes-map-type: atomic type: object podAffinity: description: Describes pod affinity scheduling @@ -10863,6 +10877,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: description: A label query over the set of namespaces that @@ -10943,6 +10958,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaces: description: namespaces specifies a static list of namespace @@ -11077,6 +11093,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: description: A label query over the set of namespaces that the @@ -11149,6 +11166,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaces: description: namespaces specifies a static list of namespace names @@ -11284,6 +11302,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: description: A label query over the set of namespaces that @@ -11364,6 +11383,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaces: description: namespaces specifies a static list of namespace @@ -11498,6 +11518,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaceSelector: description: A label query over the set of namespaces that the @@ -11570,6 +11591,7 @@ spec: are ANDed. type: object type: object + x-kubernetes-map-type: atomic namespaces: description: namespaces specifies a static list of namespace names