Skip to content

Commit

Permalink
chore(KFLUXVNGD-38): remove maintainers delete permissions
Browse files Browse the repository at this point in the history
Remove Project* delete permissions from maintainers, as maintainers
should not have permissions to delete applications or components.

Signed-off-by: Yftach Herzog <yherzog@redhat.com>
  • Loading branch information
yftacherzog committed Oct 7, 2024
1 parent 8739e21 commit 096ef73
Show file tree
Hide file tree
Showing 19 changed files with 1,224 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ resources:
- tiertemplate-appstudio-contributor-829105171-829105171.yaml
- tiertemplate-appstudio-maintainer-1904354742-1904354742.yaml
- tiertemplate-appstudio-maintainer-293087644-293087644.yaml
- tiertemplate-appstudio-maintainer-474752551-474752551.yaml
- tiertemplate-appstudio-tenant-199961605-199961605.yaml
- tiertemplate-appstudio-tenant-2313893948-2313893948.yaml
- tiertemplate-appstudio-tenant-3815075241-3815075241.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
contributor:
templateRef: appstudio-contributor-829105171-829105171
maintainer:
templateRef: appstudio-maintainer-1904354742-1904354742
templateRef: appstudio-maintainer-474752551-474752551
viewer:
templateRef: appstudio-viewer-4256863455-4256863455
status: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
# ----------------------------------------------------------------
# Generated by cli - DO NOT EDIT
# ----------------------------------------------------------------

apiVersion: toolchain.dev.openshift.com/v1alpha1
kind: TierTemplate
metadata:
name: appstudio-maintainer-474752551-474752551
namespace: toolchain-host-operator
spec:
revision: 474752551-474752551
template:
apiVersion: template.openshift.io/v1
kind: Template
metadata: {}
objects:
- apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: appstudio-maintainer-user-actions
namespace: ${NAMESPACE}
rules:
- apiGroups:
- appstudio.redhat.com
resources:
- applications
- components
- imagerepositories
- componentdetectionqueries
verbs:
- get
- list
- watch
- create
- update
- patch
- apiGroups:
- appstudio.redhat.com
resources:
- promotionruns
- snapshotenvironmentbindings
- snapshots
- environments
verbs:
- get
- list
- watch
- apiGroups:
- appstudio.redhat.com
resources:
- deploymenttargets
- deploymenttargetclaims
verbs:
- get
- list
- watch
- apiGroups:
- managed-gitops.redhat.com
resources:
- gitopsdeployments
- gitopsdeploymentmanagedenvironments
- gitopsdeploymentrepositorycredentials
- gitopsdeploymentsyncruns
verbs:
- get
- list
- watch
- apiGroups:
- tekton.dev
resources:
- pipelineruns
verbs:
- get
- list
- watch
- apiGroups:
- results.tekton.dev
resources:
- results
- records
- logs
verbs:
- get
- list
- apiGroups:
- appstudio.redhat.com
resources:
- integrationtestscenarios
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- appstudio.redhat.com
resources:
- enterprisecontractpolicies
verbs:
- get
- list
- watch
- apiGroups:
- appstudio.redhat.com
resources:
- releases
- releasestrategies
- releaseplans
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- appstudio.redhat.com
resources:
- releaseplanadmissions
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- jvmbuildservice.io
resources:
- jbsconfigs
- artifactbuilds
verbs:
- get
- list
- watch
- create
- update
- patch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- apiGroups:
- appstudio.redhat.com
resources:
- buildpipelineselectors
verbs:
- get
- list
- watch
- apiGroups:
- projctl.konflux.dev
resources:
- projects
- projectdevelopmentstreams
- projectdevelopmentstreamtemplates
verbs:
- get
- list
- watch
- create
- update
- patch
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: appstudio-maintainer-${USERNAME}-actions-user
namespace: ${NAMESPACE}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: appstudio-maintainer-user-actions
subjects:
- kind: User
name: ${USERNAME}
- apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: appstudio-${USERNAME}-view-user
namespace: ${NAMESPACE}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- kind: User
name: ${USERNAME}
parameters:
- name: NAMESPACE
required: true
- name: USERNAME
required: true
tierName: appstudio
type: maintainer
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resources:
- tiertemplate-appstudiolarge-maintainer-1929014883-1904354742.yaml
- tiertemplate-appstudiolarge-maintainer-1929014883-293087644.yaml
- tiertemplate-appstudiolarge-maintainer-3994678728-1904354742.yaml
- tiertemplate-appstudiolarge-maintainer-3994678728-474752551.yaml
- tiertemplate-appstudiolarge-tenant-1884308846-199961605.yaml
- tiertemplate-appstudiolarge-tenant-1884308846-2313893948.yaml
- tiertemplate-appstudiolarge-tenant-1929014883-3815075241.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
contributor:
templateRef: appstudiolarge-contributor-3994678728-829105171
maintainer:
templateRef: appstudiolarge-maintainer-3994678728-1904354742
templateRef: appstudiolarge-maintainer-3994678728-474752551
viewer:
templateRef: appstudiolarge-viewer-3994678728-4256863455
status: {}
Loading

0 comments on commit 096ef73

Please sign in to comment.