Skip to content

Commit 26b27c1

Browse files
committed
Fix e2e
1 parent 9744225 commit 26b27c1

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

config/rbac/role.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ kind: ClusterRole
44
metadata:
55
name: manager-role
66
rules:
7+
- apiGroups:
8+
- ""
9+
resources:
10+
- secrets
11+
verbs:
12+
- get
13+
- list
14+
- update
15+
- watch
16+
- apiGroups:
17+
- cluster.x-k8s.io
18+
resources:
19+
- clusters
20+
- clusters/status
21+
- machines
22+
- machines/status
23+
verbs:
24+
- get
25+
- list
26+
- watch
727
- apiGroups:
828
- infrastructure.cluster.x-k8s.io
929
resources:

internal/controller/scalewaycluster_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ func NewScalewayClusterReconciler(c client.Client) *ScalewayClusterReconciler {
4949
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=scalewayclusters,verbs=get;list;watch;create;update;patch;delete
5050
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=scalewayclusters/status,verbs=get;update;patch
5151
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=scalewayclusters/finalizers,verbs=update
52+
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=clusters;clusters/status,verbs=get;list;watch
53+
// +kubebuilder:rbac:groups="",resources=secrets,verbs=get;list;watch;update
5254

5355
// Reconcile is part of the main kubernetes reconciliation loop which aims to
5456
// move the current state of the cluster closer to the desired state.

internal/controller/scalewaymachine_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func NewScalewayMachineReconciler(c client.Client) *ScalewayMachineReconciler {
4545
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=scalewaymachines,verbs=get;list;watch;create;update;patch;delete
4646
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=scalewaymachines/status,verbs=get;update;patch
4747
// +kubebuilder:rbac:groups=infrastructure.cluster.x-k8s.io,resources=scalewaymachines/finalizers,verbs=update
48+
// +kubebuilder:rbac:groups=cluster.x-k8s.io,resources=machines;machines/status,verbs=get;list;watch
4849

4950
// Reconcile is part of the main kubernetes reconciliation loop which aims to
5051
// move the current state of the cluster closer to the desired state.

test/e2e/e2e_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
)
1616

1717
// namespace where the project is deployed in
18-
const namespace = "cluster-api-provider-scaleway-system"
18+
const namespace = "caps-system"
1919

2020
// serviceAccountName created for the project
2121
const serviceAccountName = "caps-controller-manager"
@@ -49,6 +49,11 @@ var _ = Describe("Manager", Ordered, func() {
4949
_, err = utils.Run(cmd)
5050
Expect(err).NotTo(HaveOccurred(), "Failed to install CRDs")
5151

52+
By("installing cluster-api CRDs")
53+
cmd = exec.Command("kubectl", "apply", "-k", "github.com/kubernetes-sigs/cluster-api/config/crd/")
54+
_, err = utils.Run(cmd)
55+
Expect(err).NotTo(HaveOccurred(), "Failed to apply cluster-api CRDs")
56+
5257
By("deploying the controller-manager")
5358
cmd = exec.Command("make", "deploy", fmt.Sprintf("IMG=%s", projectImage))
5459
_, err = utils.Run(cmd)

0 commit comments

Comments
 (0)