Skip to content

Commit

Permalink
GITOPS-3617 Create Job from Cronjob feature failing with error cannot…
Browse files Browse the repository at this point in the history
… create resource "jobs"

Signed-off-by: Cheng Fang <cfang@redhat.com>
  • Loading branch information
chengfang committed Feb 8, 2024
1 parent 0556c7d commit 9d7f830
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions controllers/argocd/policyrule.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,17 @@ func policyRuleForServer() []v1.PolicyRule {
"list",
},
},
{
APIGroups: []string{
"batch",
},
Resources: []string{
"jobs",
},
Verbs: []string{
"create",
},
},
}
}

Expand Down Expand Up @@ -229,6 +240,17 @@ func policyRuleForServerApplicationSourceNamespaces() []v1.PolicyRule {
"delete",
},
},
{
APIGroups: []string{
"batch",
},
Resources: []string{
"jobs",
},
Verbs: []string{
"create",
},
},
}
}

Expand Down Expand Up @@ -270,6 +292,17 @@ func policyRuleForServerClusterRole() []v1.PolicyRule {
"list",
},
},
{
APIGroups: []string{
"batch",
},
Resources: []string{
"jobs",
},
Verbs: []string{
"create",
},
},
}
}

Expand Down

0 comments on commit 9d7f830

Please sign in to comment.