Skip to content

Commit 993c1bf

Browse files
committed
Fix RBAC generation to include namespaces list and watch
Also add checking manifests to github PR CI Signed-off-by: Angel Misevski <[email protected]>
1 parent fc3dd69 commit 993c1bf

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/pr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ jobs:
5757
echo "not well formatted sources are found"
5858
exit 1
5959
fi
60+
-
61+
name: Check manifests
62+
run: |
63+
git reset HEAD --hard
64+
pip install yq
65+
# Note: fmt is necessary after generate since generated sources will
66+
# fail format check by default.
67+
make generate fmt manifests
68+
if [[ ! -z $(git status -s) ]]
69+
then
70+
echo "generated sources are not up to date"
71+
exit 1
72+
fi
6073
-
6174
name: Run Go Tests
6275
run: |

controllers/workspace/devworkspace_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ type DevWorkspaceReconciler struct {
6565
/////// Required permissions for controller
6666
// +kubebuilder:rbac:groups=apps;extensions,resources=deployments;replicasets,verbs=*
6767
// +kubebuilder:rbac:groups="",resources=pods;serviceaccounts;secrets;configmaps;persistentvolumeclaims,verbs=*
68-
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get
68+
// +kubebuilder:rbac:groups="",resources=namespaces,verbs=get;list;watch
6969
// +kubebuilder:rbac:groups="batch",resources=jobs,verbs=get;create;list;watch;update;patch;delete
7070
// +kubebuilder:rbac:groups=admissionregistration.k8s.io,resources=mutatingwebhookconfigurations;validatingwebhookconfigurations,verbs=get;list;watch;create;update;patch;delete
7171
// +kubebuilder:rbac:groups=rbac.authorization.k8s.io,resources=roles;rolebindings;clusterroles;clusterrolebindings,verbs=get;list;watch;create;update

0 commit comments

Comments
 (0)