From 9f9b3d868a6feb74933795d9b34d0f622e572a80 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Tue, 26 Mar 2024 17:34:15 -0400 Subject: [PATCH] Lint fixes --- ....openstack.org_openstackcontrolplanes.yaml | 35 +++++---- .../core.openstack.org_openstackversions.yaml | 78 +++++++++---------- apis/core/v1beta1/openstackversion_types.go | 28 +++---- apis/core/v1beta1/openstackversion_webhook.go | 1 + apis/core/v1beta1/zz_generated.deepcopy.go | 52 ++++++------- apis/go.mod | 6 +- apis/go.sum | 12 +-- ....openstack.org_openstackcontrolplanes.yaml | 35 +++++---- .../core.openstack.org_openstackversions.yaml | 78 +++++++++---------- .../core/openstackcontrolplane_controller.go | 2 +- .../core/openstackversion_controller.go | 9 ++- go.mod | 6 +- go.sum | 12 +-- pkg/openstack/barbican.go | 5 +- pkg/openstack/cinder.go | 4 +- pkg/openstack/designate.go | 4 +- pkg/openstack/glance.go | 4 +- pkg/openstack/heat.go | 4 +- pkg/openstack/ironic.go | 4 +- pkg/openstack/keystone.go | 6 +- pkg/openstack/manila.go | 4 +- pkg/openstack/neutron.go | 4 +- pkg/openstack/nova.go | 6 +- pkg/openstack/octavia.go | 4 +- pkg/openstack/ovn.go | 14 +++- pkg/openstack/placement.go | 4 +- pkg/openstack/telemetry.go | 4 +- pkg/openstack/version.go | 35 +++++---- 28 files changed, 243 insertions(+), 217 deletions(-) diff --git a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml index 9bb5ac3f7..c497a5ba4 100644 --- a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -6147,9 +6147,6 @@ spec: additionalProperties: type: string type: object - enableSecureRBAC: - default: true - type: boolean memcachedInstance: default: memcached type: string @@ -6268,6 +6265,12 @@ spec: type: object secret: type: string + secureRBACEnforceNewDefaults: + default: true + type: boolean + secureRBACEnforceScope: + default: false + type: boolean tls: properties: api: @@ -16260,7 +16263,7 @@ spec: type: string ansibleeeImage: type: string - aodhApiImage: + aodhAPIImage: type: string aodhEvaluatorImage: type: string @@ -16270,7 +16273,7 @@ spec: type: string apacheImage: type: string - barbicanApiImage: + barbicanAPIImage: type: string barbicanKeystoneListenerImage: type: string @@ -16286,7 +16289,7 @@ spec: type: string ceilometerSgcoreImage: type: string - cinderApiImage: + cinderAPIImage: type: string cinderBackupImage: type: string @@ -16296,7 +16299,7 @@ spec: additionalProperties: type: string type: object - designateApiImage: + designateAPIImage: type: string designateBackendbind9Image: type: string @@ -16310,9 +16313,9 @@ spec: type: string designateWorkerImage: type: string - glanceApiImage: + glanceAPIImage: type: string - heatApiImage: + heatAPIImage: type: string heatCfnapiImage: type: string @@ -16326,7 +16329,7 @@ spec: type: string infraRedisImage: type: string - ironicApiImage: + ironicAPIImage: type: string ironicConductorImage: type: string @@ -16338,9 +16341,9 @@ spec: type: string ironicPythonAgentImage: type: string - keystoneApiImage: + keystoneAPIImage: type: string - manilaApiImage: + manilaAPIImage: type: string manilaSchedulerImage: type: string @@ -16350,9 +16353,9 @@ spec: type: object mariadbImage: type: string - neutronApiImage: + neutronAPIImage: type: string - novaApiImage: + novaAPIImage: type: string novaComputeImage: type: string @@ -16362,7 +16365,7 @@ spec: type: string novaSchedulerImage: type: string - octaviaApiImage: + octaviaAPIImage: type: string octaviaHealthmanagerImage: type: string @@ -16384,7 +16387,7 @@ spec: type: string ovnSbDbclusterImage: type: string - placementApiImage: + placementAPIImage: type: string rabbitmqImage: type: string diff --git a/apis/bases/core.openstack.org_openstackversions.yaml b/apis/bases/core.openstack.org_openstackversions.yaml index 5deaff71a..cdccf87d3 100644 --- a/apis/bases/core.openstack.org_openstackversions.yaml +++ b/apis/bases/core.openstack.org_openstackversions.yaml @@ -43,7 +43,7 @@ spec: type: string ansibleeeImage: type: string - aodhApiImage: + aodhAPIImage: type: string aodhEvaluatorImage: type: string @@ -53,7 +53,7 @@ spec: type: string apacheImage: type: string - barbicanApiImage: + barbicanAPIImage: type: string barbicanKeystoneListenerImage: type: string @@ -69,7 +69,7 @@ spec: type: string ceilometerSgcoreImage: type: string - cinderApiImage: + cinderAPIImage: type: string cinderBackupImage: type: string @@ -79,7 +79,7 @@ spec: additionalProperties: type: string type: object - designateApiImage: + designateAPIImage: type: string designateBackendbind9Image: type: string @@ -93,9 +93,9 @@ spec: type: string designateWorkerImage: type: string - glanceApiImage: + glanceAPIImage: type: string - heatApiImage: + heatAPIImage: type: string heatCfnapiImage: type: string @@ -109,7 +109,7 @@ spec: type: string infraRedisImage: type: string - ironicApiImage: + ironicAPIImage: type: string ironicConductorImage: type: string @@ -121,9 +121,9 @@ spec: type: string ironicPythonAgentImage: type: string - keystoneApiImage: + keystoneAPIImage: type: string - manilaApiImage: + manilaAPIImage: type: string manilaSchedulerImage: type: string @@ -133,9 +133,9 @@ spec: type: object mariadbImage: type: string - neutronApiImage: + neutronAPIImage: type: string - novaApiImage: + novaAPIImage: type: string novaComputeImage: type: string @@ -145,7 +145,7 @@ spec: type: string novaSchedulerImage: type: string - octaviaApiImage: + octaviaAPIImage: type: string octaviaHealthmanagerImage: type: string @@ -167,7 +167,7 @@ spec: type: string ovnSbDbclusterImage: type: string - placementApiImage: + placementAPIImage: type: string rabbitmqImage: type: string @@ -220,7 +220,7 @@ spec: type: string ansibleeeImage: type: string - aodhApiImage: + aodhAPIImage: type: string aodhEvaluatorImage: type: string @@ -230,7 +230,7 @@ spec: type: string apacheImage: type: string - barbicanApiImage: + barbicanAPIImage: type: string barbicanKeystoneListenerImage: type: string @@ -246,7 +246,7 @@ spec: type: string ceilometerSgcoreImage: type: string - cinderApiImage: + cinderAPIImage: type: string cinderBackupImage: type: string @@ -254,7 +254,7 @@ spec: type: string cinderVolumeImage: type: string - designateApiImage: + designateAPIImage: type: string designateBackendbind9Image: type: string @@ -268,9 +268,9 @@ spec: type: string designateWorkerImage: type: string - glanceApiImage: + glanceAPIImage: type: string - heatApiImage: + heatAPIImage: type: string heatCfnapiImage: type: string @@ -284,7 +284,7 @@ spec: type: string infraRedisImage: type: string - ironicApiImage: + ironicAPIImage: type: string ironicConductorImage: type: string @@ -296,9 +296,9 @@ spec: type: string ironicPythonAgentImage: type: string - keystoneApiImage: + keystoneAPIImage: type: string - manilaApiImage: + manilaAPIImage: type: string manilaSchedulerImage: type: string @@ -306,9 +306,9 @@ spec: type: string mariadbImage: type: string - neutronApiImage: + neutronAPIImage: type: string - novaApiImage: + novaAPIImage: type: string novaComputeImage: type: string @@ -318,7 +318,7 @@ spec: type: string novaSchedulerImage: type: string - octaviaApiImage: + octaviaAPIImage: type: string octaviaHealthmanagerImage: type: string @@ -340,7 +340,7 @@ spec: type: string ovnSbDbclusterImage: type: string - placementApiImage: + placementAPIImage: type: string rabbitmqImage: type: string @@ -362,7 +362,7 @@ spec: type: string ansibleeeImage: type: string - aodhApiImage: + aodhAPIImage: type: string aodhEvaluatorImage: type: string @@ -372,7 +372,7 @@ spec: type: string apacheImage: type: string - barbicanApiImage: + barbicanAPIImage: type: string barbicanKeystoneListenerImage: type: string @@ -388,7 +388,7 @@ spec: type: string ceilometerSgcoreImage: type: string - cinderApiImage: + cinderAPIImage: type: string cinderBackupImage: type: string @@ -398,7 +398,7 @@ spec: additionalProperties: type: string type: object - designateApiImage: + designateAPIImage: type: string designateBackendbind9Image: type: string @@ -412,9 +412,9 @@ spec: type: string designateWorkerImage: type: string - glanceApiImage: + glanceAPIImage: type: string - heatApiImage: + heatAPIImage: type: string heatCfnapiImage: type: string @@ -428,7 +428,7 @@ spec: type: string infraRedisImage: type: string - ironicApiImage: + ironicAPIImage: type: string ironicConductorImage: type: string @@ -440,9 +440,9 @@ spec: type: string ironicPythonAgentImage: type: string - keystoneApiImage: + keystoneAPIImage: type: string - manilaApiImage: + manilaAPIImage: type: string manilaSchedulerImage: type: string @@ -452,9 +452,9 @@ spec: type: object mariadbImage: type: string - neutronApiImage: + neutronAPIImage: type: string - novaApiImage: + novaAPIImage: type: string novaComputeImage: type: string @@ -464,7 +464,7 @@ spec: type: string novaSchedulerImage: type: string - octaviaApiImage: + octaviaAPIImage: type: string octaviaHealthmanagerImage: type: string @@ -486,7 +486,7 @@ spec: type: string ovnSbDbclusterImage: type: string - placementApiImage: + placementAPIImage: type: string rabbitmqImage: type: string diff --git a/apis/core/v1beta1/openstackversion_types.go b/apis/core/v1beta1/openstackversion_types.go index eea8c2d41..4969304a3 100644 --- a/apis/core/v1beta1/openstackversion_types.go +++ b/apis/core/v1beta1/openstackversion_types.go @@ -70,12 +70,12 @@ type ContainerImages struct { type ContainerTemplate struct { AgentImage *string `json:"agentImage,omitempty"` AnsibleeeImage *string `json:"ansibleeeImage,omitempty"` - AodhApiImage *string `json:"aodhApiImage,omitempty"` + AodhAPIImage *string `json:"aodhAPIImage,omitempty"` AodhEvaluatorImage *string `json:"aodhEvaluatorImage,omitempty"` AodhListenerImage *string `json:"aodhListenerImage,omitempty"` AodhNotifierImage *string `json:"aodhNotifierImage,omitempty"` ApacheImage *string `json:"apacheImage,omitempty"` - BarbicanApiImage *string `json:"barbicanApiImage,omitempty"` + BarbicanAPIImage *string `json:"barbicanAPIImage,omitempty"` BarbicanKeystoneListenerImage *string `json:"barbicanKeystoneListenerImage,omitempty"` BarbicanWorkerImage *string `json:"barbicanWorkerImage,omitempty"` CeilometerCentralImage *string `json:"ceilometerCentralImage,omitempty"` @@ -83,41 +83,41 @@ type ContainerTemplate struct { CeilometerIpmiImage *string `json:"ceilometerIpmiImage,omitempty"` CeilometerNotificationImage *string `json:"ceilometerNotificationImage,omitempty"` CeilometerSgcoreImage *string `json:"ceilometerSgcoreImage,omitempty"` - CinderApiImage *string `json:"cinderApiImage,omitempty"` + CinderAPIImage *string `json:"cinderAPIImage,omitempty"` CinderBackupImage *string `json:"cinderBackupImage,omitempty"` CinderSchedulerImage *string `json:"cinderSchedulerImage,omitempty"` - DesignateApiImage *string `json:"designateApiImage,omitempty"` + DesignateAPIImage *string `json:"designateAPIImage,omitempty"` DesignateBackendbind9Image *string `json:"designateBackendbind9Image,omitempty"` DesignateCentralImage *string `json:"designateCentralImage,omitempty"` DesignateMdnsImage *string `json:"designateMdnsImage,omitempty"` DesignateProducerImage *string `json:"designateProducerImage,omitempty"` DesignateUnboundImage *string `json:"designateUnboundImage,omitempty"` DesignateWorkerImage *string `json:"designateWorkerImage,omitempty"` - GlanceApiImage *string `json:"glanceApiImage,omitempty"` - HeatApiImage *string `json:"heatApiImage,omitempty"` + GlanceAPIImage *string `json:"glanceAPIImage,omitempty"` + HeatAPIImage *string `json:"heatAPIImage,omitempty"` HeatCfnapiImage *string `json:"heatCfnapiImage,omitempty"` HeatEngineImage *string `json:"heatEngineImage,omitempty"` HorizonImage *string `json:"horizonImage,omitempty"` InfraDnsmasqImage *string `json:"infraDnsmasqImage,omitempty"` InfraMemcachedImage *string `json:"infraMemcachedImage,omitempty"` InfraRedisImage *string `json:"infraRedisImage,omitempty"` - IronicApiImage *string `json:"ironicApiImage,omitempty"` + IronicAPIImage *string `json:"ironicAPIImage,omitempty"` IronicConductorImage *string `json:"ironicConductorImage,omitempty"` IronicInspectorImage *string `json:"ironicInspectorImage,omitempty"` IronicNeutronAgentImage *string `json:"ironicNeutronAgentImage,omitempty"` IronicPxeImage *string `json:"ironicPxeImage,omitempty"` IronicPythonAgentImage *string `json:"ironicPythonAgentImage,omitempty"` - KeystoneApiImage *string `json:"keystoneApiImage,omitempty"` - ManilaApiImage *string `json:"manilaApiImage,omitempty"` + KeystoneAPIImage *string `json:"keystoneAPIImage,omitempty"` + ManilaAPIImage *string `json:"manilaAPIImage,omitempty"` ManilaSchedulerImage *string `json:"manilaSchedulerImage,omitempty"` MariadbImage *string `json:"mariadbImage,omitempty"` - NeutronApiImage *string `json:"neutronApiImage,omitempty"` - NovaApiImage *string `json:"novaApiImage,omitempty"` + NeutronAPIImage *string `json:"neutronAPIImage,omitempty"` + NovaAPIImage *string `json:"novaAPIImage,omitempty"` NovaComputeImage *string `json:"novaComputeImage,omitempty"` NovaConductorImage *string `json:"novaConductorImage,omitempty"` NovaNovncImage *string `json:"novaNovncImage,omitempty"` NovaSchedulerImage *string `json:"novaSchedulerImage,omitempty"` - OctaviaApiImage *string `json:"octaviaApiImage,omitempty"` + OctaviaAPIImage *string `json:"octaviaAPIImage,omitempty"` OctaviaHealthmanagerImage *string `json:"octaviaHealthmanagerImage,omitempty"` OctaviaHousekeepingImage *string `json:"octaviaHousekeepingImage,omitempty"` OctaviaWorkerImage *string `json:"octaviaWorkerImage,omitempty"` @@ -128,7 +128,7 @@ type ContainerTemplate struct { OvnNbDbclusterImage *string `json:"ovnNbDbclusterImage,omitempty"` OvnNorthdImage *string `json:"ovnNorthdImage,omitempty"` OvnSbDbclusterImage *string `json:"ovnSbDbclusterImage,omitempty"` - PlacementApiImage *string `json:"placementApiImage,omitempty"` + PlacementAPIImage *string `json:"placementAPIImage,omitempty"` RabbitmqImage *string `json:"rabbitmqImage,omitempty"` SwiftAccountImage *string `json:"swiftAccountImage,omitempty"` SwiftContainerImage *string `json:"swiftContainerImage,omitempty"` @@ -184,5 +184,5 @@ func init() { // IsReady - returns true if service is ready to serve requests func (instance OpenStackVersion) IsReady() bool { - return instance.Status.Conditions.IsTrue(condition.ReadyCondition) + return instance.Status.Conditions.IsTrue(condition.ReadyCondition) } diff --git a/apis/core/v1beta1/openstackversion_webhook.go b/apis/core/v1beta1/openstackversion_webhook.go index 6a350a819..a4e6f37fc 100644 --- a/apis/core/v1beta1/openstackversion_webhook.go +++ b/apis/core/v1beta1/openstackversion_webhook.go @@ -45,6 +45,7 @@ func SetupOpenStackVersionDefaults(defaults OpenStackVersionDefaults) { openstackversionlog.Info("OpenStackVersion defaults initialized", "defaults", defaults) } +// SetupWebhookWithManager - register OpenStackVersion with the controller manager func (r *OpenStackVersion) SetupWebhookWithManager(mgr ctrl.Manager) error { return ctrl.NewWebhookManagedBy(mgr). For(r). diff --git a/apis/core/v1beta1/zz_generated.deepcopy.go b/apis/core/v1beta1/zz_generated.deepcopy.go index 01b0ab9ed..0c8f3abd9 100644 --- a/apis/core/v1beta1/zz_generated.deepcopy.go +++ b/apis/core/v1beta1/zz_generated.deepcopy.go @@ -215,8 +215,8 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.AodhApiImage != nil { - in, out := &in.AodhApiImage, &out.AodhApiImage + if in.AodhAPIImage != nil { + in, out := &in.AodhAPIImage, &out.AodhAPIImage *out = new(string) **out = **in } @@ -240,8 +240,8 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.BarbicanApiImage != nil { - in, out := &in.BarbicanApiImage, &out.BarbicanApiImage + if in.BarbicanAPIImage != nil { + in, out := &in.BarbicanAPIImage, &out.BarbicanAPIImage *out = new(string) **out = **in } @@ -280,8 +280,8 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.CinderApiImage != nil { - in, out := &in.CinderApiImage, &out.CinderApiImage + if in.CinderAPIImage != nil { + in, out := &in.CinderAPIImage, &out.CinderAPIImage *out = new(string) **out = **in } @@ -295,8 +295,8 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.DesignateApiImage != nil { - in, out := &in.DesignateApiImage, &out.DesignateApiImage + if in.DesignateAPIImage != nil { + in, out := &in.DesignateAPIImage, &out.DesignateAPIImage *out = new(string) **out = **in } @@ -330,13 +330,13 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.GlanceApiImage != nil { - in, out := &in.GlanceApiImage, &out.GlanceApiImage + if in.GlanceAPIImage != nil { + in, out := &in.GlanceAPIImage, &out.GlanceAPIImage *out = new(string) **out = **in } - if in.HeatApiImage != nil { - in, out := &in.HeatApiImage, &out.HeatApiImage + if in.HeatAPIImage != nil { + in, out := &in.HeatAPIImage, &out.HeatAPIImage *out = new(string) **out = **in } @@ -370,8 +370,8 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.IronicApiImage != nil { - in, out := &in.IronicApiImage, &out.IronicApiImage + if in.IronicAPIImage != nil { + in, out := &in.IronicAPIImage, &out.IronicAPIImage *out = new(string) **out = **in } @@ -400,13 +400,13 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.KeystoneApiImage != nil { - in, out := &in.KeystoneApiImage, &out.KeystoneApiImage + if in.KeystoneAPIImage != nil { + in, out := &in.KeystoneAPIImage, &out.KeystoneAPIImage *out = new(string) **out = **in } - if in.ManilaApiImage != nil { - in, out := &in.ManilaApiImage, &out.ManilaApiImage + if in.ManilaAPIImage != nil { + in, out := &in.ManilaAPIImage, &out.ManilaAPIImage *out = new(string) **out = **in } @@ -420,13 +420,13 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.NeutronApiImage != nil { - in, out := &in.NeutronApiImage, &out.NeutronApiImage + if in.NeutronAPIImage != nil { + in, out := &in.NeutronAPIImage, &out.NeutronAPIImage *out = new(string) **out = **in } - if in.NovaApiImage != nil { - in, out := &in.NovaApiImage, &out.NovaApiImage + if in.NovaAPIImage != nil { + in, out := &in.NovaAPIImage, &out.NovaAPIImage *out = new(string) **out = **in } @@ -450,8 +450,8 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.OctaviaApiImage != nil { - in, out := &in.OctaviaApiImage, &out.OctaviaApiImage + if in.OctaviaAPIImage != nil { + in, out := &in.OctaviaAPIImage, &out.OctaviaAPIImage *out = new(string) **out = **in } @@ -505,8 +505,8 @@ func (in *ContainerTemplate) DeepCopyInto(out *ContainerTemplate) { *out = new(string) **out = **in } - if in.PlacementApiImage != nil { - in, out := &in.PlacementApiImage, &out.PlacementApiImage + if in.PlacementAPIImage != nil { + in, out := &in.PlacementAPIImage, &out.PlacementAPIImage *out = new(string) **out = **in } diff --git a/apis/go.mod b/apis/go.mod index 2b71e647f..4cf67ebb9 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -14,7 +14,7 @@ require ( github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240313161042-88282483a04f github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240315174418-d016dbadd829 github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240313143432-9108b7f7290a - github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240314165949-fec16b14c33b + github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240326081751-56015b1ae3f6 github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240314165949-fec16b14c33b github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240315120315-d76653575db5 github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240314113200-40cf3e6aa38e @@ -106,4 +106,6 @@ replace github.com/openshift/api => github.com/openshift/api v0.0.0-202304141430 // custom RabbitmqClusterSpecCore for OpenStackControlplane (v2.6.0_patches_tag) replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f //allow-merging -replace github.com/openstack-k8s-operators/ovn-operator/api => github.com/dprince/ovn-operator/api v0.0.0-20240326183925-450158835581 //allow-merging +replace github.com/openstack-k8s-operators/ovn-operator/api => github.com/dprince/ovn-operator/api v0.0.0-20240327173949-685116405532 //allow-merging + +replace github.com/openstack-k8s-operators/keystone-operator/api => github.com/dprince/keystone-operator/api v0.0.0-20240327174424-05527caa1208 //allow-merging diff --git a/apis/go.sum b/apis/go.sum index 911627017..45c06ede0 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -6,8 +6,10 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dprince/ovn-operator/api v0.0.0-20240326183925-450158835581 h1:K/UwagSdsw+OUSK1ThcskEa+CtG8f8Pxp0MQdxJ/kgE= -github.com/dprince/ovn-operator/api v0.0.0-20240326183925-450158835581/go.mod h1:ITwD6+WReIhvqx7Q0fQ7IBZHn6iIEs+EpFg1lcukZyo= +github.com/dprince/keystone-operator/api v0.0.0-20240327174424-05527caa1208 h1:iWr2j1xagCyaLBJJ5wYFJN7Vo0AdVpVLqzUix8SjMBI= +github.com/dprince/keystone-operator/api v0.0.0-20240327174424-05527caa1208/go.mod h1:opUQY0YZNCyA11FKLToVhaVZTTEMfbnf0ozOLmkKfGs= +github.com/dprince/ovn-operator/api v0.0.0-20240327173949-685116405532 h1:jlzl3R0WKK8thnnQ/r3jtKQLtKDT2XB6f4ev4oDzoMU= +github.com/dprince/ovn-operator/api v0.0.0-20240327173949-685116405532/go.mod h1:gouaaSPxUBLC1ifDBAdFsbl1njab50Uc2cBE8M6oKGc= github.com/emicklei/go-restful/v3 v3.11.2 h1:1onLa9DcsMYO9P+CXaL0dStDqQ2EHHXLiz+BtnqkLAU= github.com/emicklei/go-restful/v3 v3.11.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= @@ -91,10 +93,8 @@ github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240313161042-8 github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240313161042-88282483a04f/go.mod h1:qKuzDDDMlAmJn4JWPoUeBEzpAia7J17++hhzR0oPv88= github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240315174418-d016dbadd829 h1:SZzu5+nCVU2w0BPPe6VQiz2kccsrEghICay/hiR1wWc= github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240315174418-d016dbadd829/go.mod h1:LnNsRscwuhOstzSuBZXAXi0iUUMLkafojSlEUBBfIPU= -github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240313143432-9108b7f7290a h1:XcUHh0j65hm8/4orLTH6aRTv3Ah4rGP1rA4yu7G0fR0= -github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240313143432-9108b7f7290a/go.mod h1:8C7VPKXAxiwB5Z4Kwn12VL0guW6onIG0Ayxiio5Vyu0= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240314165949-fec16b14c33b h1:5EzrrjcGziV69MsEgoBwPdsggY56M6jUxGBP9pp+hwo= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240314165949-fec16b14c33b/go.mod h1:DL+Ts0k+fzgZmx0XxWArIeAmdKuTkPa1I5DThdybfmE= +github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240326081751-56015b1ae3f6 h1:4Z7LjnjEF82XiusXJTI/4TqgwnJas3cdvg/qEgkrW8Q= +github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240326081751-56015b1ae3f6/go.mod h1:DL+Ts0k+fzgZmx0XxWArIeAmdKuTkPa1I5DThdybfmE= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240314165949-fec16b14c33b h1:FEbadtLx4+ktxf79ZJoKZmfMNsQyqqgL5T9NXWc3i/k= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240314165949-fec16b14c33b/go.mod h1:ghnFgNIzj4amS897wEto+L+jYzDSg2cJ6y32RNfFGhk= github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240314165949-fec16b14c33b h1:lygG1KiF5d9HpKpGAl5fa8JVlC9j5VFvC4iKvJkJslA= diff --git a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml index 9bb5ac3f7..c497a5ba4 100644 --- a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -6147,9 +6147,6 @@ spec: additionalProperties: type: string type: object - enableSecureRBAC: - default: true - type: boolean memcachedInstance: default: memcached type: string @@ -6268,6 +6265,12 @@ spec: type: object secret: type: string + secureRBACEnforceNewDefaults: + default: true + type: boolean + secureRBACEnforceScope: + default: false + type: boolean tls: properties: api: @@ -16260,7 +16263,7 @@ spec: type: string ansibleeeImage: type: string - aodhApiImage: + aodhAPIImage: type: string aodhEvaluatorImage: type: string @@ -16270,7 +16273,7 @@ spec: type: string apacheImage: type: string - barbicanApiImage: + barbicanAPIImage: type: string barbicanKeystoneListenerImage: type: string @@ -16286,7 +16289,7 @@ spec: type: string ceilometerSgcoreImage: type: string - cinderApiImage: + cinderAPIImage: type: string cinderBackupImage: type: string @@ -16296,7 +16299,7 @@ spec: additionalProperties: type: string type: object - designateApiImage: + designateAPIImage: type: string designateBackendbind9Image: type: string @@ -16310,9 +16313,9 @@ spec: type: string designateWorkerImage: type: string - glanceApiImage: + glanceAPIImage: type: string - heatApiImage: + heatAPIImage: type: string heatCfnapiImage: type: string @@ -16326,7 +16329,7 @@ spec: type: string infraRedisImage: type: string - ironicApiImage: + ironicAPIImage: type: string ironicConductorImage: type: string @@ -16338,9 +16341,9 @@ spec: type: string ironicPythonAgentImage: type: string - keystoneApiImage: + keystoneAPIImage: type: string - manilaApiImage: + manilaAPIImage: type: string manilaSchedulerImage: type: string @@ -16350,9 +16353,9 @@ spec: type: object mariadbImage: type: string - neutronApiImage: + neutronAPIImage: type: string - novaApiImage: + novaAPIImage: type: string novaComputeImage: type: string @@ -16362,7 +16365,7 @@ spec: type: string novaSchedulerImage: type: string - octaviaApiImage: + octaviaAPIImage: type: string octaviaHealthmanagerImage: type: string @@ -16384,7 +16387,7 @@ spec: type: string ovnSbDbclusterImage: type: string - placementApiImage: + placementAPIImage: type: string rabbitmqImage: type: string diff --git a/config/crd/bases/core.openstack.org_openstackversions.yaml b/config/crd/bases/core.openstack.org_openstackversions.yaml index 5deaff71a..cdccf87d3 100644 --- a/config/crd/bases/core.openstack.org_openstackversions.yaml +++ b/config/crd/bases/core.openstack.org_openstackversions.yaml @@ -43,7 +43,7 @@ spec: type: string ansibleeeImage: type: string - aodhApiImage: + aodhAPIImage: type: string aodhEvaluatorImage: type: string @@ -53,7 +53,7 @@ spec: type: string apacheImage: type: string - barbicanApiImage: + barbicanAPIImage: type: string barbicanKeystoneListenerImage: type: string @@ -69,7 +69,7 @@ spec: type: string ceilometerSgcoreImage: type: string - cinderApiImage: + cinderAPIImage: type: string cinderBackupImage: type: string @@ -79,7 +79,7 @@ spec: additionalProperties: type: string type: object - designateApiImage: + designateAPIImage: type: string designateBackendbind9Image: type: string @@ -93,9 +93,9 @@ spec: type: string designateWorkerImage: type: string - glanceApiImage: + glanceAPIImage: type: string - heatApiImage: + heatAPIImage: type: string heatCfnapiImage: type: string @@ -109,7 +109,7 @@ spec: type: string infraRedisImage: type: string - ironicApiImage: + ironicAPIImage: type: string ironicConductorImage: type: string @@ -121,9 +121,9 @@ spec: type: string ironicPythonAgentImage: type: string - keystoneApiImage: + keystoneAPIImage: type: string - manilaApiImage: + manilaAPIImage: type: string manilaSchedulerImage: type: string @@ -133,9 +133,9 @@ spec: type: object mariadbImage: type: string - neutronApiImage: + neutronAPIImage: type: string - novaApiImage: + novaAPIImage: type: string novaComputeImage: type: string @@ -145,7 +145,7 @@ spec: type: string novaSchedulerImage: type: string - octaviaApiImage: + octaviaAPIImage: type: string octaviaHealthmanagerImage: type: string @@ -167,7 +167,7 @@ spec: type: string ovnSbDbclusterImage: type: string - placementApiImage: + placementAPIImage: type: string rabbitmqImage: type: string @@ -220,7 +220,7 @@ spec: type: string ansibleeeImage: type: string - aodhApiImage: + aodhAPIImage: type: string aodhEvaluatorImage: type: string @@ -230,7 +230,7 @@ spec: type: string apacheImage: type: string - barbicanApiImage: + barbicanAPIImage: type: string barbicanKeystoneListenerImage: type: string @@ -246,7 +246,7 @@ spec: type: string ceilometerSgcoreImage: type: string - cinderApiImage: + cinderAPIImage: type: string cinderBackupImage: type: string @@ -254,7 +254,7 @@ spec: type: string cinderVolumeImage: type: string - designateApiImage: + designateAPIImage: type: string designateBackendbind9Image: type: string @@ -268,9 +268,9 @@ spec: type: string designateWorkerImage: type: string - glanceApiImage: + glanceAPIImage: type: string - heatApiImage: + heatAPIImage: type: string heatCfnapiImage: type: string @@ -284,7 +284,7 @@ spec: type: string infraRedisImage: type: string - ironicApiImage: + ironicAPIImage: type: string ironicConductorImage: type: string @@ -296,9 +296,9 @@ spec: type: string ironicPythonAgentImage: type: string - keystoneApiImage: + keystoneAPIImage: type: string - manilaApiImage: + manilaAPIImage: type: string manilaSchedulerImage: type: string @@ -306,9 +306,9 @@ spec: type: string mariadbImage: type: string - neutronApiImage: + neutronAPIImage: type: string - novaApiImage: + novaAPIImage: type: string novaComputeImage: type: string @@ -318,7 +318,7 @@ spec: type: string novaSchedulerImage: type: string - octaviaApiImage: + octaviaAPIImage: type: string octaviaHealthmanagerImage: type: string @@ -340,7 +340,7 @@ spec: type: string ovnSbDbclusterImage: type: string - placementApiImage: + placementAPIImage: type: string rabbitmqImage: type: string @@ -362,7 +362,7 @@ spec: type: string ansibleeeImage: type: string - aodhApiImage: + aodhAPIImage: type: string aodhEvaluatorImage: type: string @@ -372,7 +372,7 @@ spec: type: string apacheImage: type: string - barbicanApiImage: + barbicanAPIImage: type: string barbicanKeystoneListenerImage: type: string @@ -388,7 +388,7 @@ spec: type: string ceilometerSgcoreImage: type: string - cinderApiImage: + cinderAPIImage: type: string cinderBackupImage: type: string @@ -398,7 +398,7 @@ spec: additionalProperties: type: string type: object - designateApiImage: + designateAPIImage: type: string designateBackendbind9Image: type: string @@ -412,9 +412,9 @@ spec: type: string designateWorkerImage: type: string - glanceApiImage: + glanceAPIImage: type: string - heatApiImage: + heatAPIImage: type: string heatCfnapiImage: type: string @@ -428,7 +428,7 @@ spec: type: string infraRedisImage: type: string - ironicApiImage: + ironicAPIImage: type: string ironicConductorImage: type: string @@ -440,9 +440,9 @@ spec: type: string ironicPythonAgentImage: type: string - keystoneApiImage: + keystoneAPIImage: type: string - manilaApiImage: + manilaAPIImage: type: string manilaSchedulerImage: type: string @@ -452,9 +452,9 @@ spec: type: object mariadbImage: type: string - neutronApiImage: + neutronAPIImage: type: string - novaApiImage: + novaAPIImage: type: string novaComputeImage: type: string @@ -464,7 +464,7 @@ spec: type: string novaSchedulerImage: type: string - octaviaApiImage: + octaviaAPIImage: type: string octaviaHealthmanagerImage: type: string @@ -486,7 +486,7 @@ spec: type: string ovnSbDbclusterImage: type: string - placementApiImage: + placementAPIImage: type: string rabbitmqImage: type: string diff --git a/controllers/core/openstackcontrolplane_controller.go b/controllers/core/openstackcontrolplane_controller.go index 9c3c86004..e5ec0c1a0 100644 --- a/controllers/core/openstackcontrolplane_controller.go +++ b/controllers/core/openstackcontrolplane_controller.go @@ -169,7 +169,7 @@ func (r *OpenStackControlPlaneReconciler) Reconcile(ctx context.Context, req ctr instance.InitConditions() Log.Info("Looking up the current OpenStackVersion") - ctrlResult, err, version := openstack.ReconcileVersion(ctx, instance, helper) + ctrlResult, version, err := openstack.ReconcileVersion(ctx, instance, helper) if err != nil { return ctrl.Result{}, err } else if (ctrlResult != ctrl.Result{}) { diff --git a/controllers/core/openstackversion_controller.go b/controllers/core/openstackversion_controller.go index c6556d1de..8863c81ed 100644 --- a/controllers/core/openstackversion_controller.go +++ b/controllers/core/openstackversion_controller.go @@ -182,12 +182,12 @@ func (r *OpenStackVersionReconciler) Reconcile(ctx context.Context, req ctrl.Req instance.Status.ContainerImageVersionDefaults[envAvailableVersion] = defaults // calculate the container images for the target version - if val, ok := instance.Status.ContainerImageVersionDefaults[instance.Spec.TargetVersion]; !ok { + val, ok := instance.Status.ContainerImageVersionDefaults[instance.Spec.TargetVersion] + if !ok { Log.Info("Target version not found in defaults", "targetVersion", instance.Spec.TargetVersion) return ctrl.Result{}, nil - } else { - instance.Status.ContainerImages = openstack.GetContainerImages(ctx, val, *instance) } + instance.Status.ContainerImages = openstack.GetContainerImages(ctx, val, *instance) instance.Status.Conditions.MarkTrue( corev1beta1.OpenStackVersionInitialized, @@ -219,7 +219,8 @@ func (r *OpenStackVersionReconciler) Reconcile(ctx context.Context, req ctrl.Req // minor update for Controlplane in progress // we only check keystone here as it will only get updated during this phase - if !compareStringPointers(controlPlane.Status.ContainerImages.KeystoneApiImage, instance.Status.ContainerImages.KeystoneApiImage) { + if !compareStringPointers(controlPlane.Status.ContainerImages.KeystoneAPIImage, instance.Status.ContainerImages.KeystoneAPIImage) || + !controlPlane.IsReady() { instance.Status.Conditions.Set(condition.FalseCondition( corev1beta1.OpenStackVersionMinorUpdateControlplane, condition.RequestedReason, diff --git a/go.mod b/go.mod index 7ea76ba6a..b4f403611 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240315174418-d016dbadd829 github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240313143432-9108b7f7290a github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240314165949-fec16b14c33b - github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240314165949-fec16b14c33b + github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240326081751-56015b1ae3f6 github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240314165949-fec16b14c33b github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240315120315-d76653575db5 github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240314113200-40cf3e6aa38e @@ -129,4 +129,6 @@ replace github.com/openshift/api => github.com/openshift/api v0.0.0-202304141430 // custom RabbitmqClusterSpecCore for OpenStackControlplane (v2.6.0_patches_tag) replace github.com/rabbitmq/cluster-operator/v2 => github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f //allow-merging -replace github.com/openstack-k8s-operators/ovn-operator/api => github.com/dprince/ovn-operator/api v0.0.0-20240326183925-450158835581 //allow-merging +replace github.com/openstack-k8s-operators/ovn-operator/api => github.com/dprince/ovn-operator/api v0.0.0-20240327173949-685116405532 //allow-merging + +replace github.com/openstack-k8s-operators/keystone-operator/api => github.com/dprince/keystone-operator/api v0.0.0-20240327174424-05527caa1208 //allow-merging diff --git a/go.sum b/go.sum index dc8f37865..0e2b7a859 100644 --- a/go.sum +++ b/go.sum @@ -10,8 +10,10 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dprince/ovn-operator/api v0.0.0-20240326183925-450158835581 h1:K/UwagSdsw+OUSK1ThcskEa+CtG8f8Pxp0MQdxJ/kgE= -github.com/dprince/ovn-operator/api v0.0.0-20240326183925-450158835581/go.mod h1:ITwD6+WReIhvqx7Q0fQ7IBZHn6iIEs+EpFg1lcukZyo= +github.com/dprince/keystone-operator/api v0.0.0-20240327174424-05527caa1208 h1:iWr2j1xagCyaLBJJ5wYFJN7Vo0AdVpVLqzUix8SjMBI= +github.com/dprince/keystone-operator/api v0.0.0-20240327174424-05527caa1208/go.mod h1:opUQY0YZNCyA11FKLToVhaVZTTEMfbnf0ozOLmkKfGs= +github.com/dprince/ovn-operator/api v0.0.0-20240327173949-685116405532 h1:jlzl3R0WKK8thnnQ/r3jtKQLtKDT2XB6f4ev4oDzoMU= +github.com/dprince/ovn-operator/api v0.0.0-20240327173949-685116405532/go.mod h1:gouaaSPxUBLC1ifDBAdFsbl1njab50Uc2cBE8M6oKGc= github.com/emicklei/go-restful/v3 v3.11.2 h1:1onLa9DcsMYO9P+CXaL0dStDqQ2EHHXLiz+BtnqkLAU= github.com/emicklei/go-restful/v3 v3.11.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= @@ -116,12 +118,10 @@ github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240313161042-8 github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240313161042-88282483a04f/go.mod h1:qKuzDDDMlAmJn4JWPoUeBEzpAia7J17++hhzR0oPv88= github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240315174418-d016dbadd829 h1:SZzu5+nCVU2w0BPPe6VQiz2kccsrEghICay/hiR1wWc= github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240315174418-d016dbadd829/go.mod h1:LnNsRscwuhOstzSuBZXAXi0iUUMLkafojSlEUBBfIPU= -github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240313143432-9108b7f7290a h1:XcUHh0j65hm8/4orLTH6aRTv3Ah4rGP1rA4yu7G0fR0= -github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240313143432-9108b7f7290a/go.mod h1:8C7VPKXAxiwB5Z4Kwn12VL0guW6onIG0Ayxiio5Vyu0= github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240314165949-fec16b14c33b h1:Umvz8j2ySAAo7CbDIigCU9QcU1jywkkofNpjF4i3uKk= github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240314165949-fec16b14c33b/go.mod h1:RV+rktKvegjYBQLuBKt8ax29UMqsU/D/sfSjQPr6XIs= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240314165949-fec16b14c33b h1:5EzrrjcGziV69MsEgoBwPdsggY56M6jUxGBP9pp+hwo= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240314165949-fec16b14c33b/go.mod h1:DL+Ts0k+fzgZmx0XxWArIeAmdKuTkPa1I5DThdybfmE= +github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240326081751-56015b1ae3f6 h1:4Z7LjnjEF82XiusXJTI/4TqgwnJas3cdvg/qEgkrW8Q= +github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240326081751-56015b1ae3f6/go.mod h1:DL+Ts0k+fzgZmx0XxWArIeAmdKuTkPa1I5DThdybfmE= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240314165949-fec16b14c33b h1:FEbadtLx4+ktxf79ZJoKZmfMNsQyqqgL5T9NXWc3i/k= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240314165949-fec16b14c33b/go.mod h1:ghnFgNIzj4amS897wEto+L+jYzDSg2cJ6y32RNfFGhk= github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20240314165949-fec16b14c33b h1:lygG1KiF5d9HpKpGAl5fa8JVlC9j5VFvC4iKvJkJslA= diff --git a/pkg/openstack/barbican.go b/pkg/openstack/barbican.go index c4067061a..b1fc1a204 100644 --- a/pkg/openstack/barbican.go +++ b/pkg/openstack/barbican.go @@ -102,7 +102,7 @@ func ReconcileBarbican(ctx context.Context, instance *corev1beta1.OpenStackContr instance.Spec.Barbican.Template.BarbicanWorker.DeepCopyInto(&barbican.Spec.BarbicanWorker.BarbicanWorkerTemplateCore) instance.Spec.Barbican.Template.BarbicanKeystoneListener.DeepCopyInto(&barbican.Spec.BarbicanKeystoneListener.BarbicanKeystoneListenerTemplateCore) - barbican.Spec.BarbicanAPI.ContainerImage = *version.Status.ContainerImages.BarbicanApiImage + barbican.Spec.BarbicanAPI.ContainerImage = *version.Status.ContainerImages.BarbicanAPIImage barbican.Spec.BarbicanWorker.ContainerImage = *version.Status.ContainerImages.BarbicanWorkerImage barbican.Spec.BarbicanKeystoneListener.ContainerImage = *version.Status.ContainerImages.BarbicanKeystoneListenerImage @@ -149,6 +149,9 @@ func ReconcileBarbican(ctx context.Context, instance *corev1beta1.OpenStackContr condition.SeverityInfo, corev1beta1.OpenStackControlPlaneBarbicanReadyRunningMessage)) } + instance.Status.ContainerImages.BarbicanAPIImage = version.Status.ContainerImages.BarbicanAPIImage + instance.Status.ContainerImages.BarbicanWorkerImage = version.Status.ContainerImages.BarbicanWorkerImage + instance.Status.ContainerImages.BarbicanKeystoneListenerImage = version.Status.ContainerImages.BarbicanKeystoneListenerImage return ctrl.Result{}, nil } diff --git a/pkg/openstack/cinder.go b/pkg/openstack/cinder.go index 7c969dce7..6431ceec9 100644 --- a/pkg/openstack/cinder.go +++ b/pkg/openstack/cinder.go @@ -105,7 +105,7 @@ func ReconcileCinder(ctx context.Context, instance *corev1beta1.OpenStackControl instance.Spec.Cinder.Template.CinderScheduler.DeepCopyInto(&cinder.Spec.CinderScheduler.CinderSchedulerTemplateCore) instance.Spec.Cinder.Template.CinderBackup.DeepCopyInto(&cinder.Spec.CinderBackup.CinderBackupTemplateCore) - cinder.Spec.CinderAPI.ContainerImage = *version.Status.ContainerImages.CinderApiImage + cinder.Spec.CinderAPI.ContainerImage = *version.Status.ContainerImages.CinderAPIImage cinder.Spec.CinderScheduler.ContainerImage = *version.Status.ContainerImages.CinderSchedulerImage cinder.Spec.CinderBackup.ContainerImage = *version.Status.ContainerImages.CinderBackupImage @@ -172,7 +172,7 @@ func ReconcileCinder(ctx context.Context, instance *corev1beta1.OpenStackControl corev1beta1.OpenStackControlPlaneCinderReadyRunningMessage)) } - instance.Status.ContainerImages.CinderApiImage = version.Status.ContainerImages.CinderApiImage + instance.Status.ContainerImages.CinderAPIImage = version.Status.ContainerImages.CinderAPIImage instance.Status.ContainerImages.CinderSchedulerImage = version.Status.ContainerImages.CinderSchedulerImage instance.Status.ContainerImages.CinderBackupImage = version.Status.ContainerImages.CinderBackupImage instance.Status.ContainerImages.CinderVolumeImages = version.Status.ContainerImages.DeepCopy().CinderVolumeImages diff --git a/pkg/openstack/designate.go b/pkg/openstack/designate.go index c8a93dd92..09e5a4bcd 100644 --- a/pkg/openstack/designate.go +++ b/pkg/openstack/designate.go @@ -111,7 +111,7 @@ func ReconcileDesignate(ctx context.Context, instance *corev1beta1.OpenStackCont instance.Spec.Designate.Template.DesignateBackendbind9.DesignateBackendbind9SpecBase.DeepCopyInto(&designate.Spec.DesignateBackendbind9.DesignateBackendbind9SpecBase) instance.Spec.Designate.Template.DesignateBackendbind9.DesignateServiceTemplateCore.DeepCopyInto(&designate.Spec.DesignateBackendbind9.DesignateServiceTemplateCore) - designate.Spec.DesignateAPI.ContainerImage = *version.Status.ContainerImages.DesignateApiImage + designate.Spec.DesignateAPI.ContainerImage = *version.Status.ContainerImages.DesignateAPIImage designate.Spec.DesignateCentral.ContainerImage = *version.Status.ContainerImages.DesignateCentralImage designate.Spec.DesignateMdns.ContainerImage = *version.Status.ContainerImages.DesignateMdnsImage designate.Spec.DesignateProducer.ContainerImage = *version.Status.ContainerImages.DesignateProducerImage @@ -159,7 +159,7 @@ func ReconcileDesignate(ctx context.Context, instance *corev1beta1.OpenStackCont corev1beta1.OpenStackControlPlaneDesignateReadyRunningMessage)) } - instance.Status.ContainerImages.DesignateApiImage = version.Status.ContainerImages.DesignateApiImage + instance.Status.ContainerImages.DesignateAPIImage = version.Status.ContainerImages.DesignateAPIImage instance.Status.ContainerImages.DesignateCentralImage = version.Status.ContainerImages.DesignateCentralImage instance.Status.ContainerImages.DesignateMdnsImage = version.Status.ContainerImages.DesignateMdnsImage instance.Status.ContainerImages.DesignateProducerImage = version.Status.ContainerImages.DesignateProducerImage diff --git a/pkg/openstack/glance.go b/pkg/openstack/glance.go index 826772a29..403c51488 100644 --- a/pkg/openstack/glance.go +++ b/pkg/openstack/glance.go @@ -141,7 +141,7 @@ func ReconcileGlance(ctx context.Context, instance *corev1beta1.OpenStackControl Log.Info("Reconciling Glance", "Glance.Namespace", instance.Namespace, "Glance.Name", "glance") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), glance, func() error { instance.Spec.Glance.Template.DeepCopyInto(&glance.Spec.GlanceSpecCore) - glance.Spec.ContainerImage = *version.Status.ContainerImages.GlanceApiImage + glance.Spec.ContainerImage = *version.Status.ContainerImages.GlanceAPIImage if glance.Spec.Secret == "" { glance.Spec.Secret = instance.Spec.Secret } @@ -189,7 +189,7 @@ func ReconcileGlance(ctx context.Context, instance *corev1beta1.OpenStackControl condition.SeverityInfo, corev1beta1.OpenStackControlPlaneGlanceReadyRunningMessage)) } - instance.Status.ContainerImages.GlanceApiImage = version.Status.ContainerImages.GlanceApiImage + instance.Status.ContainerImages.GlanceAPIImage = version.Status.ContainerImages.GlanceAPIImage return ctrl.Result{}, nil } diff --git a/pkg/openstack/heat.go b/pkg/openstack/heat.go index 024b3f8c0..849515f8e 100644 --- a/pkg/openstack/heat.go +++ b/pkg/openstack/heat.go @@ -154,7 +154,7 @@ func ReconcileHeat(ctx context.Context, instance *corev1beta1.OpenStackControlPl instance.Spec.Heat.Template.HeatCfnAPI.DeepCopyInto(&heat.Spec.HeatCfnAPI.HeatCfnAPITemplateCore) instance.Spec.Heat.Template.HeatEngine.DeepCopyInto(&heat.Spec.HeatEngine.HeatEngineTemplateCore) - heat.Spec.HeatAPI.ContainerImage = *version.Status.ContainerImages.HeatApiImage + heat.Spec.HeatAPI.ContainerImage = *version.Status.ContainerImages.HeatAPIImage heat.Spec.HeatCfnAPI.ContainerImage = *version.Status.ContainerImages.HeatCfnapiImage heat.Spec.HeatEngine.ContainerImage = *version.Status.ContainerImages.HeatEngineImage @@ -187,7 +187,7 @@ func ReconcileHeat(ctx context.Context, instance *corev1beta1.OpenStackControlPl condition.SeverityInfo, corev1beta1.OpenStackControlPlaneHeatReadyRunningMessage)) } - instance.Status.ContainerImages.HeatApiImage = version.Status.ContainerImages.HeatApiImage + instance.Status.ContainerImages.HeatAPIImage = version.Status.ContainerImages.HeatAPIImage instance.Status.ContainerImages.HeatCfnapiImage = version.Status.ContainerImages.HeatCfnapiImage instance.Status.ContainerImages.HeatEngineImage = version.Status.ContainerImages.HeatEngineImage diff --git a/pkg/openstack/ironic.go b/pkg/openstack/ironic.go index afcf4913e..0c084f67d 100644 --- a/pkg/openstack/ironic.go +++ b/pkg/openstack/ironic.go @@ -149,7 +149,7 @@ func ReconcileIronic(ctx context.Context, instance *corev1beta1.OpenStackControl op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), ironic, func() error { instance.Spec.Ironic.Template.DeepCopyInto(&ironic.Spec.IronicSpecCore) - ironic.Spec.Images.API = *version.Status.ContainerImages.IronicApiImage + ironic.Spec.Images.API = *version.Status.ContainerImages.IronicAPIImage ironic.Spec.Images.Conductor = *version.Status.ContainerImages.IronicConductorImage ironic.Spec.Images.Inspector = *version.Status.ContainerImages.IronicInspectorImage ironic.Spec.Images.NeutronAgent = *version.Status.ContainerImages.IronicNeutronAgentImage @@ -185,7 +185,7 @@ func ReconcileIronic(ctx context.Context, instance *corev1beta1.OpenStackControl condition.SeverityInfo, corev1beta1.OpenStackControlPlaneIronicReadyRunningMessage)) } - instance.Status.ContainerImages.IronicApiImage = version.Status.ContainerImages.IronicApiImage + instance.Status.ContainerImages.IronicAPIImage = version.Status.ContainerImages.IronicAPIImage instance.Status.ContainerImages.IronicConductorImage = version.Status.ContainerImages.IronicConductorImage instance.Status.ContainerImages.IronicInspectorImage = version.Status.ContainerImages.IronicInspectorImage instance.Status.ContainerImages.IronicNeutronAgentImage = version.Status.ContainerImages.IronicNeutronAgentImage diff --git a/pkg/openstack/keystone.go b/pkg/openstack/keystone.go index 8ed6179a3..e684805e8 100644 --- a/pkg/openstack/keystone.go +++ b/pkg/openstack/keystone.go @@ -102,7 +102,7 @@ func ReconcileKeystoneAPI(ctx context.Context, instance *corev1beta1.OpenStackCo op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), keystoneAPI, func() error { instance.Spec.Keystone.Template.DeepCopyInto(&keystoneAPI.Spec.KeystoneAPISpecCore) - keystoneAPI.Spec.ContainerImage = *version.Status.ContainerImages.KeystoneApiImage + keystoneAPI.Spec.ContainerImage = *version.Status.ContainerImages.KeystoneAPIImage if keystoneAPI.Spec.Secret == "" { keystoneAPI.Spec.Secret = instance.Spec.Secret } @@ -134,7 +134,7 @@ func ReconcileKeystoneAPI(ctx context.Context, instance *corev1beta1.OpenStackCo Log.Info(fmt.Sprintf("KeystoneAPI %s - %s", keystoneAPI.Name, op)) } - if keystoneAPI.IsReady() { + if keystoneAPI.Status.ObservedGeneration == keystoneAPI.Generation && keystoneAPI.IsReady() { instance.Status.Conditions.MarkTrue(corev1beta1.OpenStackControlPlaneKeystoneAPIReadyCondition, corev1beta1.OpenStackControlPlaneKeystoneAPIReadyMessage) } else { instance.Status.Conditions.Set(condition.FalseCondition( @@ -143,7 +143,7 @@ func ReconcileKeystoneAPI(ctx context.Context, instance *corev1beta1.OpenStackCo condition.SeverityInfo, corev1beta1.OpenStackControlPlaneKeystoneAPIReadyRunningMessage)) } - instance.Status.ContainerImages.KeystoneApiImage = version.Status.ContainerImages.KeystoneApiImage + instance.Status.ContainerImages.KeystoneAPIImage = version.Status.ContainerImages.KeystoneAPIImage return ctrl.Result{}, nil } diff --git a/pkg/openstack/manila.go b/pkg/openstack/manila.go index dac0d455f..bde19e067 100644 --- a/pkg/openstack/manila.go +++ b/pkg/openstack/manila.go @@ -105,7 +105,7 @@ func ReconcileManila(ctx context.Context, instance *corev1beta1.OpenStackControl instance.Spec.Manila.Template.ManilaAPI.DeepCopyInto(&manila.Spec.ManilaAPI.ManilaAPITemplateCore) instance.Spec.Manila.Template.ManilaScheduler.DeepCopyInto(&manila.Spec.ManilaScheduler.ManilaSchedulerTemplateCore) - manila.Spec.ManilaAPI.ContainerImage = *version.Status.ContainerImages.ManilaApiImage + manila.Spec.ManilaAPI.ContainerImage = *version.Status.ContainerImages.ManilaAPIImage manila.Spec.ManilaScheduler.ContainerImage = *version.Status.ContainerImages.ManilaSchedulerImage defaultShareImg := version.Status.ContainerImages.ManilaShareImages["default"] @@ -171,7 +171,7 @@ func ReconcileManila(ctx context.Context, instance *corev1beta1.OpenStackControl condition.SeverityInfo, corev1beta1.OpenStackControlPlaneManilaReadyRunningMessage)) } - instance.Status.ContainerImages.ManilaApiImage = version.Status.ContainerImages.ManilaApiImage + instance.Status.ContainerImages.ManilaAPIImage = version.Status.ContainerImages.ManilaAPIImage instance.Status.ContainerImages.ManilaSchedulerImage = version.Status.ContainerImages.ManilaSchedulerImage instance.Status.ContainerImages.ManilaShareImages = version.Status.ContainerImages.ManilaShareImages diff --git a/pkg/openstack/neutron.go b/pkg/openstack/neutron.go index aebbf9270..0ee06f0eb 100644 --- a/pkg/openstack/neutron.go +++ b/pkg/openstack/neutron.go @@ -133,7 +133,7 @@ func ReconcileNeutron(ctx context.Context, instance *corev1beta1.OpenStackContro Log.Info("Reconciling NeutronAPI", "NeutronAPI.Namespace", instance.Namespace, "NeutronAPI.Name", "neutron") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), neutronAPI, func() error { instance.Spec.Neutron.Template.DeepCopyInto(&neutronAPI.Spec.NeutronAPISpecCore) - neutronAPI.Spec.ContainerImage = *version.Status.ContainerImages.NeutronApiImage + neutronAPI.Spec.ContainerImage = *version.Status.ContainerImages.NeutronAPIImage if neutronAPI.Spec.Secret == "" { neutronAPI.Spec.Secret = instance.Spec.Secret } @@ -182,7 +182,7 @@ func ReconcileNeutron(ctx context.Context, instance *corev1beta1.OpenStackContro corev1beta1.OpenStackControlPlaneNeutronReadyRunningMessage)) } - instance.Status.ContainerImages.NeutronApiImage = version.Status.ContainerImages.NeutronApiImage + instance.Status.ContainerImages.NeutronAPIImage = version.Status.ContainerImages.NeutronAPIImage return ctrl.Result{}, nil diff --git a/pkg/openstack/nova.go b/pkg/openstack/nova.go index 885115555..5a7c4f5e6 100644 --- a/pkg/openstack/nova.go +++ b/pkg/openstack/nova.go @@ -282,10 +282,10 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl // RabbitMQCluster per nova cell. instance.Spec.Nova.Template.DeepCopyInto(&nova.Spec) - nova.Spec.NovaImages.APIContainerImageURL = *version.Status.ContainerImages.NovaApiImage + nova.Spec.NovaImages.APIContainerImageURL = *version.Status.ContainerImages.NovaAPIImage nova.Spec.NovaImages.NovaComputeContainerImageURL = *version.Status.ContainerImages.NovaComputeImage nova.Spec.NovaImages.ConductorContainerImageURL = *version.Status.ContainerImages.NovaConductorImage - nova.Spec.NovaImages.MetadataContainerImageURL = *version.Status.ContainerImages.NovaApiImage //metadata uses novaAPI image + nova.Spec.NovaImages.MetadataContainerImageURL = *version.Status.ContainerImages.NovaAPIImage //metadata uses novaAPI image nova.Spec.NovaImages.SchedulerContainerImageURL = *version.Status.ContainerImages.NovaSchedulerImage nova.Spec.NovaImages.NoVNCContainerImageURL = *version.Status.ContainerImages.NovaNovncImage @@ -318,7 +318,7 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl condition.SeverityInfo, corev1beta1.OpenStackControlPlaneNovaReadyRunningMessage)) } - instance.Status.ContainerImages.NovaApiImage = version.Status.ContainerImages.NovaApiImage + instance.Status.ContainerImages.NovaAPIImage = version.Status.ContainerImages.NovaAPIImage instance.Status.ContainerImages.NovaComputeImage = version.Status.ContainerImages.NovaComputeImage instance.Status.ContainerImages.NovaConductorImage = version.Status.ContainerImages.NovaConductorImage instance.Status.ContainerImages.NovaNovncImage = version.Status.ContainerImages.NovaNovncImage diff --git a/pkg/openstack/octavia.go b/pkg/openstack/octavia.go index 117b4c5de..c23aa3556 100644 --- a/pkg/openstack/octavia.go +++ b/pkg/openstack/octavia.go @@ -122,7 +122,7 @@ func ReconcileOctavia(ctx context.Context, instance *corev1beta1.OpenStackContro instance.Spec.Octavia.Template.OctaviaHealthManager.DeepCopyInto(&octavia.Spec.OctaviaHealthManager.OctaviaAmphoraControllerSpecCore) instance.Spec.Octavia.Template.OctaviaWorker.DeepCopyInto(&octavia.Spec.OctaviaWorker.OctaviaAmphoraControllerSpecCore) - octavia.Spec.OctaviaAPI.ContainerImage = *version.Status.ContainerImages.OctaviaApiImage + octavia.Spec.OctaviaAPI.ContainerImage = *version.Status.ContainerImages.OctaviaAPIImage octavia.Spec.OctaviaWorker.ContainerImage = *version.Status.ContainerImages.OctaviaWorkerImage octavia.Spec.OctaviaHealthManager.ContainerImage = *version.Status.ContainerImages.OctaviaHealthmanagerImage octavia.Spec.OctaviaHousekeeping.ContainerImage = *version.Status.ContainerImages.OctaviaHousekeepingImage @@ -156,7 +156,7 @@ func ReconcileOctavia(ctx context.Context, instance *corev1beta1.OpenStackContro condition.SeverityInfo, corev1beta1.OpenStackControlPlaneOctaviaReadyRunningMessage)) } - instance.Status.ContainerImages.OctaviaApiImage = version.Status.ContainerImages.OctaviaApiImage + instance.Status.ContainerImages.OctaviaAPIImage = version.Status.ContainerImages.OctaviaAPIImage instance.Status.ContainerImages.OctaviaWorkerImage = version.Status.ContainerImages.OctaviaWorkerImage instance.Status.ContainerImages.OctaviaHealthmanagerImage = version.Status.ContainerImages.OctaviaHealthmanagerImage instance.Status.ContainerImages.OctaviaHousekeepingImage = version.Status.ContainerImages.OctaviaHousekeepingImage diff --git a/pkg/openstack/ovn.go b/pkg/openstack/ovn.go index 943d83d52..5ed7c918f 100644 --- a/pkg/openstack/ovn.go +++ b/pkg/openstack/ovn.go @@ -164,11 +164,15 @@ func ReconcileOVNDbClusters(ctx context.Context, instance *corev1beta1.OpenStack if op != controllerutil.OperationResultNone { Log.Info(fmt.Sprintf("OVNDBCluster %s - %s", OVNDBCluster.Name, op)) } - OVNDBClustersReady = OVNDBClustersReady && OVNDBCluster.IsReady() + + OVNDBClustersReady = OVNDBClustersReady && (OVNDBCluster.Status.ObservedGeneration == OVNDBCluster.Generation) && OVNDBCluster.IsReady() + } instance.Status.ContainerImages.OvnNbDbclusterImage = version.Status.ContainerImages.OvnNbDbclusterImage instance.Status.ContainerImages.OvnSbDbclusterImage = version.Status.ContainerImages.OvnSbDbclusterImage + return OVNDBClustersReady, nil + } func ReconcileOVNNorthd(ctx context.Context, instance *corev1beta1.OpenStackControlPlane, version *corev1beta1.OpenStackVersion, helper *helper.Helper) (bool, error) { @@ -264,7 +268,13 @@ func ReconcileOVNNorthd(ctx context.Context, instance *corev1beta1.OpenStackCont Log.Info(fmt.Sprintf("OVNNorthd %s - %s", OVNNorthd.Name, op)) } instance.Status.ContainerImages.OvnNorthdImage = version.Status.ContainerImages.OvnNorthdImage - return OVNNorthd.IsReady(), nil + + if OVNNorthd.Status.ObservedGeneration != OVNNorthd.Generation { + return false, nil + } else { + return OVNNorthd.IsReady(), nil + } + } func ReconcileOVNController(ctx context.Context, instance *corev1beta1.OpenStackControlPlane, version *corev1beta1.OpenStackVersion, helper *helper.Helper) (bool, error) { diff --git a/pkg/openstack/placement.go b/pkg/openstack/placement.go index d9276e5cb..0376ff45a 100644 --- a/pkg/openstack/placement.go +++ b/pkg/openstack/placement.go @@ -100,7 +100,7 @@ func ReconcilePlacementAPI(ctx context.Context, instance *corev1beta1.OpenStackC op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), placementAPI, func() error { instance.Spec.Placement.Template.DeepCopyInto(&placementAPI.Spec.PlacementAPISpecCore) - placementAPI.Spec.ContainerImage = *version.Status.ContainerImages.PlacementApiImage + placementAPI.Spec.ContainerImage = *version.Status.ContainerImages.PlacementAPIImage if placementAPI.Spec.Secret == "" { placementAPI.Spec.Secret = instance.Spec.Secret } @@ -139,7 +139,7 @@ func ReconcilePlacementAPI(ctx context.Context, instance *corev1beta1.OpenStackC condition.SeverityInfo, corev1beta1.OpenStackControlPlanePlacementAPIReadyRunningMessage)) } - instance.Status.ContainerImages.PlacementApiImage = version.Status.ContainerImages.PlacementApiImage + instance.Status.ContainerImages.PlacementAPIImage = version.Status.ContainerImages.PlacementAPIImage return ctrl.Result{}, nil diff --git a/pkg/openstack/telemetry.go b/pkg/openstack/telemetry.go index 4dbfda2bc..a7bffb66d 100644 --- a/pkg/openstack/telemetry.go +++ b/pkg/openstack/telemetry.go @@ -111,7 +111,7 @@ func ReconcileTelemetry(ctx context.Context, instance *corev1beta1.OpenStackCont telemetry.Spec.Ceilometer.IpmiImage = *version.Status.ContainerImages.CeilometerIpmiImage telemetry.Spec.Ceilometer.NotificationImage = *version.Status.ContainerImages.CeilometerNotificationImage telemetry.Spec.Ceilometer.SgCoreImage = *version.Status.ContainerImages.CeilometerSgcoreImage - telemetry.Spec.Autoscaling.AutoscalingSpec.Aodh.APIImage = *version.Status.ContainerImages.AodhApiImage + telemetry.Spec.Autoscaling.AutoscalingSpec.Aodh.APIImage = *version.Status.ContainerImages.AodhAPIImage telemetry.Spec.Autoscaling.AutoscalingSpec.Aodh.EvaluatorImage = *version.Status.ContainerImages.AodhEvaluatorImage telemetry.Spec.Autoscaling.AutoscalingSpec.Aodh.NotifierImage = *version.Status.ContainerImages.AodhNotifierImage telemetry.Spec.Autoscaling.AutoscalingSpec.Aodh.ListenerImage = *version.Status.ContainerImages.AodhListenerImage @@ -165,7 +165,7 @@ func ReconcileTelemetry(ctx context.Context, instance *corev1beta1.OpenStackCont instance.Status.ContainerImages.CeilometerIpmiImage = version.Status.ContainerImages.CeilometerIpmiImage instance.Status.ContainerImages.CeilometerNotificationImage = version.Status.ContainerImages.CeilometerNotificationImage instance.Status.ContainerImages.CeilometerSgcoreImage = version.Status.ContainerImages.CeilometerSgcoreImage - instance.Status.ContainerImages.AodhApiImage = version.Status.ContainerImages.AodhApiImage + instance.Status.ContainerImages.AodhAPIImage = version.Status.ContainerImages.AodhAPIImage instance.Status.ContainerImages.AodhEvaluatorImage = version.Status.ContainerImages.AodhEvaluatorImage instance.Status.ContainerImages.AodhNotifierImage = version.Status.ContainerImages.AodhNotifierImage instance.Status.ContainerImages.AodhListenerImage = version.Status.ContainerImages.AodhListenerImage diff --git a/pkg/openstack/version.go b/pkg/openstack/version.go index 1259608a0..d6f3521ea 100644 --- a/pkg/openstack/version.go +++ b/pkg/openstack/version.go @@ -37,6 +37,7 @@ func InitializeOpenStackVersionImageDefaults(ctx context.Context, envImages map[ fieldName += strings.ToUpper(matches[i])[0:1] fieldName += strings.ToLower(matches[i])[1:] } + fieldName = strings.Replace(fieldName, "Api", "API", -1) } Log.Info(fmt.Sprintf("Initialize Field name: %s", fieldName)) field := d.FieldByName(fieldName) @@ -67,7 +68,7 @@ func getImg(val1 *string, val2 *string) *string { } -// ProcessContainerImages - initializes OpenStackVersion CR with default container images +// GetContainerImages - initializes OpenStackVersion CR with default container images func GetContainerImages(ctx context.Context, defaults *corev1beta1.ContainerDefaults, instance corev1beta1.OpenStackVersion) corev1beta1.ContainerImages { containerImages := corev1beta1.ContainerImages{ @@ -76,12 +77,12 @@ func GetContainerImages(ctx context.Context, defaults *corev1beta1.ContainerDefa ContainerTemplate: corev1beta1.ContainerTemplate{ AgentImage: getImg(instance.Spec.CustomContainerImages.AgentImage, defaults.AgentImage), AnsibleeeImage: getImg(instance.Spec.CustomContainerImages.AnsibleeeImage, defaults.AnsibleeeImage), - AodhApiImage: getImg(instance.Spec.CustomContainerImages.AodhApiImage, defaults.AodhApiImage), + AodhAPIImage: getImg(instance.Spec.CustomContainerImages.AodhAPIImage, defaults.AodhAPIImage), AodhEvaluatorImage: getImg(instance.Spec.CustomContainerImages.AodhEvaluatorImage, defaults.AodhEvaluatorImage), AodhListenerImage: getImg(instance.Spec.CustomContainerImages.AodhListenerImage, defaults.AodhListenerImage), AodhNotifierImage: getImg(instance.Spec.CustomContainerImages.AodhNotifierImage, defaults.AodhNotifierImage), ApacheImage: getImg(instance.Spec.CustomContainerImages.ApacheImage, defaults.ApacheImage), - BarbicanApiImage: getImg(instance.Spec.CustomContainerImages.BarbicanApiImage, defaults.BarbicanApiImage), + BarbicanAPIImage: getImg(instance.Spec.CustomContainerImages.BarbicanAPIImage, defaults.BarbicanAPIImage), BarbicanKeystoneListenerImage: getImg(instance.Spec.CustomContainerImages.BarbicanKeystoneListenerImage, defaults.BarbicanKeystoneListenerImage), BarbicanWorkerImage: getImg(instance.Spec.CustomContainerImages.BarbicanWorkerImage, defaults.BarbicanWorkerImage), CeilometerCentralImage: getImg(instance.Spec.CustomContainerImages.CeilometerCentralImage, defaults.CeilometerCentralImage), @@ -89,41 +90,41 @@ func GetContainerImages(ctx context.Context, defaults *corev1beta1.ContainerDefa CeilometerIpmiImage: getImg(instance.Spec.CustomContainerImages.CeilometerIpmiImage, defaults.CeilometerIpmiImage), CeilometerNotificationImage: getImg(instance.Spec.CustomContainerImages.CeilometerNotificationImage, defaults.CeilometerNotificationImage), CeilometerSgcoreImage: getImg(instance.Spec.CustomContainerImages.CeilometerSgcoreImage, defaults.CeilometerSgcoreImage), - CinderApiImage: getImg(instance.Spec.CustomContainerImages.CinderApiImage, defaults.CinderApiImage), + CinderAPIImage: getImg(instance.Spec.CustomContainerImages.CinderAPIImage, defaults.CinderAPIImage), CinderBackupImage: getImg(instance.Spec.CustomContainerImages.CinderBackupImage, defaults.CinderBackupImage), CinderSchedulerImage: getImg(instance.Spec.CustomContainerImages.CinderSchedulerImage, defaults.CinderSchedulerImage), - DesignateApiImage: getImg(instance.Spec.CustomContainerImages.DesignateApiImage, defaults.DesignateApiImage), + DesignateAPIImage: getImg(instance.Spec.CustomContainerImages.DesignateAPIImage, defaults.DesignateAPIImage), DesignateBackendbind9Image: getImg(instance.Spec.CustomContainerImages.DesignateBackendbind9Image, defaults.DesignateBackendbind9Image), DesignateCentralImage: getImg(instance.Spec.CustomContainerImages.DesignateCentralImage, defaults.DesignateCentralImage), DesignateMdnsImage: getImg(instance.Spec.CustomContainerImages.DesignateMdnsImage, defaults.DesignateMdnsImage), DesignateProducerImage: getImg(instance.Spec.CustomContainerImages.DesignateProducerImage, defaults.DesignateProducerImage), DesignateUnboundImage: getImg(instance.Spec.CustomContainerImages.DesignateUnboundImage, defaults.DesignateUnboundImage), DesignateWorkerImage: getImg(instance.Spec.CustomContainerImages.DesignateWorkerImage, defaults.DesignateWorkerImage), - GlanceApiImage: getImg(instance.Spec.CustomContainerImages.GlanceApiImage, defaults.GlanceApiImage), - HeatApiImage: getImg(instance.Spec.CustomContainerImages.HeatApiImage, defaults.HeatApiImage), + GlanceAPIImage: getImg(instance.Spec.CustomContainerImages.GlanceAPIImage, defaults.GlanceAPIImage), + HeatAPIImage: getImg(instance.Spec.CustomContainerImages.HeatAPIImage, defaults.HeatAPIImage), HeatCfnapiImage: getImg(instance.Spec.CustomContainerImages.HeatCfnapiImage, defaults.HeatCfnapiImage), HeatEngineImage: getImg(instance.Spec.CustomContainerImages.HeatEngineImage, defaults.HeatEngineImage), HorizonImage: getImg(instance.Spec.CustomContainerImages.HorizonImage, defaults.HorizonImage), InfraDnsmasqImage: getImg(instance.Spec.CustomContainerImages.InfraDnsmasqImage, defaults.InfraDnsmasqImage), InfraMemcachedImage: getImg(instance.Spec.CustomContainerImages.InfraMemcachedImage, defaults.InfraMemcachedImage), InfraRedisImage: getImg(instance.Spec.CustomContainerImages.InfraRedisImage, defaults.InfraRedisImage), - IronicApiImage: getImg(instance.Spec.CustomContainerImages.IronicApiImage, defaults.IronicApiImage), + IronicAPIImage: getImg(instance.Spec.CustomContainerImages.IronicAPIImage, defaults.IronicAPIImage), IronicConductorImage: getImg(instance.Spec.CustomContainerImages.IronicConductorImage, defaults.IronicConductorImage), IronicInspectorImage: getImg(instance.Spec.CustomContainerImages.IronicInspectorImage, defaults.IronicInspectorImage), IronicNeutronAgentImage: getImg(instance.Spec.CustomContainerImages.IronicNeutronAgentImage, defaults.IronicNeutronAgentImage), IronicPxeImage: getImg(instance.Spec.CustomContainerImages.IronicPxeImage, defaults.IronicPxeImage), IronicPythonAgentImage: getImg(instance.Spec.CustomContainerImages.IronicPythonAgentImage, defaults.IronicPythonAgentImage), - KeystoneApiImage: getImg(instance.Spec.CustomContainerImages.KeystoneApiImage, defaults.KeystoneApiImage), - ManilaApiImage: getImg(instance.Spec.CustomContainerImages.ManilaApiImage, defaults.ManilaApiImage), + KeystoneAPIImage: getImg(instance.Spec.CustomContainerImages.KeystoneAPIImage, defaults.KeystoneAPIImage), + ManilaAPIImage: getImg(instance.Spec.CustomContainerImages.ManilaAPIImage, defaults.ManilaAPIImage), ManilaSchedulerImage: getImg(instance.Spec.CustomContainerImages.ManilaSchedulerImage, defaults.ManilaSchedulerImage), MariadbImage: getImg(instance.Spec.CustomContainerImages.MariadbImage, defaults.MariadbImage), - NeutronApiImage: getImg(instance.Spec.CustomContainerImages.NeutronApiImage, defaults.NeutronApiImage), - NovaApiImage: getImg(instance.Spec.CustomContainerImages.NovaApiImage, defaults.NovaApiImage), + NeutronAPIImage: getImg(instance.Spec.CustomContainerImages.NeutronAPIImage, defaults.NeutronAPIImage), + NovaAPIImage: getImg(instance.Spec.CustomContainerImages.NovaAPIImage, defaults.NovaAPIImage), NovaComputeImage: getImg(instance.Spec.CustomContainerImages.NovaComputeImage, defaults.NovaComputeImage), NovaConductorImage: getImg(instance.Spec.CustomContainerImages.NovaConductorImage, defaults.NovaConductorImage), NovaNovncImage: getImg(instance.Spec.CustomContainerImages.NovaNovncImage, defaults.NovaNovncImage), NovaSchedulerImage: getImg(instance.Spec.CustomContainerImages.NovaSchedulerImage, defaults.NovaSchedulerImage), - OctaviaApiImage: getImg(instance.Spec.CustomContainerImages.OctaviaApiImage, defaults.OctaviaApiImage), + OctaviaAPIImage: getImg(instance.Spec.CustomContainerImages.OctaviaAPIImage, defaults.OctaviaAPIImage), OctaviaHealthmanagerImage: getImg(instance.Spec.CustomContainerImages.OctaviaHealthmanagerImage, defaults.OctaviaHealthmanagerImage), OctaviaHousekeepingImage: getImg(instance.Spec.CustomContainerImages.OctaviaHousekeepingImage, defaults.OctaviaHousekeepingImage), OctaviaWorkerImage: getImg(instance.Spec.CustomContainerImages.OctaviaWorkerImage, defaults.OctaviaWorkerImage), @@ -134,7 +135,7 @@ func GetContainerImages(ctx context.Context, defaults *corev1beta1.ContainerDefa OvnNbDbclusterImage: getImg(instance.Spec.CustomContainerImages.OvnNbDbclusterImage, defaults.OvnNbDbclusterImage), OvnNorthdImage: getImg(instance.Spec.CustomContainerImages.OvnNorthdImage, defaults.OvnNorthdImage), OvnSbDbclusterImage: getImg(instance.Spec.CustomContainerImages.OvnSbDbclusterImage, defaults.OvnSbDbclusterImage), - PlacementApiImage: getImg(instance.Spec.CustomContainerImages.PlacementApiImage, defaults.PlacementApiImage), + PlacementAPIImage: getImg(instance.Spec.CustomContainerImages.PlacementAPIImage, defaults.PlacementAPIImage), RabbitmqImage: getImg(instance.Spec.CustomContainerImages.RabbitmqImage, defaults.RabbitmqImage), SwiftAccountImage: getImg(instance.Spec.CustomContainerImages.SwiftAccountImage, defaults.SwiftAccountImage), SwiftContainerImage: getImg(instance.Spec.CustomContainerImages.SwiftContainerImage, defaults.SwiftContainerImage), @@ -153,7 +154,7 @@ func GetContainerImages(ctx context.Context, defaults *corev1beta1.ContainerDefa } // ReconcileVersion - reconciles OpenStackVersion CR -func ReconcileVersion(ctx context.Context, instance *corev1beta1.OpenStackControlPlane, helper *helper.Helper) (ctrl.Result, error, *corev1beta1.OpenStackVersion) { +func ReconcileVersion(ctx context.Context, instance *corev1beta1.OpenStackControlPlane, helper *helper.Helper) (ctrl.Result, *corev1beta1.OpenStackVersion, error) { version := &corev1beta1.OpenStackVersion{ ObjectMeta: metav1.ObjectMeta{ Name: instance.Name, @@ -183,11 +184,11 @@ func ReconcileVersion(ctx context.Context, instance *corev1beta1.OpenStackContro }) if err != nil { - return ctrl.Result{}, err, nil + return ctrl.Result{}, nil, err } if op != controllerutil.OperationResultNone { Log.Info(fmt.Sprintf("OpenStackVersion %s - %s", version.Name, op)) } - return ctrl.Result{}, nil, version + return ctrl.Result{}, version, nil }