Skip to content

Commit

Permalink
feat: remove the creation of cronjobs in cleanup controller (#8526) (#…
Browse files Browse the repository at this point in the history
…8528)

* feat: remove the creation of cronjobs in cleanup controller



* fix: use lastExecutionTime instead of nextExecutionTime



---------

Signed-off-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
Co-authored-by: Mariam Fahmy <mariam.fahmy@nirmata.com>
  • Loading branch information
gcp-cherry-pick-bot[bot] and MariamFahmy98 committed Sep 26, 2023
1 parent ed7b2ec commit e788bf0
Show file tree
Hide file tree
Showing 16 changed files with 354 additions and 498 deletions.
3 changes: 2 additions & 1 deletion api/kyverno/v2alpha1/cleanup_policy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ type CleanupPolicySpec struct {

// CleanupPolicyStatus stores the status of the policy.
type CleanupPolicyStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
LastExecutionTime metav1.Time `json:"lastExecutionTime,omitempty"`
}

// Validate implements programmatic validation
Expand Down
1 change: 1 addition & 0 deletions api/kyverno/v2alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions charts/kyverno/templates/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,9 @@ spec:
- type
type: object
type: array
lastExecutionTime:
format: date-time
type: string
type: object
required:
- spec
Expand Down Expand Up @@ -3802,6 +3805,9 @@ spec:
- type
type: object
type: array
lastExecutionTime:
format: date-time
type: string
type: object
required:
- spec
Expand Down
262 changes: 0 additions & 262 deletions cmd/cleanup-controller/handlers/cleanup/handlers.go

This file was deleted.

0 comments on commit e788bf0

Please sign in to comment.