Skip to content

Commit c3b7580

Browse files
authored
Merge pull request #146 from snapp-incubator/feat/sync-restart-access
feat: grant restart action to the sync project role (v0.5.3)
2 parents c65156c + db0c68d commit c3b7580

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

config/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ kind: Kustomization
66
images:
77
- name: controller
88
newName: ghcr.io/snapp-incubator/argocd-complementary-operator
9-
newTag: 0.5.2
9+
newTag: 0.5.3

internal/controller/common_unit_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,9 @@ func TestCreateAppProjStructure(t *testing.T) {
374374
expectedPolicies := []string{
375375
"p, proj:team-x:team-x-sync, applications, get, team-x/*, allow",
376376
"p, proj:team-x:team-x-sync, applications, sync, team-x/*, allow",
377+
"p, proj:team-x:team-x-sync, applications, action/apps/Deployment/restart, team-x/*, allow",
378+
"p, proj:team-x:team-x-sync, applications, action/apps/StatefulSet/restart, team-x/*, allow",
379+
"p, proj:team-x:team-x-sync, applications, action/apps/DaemonSet/restart, team-x/*, allow",
377380
"p, proj:team-x:team-x-sync, repositories, get, team-x/*, allow",
378381
"p, proj:team-x:team-x-sync, logs, get, team-x/*, allow",
379382
}

internal/controller/controller_common.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ func createAppProj(team string) *argov1alpha1.AppProject {
173173
Policies: []string{
174174
"p, proj:" + team + ":" + team + "-sync, applications, get, " + team + "/*, allow",
175175
"p, proj:" + team + ":" + team + "-sync, applications, sync, " + team + "/*, allow",
176+
"p, proj:" + team + ":" + team + "-sync, applications, action/apps/Deployment/restart, " + team + "/*, allow",
177+
"p, proj:" + team + ":" + team + "-sync, applications, action/apps/StatefulSet/restart, " + team + "/*, allow",
178+
"p, proj:" + team + ":" + team + "-sync, applications, action/apps/DaemonSet/restart, " + team + "/*, allow",
176179
"p, proj:" + team + ":" + team + "-sync, repositories, get, " + team + "/*, allow",
177180
"p, proj:" + team + ":" + team + "-sync, logs, get, " + team + "/*, allow",
178181
},

0 commit comments

Comments
 (0)