Skip to content

Commit

Permalink
Add list of glanceAPI support
Browse files Browse the repository at this point in the history
This change aligns the openstack-operator with the work done in the
glance-operator to support the deployment of an arbitrary number of
glanceAPI(s).
The logic has been improved to support the new CRD and the Glance
reconcile logic has been revisited as well.

Signed-off-by: Francesco Pantano <[email protected]>
  • Loading branch information
fmount committed Dec 15, 2023
1 parent cbcaeae commit f36c6c4
Show file tree
Hide file tree
Showing 22 changed files with 636 additions and 552 deletions.
427 changes: 218 additions & 209 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apis/core/v1beta1/openstackcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ type GlanceSection struct {
// +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"`
APIOverride map[string]Override `json:"apiOverrides,omitempty"`
}

// CinderSection defines the desired state of Cinder service
Expand Down
8 changes: 7 additions & 1 deletion apis/core/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20231207160658-3b1359af5f52
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231208230042-a3f120021b62
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231205132751-b5000faad819
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231211221509-70df3a214fda
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231215121058-9d0a5762fadd
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231212061843-87c824741b45
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231212041209-95729f0f09ae
github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20231211112757-94d545047df2
Expand Down
4 changes: 2 additions & 2 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231208230042-a
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231208230042-a3f120021b62/go.mod h1:aa0sajD3CR9Em6tn28o6lRRdY42Qsy5iQaEGKxzJrNg=
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231205132751-b5000faad819 h1:QyKf2ifup+JTMth0lbufMjR3daAMKP71PeODqzWMG6g=
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231205132751-b5000faad819/go.mod h1:Wn+GO3Kddf7C5wM2vLNo2Ub1KRmy6qCuTwdyJlxXUuc=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231211221509-70df3a214fda h1:ob0lT9En7rlTd3DzaABAGIuvbtY7qCTpCb0QBRBClXE=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231211221509-70df3a214fda/go.mod h1:clURAsYt8FW9NK/b25Toi5A9sMLT3mkMufqIjWQu8Rs=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231215121058-9d0a5762fadd h1:UDf9+ZmsDDOsSKAfrCd5tVppGfFNz6M1ypw9zr7LDrs=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231215121058-9d0a5762fadd/go.mod h1:KNJ9X/3Svh/AuU+pVkJW6yAyTP9LdcIFsluEPlNhWa8=
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231212061843-87c824741b45 h1:cv2dIYZlb5RMaMpwm7kW2ImbtXHSrVgwfzyBWmKHDQ0=
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231212061843-87c824741b45/go.mod h1:EbUoaC7FbvC/B3cZhLt1XGYBauNTB67+I5cdypoEpgc=
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231212041209-95729f0f09ae h1:9sIHGpiQpgBHhSn/0xpT/TZOF4Ms48lCEcPUMDTj2xw=
Expand Down
427 changes: 218 additions & 209 deletions config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ spec:
- description: APIOverride, provides the ability to override the generated manifest
of several child resources.
displayName: APIOverride
path: glance.apiOverride
path: glance.apiOverrides
- description: TLS - overrides tls parameters for public endpoint
displayName: TLS
path: glance.apiOverride.tls
path: glance.apiOverrides.tls
- description: Enabled - Whether Glance service should be deployed and managed
displayName: Enabled
path: glance.enabled
Expand Down
8 changes: 5 additions & 3 deletions config/samples/core_v1beta1_openstackcontrolplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ spec:
databaseInstance: openstack
storageClass: ""
storageRequest: 10G
glanceAPI:
type: single
replicas: 1
keystoneEndpoint: default
glanceAPIs:
default:
type: single
replicas: 1
cinder:
template:
databaseInstance: openstack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ spec:
databaseInstance: openstack
storageClass: ""
storageRequest: 10G
glanceAPI:
replicas: 1
type: single
keystoneEndpoint: default
glanceAPIs:
default:
replicas: 1
type: single
cinder:
template:
databaseInstance: openstack
Expand Down
8 changes: 5 additions & 3 deletions config/samples/core_v1beta1_openstackcontrolplane_galera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ spec:
databaseInstance: openstack
storageClass: ""
storageRequest: 10G
glanceAPI:
type: single
replicas: 1
keystoneEndpoint: default
glanceAPIs:
default:
type: single
replicas: 1
cinder:
template:
databaseInstance: openstack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ spec:
storageClass: ""
storageRequest: 10G
secret: osp-secret
glanceAPI:
replicas: 1
type: single
keystoneEndpoint: default
glanceAPIs:
default:
replicas: 1
type: single
cinder:
template:
databaseInstance: openstack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,31 @@ spec:
- storage
replicas: 0 # backend needs to be configured
glance:
apiOverride:
route: {}
apiOverrides:
default:
route: {}
template:
databaseInstance: openstack
storageClass: ""
storageRequest: 10G
secret: osp-secret
glanceAPI:
type: single
replicas: 1
override:
service:
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
keystoneEndpoint: default
glanceAPIs:
default:
type: single
replicas: 1
override:
service:
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:
apiOverride:
route: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,28 +78,31 @@ spec:
barbicanKeystoneListener:
replicas: 1
glance:
apiOverride:
route: {}
apiOverrides:
default:
route: {}
template:
databaseInstance: openstack
storageClass: ""
storageRequest: 10G
secret: osp-secret
glanceAPI:
type: single
replicas: 1
override:
service:
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
keystoneEndpoint: default
glanceAPIs:
default:
type: single
replicas: 1
override:
service:
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:
apiOverride:
route: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,28 +78,31 @@ spec:
barbicanKeystoneListener:
replicas: 1
glance:
apiOverride:
route: {}
apiOverrides:
default:
route: {}
template:
databaseInstance: openstack
storageClass: ""
storageRequest: 10G
secret: osp-secret
glanceAPI:
type: single
replicas: 1
override:
service:
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
keystoneEndpoint: default
glanceAPIs:
default:
type: single
replicas: 1
override:
service:
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:
apiOverride:
route: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ spec:
- storage
replicas: 0 # backend needs to be configured
glance:
apiOverride:
route: {}
apiOverrides:
default:
route: {}
template:
databaseInstance: openstack
customServiceConfig: |
Expand All @@ -124,20 +125,22 @@ spec:
storageClass: ""
storageRequest: 10G
secret: osp-secret
glanceAPI:
replicas: 1
override:
service:
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
keystoneEndpoint: default
glanceAPIs:
default:
replicas: 1
override:
service:
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:
apiOverride:
route: {}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231208230042-a3f120021b62
github.com/openstack-k8s-operators/dataplane-operator/api v0.3.1-0.20231212100408-1277c2eb40df
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231205132751-b5000faad819
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231211221509-70df3a214fda
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231215121058-9d0a5762fadd
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231212061843-87c824741b45
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231212041209-95729f0f09ae
github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20231211112757-94d545047df2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ github.com/openstack-k8s-operators/dataplane-operator/api v0.3.1-0.2023121210040
github.com/openstack-k8s-operators/dataplane-operator/api v0.3.1-0.20231212100408-1277c2eb40df/go.mod h1:JtmEd6r3XsEmzGQyPLkn+ljE1ZY1Kkk7Gio4z5eiFfs=
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231205132751-b5000faad819 h1:QyKf2ifup+JTMth0lbufMjR3daAMKP71PeODqzWMG6g=
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20231205132751-b5000faad819/go.mod h1:Wn+GO3Kddf7C5wM2vLNo2Ub1KRmy6qCuTwdyJlxXUuc=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231211221509-70df3a214fda h1:ob0lT9En7rlTd3DzaABAGIuvbtY7qCTpCb0QBRBClXE=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231211221509-70df3a214fda/go.mod h1:clURAsYt8FW9NK/b25Toi5A9sMLT3mkMufqIjWQu8Rs=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231215121058-9d0a5762fadd h1:UDf9+ZmsDDOsSKAfrCd5tVppGfFNz6M1ypw9zr7LDrs=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231215121058-9d0a5762fadd/go.mod h1:KNJ9X/3Svh/AuU+pVkJW6yAyTP9LdcIFsluEPlNhWa8=
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231212061843-87c824741b45 h1:cv2dIYZlb5RMaMpwm7kW2ImbtXHSrVgwfzyBWmKHDQ0=
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231212061843-87c824741b45/go.mod h1:EbUoaC7FbvC/B3cZhLt1XGYBauNTB67+I5cdypoEpgc=
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231212041209-95729f0f09ae h1:9sIHGpiQpgBHhSn/0xpT/TZOF4Ms48lCEcPUMDTj2xw=
Expand Down
Loading

0 comments on commit f36c6c4

Please sign in to comment.