Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update finalzier to CRD doc #215

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/openstack-k8s-operators/placement-operator/api
go 1.20

require (
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240615134235-24529fcff658
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240618142732-ec81334ac10d
k8s.io/api v0.28.11
k8s.io/apimachinery v0.28.11
sigs.k8s.io/controller-runtime v0.16.6
Expand Down
4 changes: 2 additions & 2 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240615134235-24529fcff658 h1:h10bPourbXsIN7p5M//SUly/UzWfEp+d5tloBnyDDMI=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240615134235-24529fcff658/go.mod h1:k9KuWN2LBtLbKHgcyh/0lrwk3Kr0cOAhiR3hi/mrwOQ=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240618142732-ec81334ac10d h1:t1Lvt1WGp/WbkdU5R7nsc0NtMAvfd0K1nlNYLprHhbQ=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240618142732-ec81334ac10d/go.mod h1:k9KuWN2LBtLbKHgcyh/0lrwk3Kr0cOAhiR3hi/mrwOQ=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ require (
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240617061212-21a80bc3d1fa
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240615134235-24529fcff658
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240618142732-ec81334ac10d
github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240615134235-24529fcff658
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240617061457-85af496b1f8d
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240618160206-098a347e0f61
github.com/openstack-k8s-operators/placement-operator/api v0.3.1-0.20240216174613-3d349f26e681
go.uber.org/zap v1.27.0
k8s.io/api v0.28.11
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7 h1:rncLxJBpFGqBztyxC
github.com/openshift/api v0.0.0-20230414143018-3367bc7e6ac7/go.mod h1:ctXNyWanKEjGj8sss1KjjHQ3ENKFm33FFnS5BKaIPh4=
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240617061212-21a80bc3d1fa h1:Zq8sd+K35D7jawVJzuEATsOTESdMT1Wu6t9gdGK8sdA=
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240617061212-21a80bc3d1fa/go.mod h1:0IMSIVB7kMArAHQW+fQcaWTN4xDURGaEyLT+ro2Q05k=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240615134235-24529fcff658 h1:h10bPourbXsIN7p5M//SUly/UzWfEp+d5tloBnyDDMI=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240615134235-24529fcff658/go.mod h1:k9KuWN2LBtLbKHgcyh/0lrwk3Kr0cOAhiR3hi/mrwOQ=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240618142732-ec81334ac10d h1:t1Lvt1WGp/WbkdU5R7nsc0NtMAvfd0K1nlNYLprHhbQ=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240618142732-ec81334ac10d/go.mod h1:k9KuWN2LBtLbKHgcyh/0lrwk3Kr0cOAhiR3hi/mrwOQ=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240615134235-24529fcff658 h1:Vb2WhryohIhyeG55z3HDG3R5hk4ipvAYRxAOUgYrOlI=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240615134235-24529fcff658/go.mod h1:zuPcZ5Kopr15AdfxvA0xqKIIGCZ0XbSe/0VHNKuvbEE=
github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240615134235-24529fcff658 h1:E3v5us2zv+9bRj+8t9Lk0+QpC6t1KSgVsDuzv+7RiMQ=
github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240615134235-24529fcff658/go.mod h1:0h76CxD9g0z2Hk7fGFOZcjnzT1tQQ/yRNv3OXng+S/A=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240617061457-85af496b1f8d h1:9x6/YC/UzmT2dQ1ulHSFlK09cGQf3rxo0Ff5ki62/KE=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240617061457-85af496b1f8d/go.mod h1:C9Y3qa7mcFdqcWLpfnB61ZxI56Lu1PWm90er8tdAyu8=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240618160206-098a347e0f61 h1:D2Yk4HW54k9zUn9FBQqr3HRm6ta2rTjFc3yqExkyr+o=
github.com/openstack-k8s-operators/mariadb-operator/api v0.3.1-0.20240618160206-098a347e0f61/go.mod h1:HWwqZr9qI121evs7+M7AEO1qqIHY43roDsDrOnbjEMM=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand Down
22 changes: 11 additions & 11 deletions tests/functional/placementapi_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var _ = Describe("PlacementAPI controller", func() {
// it to run
Eventually(func() []string {
return GetPlacementAPI(names.PlacementAPIName).Finalizers
}, timeout, interval).Should(ContainElement("PlacementAPI"))
}, timeout, interval).Should(ContainElement("openstack.org/placementapi"))
})

It("should not create a config map", func() {
Expand Down Expand Up @@ -733,26 +733,26 @@ var _ = Describe("PlacementAPI controller", func() {

It("removes the finalizers when deleted", func() {
placement := GetPlacementAPI(names.PlacementAPIName)
Expect(placement.Finalizers).To(ContainElement("PlacementAPI"))
Expect(placement.Finalizers).To(ContainElement("openstack.org/placementapi"))
keystoneService := keystone.GetKeystoneService(names.KeystoneServiceName)
Expect(keystoneService.Finalizers).To(ContainElement("PlacementAPI"))
Expect(keystoneService.Finalizers).To(ContainElement("openstack.org/placementapi"))
keystoneEndpoint := keystone.GetKeystoneService(names.KeystoneEndpointName)
Expect(keystoneEndpoint.Finalizers).To(ContainElement("PlacementAPI"))
Expect(keystoneEndpoint.Finalizers).To(ContainElement("openstack.org/placementapi"))
db := mariadb.GetMariaDBDatabase(names.MariaDBDatabaseName)
Expect(db.Finalizers).To(ContainElement("PlacementAPI"))
Expect(db.Finalizers).To(ContainElement("openstack.org/placementapi"))
acc := mariadb.GetMariaDBAccount(names.MariaDBAccount)
Expect(acc.Finalizers).To(ContainElement("PlacementAPI"))
Expect(acc.Finalizers).To(ContainElement("openstack.org/placementapi"))

th.DeleteInstance(GetPlacementAPI(names.PlacementAPIName))

keystoneService = keystone.GetKeystoneService(names.KeystoneServiceName)
Expect(keystoneService.Finalizers).NotTo(ContainElement("PlacementAPI"))
Expect(keystoneService.Finalizers).NotTo(ContainElement("openstack.org/placementapi"))
keystoneEndpoint = keystone.GetKeystoneService(names.KeystoneEndpointName)
Expect(keystoneEndpoint.Finalizers).NotTo(ContainElement("PlacementAPI"))
Expect(keystoneEndpoint.Finalizers).NotTo(ContainElement("openstack.org/placementapi"))
db = mariadb.GetMariaDBDatabase(names.MariaDBDatabaseName)
Expect(db.Finalizers).NotTo(ContainElement("PlacementAPI"))
Expect(db.Finalizers).NotTo(ContainElement("openstack.org/placementapi"))
acc = mariadb.GetMariaDBAccount(names.MariaDBAccount)
Expect(acc.Finalizers).NotTo(ContainElement("PlacementAPI"))
Expect(acc.Finalizers).NotTo(ContainElement("openstack.org/placementapi"))
})

It("updates the deployment if configuration changes", func() {
Expand Down Expand Up @@ -884,7 +884,7 @@ var _ = Describe("PlacementAPI controller", func() {
"Placement",
names.PlacementAPIName.Namespace,
placement.DatabaseName,
"PlacementAPI",
"openstack.org/placementapi",
mariadb, timeout, interval,
)
},
Expand Down
2 changes: 1 addition & 1 deletion tests/kuttl/common/assert_sample_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: placement.openstack.org/v1beta1
kind: PlacementAPI
metadata:
finalizers:
- PlacementAPI
- openstack.org/placementapi
name: placement
spec:
customServiceConfig: |
Expand Down
2 changes: 1 addition & 1 deletion tests/kuttl/common/errors_cleanup_placement.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ apiVersion: placement.openstack.org/v1beta1
kind: PlacementAPI
metadata:
finalizers:
- PlacementAPI
- openstack.org/placementapi
name: placement
---
apiVersion: apps/v1
Expand Down
2 changes: 1 addition & 1 deletion tests/kuttl/tests/placement_deploy_tls/03-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: placement.openstack.org/v1beta1
kind: PlacementAPI
metadata:
finalizers:
- PlacementAPI
- openstack.org/placementapi
name: placement
spec:
customServiceConfig: |
Expand Down
2 changes: 1 addition & 1 deletion tests/kuttl/tests/placement_scale/03-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ apiVersion: placement.openstack.org/v1beta1
kind: PlacementAPI
metadata:
finalizers:
- PlacementAPI
- openstack.org/placementapi
name: placement
spec:
replicas: 3
Expand Down
2 changes: 1 addition & 1 deletion tests/kuttl/tests/placement_scale/04-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ apiVersion: placement.openstack.org/v1beta1
kind: PlacementAPI
metadata:
finalizers:
- PlacementAPI
- openstack.org/placementapi
name: placement
spec:
replicas: 1
Expand Down
2 changes: 1 addition & 1 deletion tests/kuttl/tests/placement_scale/05-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ apiVersion: placement.openstack.org/v1beta1
kind: PlacementAPI
metadata:
finalizers:
- PlacementAPI
- openstack.org/placementapi
name: placement
spec:
replicas: 0
Expand Down
Loading