Skip to content

Commit

Permalink
generate: support cronjobs
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Meyer <[email protected]>
  • Loading branch information
katexochen committed Jan 9, 2025
1 parent a3496cc commit 2ef1f79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/cmd/policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ func policiesFromKubeResources(yamlPaths []string) ([]deployment, error) {
name = obj.Name
annotation = obj.Spec.Template.Annotations[kataPolicyAnnotationKey]
role = obj.Spec.Template.Annotations[contrastRoleAnnotationKey]
case kubeapi.CronJob:
name = obj.Name
annotation = obj.Spec.JobTemplate.Spec.Template.Annotations[kataPolicyAnnotationKey]
role = obj.Spec.JobTemplate.Spec.Template.Annotations[contrastRoleAnnotationKey]
}
if annotation == "" {
continue
Expand Down

0 comments on commit 2ef1f79

Please sign in to comment.