Add support for custom KES image in tenant (#759)

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
Lenin Alevski
2021-05-20 12:31:57 -07:00
committed by GitHub
parent 1267f989b2
commit 6eabff3d96
28 changed files with 105 additions and 65 deletions

View File

@@ -23,6 +23,7 @@ import (
"encoding/hex"
"fmt"
"log"
"strconv"
"time"
"errors"
@@ -203,6 +204,13 @@ func getKESConfiguration(ctx context.Context, clientSet K8sClientI, ns string, e
if encryptionCfg.Image != "" {
kesConfiguration.Image = encryptionCfg.Image
}
// Using custom replicas for KES
if encryptionCfg.Replicas != "" {
replicas, errReplicas := strconv.Atoi(encryptionCfg.Replicas)
if errReplicas != nil {
kesConfiguration.Replicas = int32(replicas)
}
}
// Generate server certificates for KES
if encryptionCfg.Server != nil {
certificates := []*models.KeyPairConfiguration{encryptionCfg.Server}

View File

@@ -4607,6 +4607,9 @@ func init() {
"image": {
"type": "string"
},
"replicas": {
"type": "string"
},
"server": {
"type": "object",
"$ref": "#/definitions/keyPairConfiguration"
@@ -12203,6 +12206,9 @@ func init() {
"image": {
"type": "string"
},
"replicas": {
"type": "string"
},
"server": {
"type": "object",
"$ref": "#/definitions/keyPairConfiguration"