Skip to content

Commit

Permalink
Set combined-ca-bundle as the default CACerts secret name
Browse files Browse the repository at this point in the history
If one misses to add the CACerts parameter to an OpenStackDataPlaneService
the resulting deployment won't receive the cacert bundle. This
defaults to combined-ca-bundle, which is also set in all the default
services.

Signed-off-by: Martin Schuppert <mschuppert@redhat.com>
  • Loading branch information
stuggi committed Oct 17, 2024
1 parent 2f7ab45 commit 26b5ae3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ spec:
default: false
type: boolean
caCerts:
default: combined-ca-bundle
maxLength: 253
type: string
certsFrom:
Expand Down
3 changes: 2 additions & 1 deletion apis/dataplane/v1beta1/openstackdataplaneservice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ type OpenStackDataPlaneServiceSpec struct {
// CACerts - Secret containing the CA certificate chain
// +kubebuilder:validation:Optional
// +kubebuilder:validation:MaxLength:=253
CACerts string `json:"caCerts,omitempty" yaml:"caCerts,omitempty"`
// +kubebuilder:default="combined-ca-bundle"
CACerts string `json:"caCerts" yaml:"caCerts"`

// OpenStackAnsibleEERunnerImage image to use as the ansibleEE runner image
// +kubebuilder:validation:Optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ spec:
default: false
type: boolean
caCerts:
default: combined-ca-bundle
maxLength: 253
type: string
certsFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,8 @@ spec:
name: libvirt-combined-ca-bundle
- mountPath: /var/lib/openstack/cacerts/nova
name: nova-combined-ca-bundle
- mountPath: /var/lib/openstack/cacerts/custom-global-service
name: custom-global-service-combined-ca-bundle
- mountPath: /runner/env/ssh_key
name: ssh-key
subPath: ssh_key
Expand Down Expand Up @@ -846,6 +848,10 @@ spec:
secret:
defaultMode: 420
secretName: combined-ca-bundle
- name: custom-global-service-combined-ca-bundle
secret:
defaultMode: 420
secretName: combined-ca-bundle
- name: ssh-key
secret:
defaultMode: 420
Expand Down

0 comments on commit 26b5ae3

Please sign in to comment.