Skip to content

Commit e8057bf

Browse files
committed
feat: API for encryption at-rest
1 parent 1042107 commit e8057bf

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
@@ -190,6 +190,9 @@ type GenericClusterConfigSpec struct {
190190

191191
// +optional
192192
Users []User `json:"users,omitempty"`
193+
194+
// +optional
195+
Encryption *Encryption `json:"encryption,omitempty"`
193196
}
194197

195198
type Image struct {
@@ -266,6 +269,18 @@ type User struct {
266269
Sudo string `json:"sudo,omitempty"`
267270
}
268271

272+
// Encryption defines the configuration to enable encryption at REST
273+
// This configuration is used by API server to encrypt data before storing it in ETCD.
274+
// Currently the encryption only enabled for secrets and configmaps.
275+
type Encryption struct {
276+
// Encryption providers
277+
// +kubebuilder:validation:UniqueItems=true
278+
// +kubebuilder:validation:Enum=aescbc;aesgcm
279+
// +kubebuilder:default=aescbc
280+
// +optional
281+
Providers []string `json:"providers"`
282+
}
283+
269284
func init() {
270285
SchemeBuilder.Register(
271286
&AWSClusterConfig{},

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,23 @@ spec:
298298
type: string
299299
type: object
300300
type: object
301+
encryption:
302+
description: |-
303+
Encryption defines the configuration to enable encryption at REST
304+
This configuration is used by API server to encrypt data before storing it in ETCD.
305+
Currently the encryption only enabled for secrets and configmaps.
306+
properties:
307+
providers:
308+
default: aescbc
309+
description: Encryption providers
310+
enum:
311+
- aescbc
312+
- aesgcm
313+
items:
314+
type: string
315+
type: array
316+
uniqueItems: true
317+
type: object
301318
etcd:
302319
properties:
303320
image:

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,23 @@ spec:
217217
type: object
218218
docker:
219219
type: object
220+
encryption:
221+
description: |-
222+
Encryption defines the configuration to enable encryption at REST
223+
This configuration is used by API server to encrypt data before storing it in ETCD.
224+
Currently the encryption only enabled for secrets and configmaps.
225+
properties:
226+
providers:
227+
default: aescbc
228+
description: Encryption providers
229+
enum:
230+
- aescbc
231+
- aesgcm
232+
items:
233+
type: string
234+
type: array
235+
uniqueItems: true
236+
type: object
220237
etcd:
221238
properties:
222239
image:

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,23 @@ spec:
365365
- machineDetails
366366
type: object
367367
type: object
368+
encryption:
369+
description: |-
370+
Encryption defines the configuration to enable encryption at REST
371+
This configuration is used by API server to encrypt data before storing it in ETCD.
372+
Currently the encryption only enabled for secrets and configmaps.
373+
properties:
374+
providers:
375+
default: aescbc
376+
description: Encryption providers
377+
enum:
378+
- aescbc
379+
- aesgcm
380+
items:
381+
type: string
382+
type: array
383+
uniqueItems: true
384+
type: object
368385
etcd:
369386
properties:
370387
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)