Skip to content

Commit

Permalink
Merge pull request #18 from pdettori/fix-rbac
Browse files Browse the repository at this point in the history
🐛 fix rbac for shadow pods
  • Loading branch information
pdettori authored Jul 9, 2024
2 parents a460780 + 1a31f27 commit 91308f1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
3 changes: 3 additions & 0 deletions charts/shadow-pods/templates/manager_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ rules:
- argoproj.io
resources:
- workflows
- workflows/finalizers
verbs:
- get
- list
- watch
- update
- patch
- apiGroups:
- ""
resources:
Expand Down
28 changes: 22 additions & 6 deletions shadow-pods/config/rbac/role.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: shadow-pods
app.kubernetes.io/managed-by: kustomize
name: manager-role
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- pods
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- argoproj.io
resources:
- workflows
verbs:
- get
- list
- patch
- update
- watch
2 changes: 1 addition & 1 deletion shadow-pods/internal/controller/workflow_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type PodInfo struct {
Phase v1alpha1.NodePhase
}

//+kubebuilder:rbac:groups=argoproj.io,resources=workflows,verbs=get;list;watch;update;patch
//+kubebuilder:rbac:groups=argoproj.io,resources=workflows;workflows/finalizers,verbs=get;list;watch;update;patch
//+kubebuilder:rbac:groups="",resources=pods,verbs=get;list;watch;create;update;patch

// Reconcile is part of the main kubernetes reconciliation loop which aims to
Expand Down

0 comments on commit 91308f1

Please sign in to comment.