Skip to content

Commit

Permalink
fix: image and command
Browse files Browse the repository at this point in the history
  • Loading branch information
kainlite committed Mar 17, 2024
1 parent 5fa7f12 commit a3ae5e2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions manifests/app/07-cleaner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ spec:
serviceAccount: cleaner
containers:
- name: kubectl
image: ghcr.io/ctron/kubectl:latest
image: bitnami/kubectl:latest
env:
- name: NUM_TO_KEEP
value: "3"
command:
- /bin/bash
- -c
- |
TO_DELETE="$(kubectl get -n tekton-pipelines pipelinerun -o jsonpath='{range .items[?(@.status.completionTime)]}{.status.completionTime}{" "}{.metadata.name}{"\n"}{end}' | sort | head -n -${NUM_TO_KEEP} | awk '{ print $2}')"
test -n "$TO_DELETE" && kubectl -n tekton-pipelines pipelinerun ${TO_DELETE} || true
TO_DELETE="$(kubectl -n tekton-pipelines get pipelinerun -o jsonpath='{range .items[?(@.status.completionTime)]}{.status.completionTime}{" "}{.metadata.name}{"\n"}{end}' | sort | head -n -${NUM_TO_KEEP} | awk '{ print $2}')"
test -n "$TO_DELETE" && kubectl -n tekton-pipelines pipelinerun ${TO_DELETE} || true

0 comments on commit a3ae5e2

Please sign in to comment.