Skip to content

Commit

Permalink
Merge pull request #408 from gthiemonge/fix_defaults
Browse files Browse the repository at this point in the history
Fix default values for nested structs
  • Loading branch information
openshift-merge-bot[bot] authored Nov 5, 2024
2 parents 76ee47d + e54e303 commit f9cd9b8
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/bases/octavia.openstack.org_octavias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ spec:
type: string
type: array
createDefaultLbMgmtNetwork:
default: true
description: CreateDefaultLbMgmtNetwork - when True, octavia-operator
creates a Management Network for the default Availability Zone
of the control plane. Can be set to false when deploying OpenStack
Expand All @@ -136,6 +137,7 @@ spec:
Attachment Definition
type: string
manageLbMgmtNetworks:
default: true
description: ManageLbMgmtNetworks - when True, octavia-operator
creates the Neutron resources needed for its Management Network
type: boolean
Expand Down
2 changes: 2 additions & 0 deletions api/v1beta1/octavia_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,12 @@ type PasswordSelector struct {
// OctaviaLbMgmtNetworks Settings for Octavia management networks
type OctaviaLbMgmtNetworks struct {
// +kubebuilder:validation:Optional
// +kubebuilder:default=true
// ManageLbMgmtNetworks - when True, octavia-operator creates the Neutron resources needed for its Management Network
ManageLbMgmtNetworks bool `json:"manageLbMgmtNetworks"`

// +kubebuilder:validation:Optional
// +kubebuilder:default=true
// CreateDefaultLbMgmtNetwork - when True, octavia-operator creates a
// Management Network for the default Availability Zone of the control
// plane. Can be set to false when deploying OpenStack in DCN mode.
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/octavia.openstack.org_octavias.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ spec:
type: string
type: array
createDefaultLbMgmtNetwork:
default: true
description: CreateDefaultLbMgmtNetwork - when True, octavia-operator
creates a Management Network for the default Availability Zone
of the control plane. Can be set to false when deploying OpenStack
Expand All @@ -136,6 +137,7 @@ spec:
Attachment Definition
type: string
manageLbMgmtNetworks:
default: true
description: ManageLbMgmtNetworks - when True, octavia-operator
creates the Neutron resources needed for its Management Network
type: boolean
Expand Down
3 changes: 3 additions & 0 deletions config/samples/octavia_v1beta1_octavia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ spec:
rabbitMqClusterName: rabbitmq
secret: osp-secret
preserveJobs: false
lbMgmtNetwork:
availabilityZones:
- zone-1
customServiceConfig: |
[DEFAULT]
debug = true
Expand Down
5 changes: 5 additions & 0 deletions tests/kuttl/common/assert_sample_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ spec:
preserveJobs: false
secret: osp-secret
serviceUser: octavia
lbMgmtNetwork:
availabilityZones:
- zone-1
manageLbMgmtNetworks: true
createDefaultLbMgmtNetwork: true
octaviaAPI:
customServiceConfig: |
[DEFAULT]
Expand Down
7 changes: 7 additions & 0 deletions tests/kuttl/tests/octavia_scale/00-test-resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@ kind: TestStep
commands:
- script: |
oc kustomize ../../../../config/samples/network-attachment-definition | oc apply -n $NAMESPACE -f -
- script: |
oc patch -n $NAMESPACE ovncontrollers ovncontroller-sample --type merge -p '
spec:
external-ids:
availability-zones:
- zone-1
'

0 comments on commit f9cd9b8

Please sign in to comment.