Skip to content

Commit

Permalink
Create nova route and svc endpoint overrides
Browse files Browse the repository at this point in the history
Creates the route for the nova components, also allows to customize the
route via override.

Generats the service override for the env with what is configured in
the externalEndpoints, or specified in the service template override.

Depends-On: openstack-k8s-operators/lib-common#313
Depends-On: openstack-k8s-operators/keystone-operator#289
Depends-On: openstack-k8s-operators/nova-operator#489

Jira: OSP-26690
  • Loading branch information
stuggi committed Aug 16, 2023
1 parent dbf1309 commit 80d41ae
Show file tree
Hide file tree
Showing 9 changed files with 674 additions and 64 deletions.
223 changes: 215 additions & 8 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6756,6 +6756,213 @@ spec:
type: object
nova:
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
cellOverride:
additionalProperties:
properties:
noVNCProxy:
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
type: object
type: object
enabled:
default: true
type: boolean
Expand Down Expand Up @@ -6793,7 +7000,7 @@ spec:
override:
properties:
service:
items:
additionalProperties:
properties:
endpointURL:
type: string
Expand Down Expand Up @@ -6839,7 +7046,7 @@ spec:
type: string
type: object
type: object
type: array
type: object
type: object
replicas:
default: 1
Expand Down Expand Up @@ -6973,7 +7180,7 @@ spec:
override:
properties:
service:
items:
additionalProperties:
properties:
endpointURL:
type: string
Expand Down Expand Up @@ -7019,7 +7226,7 @@ spec:
type: string
type: object
type: object
type: array
type: object
type: object
replicas:
default: 1
Expand Down Expand Up @@ -7080,7 +7287,7 @@ spec:
override:
properties:
service:
items:
additionalProperties:
properties:
endpointURL:
type: string
Expand Down Expand Up @@ -7126,7 +7333,7 @@ spec:
type: string
type: object
type: object
type: array
type: object
type: object
replicas:
default: 1
Expand Down Expand Up @@ -7230,7 +7437,7 @@ spec:
override:
properties:
service:
items:
additionalProperties:
properties:
endpointURL:
type: string
Expand Down Expand Up @@ -7276,7 +7483,7 @@ spec:
type: string
type: object
type: object
type: array
type: object
type: object
replicas:
default: 1
Expand Down
17 changes: 17 additions & 0 deletions apis/core/v1beta1/openstackcontrolplane_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,23 @@ type NovaSection struct {
//+operator-sdk:csv:customresourcedefinitions:type=spec
// Template - Overrides to use when creating the Nova services
Template novav1.NovaSpec `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
// CellOverride, provides the ability to override the generated manifest of several child resources
// for a nova cell.
CellOverride map[string]NovaCellOverrideSpec `json:"cellOverride,omitempty"`
}

// NovaCellOverrideSpec to override the generated manifest of several child resources.
type NovaCellOverrideSpec struct {
// +kubebuilder:validation:Optional
NoVNCProxy Override `json:"noVNCProxy,omitempty"`
}

// HeatSection defines the desired state of Heat services
Expand Down
24 changes: 24 additions & 0 deletions apis/core/v1beta1/zz_generated.deepcopy.go

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

Loading

0 comments on commit 80d41ae

Please sign in to comment.