You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/rotator/rotator.go
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,6 @@ const (
41
41
caCertName="ca.crt"
42
42
caKeyName="ca.key"
43
43
rotationCheckFrequency=12*time.Hour
44
-
certValidityDuration=10*time.Minute
45
44
lookaheadInterval=90*24*time.Hour
46
45
)
47
46
@@ -63,6 +62,9 @@ var _ manager.Runnable = &CertRotator{}
63
62
64
63
varrestartOnSecretRefresh=false
65
64
65
+
varcertValidityDuration=flag.Duration("cert-validity-duration", 10*365*24*time.Hour, "Sets how long the cert is valid for, defaults to 10 years")
66
+
67
+
66
68
//WebhookInfo is used by the rotator to receive info about resources to be updated with certificates
67
69
typeWebhookInfostruct {
68
70
//Name is the name of the webhook for a validating or mutating webhook, or the CRD name in case of a CRD conversion webhook
@@ -71,7 +73,7 @@ type WebhookInfo struct {
71
73
}
72
74
73
75
funcinit() {
74
-
flag.BoolVar(&restartOnSecretRefresh, "cert-restart-on-secret-refresh", false, "Kills the process when secrets are refreshed so that the pod can be restarted (secrets take up to 60s to be updated by running pods)")
76
+
flag.BoolVar(&restartOnSecretRefresh, "cert-restart-on-secret-refresh", true, "Kills the process when secrets are refreshed so that the pod can be restarted (secrets take up to 60s to be updated by running pods)")
0 commit comments