Skip to content

Commit

Permalink
Add new glanceAPI struct
Browse files Browse the repository at this point in the history
This change is the first of a series where the purpose is to move away
from the harcoded internal/external glanceAPI instance in favor of an
arbitrary number of GlanceAPI instances.
The current change doesn't introduce the ability to deploy >1 GlanceAPI
instance, but introduces the intermediate struct that will serve this
purpose.
The split behavior is still preserved, but it happens behind the scenes
in Glance.

Depends-On: openstack-k8s-operators/glance-operator/pull/329

Note: Still WIP and under review.

Signed-off-by: Francesco Pantano <[email protected]>
  • Loading branch information
fmount committed Nov 7, 2023
1 parent 20a7e0f commit f688341
Show file tree
Hide file tree
Showing 20 changed files with 215 additions and 407 deletions.
213 changes: 53 additions & 160 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3146,7 +3146,7 @@ spec:
- extraVol
type: object
type: array
glanceAPIExternal:
glanceAPI:
properties:
containerImage:
type: string
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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: ""
Expand Down Expand Up @@ -3438,8 +3332,7 @@ spec:
required:
- containerImage
- databaseInstance
- glanceAPIExternal
- glanceAPIInternal
- glanceAPI
- imageCacheSize
- secret
- storageRequest
Expand Down
10 changes: 6 additions & 4 deletions apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
20 changes: 10 additions & 10 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand All @@ -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=
Expand Down
Loading

0 comments on commit f688341

Please sign in to comment.