diff --git a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml index d148c7da3..b0862fa91 100644 --- a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -4202,9 +4202,211 @@ spec: type: object ironic: properties: + apiOverride: + properties: + route: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + alternateBackends: + items: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + maxItems: 3 + type: array + host: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + path: + pattern: ^/ + type: string + port: + properties: + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - targetPort + type: object + subdomain: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + tls: + properties: + caCertificate: + type: string + certificate: + type: string + destinationCACertificate: + type: string + insecureEdgeTerminationPolicy: + type: string + key: + type: string + termination: + enum: + - edge + - reencrypt + - passthrough + type: string + required: + - termination + type: object + to: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + wildcardPolicy: + enum: + - None + - Subdomain + - "" + type: string + type: object + type: object + type: object enabled: default: false type: boolean + inspectorOverride: + properties: + route: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + alternateBackends: + items: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + maxItems: 3 + type: array + host: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + path: + pattern: ^/ + type: string + port: + properties: + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - targetPort + type: object + subdomain: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + tls: + properties: + caCertificate: + type: string + certificate: + type: string + destinationCACertificate: + type: string + insecureEdgeTerminationPolicy: + type: string + key: + type: string + termination: + enum: + - edge + - reencrypt + - passthrough + type: string + required: + - termination + type: object + to: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + wildcardPolicy: + enum: + - None + - Subdomain + - "" + type: string + type: object + type: object + type: object template: properties: customServiceConfig: @@ -4252,32 +4454,6 @@ spec: additionalProperties: type: string type: object - externalEndpoints: - items: - properties: - endpoint: - enum: - - internal - - public - type: string - ipAddressPool: - minLength: 1 - type: string - loadBalancerIPs: - items: - type: string - type: array - sharedIP: - default: true - type: boolean - sharedIPKey: - default: "" - type: string - required: - - endpoint - - ipAddressPool - type: object - type: array networkAttachments: items: type: string @@ -4286,48 +4462,99 @@ spec: additionalProperties: type: string type: object - replicas: - default: 1 - format: int32 - maximum: 32 - minimum: 0 - type: integer - resources: + override: properties: - claims: - items: + service: + additionalProperties: properties: - name: + endpointURL: type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - type: object - ironicConductors: - items: - properties: - conductorGroup: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + externalName: + type: string + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object + type: object + type: object + replicas: + default: 1 + format: int32 + maximum: 32 + minimum: 0 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + type: object + ironicConductors: + items: + properties: + conductorGroup: type: string customServiceConfig: default: '# add your customization here' @@ -4463,32 +4690,6 @@ spec: - start type: object type: array - externalEndpoints: - items: - properties: - endpoint: - enum: - - internal - - public - type: string - ipAddressPool: - minLength: 1 - type: string - loadBalancerIPs: - items: - type: string - type: array - sharedIP: - default: true - type: boolean - sharedIPKey: - default: "" - type: string - required: - - endpoint - - ipAddressPool - type: object - type: array inspectionNetwork: type: string networkAttachments: @@ -4499,6 +4700,57 @@ spec: additionalProperties: type: string type: object + override: + properties: + service: + additionalProperties: + properties: + endpointURL: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + externalName: + type: string + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object + type: object + type: object passwordSelectors: default: database: IronicInspectorDatabasePassword @@ -7835,77 +8087,516 @@ spec: default: false type: boolean type: object - keystoneInstance: - default: keystone - type: string - metadataServiceTemplate: - default: - enabled: true + keystoneInstance: + default: keystone + type: string + metadataServiceTemplate: + default: + enabled: true + properties: + containerImage: + type: string + customServiceConfig: + type: string + defaultConfigOverwrite: + additionalProperties: + type: string + type: object + enabled: + type: boolean + networkAttachments: + items: + type: string + type: array + nodeSelector: + additionalProperties: + type: string + type: object + override: + properties: + service: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + externalName: + type: string + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object + type: object + replicas: + default: 1 + format: int32 + maximum: 32 + minimum: 0 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + type: object + nodeSelector: + additionalProperties: + type: string + type: object + passwordSelectors: + default: + service: NovaPassword + properties: + apiDatabase: + default: NovaAPIDatabasePassword + type: string + metadataSecret: + default: MetadataSecret + type: string + service: + default: NovaPassword + type: string + type: object + schedulerServiceTemplate: + default: + replicas: 1 + properties: + containerImage: + type: string + customServiceConfig: + type: string + defaultConfigOverwrite: + additionalProperties: + type: string + type: object + networkAttachments: + items: + type: string + type: array + nodeSelector: + additionalProperties: + type: string + type: object + replicas: + default: 1 + format: int32 + maximum: 32 + minimum: 0 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + type: object + secret: + type: string + serviceUser: + default: nova + type: string + required: + - secret + type: object + type: object + octavia: + properties: + apiOverride: + properties: + route: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + alternateBackends: + items: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + maxItems: 3 + type: array + host: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + path: + pattern: ^/ + type: string + port: + properties: + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - targetPort + type: object + subdomain: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + tls: + properties: + caCertificate: + type: string + certificate: + type: string + destinationCACertificate: + type: string + insecureEdgeTerminationPolicy: + type: string + key: + type: string + termination: + enum: + - edge + - reencrypt + - passthrough + type: string + required: + - termination + type: object + to: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + wildcardPolicy: + enum: + - None + - Subdomain + - "" + type: string + type: object + type: object + type: object + enabled: + default: false + type: boolean + template: + properties: + customServiceConfig: + default: '# add your customization here' + type: string + databaseInstance: + type: string + databaseUser: + default: octavia + type: string + debug: + properties: + dbSync: + default: false + type: boolean + service: + default: false + type: boolean + type: object + defaultConfigOverwrite: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + octaviaAPI: + properties: + containerImage: + type: string + customServiceConfig: + default: '# add your customization here' + type: string + databaseHostname: + type: string + databaseInstance: + type: string + databaseUser: + default: octavia + type: string + debug: + properties: + dbSync: + default: false + type: boolean + service: + default: false + type: boolean + type: object + defaultConfigOverwrite: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + override: + properties: + service: + additionalProperties: + properties: + endpointURL: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + externalName: + type: string + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object + type: object + type: object + passwordSelectors: + default: + database: OctaviaDatabasePassword + service: OctaviaPassword + properties: + database: + default: OctaviaDatabasePassword + type: string + service: + default: OctaviaPassword + type: string + type: object + preserveJobs: + default: false + type: boolean + replicas: + default: 1 + format: int32 + maximum: 32 + minimum: 0 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + secret: + type: string + serviceAccount: + type: string + serviceUser: + default: octavia + type: string + required: + - containerImage + - databaseInstance + - secret + - serviceAccount + type: object + octaviaHealthManager: properties: + certssecret: + type: string containerImage: type: string customServiceConfig: + default: '# add your customization here' + type: string + databaseHostname: + type: string + databaseInstance: + type: string + databaseUser: + default: octavia type: string defaultConfigOverwrite: additionalProperties: type: string type: object - enabled: - type: boolean - networkAttachments: - items: - type: string - type: array nodeSelector: additionalProperties: type: string type: object - override: + passwordSelectors: + default: + database: OctaviaDatabasePassword + service: OctaviaPassword properties: + database: + default: OctaviaDatabasePassword + type: string service: - properties: - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - labels: - additionalProperties: - type: string - type: object - type: object - spec: - properties: - externalName: - type: string - externalTrafficPolicy: - type: string - internalTrafficPolicy: - type: string - ipFamilyPolicy: - type: string - loadBalancerClass: - type: string - loadBalancerSourceRanges: - items: - type: string - type: array - sessionAffinity: - type: string - sessionAffinityConfig: - properties: - clientIP: - properties: - timeoutSeconds: - format: int32 - type: integer - type: object - type: object - type: - type: string - type: object - type: object + default: OctaviaPassword + type: string type: object replicas: default: 1 @@ -7944,45 +8635,60 @@ spec: x-kubernetes-int-or-string: true type: object type: object - type: object - nodeSelector: - additionalProperties: - type: string - type: object - passwordSelectors: - default: - service: NovaPassword - properties: - apiDatabase: - default: NovaAPIDatabasePassword + role: type: string - metadataSecret: - default: MetadataSecret + secret: type: string - service: - default: NovaPassword + serviceAccount: + type: string + serviceUser: + default: octavia type: string + transportURLSecret: + type: string + required: + - certssecret + - databaseInstance + - role + - secret + - serviceAccount type: object - schedulerServiceTemplate: - default: - replicas: 1 + octaviaHousekeeping: properties: + certssecret: + type: string containerImage: type: string customServiceConfig: + default: '# add your customization here' + type: string + databaseHostname: + type: string + databaseInstance: + type: string + databaseUser: + default: octavia type: string defaultConfigOverwrite: additionalProperties: type: string type: object - networkAttachments: - items: - type: string - type: array nodeSelector: additionalProperties: type: string type: object + passwordSelectors: + default: + database: OctaviaDatabasePassword + service: OctaviaPassword + properties: + database: + default: OctaviaDatabasePassword + type: string + service: + default: OctaviaPassword + type: string + type: object replicas: default: 1 format: int32 @@ -8020,50 +8726,28 @@ spec: x-kubernetes-int-or-string: true type: object type: object + role: + type: string + secret: + type: string + serviceAccount: + type: string + serviceUser: + default: octavia + type: string + transportURLSecret: + type: string + required: + - certssecret + - databaseInstance + - role + - secret + - serviceAccount type: object - secret: - type: string - serviceUser: - default: nova - type: string - required: - - secret - type: object - type: object - octavia: - properties: - enabled: - default: false - type: boolean - template: - properties: - customServiceConfig: - default: '# add your customization here' - type: string - databaseInstance: - type: string - databaseUser: - default: octavia - type: string - debug: - properties: - dbSync: - default: false - type: boolean - service: - default: false - type: boolean - type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object - nodeSelector: - additionalProperties: - type: string - type: object - octaviaAPI: + octaviaWorker: properties: + certssecret: + type: string containerImage: type: string customServiceConfig: @@ -8076,15 +8760,6 @@ spec: databaseUser: default: octavia type: string - debug: - properties: - dbSync: - default: false - type: boolean - service: - default: false - type: boolean - type: object defaultConfigOverwrite: additionalProperties: type: string @@ -8105,9 +8780,6 @@ spec: default: OctaviaPassword type: string type: object - preserveJobs: - default: false - type: boolean replicas: default: 1 format: int32 @@ -8145,6 +8817,8 @@ spec: x-kubernetes-int-or-string: true type: object type: object + role: + type: string secret: type: string serviceAccount: @@ -8152,9 +8826,12 @@ spec: serviceUser: default: octavia type: string + transportURLSecret: + type: string required: - - containerImage + - certssecret - databaseInstance + - role - secret - serviceAccount type: object @@ -8173,6 +8850,9 @@ spec: preserveJobs: default: false type: boolean + rabbitMqClusterName: + default: rabbitmq + type: string secret: type: string serviceUser: @@ -8181,6 +8861,7 @@ spec: required: - databaseInstance - octaviaAPI + - rabbitMqClusterName - secret type: object type: object diff --git a/apis/core/v1beta1/conditions.go b/apis/core/v1beta1/conditions.go index d4b66a104..900b30888 100644 --- a/apis/core/v1beta1/conditions.go +++ b/apis/core/v1beta1/conditions.go @@ -78,6 +78,9 @@ const ( // OpenStackControlPlaneIronicReadyCondition Status=True condition which indicates if Ironic is configured and operational OpenStackControlPlaneIronicReadyCondition condition.Type = "OpenStackControlPlaneIronicReady" + // OpenStackControlPlaneExposeIronicReadyCondition Status=True condition which indicates if Ironic is exposed via a route + OpenStackControlPlaneExposeIronicReadyCondition condition.Type = "OpenStackControlPlaneExposeIronicReady" + // OpenStackControlPlaneHorizonReadyCondition Status=True condition which indicates if Horizon is configured and operational OpenStackControlPlaneHorizonReadyCondition condition.Type = "OpenStackControlPlaneHorizonReady" @@ -140,6 +143,9 @@ const ( // OpenStackControlPlaneRedisReadyCondition Status=True condition which indicates if Redis is configured and operational OpenStackControlPlaneRedisReadyCondition condition.Type = "OpenStackControlPlaneRedisReady" + + // OpenStackControlPlaneExposeOctaviaReadyCondition Status=True condition which indicates if Octavia is exposed via a route + OpenStackControlPlaneExposeOctaviaReadyCondition condition.Type = "OpenStackControlPlaneExposeOctaviaReady" ) // OpenStackControlPlane Reasons used by API objects. diff --git a/apis/core/v1beta1/openstackcontrolplane_types.go b/apis/core/v1beta1/openstackcontrolplane_types.go index 90fe302ea..abd77c920 100644 --- a/apis/core/v1beta1/openstackcontrolplane_types.go +++ b/apis/core/v1beta1/openstackcontrolplane_types.go @@ -448,6 +448,16 @@ type IronicSection struct { //+operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating the Ironic services Template ironicv1.IronicSpec `json:"template,omitempty"` + + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec + // APIOverride, provides the ability to override the generated manifest of several child resources. + APIOverride Override `json:"apiOverride,omitempty"` + + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec + // InspectorOverride, provides the ability to override the generated manifest of several child resources. + InspectorOverride Override `json:"inspectorOverride,omitempty"` } // ManilaSection defines the desired state of Manila service @@ -530,6 +540,11 @@ type OctaviaSection struct { // +operator-sdk:csv:customresourcedefinitions:type=spec // Template - Overrides to use when creating Octavia Resources Template octaviav1.OctaviaSpec `json:"template,omitempty"` + + // +kubebuilder:validation:Optional + // +operator-sdk:csv:customresourcedefinitions:type=spec + // APIOverride, provides the ability to override the generated manifest of several child resources. + APIOverride Override `json:"apiOverride,omitempty"` } // RedisSection defines the desired state of the Redis service diff --git a/apis/core/v1beta1/zz_generated.deepcopy.go b/apis/core/v1beta1/zz_generated.deepcopy.go index 377d38bf8..bbe5b7cdc 100644 --- a/apis/core/v1beta1/zz_generated.deepcopy.go +++ b/apis/core/v1beta1/zz_generated.deepcopy.go @@ -159,6 +159,8 @@ func (in *HorizonSection) DeepCopy() *HorizonSection { func (in *IronicSection) DeepCopyInto(out *IronicSection) { *out = *in in.Template.DeepCopyInto(&out.Template) + in.APIOverride.DeepCopyInto(&out.APIOverride) + in.InspectorOverride.DeepCopyInto(&out.InspectorOverride) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IronicSection. @@ -310,6 +312,7 @@ func (in *NovaSection) DeepCopy() *NovaSection { func (in *OctaviaSection) DeepCopyInto(out *OctaviaSection) { *out = *in in.Template.DeepCopyInto(&out.Template) + in.APIOverride.DeepCopyInto(&out.APIOverride) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OctaviaSection. diff --git a/apis/go.mod b/apis/go.mod index d963bc94b..3c8b862f1 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -3,21 +3,21 @@ module github.com/openstack-k8s-operators/openstack-operator/apis go 1.19 require ( - github.com/onsi/ginkgo/v2 v2.12.0 + github.com/onsi/ginkgo/v2 v2.12.1 github.com/onsi/gomega v1.27.10 github.com/openstack-k8s-operators/cinder-operator/api v0.1.2-0.20230921082510-1b9a7de3d088 github.com/openstack-k8s-operators/glance-operator/api v0.1.2-0.20230921081203-89164087dac9 github.com/openstack-k8s-operators/heat-operator/api v0.1.1-0.20230920142821-e84784bede25 github.com/openstack-k8s-operators/horizon-operator/api v0.1.1-0.20230920143411-511d89a0e6cc github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230920125017-2c76cd203b44 - github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230915140049-df437872b34f + github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230926121739-27e75237b3c8 github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230920085319-92ae0260bbf3 - github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216 + github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb github.com/openstack-k8s-operators/manila-operator/api v0.1.1-0.20230921081246-996d4e390998 github.com/openstack-k8s-operators/mariadb-operator/api v0.1.1-0.20230918111825-8999b3b2dc3c github.com/openstack-k8s-operators/neutron-operator/api v0.1.1-0.20230920145429-537b5afebd07 github.com/openstack-k8s-operators/nova-operator/api v0.1.2-0.20230921152245-4a535c8f3e9a - github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230915083637-79fc51fd4dcf + github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230926130236-dece63badbab github.com/openstack-k8s-operators/ovn-operator/api v0.1.1-0.20230913151226-aab30786ed97 github.com/openstack-k8s-operators/placement-operator/api v0.1.1-0.20230920125340-3c99d09c7033 github.com/openstack-k8s-operators/swift-operator/api v0.1.1-0.20230920144258-a37c476a2829 diff --git a/apis/go.sum b/apis/go.sum index ac9931a7e..d8df907bb 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -122,8 +122,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= -github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= +github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= +github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxCMwNRnMjhhIDOWHJowi6q8G6koI= @@ -138,12 +138,12 @@ github.com/openstack-k8s-operators/horizon-operator/api v0.1.1-0.20230920143411- github.com/openstack-k8s-operators/horizon-operator/api v0.1.1-0.20230920143411-511d89a0e6cc/go.mod h1:rFtiDTgkoNa+Z+F0q87SIRINWm6gbgeaK3Uyl3bl/Tg= github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230920125017-2c76cd203b44 h1:W2HZy+uk5fnVwvw3+/Jd/k7sNiVXCOd8SiV0dMvmjys= github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230920125017-2c76cd203b44/go.mod h1:fOJ95wMSymtfoellY/TFKcrzW6bu/nTCTzEnFEgCGCc= -github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230915140049-df437872b34f h1:dDlJMlhvM6csW24Tf3X8SEW3rG2k08SBgV0ORR1Ts6w= -github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230915140049-df437872b34f/go.mod h1:51ig7IbGf7AjxeWi7+qvmRp0C5lp91e+HhXYTYlhVng= +github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230926121739-27e75237b3c8 h1:8oUx3FiVAOYgyTjdYwlE5AJ84K/LorLwbVuvsXkVGs8= +github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230926121739-27e75237b3c8/go.mod h1:TCsXzuQMxg9HAOfwPtc4NtaQ0ac+NJDqwuLFYOpWw7k= github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230920085319-92ae0260bbf3 h1:6VCz/ZBTJEQJTx4+z8UxLv3WITa4Bgx5CSP237wJ5xM= github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230920085319-92ae0260bbf3/go.mod h1:ta6w/29i4WuWkQp6I4cOLwMGQ5/vJI0y8Em7u+M34jo= -github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216 h1:arYbQA6bLyXJkHm+6M6gPc4YpWMFjs5qkG16Yii4UDo= -github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216/go.mod h1:Ge7Yf6AUmjEvJK9AIW2bT5udLzBIcK59b1QxqymncaQ= +github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb h1:MRd/OrTTZeU/KXAzlIH003wPLmjZ4PHaQ7HisJC9hGY= +github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb/go.mod h1:kZS5rqVWBZeCyYor2PeQB9IEZ19mGaeL/to3x8F9OJg= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230919113507-d74c2f31d216 h1:h76faqi4WAXBs3D2B0GLUdlCjS0dh78wRL0d5RZUwhk= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230919113507-d74c2f31d216/go.mod h1:GHi64tgyC75/vuT8Crda0yN5iCIYiSyS4bpzYJjX7MA= github.com/openstack-k8s-operators/lib-common/modules/storage v0.1.1-0.20230919113507-d74c2f31d216 h1:1dMwzjuZJSRgHcwblOo6jHrWAe2anwWu4w35Rukz1kw= @@ -156,8 +156,8 @@ github.com/openstack-k8s-operators/neutron-operator/api v0.1.1-0.20230920145429- github.com/openstack-k8s-operators/neutron-operator/api v0.1.1-0.20230920145429-537b5afebd07/go.mod h1:gyme//YzQKEWSn3i3S0oaNBjnMu/m2m0N13boSShBfE= github.com/openstack-k8s-operators/nova-operator/api v0.1.2-0.20230921152245-4a535c8f3e9a h1:yBEEaxtR4RWH/M9dAHUQPJ/TBbFDiRkQB4YJcKCcqGE= github.com/openstack-k8s-operators/nova-operator/api v0.1.2-0.20230921152245-4a535c8f3e9a/go.mod h1:kyi9gsAg4d8hxjUxnjDTMZeps3xTutH2+FcAnz783m8= -github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230915083637-79fc51fd4dcf h1:e6peuUus9UjB8qpVH0MAUpwog7pHgSAH80cYpaLVKvU= -github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230915083637-79fc51fd4dcf/go.mod h1:r8xZ27TZ5EPgH+EL6VRQRv0tIxlu0zNNvTnz9PjjZUg= +github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230926130236-dece63badbab h1:5b79D/nCq6g6LSUiGahY8Uqada7OfMIYPRjIX+C0UDs= +github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230926130236-dece63badbab/go.mod h1:0CM3dV0tMkluHm84zlcj4L+ToFon7Pe767wKIEkYPKM= github.com/openstack-k8s-operators/ovn-operator/api v0.1.1-0.20230913151226-aab30786ed97 h1:+nrBob4GwmRqhISqPiP7lhMwys2kJz1vYmLzKap+B7E= github.com/openstack-k8s-operators/ovn-operator/api v0.1.1-0.20230913151226-aab30786ed97/go.mod h1:0zpkMBsrFbFP+AfaJKvREHomqsXcPnUCOT0/LzKmga0= github.com/openstack-k8s-operators/placement-operator/api v0.1.1-0.20230920125340-3c99d09c7033 h1:/oIWCEllgIXQbjIj6i8NFK3yC5IHkflnMDSmdz2PeCs= diff --git a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml index d148c7da3..b0862fa91 100644 --- a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -4202,9 +4202,211 @@ spec: type: object ironic: properties: + apiOverride: + properties: + route: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + alternateBackends: + items: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + maxItems: 3 + type: array + host: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + path: + pattern: ^/ + type: string + port: + properties: + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - targetPort + type: object + subdomain: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + tls: + properties: + caCertificate: + type: string + certificate: + type: string + destinationCACertificate: + type: string + insecureEdgeTerminationPolicy: + type: string + key: + type: string + termination: + enum: + - edge + - reencrypt + - passthrough + type: string + required: + - termination + type: object + to: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + wildcardPolicy: + enum: + - None + - Subdomain + - "" + type: string + type: object + type: object + type: object enabled: default: false type: boolean + inspectorOverride: + properties: + route: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + alternateBackends: + items: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + maxItems: 3 + type: array + host: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + path: + pattern: ^/ + type: string + port: + properties: + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - targetPort + type: object + subdomain: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + tls: + properties: + caCertificate: + type: string + certificate: + type: string + destinationCACertificate: + type: string + insecureEdgeTerminationPolicy: + type: string + key: + type: string + termination: + enum: + - edge + - reencrypt + - passthrough + type: string + required: + - termination + type: object + to: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + wildcardPolicy: + enum: + - None + - Subdomain + - "" + type: string + type: object + type: object + type: object template: properties: customServiceConfig: @@ -4252,32 +4454,6 @@ spec: additionalProperties: type: string type: object - externalEndpoints: - items: - properties: - endpoint: - enum: - - internal - - public - type: string - ipAddressPool: - minLength: 1 - type: string - loadBalancerIPs: - items: - type: string - type: array - sharedIP: - default: true - type: boolean - sharedIPKey: - default: "" - type: string - required: - - endpoint - - ipAddressPool - type: object - type: array networkAttachments: items: type: string @@ -4286,48 +4462,99 @@ spec: additionalProperties: type: string type: object - replicas: - default: 1 - format: int32 - maximum: 32 - minimum: 0 - type: integer - resources: + override: properties: - claims: - items: + service: + additionalProperties: properties: - name: + endpointURL: type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - type: object - ironicConductors: - items: - properties: - conductorGroup: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + externalName: + type: string + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object + type: object + type: object + replicas: + default: 1 + format: int32 + maximum: 32 + minimum: 0 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + type: object + ironicConductors: + items: + properties: + conductorGroup: type: string customServiceConfig: default: '# add your customization here' @@ -4463,32 +4690,6 @@ spec: - start type: object type: array - externalEndpoints: - items: - properties: - endpoint: - enum: - - internal - - public - type: string - ipAddressPool: - minLength: 1 - type: string - loadBalancerIPs: - items: - type: string - type: array - sharedIP: - default: true - type: boolean - sharedIPKey: - default: "" - type: string - required: - - endpoint - - ipAddressPool - type: object - type: array inspectionNetwork: type: string networkAttachments: @@ -4499,6 +4700,57 @@ spec: additionalProperties: type: string type: object + override: + properties: + service: + additionalProperties: + properties: + endpointURL: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + externalName: + type: string + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object + type: object + type: object passwordSelectors: default: database: IronicInspectorDatabasePassword @@ -7835,77 +8087,516 @@ spec: default: false type: boolean type: object - keystoneInstance: - default: keystone - type: string - metadataServiceTemplate: - default: - enabled: true + keystoneInstance: + default: keystone + type: string + metadataServiceTemplate: + default: + enabled: true + properties: + containerImage: + type: string + customServiceConfig: + type: string + defaultConfigOverwrite: + additionalProperties: + type: string + type: object + enabled: + type: boolean + networkAttachments: + items: + type: string + type: array + nodeSelector: + additionalProperties: + type: string + type: object + override: + properties: + service: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + externalName: + type: string + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object + type: object + replicas: + default: 1 + format: int32 + maximum: 32 + minimum: 0 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + type: object + nodeSelector: + additionalProperties: + type: string + type: object + passwordSelectors: + default: + service: NovaPassword + properties: + apiDatabase: + default: NovaAPIDatabasePassword + type: string + metadataSecret: + default: MetadataSecret + type: string + service: + default: NovaPassword + type: string + type: object + schedulerServiceTemplate: + default: + replicas: 1 + properties: + containerImage: + type: string + customServiceConfig: + type: string + defaultConfigOverwrite: + additionalProperties: + type: string + type: object + networkAttachments: + items: + type: string + type: array + nodeSelector: + additionalProperties: + type: string + type: object + replicas: + default: 1 + format: int32 + maximum: 32 + minimum: 0 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + type: object + secret: + type: string + serviceUser: + default: nova + type: string + required: + - secret + type: object + type: object + octavia: + properties: + apiOverride: + properties: + route: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + alternateBackends: + items: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + maxItems: 3 + type: array + host: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + path: + pattern: ^/ + type: string + port: + properties: + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - targetPort + type: object + subdomain: + maxLength: 253 + pattern: ^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$ + type: string + tls: + properties: + caCertificate: + type: string + certificate: + type: string + destinationCACertificate: + type: string + insecureEdgeTerminationPolicy: + type: string + key: + type: string + termination: + enum: + - edge + - reencrypt + - passthrough + type: string + required: + - termination + type: object + to: + properties: + kind: + enum: + - Service + - "" + type: string + name: + type: string + weight: + format: int32 + maximum: 256 + minimum: 0 + type: integer + type: object + wildcardPolicy: + enum: + - None + - Subdomain + - "" + type: string + type: object + type: object + type: object + enabled: + default: false + type: boolean + template: + properties: + customServiceConfig: + default: '# add your customization here' + type: string + databaseInstance: + type: string + databaseUser: + default: octavia + type: string + debug: + properties: + dbSync: + default: false + type: boolean + service: + default: false + type: boolean + type: object + defaultConfigOverwrite: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + octaviaAPI: + properties: + containerImage: + type: string + customServiceConfig: + default: '# add your customization here' + type: string + databaseHostname: + type: string + databaseInstance: + type: string + databaseUser: + default: octavia + type: string + debug: + properties: + dbSync: + default: false + type: boolean + service: + default: false + type: boolean + type: object + defaultConfigOverwrite: + additionalProperties: + type: string + type: object + nodeSelector: + additionalProperties: + type: string + type: object + override: + properties: + service: + additionalProperties: + properties: + endpointURL: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + spec: + properties: + externalName: + type: string + externalTrafficPolicy: + type: string + internalTrafficPolicy: + type: string + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object + type: object + type: object + passwordSelectors: + default: + database: OctaviaDatabasePassword + service: OctaviaPassword + properties: + database: + default: OctaviaDatabasePassword + type: string + service: + default: OctaviaPassword + type: string + type: object + preserveJobs: + default: false + type: boolean + replicas: + default: 1 + format: int32 + maximum: 32 + minimum: 0 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + secret: + type: string + serviceAccount: + type: string + serviceUser: + default: octavia + type: string + required: + - containerImage + - databaseInstance + - secret + - serviceAccount + type: object + octaviaHealthManager: properties: + certssecret: + type: string containerImage: type: string customServiceConfig: + default: '# add your customization here' + type: string + databaseHostname: + type: string + databaseInstance: + type: string + databaseUser: + default: octavia type: string defaultConfigOverwrite: additionalProperties: type: string type: object - enabled: - type: boolean - networkAttachments: - items: - type: string - type: array nodeSelector: additionalProperties: type: string type: object - override: + passwordSelectors: + default: + database: OctaviaDatabasePassword + service: OctaviaPassword properties: + database: + default: OctaviaDatabasePassword + type: string service: - properties: - metadata: - properties: - annotations: - additionalProperties: - type: string - type: object - labels: - additionalProperties: - type: string - type: object - type: object - spec: - properties: - externalName: - type: string - externalTrafficPolicy: - type: string - internalTrafficPolicy: - type: string - ipFamilyPolicy: - type: string - loadBalancerClass: - type: string - loadBalancerSourceRanges: - items: - type: string - type: array - sessionAffinity: - type: string - sessionAffinityConfig: - properties: - clientIP: - properties: - timeoutSeconds: - format: int32 - type: integer - type: object - type: object - type: - type: string - type: object - type: object + default: OctaviaPassword + type: string type: object replicas: default: 1 @@ -7944,45 +8635,60 @@ spec: x-kubernetes-int-or-string: true type: object type: object - type: object - nodeSelector: - additionalProperties: - type: string - type: object - passwordSelectors: - default: - service: NovaPassword - properties: - apiDatabase: - default: NovaAPIDatabasePassword + role: type: string - metadataSecret: - default: MetadataSecret + secret: type: string - service: - default: NovaPassword + serviceAccount: + type: string + serviceUser: + default: octavia type: string + transportURLSecret: + type: string + required: + - certssecret + - databaseInstance + - role + - secret + - serviceAccount type: object - schedulerServiceTemplate: - default: - replicas: 1 + octaviaHousekeeping: properties: + certssecret: + type: string containerImage: type: string customServiceConfig: + default: '# add your customization here' + type: string + databaseHostname: + type: string + databaseInstance: + type: string + databaseUser: + default: octavia type: string defaultConfigOverwrite: additionalProperties: type: string type: object - networkAttachments: - items: - type: string - type: array nodeSelector: additionalProperties: type: string type: object + passwordSelectors: + default: + database: OctaviaDatabasePassword + service: OctaviaPassword + properties: + database: + default: OctaviaDatabasePassword + type: string + service: + default: OctaviaPassword + type: string + type: object replicas: default: 1 format: int32 @@ -8020,50 +8726,28 @@ spec: x-kubernetes-int-or-string: true type: object type: object + role: + type: string + secret: + type: string + serviceAccount: + type: string + serviceUser: + default: octavia + type: string + transportURLSecret: + type: string + required: + - certssecret + - databaseInstance + - role + - secret + - serviceAccount type: object - secret: - type: string - serviceUser: - default: nova - type: string - required: - - secret - type: object - type: object - octavia: - properties: - enabled: - default: false - type: boolean - template: - properties: - customServiceConfig: - default: '# add your customization here' - type: string - databaseInstance: - type: string - databaseUser: - default: octavia - type: string - debug: - properties: - dbSync: - default: false - type: boolean - service: - default: false - type: boolean - type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object - nodeSelector: - additionalProperties: - type: string - type: object - octaviaAPI: + octaviaWorker: properties: + certssecret: + type: string containerImage: type: string customServiceConfig: @@ -8076,15 +8760,6 @@ spec: databaseUser: default: octavia type: string - debug: - properties: - dbSync: - default: false - type: boolean - service: - default: false - type: boolean - type: object defaultConfigOverwrite: additionalProperties: type: string @@ -8105,9 +8780,6 @@ spec: default: OctaviaPassword type: string type: object - preserveJobs: - default: false - type: boolean replicas: default: 1 format: int32 @@ -8145,6 +8817,8 @@ spec: x-kubernetes-int-or-string: true type: object type: object + role: + type: string secret: type: string serviceAccount: @@ -8152,9 +8826,12 @@ spec: serviceUser: default: octavia type: string + transportURLSecret: + type: string required: - - containerImage + - certssecret - databaseInstance + - role - secret - serviceAccount type: object @@ -8173,6 +8850,9 @@ spec: preserveJobs: default: false type: boolean + rabbitMqClusterName: + default: rabbitmq + type: string secret: type: string serviceUser: @@ -8181,6 +8861,7 @@ spec: required: - databaseInstance - octaviaAPI + - rabbitMqClusterName - secret type: object type: object diff --git a/config/manifests/bases/openstack-operator.clusterserviceversion.yaml b/config/manifests/bases/openstack-operator.clusterserviceversion.yaml index b1766e6c0..f9e92873d 100644 --- a/config/manifests/bases/openstack-operator.clusterserviceversion.yaml +++ b/config/manifests/bases/openstack-operator.clusterserviceversion.yaml @@ -38,29 +38,15 @@ spec: - description: Cinder - Parameters related to the Cinder service displayName: Cinder path: cinder + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: cinder.apiOverride - description: Enabled - Whether Cinder service should be deployed and managed displayName: Enabled path: cinder.enabled x-descriptors: - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: IPAddressPool expose VIP via MetalLB on the IPAddressPool - displayName: IPAddress Pool - path: cinder.externalEndpoints[0].ipAddressPool - - description: LoadBalancerIPs, request given IPs from the pool if available. - Using a list to allow dual stack (IPv4/IPv6) support - displayName: Load Balancer IPs - path: cinder.externalEndpoints[0].loadBalancerIPs - - description: SharedIP if true, VIP/VIPs get shared with multiple services - displayName: Shared IP - path: cinder.externalEndpoints[0].sharedIP - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: SharedIPKey specifies the sharing key which gets set as the annotation - on the LoadBalancer service. Services which share the same VIP must have - the same SharedIPKey. Defaults to the IPAddressPool if SharedIP is true, - but no SharedIPKey specified. - displayName: Shared IPKey - path: cinder.externalEndpoints[0].sharedIPKey - description: Template - Overrides to use when creating Cinder Resources displayName: Template path: cinder.template @@ -95,35 +81,29 @@ spec: - description: Glance - Parameters related to the Glance service displayName: Glance path: glance + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: glance.apiOverride - description: Enabled - Whether Glance service should be deployed and managed displayName: Enabled path: glance.enabled x-descriptors: - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: IPAddressPool expose VIP via MetalLB on the IPAddressPool - displayName: IPAddress Pool - path: glance.externalEndpoints[0].ipAddressPool - - description: LoadBalancerIPs, request given IPs from the pool if available. - Using a list to allow dual stack (IPv4/IPv6) support - displayName: Load Balancer IPs - path: glance.externalEndpoints[0].loadBalancerIPs - - description: SharedIP if true, VIP/VIPs get shared with multiple services - displayName: Shared IP - path: glance.externalEndpoints[0].sharedIP - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: SharedIPKey specifies the sharing key which gets set as the annotation - on the LoadBalancer service. Services which share the same VIP must have - the same SharedIPKey. Defaults to the IPAddressPool if SharedIP is true, - but no SharedIPKey specified. - displayName: Shared IPKey - path: glance.externalEndpoints[0].sharedIPKey - description: Template - Overrides to use when creating the Glance Service displayName: Template path: glance.template - description: Heat - Parameters related to the Heat services displayName: Heat path: heat + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: heat.apiOverride + - description: CnfAPIOverride, provides the ability to override the generated + manifest of several child resources. + displayName: Cnf APIOverride + path: heat.cnfAPIOverride - description: Enabled - Whether Heat services should be deployed and managed displayName: Enabled path: heat.enabled @@ -135,46 +115,48 @@ spec: - description: Horizon - Parameters related to the Horizon services displayName: Horizon path: horizon + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: horizon.apiOverride - description: Ironic - Parameters related to the Ironic services displayName: Ironic path: ironic + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: ironic.apiOverride - description: Enabled - Whether Ironic services should be deployed and managed displayName: Enabled path: ironic.enabled x-descriptors: - urn:alm:descriptor:com.tectonic.ui:booleanSwitch + - description: InspectorOverride, provides the ability to override the generated + manifest of several child resources. + displayName: Inspector Override + path: ironic.inspectorOverride - description: Template - Overrides to use when creating the Ironic services displayName: Template path: ironic.template - description: Keystone - Parameters related to the Keystone service displayName: Keystone path: keystone + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: keystone.apiOverride - description: Enabled - Whether Keystone service should be deployed and managed displayName: Enabled path: keystone.enabled x-descriptors: - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: IPAddressPool expose VIP via MetalLB on the IPAddressPool - displayName: IPAddress Pool - path: keystone.externalEndpoints[0].ipAddressPool - - description: LoadBalancerIPs, request given IPs from the pool if available. - Using a list to allow dual stack (IPv4/IPv6) support - displayName: Load Balancer IPs - path: keystone.externalEndpoints[0].loadBalancerIPs - - description: SharedIP if true, VIP/VIPs get shared with multiple services - displayName: Shared IP - path: keystone.externalEndpoints[0].sharedIP - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: SharedIPKey specifies the sharing key which gets set as the annotation - on the LoadBalancer service. Services which share the same VIP must have - the same SharedIPKey. Defaults to the IPAddressPool if SharedIP is true, - but no SharedIPKey specified. - displayName: Shared IPKey - path: keystone.externalEndpoints[0].sharedIPKey - description: Template - Overrides to use when creating the Keystone service displayName: Template path: keystone.template + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: manila.apiOverride - description: Enabled - Whether Manila service should be deployed and managed displayName: Enabled path: manila.enabled @@ -205,12 +187,16 @@ spec: - description: Neutron - Overrides to use when creating the Neutron Service displayName: Neutron path: neutron + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: neutron.apiOverride - description: Enabled - Whether Neutron service should be deployed and managed displayName: Enabled path: neutron.enabled x-descriptors: - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: Template - Overrides to use when creating the Neutron service + - description: Template - Overrides to use when creating the Neutron Service displayName: Template path: neutron.template - description: NodeSelector to target subset of worker nodes running control @@ -220,6 +206,16 @@ spec: - description: Nova - Parameters related to the Nova services displayName: Nova path: nova + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: nova.apiOverride + - description: CellOverride, provides the ability to override the generated + manifest of several child resources for a nova cell. cell0 never have compute + nodes and therefore it won't have a noVNCProxy deployed. Providing an override + for cell0 noVNCProxy does not have an effect. + displayName: Cell Override + path: nova.cellOverride - description: Enabled - Whether Nova services should be deployed and managed displayName: Enabled path: nova.enabled @@ -228,6 +224,10 @@ spec: - description: Template - Overrides to use when creating the Nova services displayName: Template path: nova.template + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: octavia.apiOverride - description: Enabled - Whether the Octavia service should be deployed and managed displayName: Enabled @@ -262,29 +262,15 @@ spec: - description: Placement - Parameters related to the Placement service displayName: Placement path: placement + - description: APIOverride, provides the ability to override the generated manifest + of several child resources. + displayName: APIOverride + path: placement.apiOverride - description: Enabled - Whether Placement service should be deployed and managed displayName: Enabled path: placement.enabled x-descriptors: - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: IPAddressPool expose VIP via MetalLB on the IPAddressPool - displayName: IPAddress Pool - path: placement.externalEndpoints[0].ipAddressPool - - description: LoadBalancerIPs, request given IPs from the pool if available. - Using a list to allow dual stack (IPv4/IPv6) support - displayName: Load Balancer IPs - path: placement.externalEndpoints[0].loadBalancerIPs - - description: SharedIP if true, VIP/VIPs get shared with multiple services - displayName: Shared IP - path: placement.externalEndpoints[0].sharedIP - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: SharedIPKey specifies the sharing key which gets set as the annotation - on the LoadBalancer service. Services which share the same VIP must have - the same SharedIPKey. Defaults to the IPAddressPool if SharedIP is true, - but no SharedIPKey specified. - displayName: Shared IPKey - path: placement.externalEndpoints[0].sharedIPKey - description: Template - Overrides to use when creating the Placement API displayName: Template path: placement.template @@ -299,28 +285,6 @@ spec: - description: Templates - Overrides to use when creating the Rabbitmq clusters displayName: Templates path: rabbitmq.templates - - description: ExternalEndpoint, expose a VIP via MetalLB on the pre-created - address pool - displayName: External Endpoint - path: rabbitmq.templates.externalEndpoint - - description: IPAddressPool expose VIP via MetalLB on the IPAddressPool - displayName: IPAddress Pool - path: rabbitmq.templates.externalEndpoint.ipAddressPool - - description: LoadBalancerIPs, request given IPs from the pool if available. - Using a list to allow dual stack (IPv4/IPv6) support - displayName: Load Balancer IPs - path: rabbitmq.templates.externalEndpoint.loadBalancerIPs - - description: SharedIP if true, VIP/VIPs get shared with multiple services - displayName: Shared IP - path: rabbitmq.templates.externalEndpoint.sharedIP - x-descriptors: - - urn:alm:descriptor:com.tectonic.ui:booleanSwitch - - description: SharedIPKey specifies the sharing key which gets set as the annotation - on the LoadBalancer service. Services which share the same VIP must have - the same SharedIPKey. Defaults to the IPAddressPool if SharedIP is true, - but no SharedIPKey specified. - displayName: Shared IPKey - path: rabbitmq.templates.externalEndpoint.sharedIPKey - description: Enabled - Whether the Redis service should be deployed and managed displayName: Enabled path: redis.enabled @@ -344,6 +308,10 @@ spec: path: swift.enabled x-descriptors: - urn:alm:descriptor:com.tectonic.ui:booleanSwitch + - description: ProxyOverride, provides the ability to override the generated + manifest of several child resources. + displayName: Proxy Override + path: swift.proxyOverride - description: Template - Overrides to use when creating Swift Resources displayName: Template path: swift.template diff --git a/go.mod b/go.mod index 1f2023403..ebf017875 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/ghodss/yaml v1.0.0 github.com/go-logr/logr v1.2.4 github.com/imdario/mergo v0.3.16 - github.com/onsi/ginkgo/v2 v2.12.0 + github.com/onsi/ginkgo/v2 v2.12.1 github.com/onsi/gomega v1.27.10 github.com/openstack-k8s-operators/cinder-operator/api v0.1.2-0.20230921082510-1b9a7de3d088 github.com/openstack-k8s-operators/dataplane-operator/api v0.1.1-0.20230919085012-e89d5ef2fafd @@ -14,14 +14,14 @@ require ( github.com/openstack-k8s-operators/heat-operator/api v0.1.1-0.20230920142821-e84784bede25 github.com/openstack-k8s-operators/horizon-operator/api v0.1.1-0.20230920143411-511d89a0e6cc github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230920125017-2c76cd203b44 - github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230915140049-df437872b34f + github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230926121739-27e75237b3c8 github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230920085319-92ae0260bbf3 - github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216 + github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb github.com/openstack-k8s-operators/manila-operator/api v0.1.1-0.20230921081246-996d4e390998 github.com/openstack-k8s-operators/mariadb-operator/api v0.1.1-0.20230918111825-8999b3b2dc3c github.com/openstack-k8s-operators/neutron-operator/api v0.1.1-0.20230920145429-537b5afebd07 github.com/openstack-k8s-operators/nova-operator/api v0.1.2-0.20230921152245-4a535c8f3e9a - github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230915083637-79fc51fd4dcf + github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230926130236-dece63badbab github.com/openstack-k8s-operators/openstack-ansibleee-operator/api v0.1.1-0.20230918170038-6c1275780727 github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.1.1-0.20230915055858-ecb378f804c9 github.com/openstack-k8s-operators/openstack-operator/apis v0.0.0-20230725141229-4ce90d0120fd diff --git a/go.sum b/go.sum index 2a07fd383..5b551cf86 100644 --- a/go.sum +++ b/go.sum @@ -129,8 +129,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.12.0 h1:UIVDowFPwpg6yMUpPjGkYvf06K3RAiJXUhCxEwQVHRI= -github.com/onsi/ginkgo/v2 v2.12.0/go.mod h1:ZNEzXISYlqpb8S36iN71ifqLi3vVD1rVJGvWRCJOUpQ= +github.com/onsi/ginkgo/v2 v2.12.1 h1:uHNEO1RP2SpuZApSkel9nEh1/Mu+hmQe7Q+Pepg5OYA= +github.com/onsi/ginkgo/v2 v2.12.1/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxCMwNRnMjhhIDOWHJowi6q8G6koI= @@ -147,12 +147,12 @@ github.com/openstack-k8s-operators/horizon-operator/api v0.1.1-0.20230920143411- github.com/openstack-k8s-operators/horizon-operator/api v0.1.1-0.20230920143411-511d89a0e6cc/go.mod h1:rFtiDTgkoNa+Z+F0q87SIRINWm6gbgeaK3Uyl3bl/Tg= github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230920125017-2c76cd203b44 h1:W2HZy+uk5fnVwvw3+/Jd/k7sNiVXCOd8SiV0dMvmjys= github.com/openstack-k8s-operators/infra-operator/apis v0.1.1-0.20230920125017-2c76cd203b44/go.mod h1:fOJ95wMSymtfoellY/TFKcrzW6bu/nTCTzEnFEgCGCc= -github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230915140049-df437872b34f h1:dDlJMlhvM6csW24Tf3X8SEW3rG2k08SBgV0ORR1Ts6w= -github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230915140049-df437872b34f/go.mod h1:51ig7IbGf7AjxeWi7+qvmRp0C5lp91e+HhXYTYlhVng= +github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230926121739-27e75237b3c8 h1:8oUx3FiVAOYgyTjdYwlE5AJ84K/LorLwbVuvsXkVGs8= +github.com/openstack-k8s-operators/ironic-operator/api v0.1.1-0.20230926121739-27e75237b3c8/go.mod h1:TCsXzuQMxg9HAOfwPtc4NtaQ0ac+NJDqwuLFYOpWw7k= github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230920085319-92ae0260bbf3 h1:6VCz/ZBTJEQJTx4+z8UxLv3WITa4Bgx5CSP237wJ5xM= github.com/openstack-k8s-operators/keystone-operator/api v0.1.1-0.20230920085319-92ae0260bbf3/go.mod h1:ta6w/29i4WuWkQp6I4cOLwMGQ5/vJI0y8Em7u+M34jo= -github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216 h1:arYbQA6bLyXJkHm+6M6gPc4YpWMFjs5qkG16Yii4UDo= -github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230919113507-d74c2f31d216/go.mod h1:Ge7Yf6AUmjEvJK9AIW2bT5udLzBIcK59b1QxqymncaQ= +github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb h1:MRd/OrTTZeU/KXAzlIH003wPLmjZ4PHaQ7HisJC9hGY= +github.com/openstack-k8s-operators/lib-common/modules/common v0.1.1-0.20230925103424-7dcb605ea0bb/go.mod h1:kZS5rqVWBZeCyYor2PeQB9IEZ19mGaeL/to3x8F9OJg= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230919113507-d74c2f31d216 h1:h76faqi4WAXBs3D2B0GLUdlCjS0dh78wRL0d5RZUwhk= github.com/openstack-k8s-operators/lib-common/modules/openstack v0.1.1-0.20230919113507-d74c2f31d216/go.mod h1:GHi64tgyC75/vuT8Crda0yN5iCIYiSyS4bpzYJjX7MA= github.com/openstack-k8s-operators/lib-common/modules/storage v0.1.1-0.20230919113507-d74c2f31d216 h1:1dMwzjuZJSRgHcwblOo6jHrWAe2anwWu4w35Rukz1kw= @@ -165,8 +165,8 @@ github.com/openstack-k8s-operators/neutron-operator/api v0.1.1-0.20230920145429- github.com/openstack-k8s-operators/neutron-operator/api v0.1.1-0.20230920145429-537b5afebd07/go.mod h1:gyme//YzQKEWSn3i3S0oaNBjnMu/m2m0N13boSShBfE= github.com/openstack-k8s-operators/nova-operator/api v0.1.2-0.20230921152245-4a535c8f3e9a h1:yBEEaxtR4RWH/M9dAHUQPJ/TBbFDiRkQB4YJcKCcqGE= github.com/openstack-k8s-operators/nova-operator/api v0.1.2-0.20230921152245-4a535c8f3e9a/go.mod h1:kyi9gsAg4d8hxjUxnjDTMZeps3xTutH2+FcAnz783m8= -github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230915083637-79fc51fd4dcf h1:e6peuUus9UjB8qpVH0MAUpwog7pHgSAH80cYpaLVKvU= -github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230915083637-79fc51fd4dcf/go.mod h1:r8xZ27TZ5EPgH+EL6VRQRv0tIxlu0zNNvTnz9PjjZUg= +github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230926130236-dece63badbab h1:5b79D/nCq6g6LSUiGahY8Uqada7OfMIYPRjIX+C0UDs= +github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-20230926130236-dece63badbab/go.mod h1:0CM3dV0tMkluHm84zlcj4L+ToFon7Pe767wKIEkYPKM= github.com/openstack-k8s-operators/openstack-ansibleee-operator/api v0.1.1-0.20230918170038-6c1275780727 h1:D/FWfsLEWNvIBxXRzJmQmzmwp/jZuap3JNicVWo5Eh4= github.com/openstack-k8s-operators/openstack-ansibleee-operator/api v0.1.1-0.20230918170038-6c1275780727/go.mod h1:gCsHjYsZWdF8DOd4MH++2RZ+tF/VOuhhaVXWB7HrLCg= github.com/openstack-k8s-operators/openstack-baremetal-operator/api v0.1.1-0.20230915055858-ecb378f804c9 h1:Q6CPgccNeA2zfLZnDFxYBa0nwlfnZm60kSDa/4TqucY= diff --git a/pkg/openstack/ironic.go b/pkg/openstack/ironic.go index d207ccb5e..44d0f5d74 100644 --- a/pkg/openstack/ironic.go +++ b/pkg/openstack/ironic.go @@ -4,14 +4,19 @@ import ( "context" "fmt" + "github.com/openstack-k8s-operators/lib-common/modules/common" "github.com/openstack-k8s-operators/lib-common/modules/common/condition" "github.com/openstack-k8s-operators/lib-common/modules/common/helper" + "github.com/openstack-k8s-operators/lib-common/modules/common/service" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "sigs.k8s.io/controller-runtime/pkg/reconcile" ironicv1 "github.com/openstack-k8s-operators/ironic-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" + k8s_errors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" ) @@ -29,9 +34,96 @@ func ReconcileIronic(ctx context.Context, instance *corev1beta1.OpenStackControl return res, err } instance.Status.Conditions.Remove(corev1beta1.OpenStackControlPlaneIronicReadyCondition) + instance.Status.Conditions.Remove(corev1beta1.OpenStackControlPlaneExposeIronicReadyCondition) return ctrl.Result{}, nil } + // add selector to service overrides + for _, endpointType := range []service.Endpoint{service.EndpointPublic, service.EndpointInternal} { + if instance.Spec.Ironic.Template.IronicAPI.Override.Service == nil { + instance.Spec.Ironic.Template.IronicAPI.Override.Service = map[service.Endpoint]service.RoutedOverrideSpec{} + } + instance.Spec.Ironic.Template.IronicAPI.Override.Service[endpointType] = + AddServiceComponentLabel( + instance.Spec.Ironic.Template.IronicAPI.Override.Service[endpointType], + ironic.Name+"-api") + + if instance.Spec.Ironic.Template.IronicInspector.Override.Service == nil { + instance.Spec.Ironic.Template.IronicInspector.Override.Service = map[service.Endpoint]service.RoutedOverrideSpec{} + } + instance.Spec.Ironic.Template.IronicInspector.Override.Service[endpointType] = + AddServiceComponentLabel( + instance.Spec.Ironic.Template.IronicInspector.Override.Service[endpointType], + ironic.Name+"-inspector") + } + + // When component services got created check if there is the need to create a route + if err := helper.GetClient().Get(ctx, types.NamespacedName{Name: "ironic", Namespace: instance.Namespace}, ironic); err != nil { + if !k8s_errors.IsNotFound(err) { + return ctrl.Result{}, err + } + } + + // Ironic API + if ironic.Status.Conditions.IsTrue(ironicv1.IronicAPIReadyCondition) { + svcs, err := service.GetServicesListWithLabel( + ctx, + helper, + instance.Namespace, + map[string]string{common.AppSelector: ironic.Name + "-api"}, + ) + if err != nil { + return ctrl.Result{}, err + } + + var ctrlResult reconcile.Result + instance.Spec.Ironic.Template.IronicAPI.Override.Service, ctrlResult, err = EnsureRoute( + ctx, + instance, + helper, + ironic, + svcs, + instance.Spec.Ironic.Template.IronicAPI.Override.Service, + instance.Spec.Ironic.APIOverride.Route, + corev1beta1.OpenStackControlPlaneExposeIronicReadyCondition, + ) + if err != nil { + return ctrlResult, err + } else if (ctrlResult != ctrl.Result{}) { + return ctrlResult, nil + } + } + + // Ironic Inspector + if ironic.Status.Conditions.IsTrue(ironicv1.IronicInspectorReadyCondition) { + svcs, err := service.GetServicesListWithLabel( + ctx, + helper, + instance.Namespace, + map[string]string{common.AppSelector: ironic.Name + "-inspector"}, + ) + if err != nil { + return ctrl.Result{}, err + } + + var ctrlResult reconcile.Result + instance.Spec.Ironic.Template.IronicInspector.Override.Service, ctrlResult, err = EnsureRoute( + ctx, + instance, + helper, + ironic, + svcs, + instance.Spec.Ironic.Template.IronicInspector.Override.Service, + instance.Spec.Ironic.InspectorOverride.Route, + corev1beta1.OpenStackControlPlaneExposeIronicReadyCondition, + ) + if err != nil { + return ctrlResult, err + } else if (ctrlResult != ctrl.Result{}) { + return ctrlResult, nil + } + } + helper.GetLogger().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) diff --git a/pkg/openstack/octavia.go b/pkg/openstack/octavia.go index 6429a0eee..6715197f1 100644 --- a/pkg/openstack/octavia.go +++ b/pkg/openstack/octavia.go @@ -20,14 +20,19 @@ import ( "context" "fmt" + "github.com/openstack-k8s-operators/lib-common/modules/common" "github.com/openstack-k8s-operators/lib-common/modules/common/condition" "github.com/openstack-k8s-operators/lib-common/modules/common/helper" + "github.com/openstack-k8s-operators/lib-common/modules/common/service" "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + "sigs.k8s.io/controller-runtime/pkg/reconcile" octaviav1 "github.com/openstack-k8s-operators/octavia-operator/api/v1beta1" corev1beta1 "github.com/openstack-k8s-operators/openstack-operator/apis/core/v1beta1" + k8s_errors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" ctrl "sigs.k8s.io/controller-runtime" ) @@ -45,9 +50,57 @@ func ReconcileOctavia(ctx context.Context, instance *corev1beta1.OpenStackContro return res, err } instance.Status.Conditions.Remove(corev1beta1.OpenStackControlPlaneOctaviaReadyCondition) + instance.Status.Conditions.Remove(corev1beta1.OpenStackControlPlaneExposeOctaviaReadyCondition) return ctrl.Result{}, nil } + // add selector to service overrides + for _, endpointType := range []service.Endpoint{service.EndpointPublic, service.EndpointInternal} { + if instance.Spec.Octavia.Template.OctaviaAPI.Override.Service == nil { + instance.Spec.Octavia.Template.OctaviaAPI.Override.Service = map[service.Endpoint]service.RoutedOverrideSpec{} + } + instance.Spec.Octavia.Template.OctaviaAPI.Override.Service[endpointType] = + AddServiceComponentLabel( + instance.Spec.Octavia.Template.OctaviaAPI.Override.Service[endpointType], + octavia.Name) + } + + // When component services got created check if there is the need to create a route + if err := helper.GetClient().Get(ctx, types.NamespacedName{Name: "octavia", Namespace: instance.Namespace}, octavia); err != nil { + if !k8s_errors.IsNotFound(err) { + return ctrl.Result{}, err + } + } + + if octavia.Status.Conditions.IsTrue(condition.ReadyCondition) { + svcs, err := service.GetServicesListWithLabel( + ctx, + helper, + instance.Namespace, + map[string]string{common.AppSelector: octavia.Name}, + ) + if err != nil { + return ctrl.Result{}, err + } + + var ctrlResult reconcile.Result + instance.Spec.Octavia.Template.OctaviaAPI.Override.Service, ctrlResult, err = EnsureRoute( + ctx, + instance, + helper, + octavia, + svcs, + instance.Spec.Octavia.Template.OctaviaAPI.Override.Service, + instance.Spec.Octavia.APIOverride.Route, + corev1beta1.OpenStackControlPlaneExposeOctaviaReadyCondition, + ) + if err != nil { + return ctrlResult, err + } else if (ctrlResult != ctrl.Result{}) { + return ctrlResult, nil + } + } + 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)