Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
weinimo committed Mar 6, 2024
1 parent 66c7fba commit 8f8b4a4
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 21 deletions.
6 changes: 0 additions & 6 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,6 @@ rules:
- mariadbaccounts/finalizers
verbs:
- update
- apiGroups:
- mariadb.openstack.org
resources:
- mariadbaccounts/finalizers
verbs:
- update
- apiGroups:
- mariadb.openstack.org
resources:
Expand Down
2 changes: 1 addition & 1 deletion controllers/octavia_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ func (r *OctaviaReconciler) generateServiceConfigMaps(
// or end-user YAML declaration)
databaseAccount, dbSecret, err := mariadbv1.EnsureMariaDBAccount(
ctx, h, instance.Spec.DatabaseAccount,
instance.Namespace, false,
instance.Namespace, false, "",
)

if err != nil {
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240220135139-2dc967b0f6de
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240224182407-3b6c02b195f6
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240224182407-3b6c02b195f6
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240222094307-76fef735f093
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240303091826-438dde8600d3
github.com/openstack-k8s-operators/octavia-operator/api v0.0.0-00010101000000-000000000000
github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240221131248-e97a8e5ca98f
go.uber.org/zap v1.26.0
Expand Down Expand Up @@ -88,5 +88,3 @@ replace github.com/openstack-k8s-operators/octavia-operator/api => ./api
// 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/mariadb-operator/api => github.com/zzzeek/mariadb-operator/api v0.3.1-0.20240222195117-de879c4be63a //allow-merging
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.2024022418
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240224182407-3b6c02b195f6/go.mod h1:oB0Lc1U5wiJZBdT3lSMkZfG/LhHR6z/SJ0Tp7Y/GUkg=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240224182407-3b6c02b195f6 h1:u03dfqrO8ml0gShw11Mm+vmqOsSXbY9pv+4sfo2HaTQ=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240224182407-3b6c02b195f6/go.mod h1:K1FWWDoDOvMkeyz26x2dNKFJMOad041AXhTL2S8JAlA=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240303091826-438dde8600d3 h1:fwb+GvvnN9Mhkgg5pBksZ8W5+hLCcNOorHsUTQYA1Lg=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240303091826-438dde8600d3/go.mod h1:f9IIyWeoskWoeWaDFF3qmAJ2Kqyovfi0Ar/QUfk3qag=
github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240221131248-e97a8e5ca98f h1:iacJjeV8yVUE0ZD27PjrbLTgQlaAUF5s+fPczQg/Yqc=
github.com/openstack-k8s-operators/ovn-operator/api v0.3.1-0.20240221131248-e97a8e5ca98f/go.mod h1:m/5jovuZ3Y1/Uy2af8RqxWhe3+bWn7QIFXH4amKBdmY=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand All @@ -110,8 +112,6 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
github.com/zzzeek/mariadb-operator/api v0.3.1-0.20240222195117-de879c4be63a h1:eVtZZAIwgoyOGv1BdNsjy1WRsosdvK13NeYhyXikOIo=
github.com/zzzeek/mariadb-operator/api v0.3.1-0.20240222195117-de879c4be63a/go.mod h1:f9IIyWeoskWoeWaDFF3qmAJ2Kqyovfi0Ar/QUfk3qag=
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
Expand Down
2 changes: 1 addition & 1 deletion pkg/octavia/initcontainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func InitContainer(init APIDetails) []corev1.Container {

envVars := map[string]env.Setter{}
envVars["DatabaseHost"] = env.SetValue(init.DatabaseHost)
envVars["DatabaseUser"] = env.SetValue(init.DatabaseAccount)
envVars["DatabaseAccount"] = env.SetValue(init.DatabaseAccount)
envVars["DatabaseName"] = env.SetValue(init.DatabaseName)

envs := []corev1.EnvVar{
Expand Down
2 changes: 1 addition & 1 deletion templates/octavia/bin/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -ex
# Secrets are obtained from ENV variables.
export PASSWORD=${AdminPassword:?"Please specify a AdminPassword variable."}
export DBHOST=${DatabaseHost:?"Please specify a DatabaseHost variable."}
export DBUSER=${DatabaseUser:?"Please specify a DatabaseUser variable."}
export DBUSER=${DatabaseAccount:?"Please specify a DatabaseAccount variable."}
export DBPASSWORD=${DatabasePassword:?"Please specify a DatabasePassword variable."}
export DB=${DatabaseName:-"octavia"}
export TRANSPORTURL=${TransportURL:-""}
Expand Down
2 changes: 1 addition & 1 deletion templates/octaviaamphoracontroller/bin/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ set -ex
# Secrets are obtained from ENV variables.
export PASSWORD=${AdminPassword:?"Please specify a AdminPassword variable."}
export DBHOST=${DatabaseHost:?"Please specify a DatabaseHost variable."}
export DBUSER=${DatabaseUser:?"Please specify a DatabaseUser variable."}
export DBUSER=${DatabaseAccount:?"Please specify a DatabaseAccount variable."}
export DBPASSWORD=${DatabasePassword:?"Please specify a DatabasePassword variable."}
export DB=${DatabaseName:-"octavia"}
export TRANSPORTURL=${TransportURL:-""}
Expand Down
7 changes: 1 addition & 6 deletions tests/kuttl/common/assert_sample_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
apiVersion: octavia.openstack.org/v1beta1
kind: Octavia
metadata:
finalizers:
- Octavia
name: octavia
spec:
customServiceConfig: |
Expand Down Expand Up @@ -71,9 +69,6 @@ spec:
database: OctaviaDatabasePassword
secret: osp-secret
serviceUser: octavia
status:
databaseHostname: openstack.octavia-kuttl-tests.svc
apireadyCount: 1
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -174,7 +169,7 @@ spec:
key: transport_url
name: rabbitmq-transport-url-octavia-octavia-transport
- name: DatabaseHost
value: openstack
value: openstack.octavia-kuttl-tests.svc
- name: DatabaseName
value: octavia
- name: databaseAccount
Expand Down

0 comments on commit 8f8b4a4

Please sign in to comment.