From 328a41c0f266eaa8555fbc119c7c6a5499a8937f Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Mon, 6 Mar 2023 13:02:57 -0800 Subject: [PATCH] Extend pod webhook self-signed certs expiration date to 99 years in the future (#535) Signed-off-by: Eduardo Apolinario Co-authored-by: Eduardo Apolinario --- pkg/webhook/init_cert.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/webhook/init_cert.go b/pkg/webhook/init_cert.go index b37c127a7..dc002fd21 100644 --- a/pkg/webhook/init_cert.go +++ b/pkg/webhook/init_cert.go @@ -162,7 +162,7 @@ func createCerts(serviceName string, serviceNamespace string) (certs webhookCert Organization: []string{"flyte.org"}, }, NotBefore: time.Now(), - NotAfter: time.Now().AddDate(1, 0, 0), + NotAfter: time.Now().AddDate(99, 0, 0), IsCA: true, ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, @@ -204,7 +204,7 @@ func createCerts(serviceName string, serviceNamespace string) (certs webhookCert Organization: []string{"flyte.org"}, }, NotBefore: time.Now(), - NotAfter: time.Now().AddDate(1, 0, 0), + NotAfter: time.Now().AddDate(99, 0, 0), SubjectKeyId: []byte{1, 2, 3, 4, 6}, ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth}, KeyUsage: x509.KeyUsageDigitalSignature,