Skip to content

Commit

Permalink
Merge pull request #1091 from equinor/certificate-rotation-policy
Browse files Browse the repository at this point in the history
set certificate private key rotation policy to always
  • Loading branch information
nilsgstrabo authored Apr 17, 2024
2 parents 15f80a9 + b10aafa commit 8fed749
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/apis/deployment/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4034,6 +4034,7 @@ func Test_ExternalDNS_Legacy_ResourcesMigrated(t *testing.T) {
SecretTemplate: &cmv1.CertificateSecretTemplate{
Labels: map[string]string{kube.RadixAppLabel: appName, kube.RadixExternalAliasFQDNLabel: fqdnAutomation},
},
PrivateKey: &cmv1.CertificatePrivateKey{RotationPolicy: cmv1.RotationPolicyAlways},
}
assert.Equal(t, expectedCertSpec, cert.Spec)
}
Expand Down Expand Up @@ -4097,6 +4098,7 @@ func Test_ExternalDNS_ContainsAllResources(t *testing.T) {
SecretTemplate: &cmv1.CertificateSecretTemplate{
Labels: map[string]string{kube.RadixAppLabel: appName, kube.RadixExternalAliasFQDNLabel: fqdn},
},
PrivateKey: &cmv1.CertificatePrivateKey{RotationPolicy: cmv1.RotationPolicyAlways},
}
assert.Equal(t, expectedCertSpec, cert.Spec)
}
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/deployment/externaldns.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ func (deploy *Deployment) createOrUpdateExternalDnsCertificate(externalDns radix
SecretTemplate: &cmv1.CertificateSecretTemplate{
Labels: radixlabels.ForExternalDNSTLSSecret(deploy.registration.Name, externalDns),
},
PrivateKey: &cmv1.CertificatePrivateKey{
RotationPolicy: cmv1.RotationPolicyAlways,
},
},
}

Expand Down

0 comments on commit 8fed749

Please sign in to comment.