@@ -173,6 +173,9 @@ type APIServerNamedServingCert struct {
173
173
ServingCertificate SecretNameReference `json:"servingCertificate"`
174
174
}
175
175
176
+ // APIServerEncryption is used to encrypt sensitive resources on the cluster.
177
+ //
178
+ // +union
176
179
type APIServerEncryption struct {
177
180
// type defines what encryption type should be used to encrypt resources at the datastore layer.
178
181
// When this field is unset (i.e. when it is set to the empty string), identity is implied.
@@ -191,9 +194,23 @@ type APIServerEncryption struct {
191
194
// +unionDiscriminator
192
195
// +optional
193
196
Type EncryptionType `json:"type,omitempty"`
197
+
198
+ // kms defines the configuration for the external KMS instance that manages the encryption keys,
199
+ // when KMS encryption is enabled sensitive resources will be encrypted using keys managed by an
200
+ // externally configured KMS instance.
201
+ //
202
+ // The Key Management Service (KMS) instance provides symmetric encryption and is responsible for
203
+ // managing the lifecyle of the encryption keys outside of the control plane.
204
+ // This allows integration with an external provider to manage the data encryption keys securely.
205
+ //
206
+ // +openshift:enable:FeatureGate=KMSv2
207
+ // +unionMember
208
+ // +optional
209
+ KMS * KMSConfig `json:"kms,omitempty"`
194
210
}
195
211
196
- // +kubebuilder:validation:Enum="";identity;aescbc;aesgcm
212
+ // +openshift:validation:FeatureSetAwareEnum:featureSet=Default,enum="";identity;aescbc;aesgcm
213
+ // +openshift:validation:FeatureSetAwareEnum:featureSet=TechPreviewNoUpgrade,enum="";identity;aescbc;aesgcm;kms
197
214
type EncryptionType string
198
215
199
216
const (
@@ -208,6 +225,13 @@ const (
208
225
// aesgcm refers to a type where AES-GCM with random nonce and a 32-byte key
209
226
// is used to perform encryption at the datastore layer.
210
227
EncryptionTypeAESGCM EncryptionType = "aesgcm"
228
+
229
+ // kms refers to a type of encryption where the encryption keys are managed
230
+ // outside the control plane in a Key Management Service instance,
231
+ // encryption is still performed at the datastore layer.
232
+ //
233
+ // +openshift:enable:FeatureGate=KMSv2
234
+ EncryptionTypeKMS EncryptionType = "kms"
211
235
)
212
236
213
237
type APIServerStatus struct {
0 commit comments