diff --git a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml index 253ac8935..d1e96f984 100644 --- a/apis/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/apis/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -3146,7 +3146,7 @@ spec: - extraVol type: object type: array - glanceAPIExternal: + glanceAPI: properties: containerImage: type: string @@ -3177,169 +3177,52 @@ spec: override: properties: service: - properties: - endpointURL: - type: string - metadata: - properties: - annotations: - additionalProperties: + 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 - type: object - labels: - additionalProperties: + externalTrafficPolicy: 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: + internalTrafficPolicy: 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 - pvc: - type: string - 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 - required: - - containerImage - type: object - glanceAPIInternal: - properties: - containerImage: - type: string - customServiceConfig: - type: string - customServiceConfigSecrets: - items: - type: string - type: array - debug: - properties: - service: - default: false - type: boolean - type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object - networkAttachments: - items: - type: string - type: array - nodeSelector: - additionalProperties: - type: string - type: object - override: - properties: - service: - properties: - endpointURL: - type: string - metadata: - properties: - annotations: - additionalProperties: + ipFamilyPolicy: type: string - type: object - labels: - additionalProperties: + loadBalancerClass: 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: + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: 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 + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object type: object type: object pvc: @@ -3381,8 +3264,19 @@ spec: x-kubernetes-int-or-string: true type: object type: object + storageClass: + type: string + storageRequest: + type: string + type: + default: split + enum: + - split + - single + type: string required: - containerImage + - storageRequest type: object imageCacheSize: default: "" @@ -3438,8 +3332,7 @@ spec: required: - containerImage - databaseInstance - - glanceAPIExternal - - glanceAPIInternal + - glanceAPI - imageCacheSize - secret - storageRequest diff --git a/apis/go.mod b/apis/go.mod index fe84942ce..2994c50b5 100644 --- a/apis/go.mod +++ b/apis/go.mod @@ -11,8 +11,8 @@ require ( github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231030011854-d014e871e1c1 github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20231020142809-b6b6796c004f github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20231026221435-33533d2716d9 - github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231020144009-3e445cd965f8 - github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231027113646-46f2fdbf77f1 + github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231103151903-a1a0e540408d + github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231102083359-58e12a1299b2 github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20231025113820-f49225061a75 github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20231024153304-3bd4917dd1d5 github.com/openstack-k8s-operators/neutron-operator/api v0.3.1-0.20231024012242-a8ddfbf9ad44 @@ -65,8 +65,8 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/openshift/api v3.9.0+incompatible // indirect - github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231027113646-46f2fdbf77f1 //indirect - github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231027113646-46f2fdbf77f1 + github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231102083359-58e12a1299b2 //indirect + github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231102083359-58e12a1299b2 github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect @@ -111,3 +111,5 @@ replace github.com/openshift/api => github.com/openshift/api v0.0.0-202304141430 // Bump golang.org/x/net to avoid Rapid Reset CVE replace golang.org/x/net => golang.org/x/net v0.17.0 //allow-merging + +replace github.com/openstack-k8s-operators/glance-operator/api => github.com/fmount/glance-operator/api v0.0.0-20231107093207-ecb5c0001886 diff --git a/apis/go.sum b/apis/go.sum index e3d6834ea..516c689ae 100644 --- a/apis/go.sum +++ b/apis/go.sum @@ -33,6 +33,8 @@ github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCv github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= +github.com/fmount/glance-operator/api v0.0.0-20231107093207-ecb5c0001886 h1:TLPuFC5KAlEZ13ZRE9y9pcSjPzU6oQGlx65vZg40xwY= +github.com/fmount/glance-operator/api v0.0.0-20231107093207-ecb5c0001886/go.mod h1:b+/Jzmzv0wbVOxmRe+RKILhqmiKzrwC74eZyeD57RTc= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -132,8 +134,6 @@ github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxC github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4= github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231020183900-9e910befd6b1 h1:Ord99cl5+efbXF37fMvfN2BTtIWWwgA+kh23M1hTGqs= github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231020183900-9e910befd6b1/go.mod h1:8NFIyjXZeC+T2UBcmTDTfSatRdhi2eaZlaAuzcT2rNk= -github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231029084849-1626f1b5fd75 h1:Fs6wT/L88eaCBkRrqxcFVEyyUjDxGPuJTvW0r1rb2Z0= -github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231029084849-1626f1b5fd75/go.mod h1:Q+rECoDyozwQhmGY/XBH78bsWZPHoSYLJBAuPpPDstM= github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231024034110-9dd57dde400d h1:TUyytjG3MT7mxGu9FGq+F+cbnbpyCqrUmSHxXCA8bBw= github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231024034110-9dd57dde400d/go.mod h1:ncGl+d8igcmEldEceSD55QSplCT5hRUvgCMUy55BY5I= github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231030011854-d014e871e1c1 h1:Xqoe9BVToQakhY8ZQpteQUEtD6kVDRlz8DAW609Nids= @@ -142,14 +142,14 @@ github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20231020142809-b github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20231020142809-b6b6796c004f/go.mod h1:Zx2FewCh3EFd62QGE7WnZBiAg0Spkm+FNM04eSRby1Q= github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20231026221435-33533d2716d9 h1:GkJJuun4td7/fNw7mCqntBXKkfq9SYvK6+Hgb4UbWN8= github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20231026221435-33533d2716d9/go.mod h1:jvTIQq25VtL21YtigO639tstZjc+aDwgOXk8/k58KsY= -github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231020144009-3e445cd965f8 h1:PpTqb+ZQfKJ81M2ngBsVAXWrxdpTogeWTgNAOYHEsXk= -github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231020144009-3e445cd965f8/go.mod h1:sDYtAWryP7mF2v4XfmKdAoFquVAMts2J5PuYFV9VBQU= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231027113646-46f2fdbf77f1 h1:2bUnS5bGT77jBguPF2zyivaHhcfWti/yB9TUXN803hY= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231027113646-46f2fdbf77f1/go.mod h1:NvjAETczXby5m3IvylR3YaOiEBWkmWbHBx/UrnUVtfA= -github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231027113646-46f2fdbf77f1 h1:tcqkGudMGkhYtLbMq8O0BVggrqsSdcdw1hEzplAO2Xc= -github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231027113646-46f2fdbf77f1/go.mod h1:bGwj+Spj1d880n7PhlmaRhLXpzTaX61b+ET0pfhm5gU= -github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231027113646-46f2fdbf77f1 h1:XeHpej7gpMu3rMy97+JPm8BUXsxbCwK/prYXmQsIhco= -github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231027113646-46f2fdbf77f1/go.mod h1:zoThLQNL2Sbp3KAj3OaBNm+gbkEeblQW8tKLFiU4xFs= +github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231103151903-a1a0e540408d h1:DbniGmM4s9c4MkkJhoDVprJtcBiB3ixpDZOu6VtgPJY= +github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231103151903-a1a0e540408d/go.mod h1:vIDFS1mvMsJ0ICXm2f8Qh+BmQwH/qef+Gq6SIoh4uKM= +github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231102083359-58e12a1299b2 h1:U4hwPDoo9k2wo6PldPyJbgfvo9Mdyuhum7vLWTHez1c= +github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231102083359-58e12a1299b2/go.mod h1:NvjAETczXby5m3IvylR3YaOiEBWkmWbHBx/UrnUVtfA= +github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231102083359-58e12a1299b2 h1:3b9GPyCUpbqogAv6j6k1WBQ1a3k7MINQyTaYik3VqNw= +github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231102083359-58e12a1299b2/go.mod h1:gT47JFLsW0STzgKSsdUMjT9qXEhz3VjoRZsZySWlhTM= +github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231102083359-58e12a1299b2 h1:4XQVtWvaw8DamAXzG6SCFOQF49z+BeacLJKS6I7q9GA= +github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231102083359-58e12a1299b2/go.mod h1:zoThLQNL2Sbp3KAj3OaBNm+gbkEeblQW8tKLFiU4xFs= github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20231025113820-f49225061a75 h1:Y7wTON0KdnZOwZV5PPMSWmqwchyG8LQX1qQiqPRtLnk= github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20231025113820-f49225061a75/go.mod h1:gGBlCiZwXl6fIK+Dg8isC26U5J0ARCWAaD0ZlLPW9/M= github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20231024153304-3bd4917dd1d5 h1:kDuJWEZIFvy0Kp9SMazZyijVNH6gfOy0HrYq9lU1lyw= diff --git a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml index 253ac8935..d1e96f984 100644 --- a/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml +++ b/config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml @@ -3146,7 +3146,7 @@ spec: - extraVol type: object type: array - glanceAPIExternal: + glanceAPI: properties: containerImage: type: string @@ -3177,169 +3177,52 @@ spec: override: properties: service: - properties: - endpointURL: - type: string - metadata: - properties: - annotations: - additionalProperties: + 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 - type: object - labels: - additionalProperties: + externalTrafficPolicy: 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: + internalTrafficPolicy: 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 - pvc: - type: string - 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 - required: - - containerImage - type: object - glanceAPIInternal: - properties: - containerImage: - type: string - customServiceConfig: - type: string - customServiceConfigSecrets: - items: - type: string - type: array - debug: - properties: - service: - default: false - type: boolean - type: object - defaultConfigOverwrite: - additionalProperties: - type: string - type: object - networkAttachments: - items: - type: string - type: array - nodeSelector: - additionalProperties: - type: string - type: object - override: - properties: - service: - properties: - endpointURL: - type: string - metadata: - properties: - annotations: - additionalProperties: + ipFamilyPolicy: type: string - type: object - labels: - additionalProperties: + loadBalancerClass: 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: + loadBalancerSourceRanges: + items: + type: string + type: array + sessionAffinity: 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 + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + type: + type: string + type: object + type: object type: object type: object pvc: @@ -3381,8 +3264,19 @@ spec: x-kubernetes-int-or-string: true type: object type: object + storageClass: + type: string + storageRequest: + type: string + type: + default: split + enum: + - split + - single + type: string required: - containerImage + - storageRequest type: object imageCacheSize: default: "" @@ -3438,8 +3332,7 @@ spec: required: - containerImage - databaseInstance - - glanceAPIExternal - - glanceAPIInternal + - glanceAPI - imageCacheSize - secret - storageRequest diff --git a/config/samples/core_v1beta1_openstackcontrolplane.yaml b/config/samples/core_v1beta1_openstackcontrolplane.yaml index c27c8b6ab..8be674bba 100644 --- a/config/samples/core_v1beta1_openstackcontrolplane.yaml +++ b/config/samples/core_v1beta1_openstackcontrolplane.yaml @@ -57,9 +57,12 @@ spec: secret: osp-secret glance: template: + secret: osp-secret databaseInstance: openstack storageClass: "" storageRequest: 10G + glanceAPI: + replicas: 1 cinder: template: databaseInstance: openstack diff --git a/config/samples/core_v1beta1_openstackcontrolplane_collapsed_cell.yaml b/config/samples/core_v1beta1_openstackcontrolplane_collapsed_cell.yaml index 0562fd2f2..f80db1dcb 100644 --- a/config/samples/core_v1beta1_openstackcontrolplane_collapsed_cell.yaml +++ b/config/samples/core_v1beta1_openstackcontrolplane_collapsed_cell.yaml @@ -34,9 +34,12 @@ spec: secret: osp-secret glance: template: + secret: osp-secret databaseInstance: openstack storageClass: "" storageRequest: 10G + glanceAPI: + replicas: 1 cinder: template: databaseInstance: openstack diff --git a/config/samples/core_v1beta1_openstackcontrolplane_galera.yaml b/config/samples/core_v1beta1_openstackcontrolplane_galera.yaml index 851a562e4..581b6ed71 100644 --- a/config/samples/core_v1beta1_openstackcontrolplane_galera.yaml +++ b/config/samples/core_v1beta1_openstackcontrolplane_galera.yaml @@ -50,9 +50,12 @@ spec: secret: osp-secret glance: template: + secret: osp-secret databaseInstance: openstack storageClass: "" storageRequest: 10G + glanceAPI: + replicas: 1 cinder: template: databaseInstance: openstack diff --git a/config/samples/core_v1beta1_openstackcontrolplane_galera_3replicas.yaml b/config/samples/core_v1beta1_openstackcontrolplane_galera_3replicas.yaml index b023168de..5077ac770 100644 --- a/config/samples/core_v1beta1_openstackcontrolplane_galera_3replicas.yaml +++ b/config/samples/core_v1beta1_openstackcontrolplane_galera_3replicas.yaml @@ -53,6 +53,9 @@ spec: databaseInstance: openstack storageClass: "" storageRequest: 10G + secret: osp-secret + glanceAPI: + replicas: 1 cinder: template: databaseInstance: openstack diff --git a/config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation.yaml b/config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation.yaml index cde87aefd..f12ea89d0 100644 --- a/config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation.yaml +++ b/config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation.yaml @@ -62,19 +62,19 @@ spec: databaseInstance: openstack storageClass: "" storageRequest: 10G - glanceAPIInternal: + secret: osp-secret + glanceAPI: + replicas: 1 override: service: - metadata: - annotations: - metallb.universe.tf/address-pool: internalapi - metallb.universe.tf/allow-shared-ip: internalapi - metallb.universe.tf/loadBalancerIPs: 172.17.0.80 - spec: - type: LoadBalancer - networkAttachments: - - storage - glanceAPIExternal: + internal: + metadata: + annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + spec: + type: LoadBalancer networkAttachments: - storage keystone: diff --git a/config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml b/config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml index 1e48fc5bd..697de1254 100644 --- a/config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml +++ b/config/samples/core_v1beta1_openstackcontrolplane_galera_network_isolation_3replicas.yaml @@ -62,19 +62,19 @@ spec: databaseInstance: openstack storageClass: "" storageRequest: 10G - glanceAPIInternal: + secret: osp-secret + glanceAPI: + replicas: 1 override: service: - metadata: - annotations: - metallb.universe.tf/address-pool: internalapi - metallb.universe.tf/allow-shared-ip: internalapi - metallb.universe.tf/loadBalancerIPs: 172.17.0.80 - spec: - type: LoadBalancer - networkAttachments: - - storage - glanceAPIExternal: + internal: + metadata: + annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + spec: + type: LoadBalancer networkAttachments: - storage keystone: diff --git a/config/samples/core_v1beta1_openstackcontrolplane_network_isolation.yaml b/config/samples/core_v1beta1_openstackcontrolplane_network_isolation.yaml index 32e3a53f0..000daf8ea 100644 --- a/config/samples/core_v1beta1_openstackcontrolplane_network_isolation.yaml +++ b/config/samples/core_v1beta1_openstackcontrolplane_network_isolation.yaml @@ -62,19 +62,19 @@ spec: databaseInstance: openstack storageClass: "" storageRequest: 10G - glanceAPIInternal: + secret: osp-secret + glanceAPI: + replicas: 1 override: service: - metadata: - annotations: - metallb.universe.tf/address-pool: internalapi - metallb.universe.tf/allow-shared-ip: internalapi - metallb.universe.tf/loadBalancerIPs: 172.17.0.80 - spec: - type: LoadBalancer - networkAttachments: - - storage - glanceAPIExternal: + internal: + metadata: + annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + spec: + type: LoadBalancer networkAttachments: - storage keystone: diff --git a/config/samples/core_v1beta1_openstackcontrolplane_network_isolation_ceph.yaml b/config/samples/core_v1beta1_openstackcontrolplane_network_isolation_ceph.yaml index 62a1164b6..f6f43f530 100644 --- a/config/samples/core_v1beta1_openstackcontrolplane_network_isolation_ceph.yaml +++ b/config/samples/core_v1beta1_openstackcontrolplane_network_isolation_ceph.yaml @@ -101,19 +101,19 @@ spec: rbd_store_user = openstack storageClass: "" storageRequest: 10G - glanceAPIInternal: + secret: osp-secret + glanceAPI: + replicas: 1 override: service: - metadata: - annotations: - metallb.universe.tf/address-pool: internalapi - metallb.universe.tf/allow-shared-ip: internalapi - metallb.universe.tf/loadBalancerIPs: 172.17.0.80 - spec: - type: LoadBalancer - networkAttachments: - - storage - glanceAPIExternal: + internal: + metadata: + annotations: + metallb.universe.tf/address-pool: internalapi + metallb.universe.tf/allow-shared-ip: internalapi + metallb.universe.tf/loadBalancerIPs: 172.17.0.80 + spec: + type: LoadBalancer networkAttachments: - storage keystone: diff --git a/go.mod b/go.mod index 69a4fd398..ba8964ea1 100644 --- a/go.mod +++ b/go.mod @@ -16,9 +16,9 @@ require ( github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231030011854-d014e871e1c1 github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20231020142809-b6b6796c004f github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20231026221435-33533d2716d9 - github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231020144009-3e445cd965f8 + github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231103151903-a1a0e540408d github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20231027113646-46f2fdbf77f1 - github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231027113646-46f2fdbf77f1 + github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231102083359-58e12a1299b2 github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20231027113646-46f2fdbf77f1 github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20231025113820-f49225061a75 github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20231024153304-3bd4917dd1d5 @@ -81,8 +81,8 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/openshift/api v3.9.0+incompatible - github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231027113646-46f2fdbf77f1 //indirect - github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231027113646-46f2fdbf77f1 //indirect + github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231102083359-58e12a1299b2 //indirect + github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231102083359-58e12a1299b2 //indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect @@ -129,3 +129,5 @@ 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 + +replace github.com/openstack-k8s-operators/glance-operator/api => github.com/fmount/glance-operator/api v0.0.0-20231107093207-ecb5c0001886 diff --git a/go.sum b/go.sum index c19d8c79a..ac0d00cc4 100644 --- a/go.sum +++ b/go.sum @@ -37,6 +37,8 @@ github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCv github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/flowstack/go-jsonschema v0.1.1/go.mod h1:yL7fNggx1o8rm9RlgXv7hTBWxdBM0rVwpMwimd3F3N0= +github.com/fmount/glance-operator/api v0.0.0-20231107093207-ecb5c0001886 h1:TLPuFC5KAlEZ13ZRE9y9pcSjPzU6oQGlx65vZg40xwY= +github.com/fmount/glance-operator/api v0.0.0-20231107093207-ecb5c0001886/go.mod h1:b+/Jzmzv0wbVOxmRe+RKILhqmiKzrwC74eZyeD57RTc= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= @@ -145,8 +147,6 @@ github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231020183900-9 github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231020183900-9e910befd6b1/go.mod h1:8NFIyjXZeC+T2UBcmTDTfSatRdhi2eaZlaAuzcT2rNk= github.com/openstack-k8s-operators/dataplane-operator/api v0.3.1-0.20231029224549-c73b9e5eddac h1:f18eUsKkLOb9lmdAKm7TljLNUzSalG5MuGPztyEQaDM= github.com/openstack-k8s-operators/dataplane-operator/api v0.3.1-0.20231029224549-c73b9e5eddac/go.mod h1:xkU3lg5cK0do484Kzp0AVTsc6uXO0LLWICfWQVSd6ZM= -github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231029084849-1626f1b5fd75 h1:Fs6wT/L88eaCBkRrqxcFVEyyUjDxGPuJTvW0r1rb2Z0= -github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231029084849-1626f1b5fd75/go.mod h1:Q+rECoDyozwQhmGY/XBH78bsWZPHoSYLJBAuPpPDstM= github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231024034110-9dd57dde400d h1:TUyytjG3MT7mxGu9FGq+F+cbnbpyCqrUmSHxXCA8bBw= github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231024034110-9dd57dde400d/go.mod h1:ncGl+d8igcmEldEceSD55QSplCT5hRUvgCMUy55BY5I= github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231030011854-d014e871e1c1 h1:Xqoe9BVToQakhY8ZQpteQUEtD6kVDRlz8DAW609Nids= @@ -155,16 +155,16 @@ github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20231020142809-b github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20231020142809-b6b6796c004f/go.mod h1:Zx2FewCh3EFd62QGE7WnZBiAg0Spkm+FNM04eSRby1Q= github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20231026221435-33533d2716d9 h1:GkJJuun4td7/fNw7mCqntBXKkfq9SYvK6+Hgb4UbWN8= github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20231026221435-33533d2716d9/go.mod h1:jvTIQq25VtL21YtigO639tstZjc+aDwgOXk8/k58KsY= -github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231020144009-3e445cd965f8 h1:PpTqb+ZQfKJ81M2ngBsVAXWrxdpTogeWTgNAOYHEsXk= -github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231020144009-3e445cd965f8/go.mod h1:sDYtAWryP7mF2v4XfmKdAoFquVAMts2J5PuYFV9VBQU= +github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231103151903-a1a0e540408d h1:DbniGmM4s9c4MkkJhoDVprJtcBiB3ixpDZOu6VtgPJY= +github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20231103151903-a1a0e540408d/go.mod h1:vIDFS1mvMsJ0ICXm2f8Qh+BmQwH/qef+Gq6SIoh4uKM= github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20231027113646-46f2fdbf77f1 h1:IBqwFm4+3TEkKIie7PhwYf8t46pV+QQIlkFfoRmTYQQ= github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20231027113646-46f2fdbf77f1/go.mod h1:TmvBx0eRe/K3hqPPwzhvjBhl3ugtpcmuV5KYjSpCMj0= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231027113646-46f2fdbf77f1 h1:2bUnS5bGT77jBguPF2zyivaHhcfWti/yB9TUXN803hY= -github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231027113646-46f2fdbf77f1/go.mod h1:NvjAETczXby5m3IvylR3YaOiEBWkmWbHBx/UrnUVtfA= -github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231027113646-46f2fdbf77f1 h1:tcqkGudMGkhYtLbMq8O0BVggrqsSdcdw1hEzplAO2Xc= -github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231027113646-46f2fdbf77f1/go.mod h1:bGwj+Spj1d880n7PhlmaRhLXpzTaX61b+ET0pfhm5gU= -github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231027113646-46f2fdbf77f1 h1:XeHpej7gpMu3rMy97+JPm8BUXsxbCwK/prYXmQsIhco= -github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231027113646-46f2fdbf77f1/go.mod h1:zoThLQNL2Sbp3KAj3OaBNm+gbkEeblQW8tKLFiU4xFs= +github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231102083359-58e12a1299b2 h1:U4hwPDoo9k2wo6PldPyJbgfvo9Mdyuhum7vLWTHez1c= +github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20231102083359-58e12a1299b2/go.mod h1:NvjAETczXby5m3IvylR3YaOiEBWkmWbHBx/UrnUVtfA= +github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231102083359-58e12a1299b2 h1:3b9GPyCUpbqogAv6j6k1WBQ1a3k7MINQyTaYik3VqNw= +github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20231102083359-58e12a1299b2/go.mod h1:gT47JFLsW0STzgKSsdUMjT9qXEhz3VjoRZsZySWlhTM= +github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231102083359-58e12a1299b2 h1:4XQVtWvaw8DamAXzG6SCFOQF49z+BeacLJKS6I7q9GA= +github.com/openstack-k8s-operators/lib-common/modules/storage v0.3.1-0.20231102083359-58e12a1299b2/go.mod h1:zoThLQNL2Sbp3KAj3OaBNm+gbkEeblQW8tKLFiU4xFs= github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20231027113646-46f2fdbf77f1 h1:ouapCIZeSB5D+g596OVyD6YDZrgP/AcMhgQ62J5CXyY= github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20231027113646-46f2fdbf77f1/go.mod h1:St2fdpMneNUq5XTamRLSgI5iKPm096JFGSFit5FjJ/4= github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20231025113820-f49225061a75 h1:Y7wTON0KdnZOwZV5PPMSWmqwchyG8LQX1qQiqPRtLnk= diff --git a/hack/pin-bundle-images.sh b/hack/pin-bundle-images.sh index 1e64787ea..0b92a82a5 100755 --- a/hack/pin-bundle-images.sh +++ b/hack/pin-bundle-images.sh @@ -46,6 +46,9 @@ for MOD_PATH in $(go list -mod=readonly -m -json all | jq -r '. | select(.Path | REPO_CURL_URL="https://${CURL_REGISTRY}/api/v1/repository/${IMAGENAMESPACE}" fi else + # Current hack to point to a diff glance-operator-bundle built on top + # of https://github.com/openstack-k8s-operators/glance-operator/pull/329 + GITHUB_USER="fpantano" REPO_CURL_URL="https://${CURL_REGISTRY}/api/v1/repository/${GITHUB_USER}" REPO_URL="${CURL_REGISTRY}/${GITHUB_USER}" fi diff --git a/pkg/openstack/glance.go b/pkg/openstack/glance.go index ca6e4fada..960686f3c 100644 --- a/pkg/openstack/glance.go +++ b/pkg/openstack/glance.go @@ -17,7 +17,6 @@ import ( k8s_errors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/utils/ptr" ctrl "sigs.k8s.io/controller-runtime" ) @@ -39,18 +38,15 @@ func ReconcileGlance(ctx context.Context, instance *corev1beta1.OpenStackControl return ctrl.Result{}, nil } - serviceOverrides := map[service.Endpoint]service.RoutedOverrideSpec{} - if instance.Spec.Glance.Template.GlanceAPIExternal.Override.Service != nil { - serviceOverrides[service.EndpointPublic] = *instance.Spec.Glance.Template.GlanceAPIExternal.Override.Service - } - if instance.Spec.Glance.Template.GlanceAPIInternal.Override.Service != nil { - serviceOverrides[service.EndpointInternal] = *instance.Spec.Glance.Template.GlanceAPIInternal.Override.Service - } - // add selector to service overrides for _, endpointType := range []service.Endpoint{service.EndpointPublic, service.EndpointInternal} { - svcOverride := serviceOverrides[endpointType] - serviceOverrides[endpointType] = AddServiceComponentLabel(svcOverride, glance.Name) + if instance.Spec.Glance.Template.GlanceAPI.Override.Service == nil { + instance.Spec.Glance.Template.GlanceAPI.Override.Service = map[service.Endpoint]service.RoutedOverrideSpec{} + } + instance.Spec.Glance.Template.GlanceAPI.Override.Service[endpointType] = + AddServiceComponentLabel( + instance.Spec.Manila.Template.ManilaAPI.Override.Service[endpointType], + glance.Name) } // When component services got created check if there is the need to create a route @@ -72,13 +68,13 @@ func ReconcileGlance(ctx context.Context, instance *corev1beta1.OpenStackControl } var ctrlResult reconcile.Result - serviceOverrides, ctrlResult, err = EnsureEndpointConfig( + instance.Spec.Glance.Template.GlanceAPI.Override.Service, ctrlResult, err = EnsureEndpointConfig( ctx, instance, helper, glance, svcs, - serviceOverrides, + instance.Spec.Glance.Template.GlanceAPI.Override.Service, instance.Spec.Glance.APIOverride, corev1beta1.OpenStackControlPlaneExposeGlanceReadyCondition, ) @@ -92,8 +88,6 @@ func ReconcileGlance(ctx context.Context, instance *corev1beta1.OpenStackControl helper.GetLogger().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) - glance.Spec.GlanceAPIExternal.Override.Service = ptr.To(serviceOverrides[service.EndpointPublic]) - glance.Spec.GlanceAPIInternal.Override.Service = ptr.To(serviceOverrides[service.EndpointInternal]) if glance.Spec.Secret == "" { glance.Spec.Secret = instance.Spec.Secret diff --git a/tests/kuttl/common/assert-sample-deployment.yaml b/tests/kuttl/common/assert-sample-deployment.yaml index 2e193af53..a40ac426d 100644 --- a/tests/kuttl/common/assert-sample-deployment.yaml +++ b/tests/kuttl/common/assert-sample-deployment.yaml @@ -43,6 +43,9 @@ spec: template: databaseInstance: openstack storageRequest: 10G + secret: osp-secret + glanceAPI: + replicas: 1 cinder: template: databaseInstance: openstack diff --git a/tests/kuttl/tests/collapsed/01-assert-collapsed-cell.yaml b/tests/kuttl/tests/collapsed/01-assert-collapsed-cell.yaml index e1e22c63f..2746b0de4 100644 --- a/tests/kuttl/tests/collapsed/01-assert-collapsed-cell.yaml +++ b/tests/kuttl/tests/collapsed/01-assert-collapsed-cell.yaml @@ -28,6 +28,8 @@ spec: template: databaseInstance: openstack storageRequest: 10G + glanceAPI: + replicas: 1 cinder: template: databaseInstance: openstack diff --git a/tests/kuttl/tests/galera-3replicas/01-assert-galera-3replicas.yaml b/tests/kuttl/tests/galera-3replicas/01-assert-galera-3replicas.yaml index 1d0b51309..35efe9d7d 100644 --- a/tests/kuttl/tests/galera-3replicas/01-assert-galera-3replicas.yaml +++ b/tests/kuttl/tests/galera-3replicas/01-assert-galera-3replicas.yaml @@ -44,6 +44,8 @@ spec: template: databaseInstance: openstack storageRequest: 10G + glanceAPI: + replicas: 1 cinder: template: databaseInstance: openstack diff --git a/tests/kuttl/tests/galera-basic/01-assert-galera.yaml b/tests/kuttl/tests/galera-basic/01-assert-galera.yaml index 96650f9ab..57379a3bc 100644 --- a/tests/kuttl/tests/galera-basic/01-assert-galera.yaml +++ b/tests/kuttl/tests/galera-basic/01-assert-galera.yaml @@ -44,6 +44,8 @@ spec: template: databaseInstance: openstack storageRequest: 10G + glanceAPI: + replicas: 1 cinder: template: databaseInstance: openstack