diff --git a/deploy/crds/crd-certificates.yaml b/deploy/crds/crd-certificates.yaml index 84ea7903b..d7c557a95 100644 --- a/deploy/crds/crd-certificates.yaml +++ b/deploy/crds/crd-certificates.yaml @@ -190,6 +190,9 @@ spec: rotationPolicy: description: RotationPolicy controls how private keys should be regenerated when a re-issuance is being processed. If set to Never, a private key will only be generated if one does not already exist in the target `spec.secretName`. If one does exists but it does not have the correct algorithm or size, a warning will be raised to await user intervention. If set to Always, a private key matching the specified requirements will be generated whenever a re-issuance occurs. Default is 'Never' for backward compatibility. type: string + enum: + - Never + - Always size: description: Size is the key bit size of the corresponding private key for this certificate. If `algorithm` is set to `RSA`, valid values are `2048`, `4096` or `8192`, and will default to `2048` if not specified. If `algorithm` is set to `ECDSA`, valid values are `256`, `384` or `521`, and will default to `256` if not specified. If `algorithm` is set to `Ed25519`, Size is ignored. No other values are allowed. type: integer diff --git a/pkg/apis/certmanager/v1/types_certificate.go b/pkg/apis/certmanager/v1/types_certificate.go index 34030d6c7..9fb115300 100644 --- a/pkg/apis/certmanager/v1/types_certificate.go +++ b/pkg/apis/certmanager/v1/types_certificate.go @@ -212,6 +212,7 @@ type CertificatePrivateKey struct { // will be generated whenever a re-issuance occurs. // Default is 'Never' for backward compatibility. // +optional + // +kubebuilder:validation:Enum=Never;Always RotationPolicy PrivateKeyRotationPolicy `json:"rotationPolicy,omitempty"` // The private key cryptography standards (PKCS) encoding for this