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
Depends-On: /pull/518

Note: Still WIP and under review.

Signed-off-by: Francesco Pantano <[email protected]>
  • Loading branch information
fmount committed Oct 17, 2023
1 parent 90ff62e commit 051479c
Show file tree
Hide file tree
Showing 21 changed files with 63 additions and 270 deletions.
128 changes: 7 additions & 121 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3135,7 +3135,7 @@ spec:
- extraVol
type: object
type: array
glanceAPIExternal:
glanceAPI:
properties:
containerImage:
type: string
Expand Down Expand Up @@ -3251,125 +3251,12 @@ spec:
x-kubernetes-int-or-string: true
type: object
type: object
required:
- containerImage
type: object
glanceAPIInternal:
properties:
containerImage:
type: string
customServiceConfig:
type:
default: split
enum:
- split
- single
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:
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
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
Expand Down Expand Up @@ -3427,8 +3314,7 @@ spec:
required:
- containerImage
- databaseInstance
- glanceAPIExternal
- glanceAPIInternal
- glanceAPI
- imageCacheSize
- secret
- storageRequest
Expand Down
2 changes: 2 additions & 0 deletions apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ replace (
// 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.1.2-0.20231017102230-376986b4bd44
4 changes: 2 additions & 2 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.1.2-0.20231017102230-376986b4bd44 h1:RODHB5EE3Zlp1XxVhfjlVkTUwi09s7C6G/0gbJG+dak=
github.com/fmount/glance-operator/api v0.1.2-0.20231017102230-376986b4bd44/go.mod h1:D+c4nLxVzSZDeYqAGrfD5po2+udzVkF5M5SCF9QeMMY=
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 @@ -130,8 +132,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.20231006133827-ce89e0fd01f2 h1:sPQWPiTBSyNf1vdImemK4vAjavwmf/cKXkIrIMOVWTs=
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20231006133827-ce89e0fd01f2/go.mod h1:8NFIyjXZeC+T2UBcmTDTfSatRdhi2eaZlaAuzcT2rNk=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231013112543-a07d8273b82d h1:WEG0KPgsujhwVh7W/IbJ8I8JTDUuJj6V5rWD6L+KzbI=
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20231013112543-a07d8273b82d/go.mod h1:D+c4nLxVzSZDeYqAGrfD5po2+udzVkF5M5SCF9QeMMY=
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231015090350-5fdcca35e29e h1:XBXHAOx6UbYT5IKiSX4GcFLrvc6ccdcHi39As7+1NvM=
github.com/openstack-k8s-operators/heat-operator/api v0.3.1-0.20231015090350-5fdcca35e29e/go.mod h1:w4AkvOs7PCint2ZJSk2/ownZE3qQnVryNuqZsw0ZKM4=
github.com/openstack-k8s-operators/horizon-operator/api v0.3.1-0.20231015112558-692aca16f97d h1:WID1OPHjN8saP8SK5SZfE9m31e5HYrTltIugrIHgt3w=
Expand Down
128 changes: 7 additions & 121 deletions config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3135,7 +3135,7 @@ spec:
- extraVol
type: object
type: array
glanceAPIExternal:
glanceAPI:
properties:
containerImage:
type: string
Expand Down Expand Up @@ -3251,125 +3251,12 @@ spec:
x-kubernetes-int-or-string: true
type: object
type: object
required:
- containerImage
type: object
glanceAPIInternal:
properties:
containerImage:
type: string
customServiceConfig:
type:
default: split
enum:
- split
- single
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:
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
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
Expand Down Expand Up @@ -3427,8 +3314,7 @@ spec:
required:
- containerImage
- databaseInstance
- glanceAPIExternal
- glanceAPIInternal
- glanceAPI
- imageCacheSize
- secret
- storageRequest
Expand Down
3 changes: 3 additions & 0 deletions config/samples/core_v1beta1_openstackcontrolplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ spec:
secret: osp-secret
glance:
template:
secret: osp-secret
databaseInstance: openstack
storageClass: ""
storageRequest: 10G
glanceAPI:
replicas: 1
cinder:
template:
databaseInstance: openstack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions config/samples/core_v1beta1_openstackcontrolplane_galera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ spec:
databaseInstance: openstack
storageClass: ""
storageRequest: 10G
secret: osp-secret
glanceAPI:
replicas: 1
cinder:
template:
databaseInstance: openstack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ spec:
databaseInstance: openstack
storageClass: ""
storageRequest: 10G
glanceAPIInternal:
secret: osp-secret
glanceAPI:
replicas: 1
override:
service:
metadata:
Expand All @@ -68,9 +70,6 @@ spec:
type: LoadBalancer
networkAttachments:
- storage
glanceAPIExternal:
networkAttachments:
- storage
keystone:
apiOverride:
route: {}
Expand Down
Loading

0 comments on commit 051479c

Please sign in to comment.