Skip to content

Commit

Permalink
fix: Create Job from Cronjob feature failing with error cannot create…
Browse files Browse the repository at this point in the history
… resource "jobs" (argoproj-labs#1219)

Signed-off-by: Cheng Fang <cfang@redhat.com>
  • Loading branch information
chengfang committed Feb 28, 2024
1 parent 8f65a5e commit ca41c17
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 @@ -143,6 +143,17 @@ func policyRuleForServer() []v1.PolicyRule {
"list",
},
},
{
APIGroups: []string{
"batch",
},
Resources: []string{
"jobs",
},
Verbs: []string{
"create",
},
},
}
}

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

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

Expand Down

0 comments on commit ca41c17

Please sign in to comment.