Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete obsolete post-install hooks #582

Open
kravciak opened this issue Nov 7, 2024 · 0 comments
Open

Delete obsolete post-install hooks #582

kravciak opened this issue Nov 7, 2024 · 0 comments
Labels
kind/bug Something isn't working kind/tech-debt
Milestone

Comments

@kravciak
Copy link
Contributor

kravciak commented Nov 7, 2024

After every installation we run cleanup jobs:

  • delete-pre-1-11-policyreports-job
  • del-pre-1-17-webhook-srv-cert

Those jobs should be valid only for single release because of our upgrade path (... -> 1.16 -> 1.17 -> 1.18 -> 1.19 -> ...).

For example: del-pre-1-17-webhook-srv-cert should be valid only for 1.17 release.
Same for delete-pre-1-11-policyreports-job should run only on 1.11 release.

~ make clean cluster install CONTROLLER_ARGS="--debug"
...
install.go:218: [debug] Original chart version: "3.1.0"
install.go:235: [debug] CHART PATH: /home/kravciak/.cache/helm/repository/kubewarden-controller-3.1.0.tgz

client.go:142: [debug] creating 1 resource(s)
client.go:142: [debug] creating 23 resource(s)
wait.go:48: [debug] beginning wait for 23 resources with timeout of 5m0s
ready.go:303: [debug] Deployment is not ready: kubewarden/kubewarden-controller. 0 out of 1 expected pods are ready
ready.go:303: [debug] Deployment is not ready: kubewarden/kubewarden-controller. 0 out of 1 expected pods are ready
ready.go:303: [debug] Deployment is not ready: kubewarden/kubewarden-controller. 0 out of 1 expected pods are ready
ready.go:303: [debug] Deployment is not ready: kubewarden/kubewarden-controller. 0 out of 1 expected pods are ready
ready.go:303: [debug] Deployment is not ready: kubewarden/kubewarden-controller. 0 out of 1 expected pods are ready
ready.go:303: [debug] Deployment is not ready: kubewarden/kubewarden-controller. 0 out of 1 expected pods are ready
client.go:486: [debug] Starting delete for "kubewarden-controller-del-pre-1-17-webhook-srv-cert" Job
client.go:490: [debug] Ignoring delete failure for "kubewarden-controller-del-pre-1-17-webhook-srv-cert" batch/v1, Kind=Job: jobs.batch "kubewarden-controller-del-pre-1-17-webhook-srv-cert" not found
wait.go:66: [debug] beginning wait for 1 resources to be deleted with timeout of 5m0s
client.go:142: [debug] creating 1 resource(s)
client.go:712: [debug] Watching for changes to Job kubewarden-controller-del-pre-1-17-webhook-srv-cert with timeout of 5m0s
client.go:740: [debug] Add/Modify event for kubewarden-controller-del-pre-1-17-webhook-srv-cert: ADDED
client.go:779: [debug] kubewarden-controller-del-pre-1-17-webhook-srv-cert: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-del-pre-1-17-webhook-srv-cert: MODIFIED
client.go:779: [debug] kubewarden-controller-del-pre-1-17-webhook-srv-cert: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-del-pre-1-17-webhook-srv-cert: MODIFIED
client.go:779: [debug] kubewarden-controller-del-pre-1-17-webhook-srv-cert: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-del-pre-1-17-webhook-srv-cert: MODIFIED
client.go:779: [debug] kubewarden-controller-del-pre-1-17-webhook-srv-cert: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-del-pre-1-17-webhook-srv-cert: MODIFIED
client.go:779: [debug] kubewarden-controller-del-pre-1-17-webhook-srv-cert: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-del-pre-1-17-webhook-srv-cert: MODIFIED
client.go:486: [debug] Starting delete for "kubewarden-controller-delete-pre-1-11-policyreports-job" Job
client.go:490: [debug] Ignoring delete failure for "kubewarden-controller-delete-pre-1-11-policyreports-job" batch/v1, Kind=Job: jobs.batch "kubewarden-controller-delete-pre-1-11-policyreports-job" not found
wait.go:66: [debug] beginning wait for 1 resources to be deleted with timeout of 5m0s
client.go:142: [debug] creating 1 resource(s)
client.go:712: [debug] Watching for changes to Job kubewarden-controller-delete-pre-1-11-policyreports-job with timeout of 5m0s
client.go:740: [debug] Add/Modify event for kubewarden-controller-delete-pre-1-11-policyreports-job: ADDED
client.go:779: [debug] kubewarden-controller-delete-pre-1-11-policyreports-job: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-delete-pre-1-11-policyreports-job: MODIFIED
client.go:779: [debug] kubewarden-controller-delete-pre-1-11-policyreports-job: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-delete-pre-1-11-policyreports-job: MODIFIED
client.go:779: [debug] kubewarden-controller-delete-pre-1-11-policyreports-job: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-delete-pre-1-11-policyreports-job: MODIFIED
client.go:779: [debug] kubewarden-controller-delete-pre-1-11-policyreports-job: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-delete-pre-1-11-policyreports-job: MODIFIED
client.go:779: [debug] kubewarden-controller-delete-pre-1-11-policyreports-job: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
client.go:740: [debug] Add/Modify event for kubewarden-controller-delete-pre-1-11-policyreports-job: MODIFIED
client.go:486: [debug] Starting delete for "kubewarden-controller-del-pre-1-17-webhook-srv-cert" Job
wait.go:66: [debug] beginning wait for 1 resources to be deleted with timeout of 5m0s
client.go:486: [debug] Starting delete for "kubewarden-controller-delete-pre-1-11-policyreports-job" Job
wait.go:66: [debug] beginning wait for 1 resources to be deleted with timeout of 5m0s
...
@kravciak kravciak added kind/bug Something isn't working kind/tech-debt labels Nov 7, 2024
@flavio flavio added this to the 1.19 milestone Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working kind/tech-debt
Projects
Status: No status
Development

No branches or pull requests

2 participants