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" (#1219)

Signed-off-by: Cheng Fang <[email protected]>
  • Loading branch information
chengfang authored Feb 9, 2024
1 parent 1d94461 commit 61e7020
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 61e7020

Please sign in to comment.