@@ -89,6 +89,19 @@ const (
8989 PKCS8 PrivateKeyEncoding = "PKCS8"
9090)
9191
92+ // +kubebuilder:validation:Enum=SHA256WithRSA;SHA384WithRSA;SHA512WithRSA;ECDSAWithSHA256;ECDSAWithSHA384;ECDSAWithSHA512;PureEd25519
93+ type SignatureAlgorithm string
94+
95+ const (
96+ SHA256WithRSA SignatureAlgorithm = "SHA256WithRSA"
97+ SHA384WithRSA SignatureAlgorithm = "SHA384WithRSA"
98+ SHA512WithRSA SignatureAlgorithm = "SHA512WithRSA"
99+ ECDSAWithSHA256 SignatureAlgorithm = "ECDSAWithSHA256"
100+ ECDSAWithSHA384 SignatureAlgorithm = "ECDSAWithSHA384"
101+ ECDSAWithSHA512 SignatureAlgorithm = "ECDSAWithSHA512"
102+ PureEd25519 SignatureAlgorithm = "PureEd25519"
103+ )
104+
92105// CertificateSpec defines the desired state of Certificate.
93106//
94107// NOTE: The specification contains a lot of "requested" certificate attributes, it is
@@ -236,6 +249,13 @@ type CertificateSpec struct {
236249 // encoding and the rotation policy.
237250 PrivateKey * CertificatePrivateKey
238251
252+ // Signature algorithm to use.
253+ // Allowed values for RSA keys: SHA256WithRSA, SHA384WithRSA, SHA512WithRSA.
254+ // Allowed values for ECDSA keys: ECDSAWithSHA256, ECDSAWithSHA384, ECDSAWithSHA512.
255+ // Allowed values for Ed25519 keys: PureEd25519.
256+ // +optional
257+ SignatureAlgorithm SignatureAlgorithm `json:"signatureAlgorithm,omitempty"`
258+
239259 // Whether the KeyUsage and ExtKeyUsage extensions should be set in the encoded CSR.
240260 //
241261 // This option defaults to true, and should only be disabled if the target
0 commit comments