mirror of
https://github.com/rancher/types.git
synced 2025-08-02 05:11:59 +00:00
Override encryption types in schema
This commit is contained in:
parent
560c2dd3d9
commit
0223867195
@ -9,6 +9,7 @@ import (
|
||||
"github.com/rancher/types/factory"
|
||||
"github.com/rancher/types/mapper"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
apiserverconfig "k8s.io/apiserver/pkg/apis/config"
|
||||
)
|
||||
|
||||
var (
|
||||
@ -45,7 +46,8 @@ var (
|
||||
Init(credTypes).
|
||||
Init(mgmtSecretTypes).
|
||||
Init(clusterTemplateTypes).
|
||||
Init(driverMetadataTypes)
|
||||
Init(driverMetadataTypes).
|
||||
Init(encryptionTypes)
|
||||
|
||||
TokenSchemas = factory.Schemas(&Version).
|
||||
Init(tokens)
|
||||
@ -900,3 +902,12 @@ func clusterScanTypes(schemas *types.Schemas) *types.Schemas {
|
||||
schema.ResourceMethods = []string{http.MethodGet, http.MethodDelete}
|
||||
})
|
||||
}
|
||||
|
||||
func encryptionTypes(schemas *types.Schemas) *types.Schemas {
|
||||
return schemas.MustImport(&Version, v3.SecretsEncryptionConfig{}).
|
||||
MustImport(&Version, apiserverconfig.Key{}, struct {
|
||||
Secret string `norman:"type=password"`
|
||||
}{}).MustImport(&Version, apiserverconfig.KMSConfiguration{}, struct {
|
||||
Timeout string
|
||||
}{})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user