diff --git a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml index 02118f3bc..84d729abf 100644 --- a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -156,8 +156,6 @@ spec: properties: barbicanAPI: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -285,13 +283,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object barbicanKeystoneListener: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -347,13 +341,9 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object barbicanWorker: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -409,8 +399,6 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object customServiceConfig: type: string @@ -580,8 +568,6 @@ spec: properties: cinderAPI: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -701,13 +687,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object cinderBackup: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -758,13 +740,9 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object cinderScheduler: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -815,14 +793,10 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object cinderVolumes: additionalProperties: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -874,8 +848,6 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object type: object customServiceConfig: @@ -1831,8 +1803,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -1961,8 +1931,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateBackendbind9: properties: @@ -1972,8 +1940,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2051,8 +2017,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateCentral: properties: @@ -2062,8 +2026,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2141,8 +2103,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateMdns: properties: @@ -2152,8 +2112,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2231,8 +2189,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateProducer: properties: @@ -2242,8 +2198,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2321,13 +2275,9 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateUnbound: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2385,8 +2335,6 @@ spec: type: object serviceAccount: type: string - required: - - containerImage type: object designateWorker: properties: @@ -2396,8 +2344,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2475,8 +2421,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object nodeSelector: additionalProperties: @@ -3411,8 +3355,6 @@ spec: host: type: string type: object - containerImage: - type: string customServiceConfig: type: string disableNonTLSListeners: @@ -3443,7 +3385,6 @@ spec: type: string type: object required: - - containerImage - replicas - secret - storageClass @@ -3566,8 +3507,6 @@ spec: type: boolean template: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -4567,7 +4506,6 @@ spec: storageRequest: type: string required: - - containerImage - databaseInstance - glanceAPIs - imageCache @@ -4809,8 +4747,6 @@ spec: type: object heatAPI: properties: - containerImage: - type: string customServiceConfig: type: string defaultConfigOverwrite: @@ -4927,13 +4863,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object heatCfnAPI: properties: - containerImage: - type: string customServiceConfig: type: string defaultConfigOverwrite: @@ -5050,13 +4982,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object heatEngine: properties: - containerImage: - type: string customServiceConfig: type: string defaultConfigOverwrite: @@ -5104,8 +5032,6 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object memcachedInstance: default: memcached @@ -5260,8 +5186,6 @@ spec: type: boolean template: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -5375,7 +5299,6 @@ spec: type: string type: object required: - - containerImage - memcachedInstance - secret type: object @@ -5611,21 +5534,6 @@ spec: additionalProperties: type: string type: object - images: - properties: - api: - type: string - conductor: - type: string - inspector: - type: string - ironicPythonAgent: - type: string - neutronAgent: - type: string - pxe: - type: string - type: object ironicAPI: properties: customServiceConfig: @@ -6228,8 +6136,6 @@ spec: adminUser: default: admin type: string - containerImage: - type: string customServiceConfig: type: string databaseAccount: @@ -6390,7 +6296,6 @@ spec: default: false type: boolean required: - - containerImage - databaseInstance - memcachedInstance - rabbitMqClusterName @@ -7291,8 +7196,6 @@ spec: type: array manilaAPI: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -7414,13 +7317,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object manilaScheduler: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -7473,14 +7372,10 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object manilaShares: additionalProperties: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -7533,8 +7428,6 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object type: object memcachedInstance: @@ -7578,8 +7471,6 @@ spec: templates: additionalProperties: properties: - containerImage: - type: string replicas: default: 1 format: int32 @@ -7591,8 +7482,6 @@ spec: secretName: type: string type: object - required: - - containerImage type: object type: object type: object @@ -7709,8 +7598,6 @@ spec: type: boolean template: properties: - containerImage: - type: string customServiceConfig: type: string databaseInstance: @@ -8624,7 +8511,6 @@ spec: type: object type: object required: - - containerImage - databaseInstance - memcachedInstance - rabbitMqClusterName @@ -9751,8 +9637,6 @@ spec: type: object octaviaAPI: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -9890,7 +9774,6 @@ spec: transportURLSecret: type: string required: - - containerImage - databaseInstance - secret - serviceAccount @@ -9919,8 +9802,6 @@ spec: - name type: object type: array - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -10048,8 +9929,6 @@ spec: - name type: object type: array - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -10177,8 +10056,6 @@ spec: - name type: object type: array - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -10389,10 +10266,6 @@ spec: additionalProperties: type: string type: object - ovnContainerImage: - type: string - ovsContainerImage: - type: string resources: properties: claims: @@ -10431,15 +10304,10 @@ spec: secretName: type: string type: object - required: - - ovnContainerImage - - ovsContainerImage type: object ovnDBCluster: additionalProperties: properties: - containerImage: - type: string dbType: default: NB pattern: ^NB|SB$ @@ -10514,15 +10382,12 @@ spec: type: string type: object required: - - containerImage - dbType - storageRequest type: object type: object ovnNorthd: properties: - containerImage: - type: string logLevel: default: info type: string @@ -10576,8 +10441,6 @@ spec: secretName: type: string type: object - required: - - containerImage type: object type: object type: object @@ -10694,8 +10557,6 @@ spec: type: boolean template: properties: - containerImage: - type: string customServiceConfig: type: string databaseAccount: @@ -10838,7 +10699,6 @@ spec: type: string type: object required: - - containerImage - databaseInstance - secret type: object @@ -11221,16 +11081,6 @@ spec: format: int32 minimum: 0 type: integer - image: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - type: array override: properties: service: @@ -14886,8 +14736,6 @@ spec: type: object type: object service: - default: - type: ClusterIP properties: annotations: additionalProperties: @@ -14950,8 +14798,6 @@ spec: templates: additionalProperties: properties: - containerImage: - type: string replicas: default: 1 format: int32 @@ -14963,8 +14809,6 @@ spec: secretName: type: string type: object - required: - - containerImage type: object type: object type: object @@ -15100,8 +14944,6 @@ spec: type: string swiftProxy: properties: - containerImageProxy: - type: string defaultConfigOverwrite: additionalProperties: type: string @@ -15208,7 +15050,6 @@ spec: type: string type: object required: - - containerImageProxy - memcachedServers - replicas - secret @@ -15217,8 +15058,6 @@ spec: type: object swiftRing: properties: - containerImage: - type: string minPartHours: default: 1 format: int64 @@ -15243,7 +15082,6 @@ spec: type: string type: object required: - - containerImage - minPartHours - partPower - ringReplicas @@ -15251,14 +15089,6 @@ spec: type: object swiftStorage: properties: - containerImageAccount: - type: string - containerImageContainer: - type: string - containerImageObject: - type: string - containerImageProxy: - type: string containerSharderEnabled: default: false type: boolean @@ -15288,10 +15118,6 @@ spec: default: swift-conf type: string required: - - containerImageAccount - - containerImageContainer - - containerImageObject - - containerImageProxy - memcachedServers - replicas - storageClass @@ -15424,8 +15250,6 @@ spec: properties: aodh: properties: - apiImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -15438,10 +15262,6 @@ spec: additionalProperties: type: string type: object - evaluatorImage: - type: string - listenerImage: - type: string memcachedInstance: default: memcached type: string @@ -15449,8 +15269,6 @@ spec: items: type: string type: array - notifierImage: - type: string override: properties: service: @@ -15547,12 +15365,8 @@ spec: type: string type: object required: - - apiImage - databaseInstance - - evaluatorImage - - listenerImage - memcachedInstance - - notifierImage - secret type: object enabled: @@ -15573,10 +15387,6 @@ spec: type: object ceilometer: properties: - centralImage: - type: string - computeImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -15587,14 +15397,10 @@ spec: enabled: default: true type: boolean - ipmiImage: - type: string networkAttachmentDefinitions: items: type: string type: array - notificationImage: - type: string passwordSelector: default: service: CeilometerPassword @@ -15617,15 +15423,8 @@ spec: serviceUser: default: ceilometer type: string - sgCoreImage: - type: string required: - - centralImage - - computeImage - - ipmiImage - - notificationImage - secret - - sgCoreImage type: object logging: properties: diff --git a/apis/core/v1beta1/openstackcontrolplane_types.go b/apis/core/v1beta1/openstackcontrolplane_types.go index 8f8d0128a..b0cb6f619 100644 --- a/apis/core/v1beta1/openstackcontrolplane_types.go +++ b/apis/core/v1beta1/openstackcontrolplane_types.go @@ -305,7 +305,7 @@ type KeystoneSection struct { // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating the Keystone service - Template keystonev1.KeystoneAPISpec `json:"template,omitempty"` + Template keystonev1.KeystoneAPISpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -345,7 +345,7 @@ type PlacementSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating the Placement API - Template placementv1.PlacementAPISpec `json:"template,omitempty"` + Template placementv1.PlacementAPISpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -364,7 +364,7 @@ type GlanceSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating the Glance Service - Template glancev1.GlanceSpec `json:"template,omitempty"` + Template glancev1.GlanceSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -383,7 +383,7 @@ type CinderSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating Cinder Resources - Template cinderv1.CinderSpec `json:"template,omitempty"` + Template cinderv1.CinderSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -402,7 +402,7 @@ type GaleraSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Templates - Overrides to use when creating the Galera databases - Templates map[string]mariadbv1.GaleraSpec `json:"templates,omitempty"` + Templates map[string]mariadbv1.GaleraSpecCore `json:"templates,omitempty"` } // RabbitmqSection defines the desired state of RabbitMQ service @@ -430,7 +430,7 @@ type MemcachedSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Templates - Overrides to use when creating the Memcached databases - Templates map[string]memcachedv1.MemcachedSpec `json:"templates,omitempty"` + Templates map[string]memcachedv1.MemcachedSpecCore `json:"templates,omitempty"` } // RabbitmqTemplate definition @@ -438,7 +438,7 @@ type RabbitmqTemplate struct { // +kubebuilder:validation:Required //+operator-sdk:csv:customresourcedefinitions:type=spec // Overrides to use when creating the Rabbitmq clusters - rabbitmqv2.RabbitmqClusterSpec `json:",inline"` + rabbitmqv2.RabbitmqClusterSpecCore `json:",inline"` } // OvnSection defines the desired state of OVN services @@ -460,17 +460,17 @@ type OvnResources struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // OVNDBCluster - Overrides to use when creating the OVNDBCluster services - OVNDBCluster map[string]ovnv1.OVNDBClusterSpec `json:"ovnDBCluster,omitempty"` + OVNDBCluster map[string]ovnv1.OVNDBClusterSpecCore `json:"ovnDBCluster,omitempty"` // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // OVNNorthd - Overrides to use when creating the OVNNorthd service - OVNNorthd ovnv1.OVNNorthdSpec `json:"ovnNorthd,omitempty"` + OVNNorthd ovnv1.OVNNorthdSpecCore `json:"ovnNorthd,omitempty"` // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // OVNController - Overrides to use when creating the OVNController service - OVNController ovnv1.OVNControllerSpec `json:"ovnController,omitempty"` + OVNController ovnv1.OVNControllerSpecCore `json:"ovnController,omitempty"` } // NeutronSection defines the desired state of Neutron service @@ -484,7 +484,7 @@ type NeutronSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating the Neutron Service - Template neutronv1.NeutronAPISpec `json:"template,omitempty"` + Template neutronv1.NeutronAPISpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -535,7 +535,7 @@ type HeatSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating the Heat services - Template heatv1.HeatSpec `json:"template,omitempty"` + Template heatv1.HeatSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -559,7 +559,7 @@ type IronicSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating the Ironic services - Template ironicv1.IronicSpec `json:"template,omitempty"` + Template ironicv1.IronicSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -582,7 +582,7 @@ type ManilaSection struct { // +kubebuilder:validation:Optional // Template - Overrides to use when creating Manila Resources - Template manilav1.ManilaSpec `json:"template,omitempty"` + Template manilav1.ManilaSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -599,7 +599,7 @@ type HorizonSection struct { // +kubebuilder:validation:Optional // Template - Overrides to use when creating the Horizon services - Template horizonv1.HorizonSpec `json:"template,omitempty"` + Template horizonv1.HorizonSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -618,7 +618,7 @@ type TelemetrySection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating the OpenStack Telemetry services - Template telemetryv1.TelemetrySpec `json:"template,omitempty"` + Template telemetryv1.TelemetrySpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -637,7 +637,7 @@ type SwiftSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating Swift Resources - Template swiftv1.SwiftSpec `json:"template,omitempty"` + Template swiftv1.SwiftSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -656,7 +656,7 @@ type OctaviaSection struct { // +kubebuilder:valdiation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating Octavia Resources - Template octaviav1.OctaviaSpec `json:"template,omitempty"` + Template octaviav1.OctaviaSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -675,7 +675,7 @@ type DesignateSection struct { // +kubebuilder:valdiation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating Designate Resources - Template designatev1.DesignateSpec `json:"template,omitempty"` + Template designatev1.DesignateSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -694,7 +694,7 @@ type BarbicanSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating the Barbican Service - Template barbicanv1.BarbicanSpec `json:"template,omitempty"` + Template barbicanv1.BarbicanSpecCore `json:"template,omitempty"` // +kubebuilder:validation:Optional // +operator-sdk:csv:customresourcedefinitions:type=spec @@ -713,7 +713,7 @@ type RedisSection struct { // +kubebuilder:validation:Optional //+operator-sdk:csv:customresourcedefinitions:type=spec // Templates - Overrides to use when creating the Redis Resources - Templates map[string]redisv1.RedisSpec `json:"templates,omitempty"` + Templates map[string]redisv1.RedisSpecCore `json:"templates,omitempty"` } // OpenStackClientSection defines the desired state of the OpenStackClient diff --git a/apis/core/v1beta1/openstackcontrolplane_webhook.go b/apis/core/v1beta1/openstackcontrolplane_webhook.go index 0c07a6163..7c2faca6a 100644 --- a/apis/core/v1beta1/openstackcontrolplane_webhook.go +++ b/apis/core/v1beta1/openstackcontrolplane_webhook.go @@ -320,18 +320,6 @@ func (r *OpenStackControlPlane) Default() { // DefaultServices - common function for calling individual services' defaulting functions func (r *OpenStackControlPlane) DefaultServices() { - // RabbitMQ - // This is a special case in that we don't own the RabbitMQ operator, - // so we aren't able to add and call a Default function on its spec. - // Instead we just directly set the defaults we need. - for key, template := range r.Spec.Rabbitmq.Templates { - if template.Image == "" { - template.Image = openstackControlPlaneDefaults.RabbitMqImageURL - // By-value copy, need to update - r.Spec.Rabbitmq.Templates[key] = template - } - } - // Cinder r.Spec.Cinder.Template.Default() @@ -405,7 +393,8 @@ func (r *OpenStackControlPlane) DefaultServices() { r.Spec.Telemetry.Template.Default() // Heat - r.Spec.Heat.Template.Default() + // FIXME: https://github.com/openstack-k8s-operators/heat-operator/pull/331 + //r.Spec.Heat.Template.Default() // Swift if r.Spec.Swift.Template.SwiftStorage.StorageClass == "" { diff --git a/apis/core/v1beta1/zz_generated.deepcopy.go b/apis/core/v1beta1/zz_generated.deepcopy.go index 4ee4900a3..01b0ab9ed 100644 --- a/apis/core/v1beta1/zz_generated.deepcopy.go +++ b/apis/core/v1beta1/zz_generated.deepcopy.go @@ -636,7 +636,7 @@ func (in *GaleraSection) DeepCopyInto(out *GaleraSection) { *out = *in if in.Templates != nil { in, out := &in.Templates, &out.Templates - *out = make(map[string]apiv1beta1.GaleraSpec, len(*in)) + *out = make(map[string]apiv1beta1.GaleraSpecCore, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } @@ -768,7 +768,7 @@ func (in *MemcachedSection) DeepCopyInto(out *MemcachedSection) { *out = *in if in.Templates != nil { in, out := &in.Templates, &out.Templates - *out = make(map[string]memcachedv1beta1.MemcachedSpec, len(*in)) + *out = make(map[string]memcachedv1beta1.MemcachedSpecCore, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } @@ -1225,7 +1225,7 @@ func (in *OvnResources) DeepCopyInto(out *OvnResources) { *out = *in if in.OVNDBCluster != nil { in, out := &in.OVNDBCluster, &out.OVNDBCluster - *out = make(map[string]ovn_operatorapiv1beta1.OVNDBClusterSpec, len(*in)) + *out = make(map[string]ovn_operatorapiv1beta1.OVNDBClusterSpecCore, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } @@ -1302,7 +1302,7 @@ func (in *RabbitmqSection) DeepCopy() *RabbitmqSection { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RabbitmqTemplate) DeepCopyInto(out *RabbitmqTemplate) { *out = *in - in.RabbitmqClusterSpec.DeepCopyInto(&out.RabbitmqClusterSpec) + in.RabbitmqClusterSpecCore.DeepCopyInto(&out.RabbitmqClusterSpecCore) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RabbitmqTemplate. @@ -1320,7 +1320,7 @@ func (in *RedisSection) DeepCopyInto(out *RedisSection) { *out = *in if in.Templates != nil { in, out := &in.Templates, &out.Templates - *out = make(map[string]redisv1beta1.RedisSpec, len(*in)) + *out = make(map[string]redisv1beta1.RedisSpecCore, len(*in)) for key, val := range *in { (*out)[key] = *val.DeepCopy() } diff --git a/apis/go.mod b/apis/go.mod index 047d6a23f..b6342b886 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -102,3 +102,6 @@ require ( // mschuppert: map to latest commit from release-4.13 tag // must consistent within modules and service operators replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 //allow-merging + +// 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 diff --git a/apis/go.sum b/apis/go.sum index 9993814a8..d59d74686 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -111,6 +111,8 @@ github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240318052728-f132 github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240318052728-f132fab5c943/go.mod h1:dcKA0ZNATdkWVmltQQX8jYpEzM89FRIvzlo9Byj8H04= github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240313145348-1dd69c7bc338 h1:4px3BVSfWmfvJf+Nurf0EJb4ViKHW4qM8ocDqH0u8C4= github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240313145348-1dd69c7bc338/go.mod h1:i7bl0Vg4iyaOR4GCfduMWq0V9k5h9ltKDnx0hZg1JDE= +github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f h1:wWaOCAkCym4t+NZWXYT/LErGhKujDdKgc7Qy/3vX4uU= +github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f/go.mod h1:Zryxg5YgbPUFcLSCcKpf10il8kIRAK5HloNo6khhdis= github.com/openstack-k8s-operators/swift-operator/api v0.3.1-0.20240315154317-8b38ff1e6a8d h1:O4nJMsX3pS3X3CUw7/wjgJXoTIPA68pJowA1CfQP6IM= github.com/openstack-k8s-operators/swift-operator/api v0.3.1-0.20240315154317-8b38ff1e6a8d/go.mod h1:/7+Ld3BHb9RDaHhXKEtCiWQmhVwpRLVeLutZxyHRPpM= github.com/openstack-k8s-operators/telemetry-operator/api v0.3.1-0.20240311060559-4ecd4f5c3961 h1:YYeHx9q2/ohmCwezfdw+qDJywpSZVgo9Ud24Oyie2J4= @@ -127,8 +129,6 @@ github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqSc github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rabbitmq/cluster-operator/v2 v2.6.0 h1:pr42elurQgi4DVmLTI1cOh8VZRNkfFKZK9+FgQuM/8w= -github.com/rabbitmq/cluster-operator/v2 v2.6.0/go.mod h1:Zryxg5YgbPUFcLSCcKpf10il8kIRAK5HloNo6khhdis= github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.64.1-rhobs3 h1:vy4ElN2RHyrIzzPn5b8vKuQLg4ZofuUAz65eLqLqloA= github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.64.1-rhobs3/go.mod h1:p+YsgXodntOtgwXKTpWrJzVS7QmMfZlGDG0v6Noze7s= github.com/rhobs/observability-operator v0.0.20 h1:u4Ejzq/Yt3rY4b/apKhpgYIvmp+MpcV9hhEzhzedpk4= diff --git a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml index 02118f3bc..84d729abf 100644 --- a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -156,8 +156,6 @@ spec: properties: barbicanAPI: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -285,13 +283,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object barbicanKeystoneListener: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -347,13 +341,9 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object barbicanWorker: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -409,8 +399,6 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object customServiceConfig: type: string @@ -580,8 +568,6 @@ spec: properties: cinderAPI: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -701,13 +687,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object cinderBackup: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -758,13 +740,9 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object cinderScheduler: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -815,14 +793,10 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object cinderVolumes: additionalProperties: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -874,8 +848,6 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object type: object customServiceConfig: @@ -1831,8 +1803,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -1961,8 +1931,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateBackendbind9: properties: @@ -1972,8 +1940,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2051,8 +2017,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateCentral: properties: @@ -2062,8 +2026,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2141,8 +2103,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateMdns: properties: @@ -2152,8 +2112,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2231,8 +2189,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateProducer: properties: @@ -2242,8 +2198,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2321,13 +2275,9 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object designateUnbound: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2385,8 +2335,6 @@ spec: type: object serviceAccount: type: string - required: - - containerImage type: object designateWorker: properties: @@ -2396,8 +2344,6 @@ spec: type: string backendWorkerServerProtocol: type: string - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -2475,8 +2421,6 @@ spec: type: string transportURLSecret: type: string - required: - - containerImage type: object nodeSelector: additionalProperties: @@ -3411,8 +3355,6 @@ spec: host: type: string type: object - containerImage: - type: string customServiceConfig: type: string disableNonTLSListeners: @@ -3443,7 +3385,6 @@ spec: type: string type: object required: - - containerImage - replicas - secret - storageClass @@ -3566,8 +3507,6 @@ spec: type: boolean template: properties: - containerImage: - type: string customServiceConfig: type: string customServiceConfigSecrets: @@ -4567,7 +4506,6 @@ spec: storageRequest: type: string required: - - containerImage - databaseInstance - glanceAPIs - imageCache @@ -4809,8 +4747,6 @@ spec: type: object heatAPI: properties: - containerImage: - type: string customServiceConfig: type: string defaultConfigOverwrite: @@ -4927,13 +4863,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object heatCfnAPI: properties: - containerImage: - type: string customServiceConfig: type: string defaultConfigOverwrite: @@ -5050,13 +4982,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object heatEngine: properties: - containerImage: - type: string customServiceConfig: type: string defaultConfigOverwrite: @@ -5104,8 +5032,6 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object memcachedInstance: default: memcached @@ -5260,8 +5186,6 @@ spec: type: boolean template: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -5375,7 +5299,6 @@ spec: type: string type: object required: - - containerImage - memcachedInstance - secret type: object @@ -5611,21 +5534,6 @@ spec: additionalProperties: type: string type: object - images: - properties: - api: - type: string - conductor: - type: string - inspector: - type: string - ironicPythonAgent: - type: string - neutronAgent: - type: string - pxe: - type: string - type: object ironicAPI: properties: customServiceConfig: @@ -6228,8 +6136,6 @@ spec: adminUser: default: admin type: string - containerImage: - type: string customServiceConfig: type: string databaseAccount: @@ -6390,7 +6296,6 @@ spec: default: false type: boolean required: - - containerImage - databaseInstance - memcachedInstance - rabbitMqClusterName @@ -7291,8 +7196,6 @@ spec: type: array manilaAPI: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -7414,13 +7317,9 @@ spec: caBundleSecretName: type: string type: object - required: - - containerImage type: object manilaScheduler: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -7473,14 +7372,10 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object manilaShares: additionalProperties: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -7533,8 +7428,6 @@ spec: x-kubernetes-int-or-string: true type: object type: object - required: - - containerImage type: object type: object memcachedInstance: @@ -7578,8 +7471,6 @@ spec: templates: additionalProperties: properties: - containerImage: - type: string replicas: default: 1 format: int32 @@ -7591,8 +7482,6 @@ spec: secretName: type: string type: object - required: - - containerImage type: object type: object type: object @@ -7709,8 +7598,6 @@ spec: type: boolean template: properties: - containerImage: - type: string customServiceConfig: type: string databaseInstance: @@ -8624,7 +8511,6 @@ spec: type: object type: object required: - - containerImage - databaseInstance - memcachedInstance - rabbitMqClusterName @@ -9751,8 +9637,6 @@ spec: type: object octaviaAPI: properties: - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -9890,7 +9774,6 @@ spec: transportURLSecret: type: string required: - - containerImage - databaseInstance - secret - serviceAccount @@ -9919,8 +9802,6 @@ spec: - name type: object type: array - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -10048,8 +9929,6 @@ spec: - name type: object type: array - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -10177,8 +10056,6 @@ spec: - name type: object type: array - containerImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -10389,10 +10266,6 @@ spec: additionalProperties: type: string type: object - ovnContainerImage: - type: string - ovsContainerImage: - type: string resources: properties: claims: @@ -10431,15 +10304,10 @@ spec: secretName: type: string type: object - required: - - ovnContainerImage - - ovsContainerImage type: object ovnDBCluster: additionalProperties: properties: - containerImage: - type: string dbType: default: NB pattern: ^NB|SB$ @@ -10514,15 +10382,12 @@ spec: type: string type: object required: - - containerImage - dbType - storageRequest type: object type: object ovnNorthd: properties: - containerImage: - type: string logLevel: default: info type: string @@ -10576,8 +10441,6 @@ spec: secretName: type: string type: object - required: - - containerImage type: object type: object type: object @@ -10694,8 +10557,6 @@ spec: type: boolean template: properties: - containerImage: - type: string customServiceConfig: type: string databaseAccount: @@ -10838,7 +10699,6 @@ spec: type: string type: object required: - - containerImage - databaseInstance - secret type: object @@ -11221,16 +11081,6 @@ spec: format: int32 minimum: 0 type: integer - image: - type: string - imagePullSecrets: - items: - properties: - name: - type: string - type: object - x-kubernetes-map-type: atomic - type: array override: properties: service: @@ -14886,8 +14736,6 @@ spec: type: object type: object service: - default: - type: ClusterIP properties: annotations: additionalProperties: @@ -14950,8 +14798,6 @@ spec: templates: additionalProperties: properties: - containerImage: - type: string replicas: default: 1 format: int32 @@ -14963,8 +14809,6 @@ spec: secretName: type: string type: object - required: - - containerImage type: object type: object type: object @@ -15100,8 +14944,6 @@ spec: type: string swiftProxy: properties: - containerImageProxy: - type: string defaultConfigOverwrite: additionalProperties: type: string @@ -15208,7 +15050,6 @@ spec: type: string type: object required: - - containerImageProxy - memcachedServers - replicas - secret @@ -15217,8 +15058,6 @@ spec: type: object swiftRing: properties: - containerImage: - type: string minPartHours: default: 1 format: int64 @@ -15243,7 +15082,6 @@ spec: type: string type: object required: - - containerImage - minPartHours - partPower - ringReplicas @@ -15251,14 +15089,6 @@ spec: type: object swiftStorage: properties: - containerImageAccount: - type: string - containerImageContainer: - type: string - containerImageObject: - type: string - containerImageProxy: - type: string containerSharderEnabled: default: false type: boolean @@ -15288,10 +15118,6 @@ spec: default: swift-conf type: string required: - - containerImageAccount - - containerImageContainer - - containerImageObject - - containerImageProxy - memcachedServers - replicas - storageClass @@ -15424,8 +15250,6 @@ spec: properties: aodh: properties: - apiImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -15438,10 +15262,6 @@ spec: additionalProperties: type: string type: object - evaluatorImage: - type: string - listenerImage: - type: string memcachedInstance: default: memcached type: string @@ -15449,8 +15269,6 @@ spec: items: type: string type: array - notifierImage: - type: string override: properties: service: @@ -15547,12 +15365,8 @@ spec: type: string type: object required: - - apiImage - databaseInstance - - evaluatorImage - - listenerImage - memcachedInstance - - notifierImage - secret type: object enabled: @@ -15573,10 +15387,6 @@ spec: type: object ceilometer: properties: - centralImage: - type: string - computeImage: - type: string customServiceConfig: default: '# add your customization here' type: string @@ -15587,14 +15397,10 @@ spec: enabled: default: true type: boolean - ipmiImage: - type: string networkAttachmentDefinitions: items: type: string type: array - notificationImage: - type: string passwordSelector: default: service: CeilometerPassword @@ -15617,15 +15423,8 @@ spec: serviceUser: default: ceilometer type: string - sgCoreImage: - type: string required: - - centralImage - - computeImage - - ipmiImage - - notificationImage - secret - - sgCoreImage type: object logging: properties: diff --git a/controllers/core/openstackcontrolplane_controller.go b/controllers/core/openstackcontrolplane_controller.go index 5e90b1e39..fa701c4b4 100644 --- a/controllers/core/openstackcontrolplane_controller.go +++ b/controllers/core/openstackcontrolplane_controller.go @@ -166,11 +166,7 @@ func (r *OpenStackControlPlaneReconciler) Reconcile(ctx context.Context, req ctr } }() - if instance.Status.Conditions == nil { - instance.InitConditions() - // Register overall status immediately to have an early feedback e.g. in the cli - return ctrl.Result{}, nil - } + instance.InitConditions() Log.Info("Looking up the current OpenStackVersion") ctrlResult, err, version := openstack.ReconcileVersion(ctx, instance, helper) diff --git a/controllers/core/openstackversion_controller.go b/controllers/core/openstackversion_controller.go index ea663a29e..24e388374 100644 --- a/controllers/core/openstackversion_controller.go +++ b/controllers/core/openstackversion_controller.go @@ -210,7 +210,8 @@ func (r *OpenStackVersionReconciler) Reconcile(ctx context.Context, req ctrl.Req Log.Info("Minor update Controlplane is not in ready condition, waiting") return ctrl.Result{}, nil } - if !compareStringPointers(controlPlane.Status.ContainerImages.OvnControllerImage, instance.Status.ContainerImages.OvnControllerImage) { + if !compareStringPointers(controlPlane.Status.ContainerImages.OvnControllerImage, instance.Status.ContainerImages.OvnControllerImage) || + controlPlane.Status.Conditions.IsFalse(corev1beta1.OpenStackVersionMinorUpdateOVNControlplane) { instance.Status.Conditions.Set(condition.FalseCondition( corev1beta1.OpenStackVersionMinorUpdateOVNControlplane, condition.RequestedReason, diff --git a/go.mod b/go.mod index b5b462292..e5c2b265b 100644 --- a/go.mod +++ b/go.mod @@ -119,3 +119,6 @@ replace github.com/openstack-k8s-operators/openstack-operator/apis => ./apis // mschuppert: map to latest commit from release-4.13 tag // must consistent within modules and service operators replace github.com/openshift/api => github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 //allow-merging + +// 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 diff --git a/go.sum b/go.sum index 6ac2a1f52..f2a2ad79b 100644 --- a/go.sum +++ b/go.sum @@ -133,6 +133,8 @@ github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240318052728-f132 github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240318052728-f132fab5c943/go.mod h1:dcKA0ZNATdkWVmltQQX8jYpEzM89FRIvzlo9Byj8H04= github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240313145348-1dd69c7bc338 h1:4px3BVSfWmfvJf+Nurf0EJb4ViKHW4qM8ocDqH0u8C4= github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240313145348-1dd69c7bc338/go.mod h1:i7bl0Vg4iyaOR4GCfduMWq0V9k5h9ltKDnx0hZg1JDE= +github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f h1:wWaOCAkCym4t+NZWXYT/LErGhKujDdKgc7Qy/3vX4uU= +github.com/openstack-k8s-operators/rabbitmq-cluster-operator/v2 v2.6.1-0.20240313124519-961a0ee8bf7f/go.mod h1:Zryxg5YgbPUFcLSCcKpf10il8kIRAK5HloNo6khhdis= github.com/openstack-k8s-operators/swift-operator/api v0.3.1-0.20240315154317-8b38ff1e6a8d h1:O4nJMsX3pS3X3CUw7/wjgJXoTIPA68pJowA1CfQP6IM= github.com/openstack-k8s-operators/swift-operator/api v0.3.1-0.20240315154317-8b38ff1e6a8d/go.mod h1:/7+Ld3BHb9RDaHhXKEtCiWQmhVwpRLVeLutZxyHRPpM= github.com/openstack-k8s-operators/telemetry-operator/api v0.3.1-0.20240311060559-4ecd4f5c3961 h1:YYeHx9q2/ohmCwezfdw+qDJywpSZVgo9Ud24Oyie2J4= @@ -151,8 +153,6 @@ github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqSc github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rabbitmq/cluster-operator/v2 v2.6.0 h1:pr42elurQgi4DVmLTI1cOh8VZRNkfFKZK9+FgQuM/8w= -github.com/rabbitmq/cluster-operator/v2 v2.6.0/go.mod h1:Zryxg5YgbPUFcLSCcKpf10il8kIRAK5HloNo6khhdis= github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.64.1-rhobs3 h1:vy4ElN2RHyrIzzPn5b8vKuQLg4ZofuUAz65eLqLqloA= github.com/rhobs/obo-prometheus-operator/pkg/apis/monitoring v0.64.1-rhobs3/go.mod h1:p+YsgXodntOtgwXKTpWrJzVS7QmMfZlGDG0v6Noze7s= github.com/rhobs/observability-operator v0.0.20 h1:u4Ejzq/Yt3rY4b/apKhpgYIvmp+MpcV9hhEzhzedpk4= diff --git a/hack/fake_minor_update.sh b/hack/fake_minor_update.sh index b855c0601..d3d4a65d8 100644 --- a/hack/fake_minor_update.sh +++ b/hack/fake_minor_update.sh @@ -7,4 +7,3 @@ sed -i csv.yaml -e "s|value: .*quay.io/podified-antelope-centos9/\(.*\)@.*|value # also bump the OPENSTACK_RELEASE_VERSION value (it is the only field set like this) sed -i csv.yaml -e "s|value: 0.0.1|value: 0.0.2|" oc apply -n openstack-operators -f csv.yaml - diff --git a/pkg/openstack/barbican.go b/pkg/openstack/barbican.go index e8f787364..6c0d3d48d 100644 --- a/pkg/openstack/barbican.go +++ b/pkg/openstack/barbican.go @@ -97,7 +97,10 @@ func ReconcileBarbican(ctx context.Context, instance *corev1beta1.OpenStackContr helper.GetLogger().Info("Reconciling Barbican", "Barbican.Namespace", instance.Namespace, "Barbican.Name", "barbican") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), barbican, func() error { - instance.Spec.Barbican.Template.DeepCopyInto(&barbican.Spec) + instance.Spec.Barbican.Template.BarbicanSpecBase.DeepCopyInto(&barbican.Spec.BarbicanSpecBase) + instance.Spec.Barbican.Template.BarbicanAPI.DeepCopyInto(&barbican.Spec.BarbicanAPI.BarbicanAPITemplateCore) + 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.BarbicanWorker.ContainerImage = *version.Status.ContainerImages.BarbicanWorkerImage diff --git a/pkg/openstack/cinder.go b/pkg/openstack/cinder.go index 993580e37..7c969dce7 100644 --- a/pkg/openstack/cinder.go +++ b/pkg/openstack/cinder.go @@ -100,7 +100,10 @@ func ReconcileCinder(ctx context.Context, instance *corev1beta1.OpenStackControl Log.Info("Reconciling Cinder", "Cinder.Namespace", instance.Namespace, "Cinder.Name", "cinder") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), cinder, func() error { - instance.Spec.Cinder.Template.DeepCopyInto(&cinder.Spec) + instance.Spec.Cinder.Template.CinderSpecBase.DeepCopyInto(&cinder.Spec.CinderSpecBase) + instance.Spec.Cinder.Template.CinderAPI.DeepCopyInto(&cinder.Spec.CinderAPI.CinderAPITemplateCore) + 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.CinderScheduler.ContainerImage = *version.Status.ContainerImages.CinderSchedulerImage @@ -111,6 +114,10 @@ func ReconcileCinder(ctx context.Context, instance *corev1beta1.OpenStackControl return errors.New("default Cinder Volume images is unset") } for name, volume := range cinder.Spec.CinderVolumes { + templateCore := volume.CinderVolumeTemplateCore + instanceCore := instance.Spec.Cinder.Template.CinderVolumes[name] + instanceCore.DeepCopyInto(&templateCore) + if volVal, ok := version.Status.ContainerImages.CinderVolumeImages[name]; ok { volume.ContainerImage = *volVal } else { diff --git a/pkg/openstack/designate.go b/pkg/openstack/designate.go index 8cac110ac..c8a93dd92 100644 --- a/pkg/openstack/designate.go +++ b/pkg/openstack/designate.go @@ -90,7 +90,26 @@ func ReconcileDesignate(ctx context.Context, instance *corev1beta1.OpenStackCont helper.GetLogger().Info("Reconciling Designate", "Designate.Namespace", instance.Namespace, "Designate.Name", "designate") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), designate, func() error { - instance.Spec.Designate.Template.DeepCopyInto(&designate.Spec) + // FIXME: the designate structs need some rework (images should be at the top level, not in the sub structs) + instance.Spec.Designate.Template.DesignateSpecBase.DeepCopyInto(&designate.Spec.DesignateSpecBase) + // API + instance.Spec.Designate.Template.DesignateAPI.DesignateAPISpecBase.DeepCopyInto(&designate.Spec.DesignateAPI.DesignateAPISpecBase) + instance.Spec.Designate.Template.DesignateAPI.DesignateServiceTemplateCore.DeepCopyInto(&designate.Spec.DesignateAPI.DesignateServiceTemplateCore) + // Central + instance.Spec.Designate.Template.DesignateCentral.DesignateCentralSpecBase.DeepCopyInto(&designate.Spec.DesignateCentral.DesignateCentralSpecBase) + instance.Spec.Designate.Template.DesignateCentral.DesignateServiceTemplateCore.DeepCopyInto(&designate.Spec.DesignateCentral.DesignateServiceTemplateCore) + // Worker + instance.Spec.Designate.Template.DesignateWorker.DesignateWorkerSpecBase.DeepCopyInto(&designate.Spec.DesignateWorker.DesignateWorkerSpecBase) + instance.Spec.Designate.Template.DesignateWorker.DesignateServiceTemplateCore.DeepCopyInto(&designate.Spec.DesignateWorker.DesignateServiceTemplateCore) + // Mdns + instance.Spec.Designate.Template.DesignateMdns.DesignateMdnsSpecBase.DeepCopyInto(&designate.Spec.DesignateMdns.DesignateMdnsSpecBase) + instance.Spec.Designate.Template.DesignateMdns.DesignateServiceTemplateCore.DeepCopyInto(&designate.Spec.DesignateMdns.DesignateServiceTemplateCore) + // Producer + instance.Spec.Designate.Template.DesignateProducer.DesignateProducerSpecBase.DeepCopyInto(&designate.Spec.DesignateProducer.DesignateProducerSpecBase) + instance.Spec.Designate.Template.DesignateProducer.DesignateServiceTemplateCore.DeepCopyInto(&designate.Spec.DesignateProducer.DesignateServiceTemplateCore) + // Bind9 + 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.DesignateCentral.ContainerImage = *version.Status.ContainerImages.DesignateCentralImage diff --git a/pkg/openstack/galera.go b/pkg/openstack/galera.go index 17d3e1950..02da6e681 100644 --- a/pkg/openstack/galera.go +++ b/pkg/openstack/galera.go @@ -125,7 +125,7 @@ func reconcileGalera( version *corev1beta1.OpenStackVersion, helper *helper.Helper, name string, - spec *mariadbv1.GaleraSpec, + spec *mariadbv1.GaleraSpecCore, ) (galeraStatus, error) { galera := &mariadbv1.Galera{ ObjectMeta: metav1.ObjectMeta{ @@ -145,7 +145,7 @@ func reconcileGalera( Log.Info("Reconciling Galera", "Galera.Namespace", instance.Namespace, "Galera.Name", name) op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), galera, func() error { - spec.DeepCopyInto(&galera.Spec) + spec.DeepCopyInto(&galera.Spec.GaleraSpecCore) galera.Spec.ContainerImage = *version.Status.ContainerImages.MariadbImage err := controllerutil.SetControllerReference(helper.GetBeforeObject(), galera, helper.GetScheme()) if err != nil { diff --git a/pkg/openstack/glance.go b/pkg/openstack/glance.go index 93673b121..826772a29 100644 --- a/pkg/openstack/glance.go +++ b/pkg/openstack/glance.go @@ -140,7 +140,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) + instance.Spec.Glance.Template.DeepCopyInto(&glance.Spec.GlanceSpecCore) glance.Spec.ContainerImage = *version.Status.ContainerImages.GlanceApiImage if glance.Spec.Secret == "" { glance.Spec.Secret = instance.Spec.Secret diff --git a/pkg/openstack/heat.go b/pkg/openstack/heat.go index f53abeabc..024b3f8c0 100644 --- a/pkg/openstack/heat.go +++ b/pkg/openstack/heat.go @@ -149,7 +149,10 @@ func ReconcileHeat(ctx context.Context, instance *corev1beta1.OpenStackControlPl Log.Info("Reconcile heat", "heat.Namespace", instance.Namespace, "heat.Name", "heat") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), heat, func() error { - instance.Spec.Heat.Template.DeepCopyInto(&heat.Spec) + instance.Spec.Heat.Template.HeatSpecBase.DeepCopyInto(&heat.Spec.HeatSpecBase) + instance.Spec.Heat.Template.HeatAPI.DeepCopyInto(&heat.Spec.HeatAPI.HeatAPITemplateCore) + 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.HeatCfnAPI.ContainerImage = *version.Status.ContainerImages.HeatCfnapiImage diff --git a/pkg/openstack/horizon.go b/pkg/openstack/horizon.go index fa8721990..c526cb30d 100644 --- a/pkg/openstack/horizon.go +++ b/pkg/openstack/horizon.go @@ -106,7 +106,8 @@ func ReconcileHorizon(ctx context.Context, instance *corev1beta1.OpenStackContro Log.Info("Reconcile Horizon", "horizon.Namespace", instance.Namespace, "horizon.Name", "horizon") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), horizon, func() error { - instance.Spec.Horizon.Template.DeepCopyInto(&horizon.Spec) + instance.Spec.Horizon.Template.DeepCopyInto(&horizon.Spec.HorizonSpecCore) + horizon.Spec.ContainerImage = *version.Status.ContainerImages.HorizonImage horizon.Spec.Override.Service = ptr.To(serviceOverrides[service.EndpointPublic]) diff --git a/pkg/openstack/ironic.go b/pkg/openstack/ironic.go index d02005884..afcf4913e 100644 --- a/pkg/openstack/ironic.go +++ b/pkg/openstack/ironic.go @@ -147,7 +147,7 @@ func ReconcileIronic(ctx context.Context, instance *corev1beta1.OpenStackControl Log.Info("Reconciling Ironic", "Ironic.Namespace", instance.Namespace, "Ironic.Name", "ironic") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), ironic, func() error { - instance.Spec.Ironic.Template.DeepCopyInto(&ironic.Spec) + instance.Spec.Ironic.Template.DeepCopyInto(&ironic.Spec.IronicSpecCore) ironic.Spec.Images.API = *version.Status.ContainerImages.IronicApiImage ironic.Spec.Images.Conductor = *version.Status.ContainerImages.IronicConductorImage diff --git a/pkg/openstack/keystone.go b/pkg/openstack/keystone.go index 14a3d8fae..8ed6179a3 100644 --- a/pkg/openstack/keystone.go +++ b/pkg/openstack/keystone.go @@ -100,7 +100,7 @@ func ReconcileKeystoneAPI(ctx context.Context, instance *corev1beta1.OpenStackCo Log.Info("Reconciling KeystoneAPI", "KeystoneAPI.Namespace", instance.Namespace, "KeystoneAPI.Name", "keystone") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), keystoneAPI, func() error { - instance.Spec.Keystone.Template.DeepCopyInto(&keystoneAPI.Spec) + instance.Spec.Keystone.Template.DeepCopyInto(&keystoneAPI.Spec.KeystoneAPISpecCore) keystoneAPI.Spec.ContainerImage = *version.Status.ContainerImages.KeystoneApiImage if keystoneAPI.Spec.Secret == "" { diff --git a/pkg/openstack/manila.go b/pkg/openstack/manila.go index 0bf650bd2..dac0d455f 100644 --- a/pkg/openstack/manila.go +++ b/pkg/openstack/manila.go @@ -101,7 +101,10 @@ func ReconcileManila(ctx context.Context, instance *corev1beta1.OpenStackControl Log.Info("Reconciling Manila", "Manila.Namespace", instance.Namespace, "Manila.Name", "manila") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), manila, func() error { - instance.Spec.Manila.Template.DeepCopyInto(&manila.Spec) + instance.Spec.Manila.Template.ManilaSpecBase.DeepCopyInto(&manila.Spec.ManilaSpecBase) + 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.ManilaScheduler.ContainerImage = *version.Status.ContainerImages.ManilaSchedulerImage @@ -110,6 +113,10 @@ func ReconcileManila(ctx context.Context, instance *corev1beta1.OpenStackControl return errors.New("default Manila Share images is unset") } for name, share := range manila.Spec.ManilaShares { + templateCore := share.ManilaShareTemplateCore + instanceCore := instance.Spec.Manila.Template.ManilaShares[name] + instanceCore.DeepCopyInto(&templateCore) + if volVal, ok := version.Status.ContainerImages.ManilaShareImages[name]; ok { share.ContainerImage = *volVal } else { diff --git a/pkg/openstack/memcached.go b/pkg/openstack/memcached.go index 90be6588e..b8c3845fa 100644 --- a/pkg/openstack/memcached.go +++ b/pkg/openstack/memcached.go @@ -137,7 +137,7 @@ func reconcileMemcached( version *corev1beta1.OpenStackVersion, helper *helper.Helper, name string, - spec *memcachedv1.MemcachedSpec, + spec *memcachedv1.MemcachedSpecCore, ) (memcachedStatus, ctrl.Result, error) { memcached := &memcachedv1.Memcached{ ObjectMeta: metav1.ObjectMeta{ @@ -189,7 +189,7 @@ func reconcileMemcached( } op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), memcached, func() error { - spec.DeepCopyInto(&memcached.Spec) + spec.DeepCopyInto(&memcached.Spec.MemcachedSpecCore) if tlsCert != "" { memcached.Spec.TLS.SecretName = ptr.To(tlsCert) diff --git a/pkg/openstack/neutron.go b/pkg/openstack/neutron.go index bfbc5a9a9..aebbf9270 100644 --- a/pkg/openstack/neutron.go +++ b/pkg/openstack/neutron.go @@ -132,7 +132,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) + instance.Spec.Neutron.Template.DeepCopyInto(&neutronAPI.Spec.NeutronAPISpecCore) neutronAPI.Spec.ContainerImage = *version.Status.ContainerImages.NeutronApiImage if neutronAPI.Spec.Secret == "" { neutronAPI.Spec.Secret = instance.Spec.Secret diff --git a/pkg/openstack/nova.go b/pkg/openstack/nova.go index 87dcd8ec8..885115555 100644 --- a/pkg/openstack/nova.go +++ b/pkg/openstack/nova.go @@ -282,21 +282,12 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl // RabbitMQCluster per nova cell. instance.Spec.Nova.Template.DeepCopyInto(&nova.Spec) - nova.Spec.APIServiceTemplate.ContainerImage = *version.Status.ContainerImages.NovaApiImage - nova.Spec.MetadataServiceTemplate.ContainerImage = *version.Status.ContainerImages.NovaApiImage //metadata uses novaAPI image - nova.Spec.SchedulerServiceTemplate.ContainerImage = *version.Status.ContainerImages.NovaSchedulerImage - - for _, cellTemplate := range nova.Spec.CellTemplates { - cellTemplate.ConductorServiceTemplate.ContainerImage = *version.Status.ContainerImages.NovaConductorImage - cellTemplate.MetadataServiceTemplate.ContainerImage = *version.Status.ContainerImages.NovaApiImage //metadata uses novaAPI image - cellTemplate.NoVNCProxyServiceTemplate.ContainerImage = *version.Status.ContainerImages.NovaNovncImage - - for computeName, computeTemplate := range cellTemplate.NovaComputeTemplates { - computeTemplate.ContainerImage = *version.Status.ContainerImages.NovaComputeImage - cellTemplate.NovaComputeTemplates[computeName] = computeTemplate - - } - } + 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.SchedulerContainerImageURL = *version.Status.ContainerImages.NovaSchedulerImage + nova.Spec.NovaImages.NoVNCContainerImageURL = *version.Status.ContainerImages.NovaNovncImage err := controllerutil.SetControllerReference(helper.GetBeforeObject(), nova, helper.GetScheme()) if err != nil { diff --git a/pkg/openstack/octavia.go b/pkg/openstack/octavia.go index e23793a9c..5a132ff15 100644 --- a/pkg/openstack/octavia.go +++ b/pkg/openstack/octavia.go @@ -106,7 +106,11 @@ func ReconcileOctavia(ctx context.Context, instance *corev1beta1.OpenStackContro helper.GetLogger().Info("Reconciling Octavia", "Octavia.Namespace", instance.Namespace, "Octavia.Name", octavia.Name) op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), octavia, func() error { - instance.Spec.Octavia.Template.DeepCopyInto(&octavia.Spec) + instance.Spec.Octavia.Template.OctaviaSpecBase.DeepCopyInto(&octavia.Spec.OctaviaSpecBase) + instance.Spec.Octavia.Template.OctaviaAPI.DeepCopyInto(&octavia.Spec.OctaviaAPI.OctaviaAPISpecCore) + instance.Spec.Octavia.Template.OctaviaHousekeeping.DeepCopyInto(&octavia.Spec.OctaviaHousekeeping.OctaviaAmphoraControllerSpecCore) + 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.OctaviaWorker.ContainerImage = *version.Status.ContainerImages.OctaviaWorkerImage diff --git a/pkg/openstack/ovn.go b/pkg/openstack/ovn.go index 92504d8bf..5c714b612 100644 --- a/pkg/openstack/ovn.go +++ b/pkg/openstack/ovn.go @@ -134,13 +134,13 @@ func ReconcileOVNDbClusters(ctx context.Context, instance *corev1beta1.OpenStack Log.Info("Reconciling OVNDBCluster", "OVNDBCluster.Namespace", instance.Namespace, "OVNDBCluster.Name", name) op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), OVNDBCluster, func() error { - dbcluster.DeepCopyInto(&OVNDBCluster.Spec) + dbcluster.DeepCopyInto(&OVNDBCluster.Spec.OVNDBClusterSpecCore) // we always set these to match OpenStackVersion if dbcluster.DBType == ovnv1.NBDBType { - dbcluster.ContainerImage = *version.Status.ContainerImages.OvnNbDbclusterImage + OVNDBCluster.Spec.ContainerImage = *version.Status.ContainerImages.OvnNbDbclusterImage } else if dbcluster.DBType == ovnv1.SBDBType { - dbcluster.ContainerImage = *version.Status.ContainerImages.OvnSbDbclusterImage + OVNDBCluster.Spec.ContainerImage = *version.Status.ContainerImages.OvnSbDbclusterImage } if OVNDBCluster.Spec.NodeSelector == nil && instance.Spec.NodeSelector != nil { @@ -235,7 +235,7 @@ func ReconcileOVNNorthd(ctx context.Context, instance *corev1beta1.OpenStackCont Log.Info("Reconciling OVNNorthd", "OVNNorthd.Namespace", instance.Namespace, "OVNNorthd.Name", "ovnnorthd") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), OVNNorthd, func() error { - instance.Spec.Ovn.Template.OVNNorthd.DeepCopyInto(&OVNNorthd.Spec) + instance.Spec.Ovn.Template.OVNNorthd.DeepCopyInto(&OVNNorthd.Spec.OVNNorthdSpecCore) OVNNorthd.Spec.ContainerImage = *version.Status.ContainerImages.OvnNorthdImage @@ -331,7 +331,8 @@ func ReconcileOVNController(ctx context.Context, instance *corev1beta1.OpenStack Log.Info("Reconciling OVNController", "OVNController.Namespace", instance.Namespace, "OVNController.Name", "ovncontroller") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), OVNController, func() error { - instance.Spec.Ovn.Template.OVNController.DeepCopyInto(&OVNController.Spec) + instance.Spec.Ovn.Template.OVNController.DeepCopyInto(&OVNController.Spec.OVNControllerSpecCore) + OVNController.Spec.OvnContainerImage = *version.Status.ContainerImages.OvnControllerImage OVNController.Spec.OvsContainerImage = *version.Status.ContainerImages.OvnControllerOvsImage diff --git a/pkg/openstack/placement.go b/pkg/openstack/placement.go index 3d3b5c7f6..d9276e5cb 100644 --- a/pkg/openstack/placement.go +++ b/pkg/openstack/placement.go @@ -98,7 +98,7 @@ func ReconcilePlacementAPI(ctx context.Context, instance *corev1beta1.OpenStackC Log.Info("Reconciling PlacementAPI", "PlacementAPI.Namespace", instance.Namespace, "PlacementAPI.Name", "placement") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), placementAPI, func() error { - instance.Spec.Placement.Template.DeepCopyInto(&placementAPI.Spec) + instance.Spec.Placement.Template.DeepCopyInto(&placementAPI.Spec.PlacementAPISpecCore) placementAPI.Spec.ContainerImage = *version.Status.ContainerImages.PlacementApiImage if placementAPI.Spec.Secret == "" { diff --git a/pkg/openstack/rabbitmq.go b/pkg/openstack/rabbitmq.go index 6b606db0a..2f4350923 100644 --- a/pkg/openstack/rabbitmq.go +++ b/pkg/openstack/rabbitmq.go @@ -180,7 +180,7 @@ func reconcileRabbitMQ( Name: "rabbitmq", // NOTE(gibi): without this the second RabbitMqCluster // will fail as the Pod will have no image. - Image: spec.Image, + Image: *version.Status.ContainerImages.RabbitmqImage, Env: envVars, Args: []string{ // OSP17 runs kolla_start here, instead just run rabbitmq-server directly @@ -226,9 +226,25 @@ func reconcileRabbitMQ( op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), rabbitmq, func() error { - spec.RabbitmqClusterSpec.DeepCopyInto(&rabbitmq.Spec) - rabbitmq.Spec.Image = *version.Status.ContainerImages.RabbitmqImage + rabbitmq.Spec.Replicas = spec.Replicas + rabbitmq.Spec.Tolerations = spec.Tolerations + rabbitmq.Spec.SkipPostDeploySteps = spec.SkipPostDeploySteps + rabbitmq.Spec.TerminationGracePeriodSeconds = spec.TerminationGracePeriodSeconds + rabbitmq.Spec.DelayStartSeconds = spec.DelayStartSeconds + spec.Service.DeepCopyInto(&rabbitmq.Spec.Service) + spec.Persistence.DeepCopyInto(&rabbitmq.Spec.Persistence) + spec.Override.DeepCopyInto(&rabbitmq.Spec.Override) + spec.SecretBackend.DeepCopyInto(&rabbitmq.Spec.SecretBackend) + if spec.Resources != nil { + rabbitmq.Spec.Resources = spec.Resources + //spec.Resources.DeepCopyInto(rabbitmq.Spec.Resources) + } + if spec.Affinity != nil { + rabbitmq.Spec.Affinity = spec.Affinity + //spec.Affinity.DeepCopyInto(rabbitmq.Spec.Affinity) + } + if rabbitmq.Spec.Persistence.StorageClassName == nil { Log.Info(fmt.Sprintf("Setting StorageClassName: " + instance.Spec.StorageClass)) rabbitmq.Spec.Persistence.StorageClassName = &instance.Spec.StorageClass diff --git a/pkg/openstack/redis.go b/pkg/openstack/redis.go index 947bf3226..e325af744 100644 --- a/pkg/openstack/redis.go +++ b/pkg/openstack/redis.go @@ -117,7 +117,7 @@ func reconcileRedis( version *corev1beta1.OpenStackVersion, helper *helper.Helper, name string, - spec *redisv1.RedisSpec, + spec *redisv1.RedisSpecCore, ) (redisStatus, error) { redis := &redisv1.Redis{ ObjectMeta: metav1.ObjectMeta{ @@ -135,7 +135,7 @@ func reconcileRedis( helper.GetLogger().Info("Reconciling Redis", "Redis.Namespace", instance.Namespace, "Redis.Name", name) op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), redis, func() error { - spec.DeepCopyInto(&redis.Spec) + spec.DeepCopyInto(&redis.Spec.RedisSpecCore) redis.Spec.ContainerImage = *version.Status.ContainerImages.InfraRedisImage err := controllerutil.SetControllerReference(helper.GetBeforeObject(), redis, helper.GetScheme()) if err != nil { diff --git a/pkg/openstack/swift.go b/pkg/openstack/swift.go index 0eaf7e855..43c526ce9 100644 --- a/pkg/openstack/swift.go +++ b/pkg/openstack/swift.go @@ -100,7 +100,10 @@ func ReconcileSwift(ctx context.Context, instance *corev1beta1.OpenStackControlP Log.Info("Reconciling Swift", "Swift.Namespace", instance.Namespace, "Swift.Name", "swift") op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), swift, func() error { - instance.Spec.Swift.Template.DeepCopyInto(&swift.Spec) + instance.Spec.Swift.Template.SwiftSpecBase.DeepCopyInto(&swift.Spec.SwiftSpecBase) + instance.Spec.Swift.Template.SwiftProxy.DeepCopyInto(&swift.Spec.SwiftProxy.SwiftProxySpecCore) + instance.Spec.Swift.Template.SwiftStorage.DeepCopyInto(&swift.Spec.SwiftStorage.SwiftStorageSpecCore) + instance.Spec.Swift.Template.SwiftRing.DeepCopyInto(&swift.Spec.SwiftRing.SwiftRingSpecCore) swift.Spec.SwiftRing.ContainerImage = *version.Status.ContainerImages.SwiftProxyImage swift.Spec.SwiftStorage.ContainerImageAccount = *version.Status.ContainerImages.SwiftAccountImage diff --git a/pkg/openstack/telemetry.go b/pkg/openstack/telemetry.go index 423307a36..4dbfda2bc 100644 --- a/pkg/openstack/telemetry.go +++ b/pkg/openstack/telemetry.go @@ -102,7 +102,9 @@ func ReconcileTelemetry(ctx context.Context, instance *corev1beta1.OpenStackCont helper.GetLogger().Info("Reconciling Telemetry", telemetryNamespaceLabel, instance.Namespace, telemetryNameLabel, telemetryName) op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), telemetry, func() error { - instance.Spec.Telemetry.Template.DeepCopyInto(&telemetry.Spec) + instance.Spec.Telemetry.Template.TelemetrySpecBase.DeepCopyInto(&telemetry.Spec.TelemetrySpecBase) + instance.Spec.Telemetry.Template.Autoscaling.AutoscalingSpecBase.DeepCopyInto(&telemetry.Spec.Autoscaling.AutoscalingSpecBase) + instance.Spec.Telemetry.Template.Ceilometer.CeilometerSpecCore.DeepCopyInto(&telemetry.Spec.Ceilometer.CeilometerSpecCore) telemetry.Spec.Ceilometer.CentralImage = *version.Status.ContainerImages.CeilometerCentralImage telemetry.Spec.Ceilometer.ComputeImage = *version.Status.ContainerImages.CeilometerComputeImage