Skip to content

Commit 0185ae1

Browse files
committed
fix(helm): set default unusedImageTTL to 24 hours
1 parent 6624857 commit 0185ae1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func main() {
7171
flag.StringVar(&metricsCertKey, "metrics-cert-key", "tls.key", "The name of the metrics server key file.")
7272
flag.BoolVar(&enableHTTP2, "enable-http2", false,
7373
"If set, HTTP/2 will be enabled for the metrics and webhook servers")
74-
flag.IntVar(&unusedImageTTL, "unused-image-ttl", 30, "Unused image TTL in days.")
74+
flag.IntVar(&unusedImageTTL, "unused-image-ttl", 24, "Unused image TTL in hours.")
7575

7676
opts := zap.Options{
7777
Development: true,
@@ -204,7 +204,7 @@ func main() {
204204
if err = (&kuikcontroller.ImageReconciler{
205205
Client: mgr.GetClient(),
206206
Scheme: mgr.GetScheme(),
207-
UnusedImageTTL: time.Hour * 24 * time.Duration(unusedImageTTL),
207+
UnusedImageTTL: time.Hour * time.Duration(unusedImageTTL),
208208
}).SetupWithManager(mgr); err != nil {
209209
setupLog.Error(err, "unable to create controller", "controller", "Image")
210210
os.Exit(1)

helm/kube-image-keeper/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ registryMonitors:
105105
interval: 1h
106106
maxPerInterval: 2
107107

108-
# -- Delay in days before deleting an Image not used by any pod
109-
unusedImageTTL: 30
108+
# -- Delay in hours before deleting an Image that is not used by any pod
109+
unusedImageTTL: 24
110110

111111
metrics:
112112
imageLastMonitorAgeMinutesBuckets:

0 commit comments

Comments
 (0)