Skip to content

Commit

Permalink
Bump barbican, set DB account default
Browse files Browse the repository at this point in the history
  • Loading branch information
dprince authored and stuggi committed Apr 9, 2024
1 parent dbd02ee commit b766775
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 20 deletions.
10 changes: 3 additions & 7 deletions apis/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ spec:
type: object
customServiceConfig:
type: string
databaseInstance:
type: string
databaseUser:
databaseAccount:
default: barbican
type: string
databaseInstance:
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand All @@ -429,13 +429,9 @@ spec:
type: object
passwordSelectors:
default:
database: BarbicanDatabasePassword
service: BarbicanPassword
simplecryptokek: BarbicanSimpleCryptoKEK
properties:
database:
default: BarbicanDatabasePassword
type: string
service:
default: BarbicanPassword
type: string
Expand Down
2 changes: 1 addition & 1 deletion apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.20
require (
github.com/onsi/ginkgo/v2 v2.16.0
github.com/onsi/gomega v1.31.1
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240305211912-95cf5d93d585
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240310115941-5124bc86e50e
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20240306133639-c2e243349b80
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20240306213520-073a542389ea
github.com/openstack-k8s-operators/glance-operator/api v0.3.1-0.20240306142853-6b5d6005953d
Expand Down
4 changes: 2 additions & 2 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxCMwNRnMjhhIDOWHJowi6q8G6koI=
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4=
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240305211912-95cf5d93d585 h1:QAIvORdCcZ+Nbg3Jy0TAg8AR1xoEWTC8IwISGD4wdWc=
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240305211912-95cf5d93d585/go.mod h1:BJoXL5gDpxJ4qCPKwfCjg6TG3Gm9cjeVA8qoDSFVBNI=
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240310115941-5124bc86e50e h1:bTwe7Vd6efGG5bQtVCcg5Vx+cI0PUcNQjeg0vOR28dk=
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240310115941-5124bc86e50e/go.mod h1:/cGtVPIqIZY31DvNLVJGIDTn7q0mySia1H9+/uOyKxI=
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20240306133639-c2e243349b80 h1:+rlsahNUHVjM3XvhqVtbIvfuU7Dgh8qRWSoRR0CUpkI=
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20240306133639-c2e243349b80/go.mod h1:j+ZW/9p2FGrVpo92t8KNTEVy4wWoVwVfTpVZxHRF/to=
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20240306213520-073a542389ea h1:6E5uL2bqgsOxKuV0K58w5L98PoNVg+iExgTzsfZfP8s=
Expand Down
10 changes: 3 additions & 7 deletions config/crd/bases/core.openstack.org_openstackcontrolplanes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,11 @@ spec:
type: object
customServiceConfig:
type: string
databaseInstance:
type: string
databaseUser:
databaseAccount:
default: barbican
type: string
databaseInstance:
type: string
defaultConfigOverwrite:
additionalProperties:
type: string
Expand All @@ -429,13 +429,9 @@ spec:
type: object
passwordSelectors:
default:
database: BarbicanDatabasePassword
service: BarbicanPassword
simplecryptokek: BarbicanSimpleCryptoKEK
properties:
database:
default: BarbicanDatabasePassword
type: string
service:
default: BarbicanPassword
type: string
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/onsi/ginkgo/v2 v2.16.0
github.com/onsi/gomega v1.31.1
github.com/openshift/api v3.9.0+incompatible
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240305211912-95cf5d93d585
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240310115941-5124bc86e50e
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20240306133639-c2e243349b80
github.com/openstack-k8s-operators/dataplane-operator/api v0.3.1-0.20240307144346-fdd88ea71261
github.com/openstack-k8s-operators/designate-operator/api v0.0.0-20240306213520-073a542389ea
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxCMwNRnMjhhIDOWHJowi6q8G6koI=
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4=
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240305211912-95cf5d93d585 h1:QAIvORdCcZ+Nbg3Jy0TAg8AR1xoEWTC8IwISGD4wdWc=
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240305211912-95cf5d93d585/go.mod h1:BJoXL5gDpxJ4qCPKwfCjg6TG3Gm9cjeVA8qoDSFVBNI=
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240310115941-5124bc86e50e h1:bTwe7Vd6efGG5bQtVCcg5Vx+cI0PUcNQjeg0vOR28dk=
github.com/openstack-k8s-operators/barbican-operator/api v0.0.0-20240310115941-5124bc86e50e/go.mod h1:/cGtVPIqIZY31DvNLVJGIDTn7q0mySia1H9+/uOyKxI=
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20240306133639-c2e243349b80 h1:+rlsahNUHVjM3XvhqVtbIvfuU7Dgh8qRWSoRR0CUpkI=
github.com/openstack-k8s-operators/cinder-operator/api v0.3.1-0.20240306133639-c2e243349b80/go.mod h1:j+ZW/9p2FGrVpo92t8KNTEVy4wWoVwVfTpVZxHRF/to=
github.com/openstack-k8s-operators/dataplane-operator/api v0.3.1-0.20240307144346-fdd88ea71261 h1:XNwnizDNHIg/RsBRXcK8rU1hCfkzymUW+PoRXISZuw0=
Expand Down
4 changes: 4 additions & 0 deletions pkg/openstack/barbican.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ func ReconcileBarbican(ctx context.Context, instance *corev1beta1.OpenStackContr
op, err := controllerutil.CreateOrPatch(ctx, helper.GetClient(), barbican, func() error {
instance.Spec.Barbican.Template.DeepCopyInto(&barbican.Spec)

// FIXME: barbican webhooks are not setting this correctly yet
if barbican.Spec.DatabaseAccount == "" {
barbican.Spec.DatabaseAccount = "barbican"
}
if barbican.Spec.Secret == "" {
barbican.Spec.Secret = instance.Spec.Secret
}
Expand Down

0 comments on commit b766775

Please sign in to comment.