Skip to content

Commit 7239718

Browse files
committed
Update namePrefix
1 parent 0badce2 commit 7239718

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

config/default/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace: cluster-api-provider-scaleway-system
66
# "wordpress" becomes "alices-wordpress".
77
# Note that it should also match with the prefix (text before '-') of the namespace
88
# field above.
9-
namePrefix: cluster-api-provider-scaleway-
9+
namePrefix: caps-
1010

1111
# Labels to add to all resources and selectors.
1212
#labels:

test/e2e/e2e_test.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ import (
1818
const namespace = "cluster-api-provider-scaleway-system"
1919

2020
// serviceAccountName created for the project
21-
const serviceAccountName = "cluster-api-provider-scaleway-controller-manager"
21+
const serviceAccountName = "caps-controller-manager"
2222

2323
// metricsServiceName is the name of the metrics service of the project
24-
const metricsServiceName = "cluster-api-provider-scaleway-controller-manager-metrics-service"
24+
const metricsServiceName = "caps-controller-manager-metrics-service"
2525

2626
// metricsRoleBindingName is the name of the RBAC that will be created to allow get the metrics data
27-
const metricsRoleBindingName = "cluster-api-provider-scaleway-metrics-binding"
27+
const metricsRoleBindingName = "caps-metrics-binding"
2828

2929
var _ = Describe("Manager", Ordered, func() {
3030
var controllerPodName string
@@ -157,12 +157,18 @@ var _ = Describe("Manager", Ordered, func() {
157157
It("should ensure the metrics endpoint is serving metrics", func() {
158158
By("creating a ClusterRoleBinding for the service account to allow access to metrics")
159159
cmd := exec.Command("kubectl", "create", "clusterrolebinding", metricsRoleBindingName,
160-
"--clusterrole=cluster-api-provider-scaleway-metrics-reader",
160+
"--clusterrole=caps-metrics-reader",
161161
fmt.Sprintf("--serviceaccount=%s:%s", namespace, serviceAccountName),
162162
)
163163
_, err := utils.Run(cmd)
164164
Expect(err).NotTo(HaveOccurred(), "Failed to create ClusterRoleBinding")
165165

166+
DeferCleanup(func() {
167+
cmd := exec.Command("kubectl", "delete", "clusterrolebinding", metricsRoleBindingName)
168+
_, err := utils.Run(cmd)
169+
Expect(err).NotTo(HaveOccurred(), "Failed to delete ClusterRoleBinding")
170+
})
171+
166172
By("validating that the metrics service is available")
167173
cmd = exec.Command("kubectl", "get", "service", metricsServiceName, "-n", namespace)
168174
_, err = utils.Run(cmd)

0 commit comments

Comments
 (0)