Skip to content

Commit

Permalink
feat: Add pods/portforward permissions (#1809)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha authored Feb 5, 2024
1 parent aaa157b commit 1ae0142
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ metadata:
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
repository: https://github.com/eclipse-che/che-operator
support: Eclipse Foundation
name: eclipse-che.v7.81.0-832.next
name: eclipse-che.v7.82.0-835.next
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -806,6 +806,14 @@ spec:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/portforward
verbs:
- get
- list
- create
- apiGroups:
- workspace.devfile.io
resources:
Expand Down Expand Up @@ -1240,7 +1248,7 @@ spec:
minKubeVersion: 1.19.0
provider:
name: Eclipse Foundation
version: 7.81.0-832.next
version: 7.82.0-835.next
webhookdefinitions:
- admissionReviewVersions:
- v1
Expand Down
8 changes: 8 additions & 0 deletions config/rbac/cluster_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ''
resources:
- pods/portforward
verbs:
- get
- list
- create
- apiGroups:
- workspace.devfile.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/deployment/kubernetes/combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8745,6 +8745,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/portforward
verbs:
- get
- list
- create
- apiGroups:
- workspace.devfile.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/portforward
verbs:
- get
- list
- create
- apiGroups:
- workspace.devfile.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions deploy/deployment/openshift/combined.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8745,6 +8745,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/portforward
verbs:
- get
- list
- create
- apiGroups:
- workspace.devfile.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/portforward
verbs:
- get
- list
- create
- apiGroups:
- workspace.devfile.io
resources:
Expand Down
8 changes: 8 additions & 0 deletions helmcharts/next/templates/che-operator.ClusterRole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,14 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods/portforward
verbs:
- get
- list
- create
- apiGroups:
- workspace.devfile.io
resources:
Expand Down
5 changes: 5 additions & 0 deletions pkg/deploy/server/rbac.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ func (s *CheServerReconciler) getUserCommonPolicies() []rbacv1.PolicyRule {
Resources: []string{"pods/log"},
Verbs: []string{"get", "list", "watch"},
},
{
APIGroups: []string{""},
Resources: []string{"pods/portforward"},
Verbs: []string{"get", "list", "create"},
},
{
APIGroups: []string{""},
Resources: []string{"secrets"},
Expand Down

0 comments on commit 1ae0142

Please sign in to comment.