Skip to content

Commit 9c2264c

Browse files
committed
feat: API for encryption at-rest
1 parent 2deeee9 commit 9c2264c

5 files changed

+91
-0
lines changed

api/v1alpha1/clusterconfig_types.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ type GenericClusterConfigSpec struct {
200200

201201
// +kubebuilder:validation:Optional
202202
Users []User `json:"users,omitempty"`
203+
204+
// +optional
205+
Encryption *Encryption `json:"encryption,omitempty"`
203206
}
204207

205208
type Image struct {
@@ -279,6 +282,18 @@ type User struct {
279282
Sudo string `json:"sudo,omitempty"`
280283
}
281284

285+
// Encryption defines the configuration to enable encryption at REST
286+
// This configuration is used by API server to encrypt data before storing it in ETCD.
287+
// Currently the encryption only enabled for secrets and configmaps.
288+
type Encryption struct {
289+
// Encryption providers
290+
// +kubebuilder:validation:UniqueItems=true
291+
// +kubebuilder:validation:Enum=aescbc;aesgcm
292+
// +kubebuilder:default=aescbc
293+
// +optional
294+
Providers []string `json:"providers"`
295+
}
296+
282297
func init() {
283298
SchemeBuilder.Register(
284299
&AWSClusterConfig{},

api/v1alpha1/crds/caren.nutanix.com_awsclusterconfigs.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,23 @@ spec:
322322
type: string
323323
type: object
324324
type: object
325+
encryption:
326+
description: |-
327+
Encryption defines the configuration to enable encryption at REST
328+
This configuration is used by API server to encrypt data before storing it in ETCD.
329+
Currently the encryption only enabled for secrets and configmaps.
330+
properties:
331+
providers:
332+
default: aescbc
333+
description: Encryption providers
334+
enum:
335+
- aescbc
336+
- aesgcm
337+
items:
338+
type: string
339+
type: array
340+
uniqueItems: true
341+
type: object
325342
etcd:
326343
properties:
327344
image:

api/v1alpha1/crds/caren.nutanix.com_dockerclusterconfigs.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,23 @@ spec:
239239
type: object
240240
docker:
241241
type: object
242+
encryption:
243+
description: |-
244+
Encryption defines the configuration to enable encryption at REST
245+
This configuration is used by API server to encrypt data before storing it in ETCD.
246+
Currently the encryption only enabled for secrets and configmaps.
247+
properties:
248+
providers:
249+
default: aescbc
250+
description: Encryption providers
251+
enum:
252+
- aescbc
253+
- aesgcm
254+
items:
255+
type: string
256+
type: array
257+
uniqueItems: true
258+
type: object
242259
etcd:
243260
properties:
244261
image:

api/v1alpha1/crds/caren.nutanix.com_nutanixclusterconfigs.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,23 @@ spec:
410410
- machineDetails
411411
type: object
412412
type: object
413+
encryption:
414+
description: |-
415+
Encryption defines the configuration to enable encryption at REST
416+
This configuration is used by API server to encrypt data before storing it in ETCD.
417+
Currently the encryption only enabled for secrets and configmaps.
418+
properties:
419+
providers:
420+
default: aescbc
421+
description: Encryption providers
422+
enum:
423+
- aescbc
424+
- aesgcm
425+
items:
426+
type: string
427+
type: array
428+
uniqueItems: true
429+
type: object
413430
etcd:
414431
properties:
415432
image:

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)