Skip to content

Commit f191ea3

Browse files
committed
WL#17063 Operator - Add support for keyring kmip
Change-Id: Iffe4a0808a5a476c7e1e1078b8f4effeda0b297e
1 parent 05b0d80 commit f191ea3

File tree

11 files changed

+294
-119
lines changed

11 files changed

+294
-119
lines changed

deploy/deploy-crds.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,29 @@ spec:
103103
type: object
104104
description: "Keyring specification"
105105
properties:
106+
kmip:
107+
type: object
108+
description: "Keyring 'KMIP' specification"
109+
required: ["configuration", "server"]
110+
properties:
111+
configuration:
112+
type: string
113+
default: ""
114+
description: "Name of a secret that contains TLS certificates"
115+
cacheKeys:
116+
type: boolean
117+
default: true
118+
description: "Whether the keys are cached by the MySQL Server in RAM in plaintext. If set to false the keys are decrypted on every access"
119+
server:
120+
type: string
121+
default: ""
122+
description: "Primary OKV Server host with port number in the format <host>:<port>"
123+
standbyServer:
124+
type: array
125+
default: []
126+
description: "A list of standby servers in the format <host>:<port>"
127+
items:
128+
type: string
106129
file:
107130
type: object
108131
description: "Keyring 'File' specification"

helm/mysql-innodbcluster/templates/deployment_cluster.yaml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,27 @@ spec:
162162
{{- end }}
163163
{{- end }}
164164
# Keyring
165-
{{- if (or (((.Values).keyring).file) (((.Values).keyring).encryptedFile) (((.Values).keyring).oci) (((.Values).keyring).example) ) }}
165+
{{- if (or (((.Values).keyring).kmip) (((.Values).keyring).file) (((.Values).keyring).encryptedFile) (((.Values).keyring).oci) ) }}
166166
keyring:
167167
{{- $keyringAlreadySpecified := "" }}
168+
{{- if (((.Values).keyring).kmip) }}
169+
{{- if $keyringAlreadySpecified }}
170+
{{- $err := printf "Keyring '%s' already specified" $keyringAlreadySpecified }}
171+
{{- fail $err }}
172+
{{- end }}
173+
{{- $keyringAlreadySpecified = "kmip" }}
174+
{{- with .Values.keyring.kmip }}
175+
kmip:
176+
configuration: {{ required "keyring.kmip.configuration is required" .configuration | quote }}
177+
{{- if hasKey . "cacheKeys" }}
178+
cacheKeys: {{ .cacheKeys }}
179+
{{- end }}
180+
server: {{ required "keyring.kmip.server is required" .server | quote }}
181+
{{- if hasKey . "standbyServer" }}
182+
standbyServer: {{ toYaml .standbyServer | nindent 8 }}
183+
{{- end }}
184+
{{- end }}
185+
{{- end }}
168186
{{- if (((.Values).keyring).file) }}
169187
{{- if $keyringAlreadySpecified }}
170188
{{- $err := printf "Keyring '%s' already specified" $keyringAlreadySpecified }}
@@ -239,19 +257,6 @@ spec:
239257
{{- end }}
240258
{{- end }}
241259
{{- end }}
242-
243-
{{- if (((.Values).keyring).example) }}
244-
{{- if $keyringAlreadySpecified }}
245-
{{- $err := printf "Keyring '%s' already specified" $keyringAlreadySpecified }}
246-
{{- fail $err }}
247-
{{- end }}
248-
{{- $keyringAlreadySpecified = "example" }}
249-
{{- with .Values.keyring.example }}
250-
example:
251-
fileName: {{ required "keyring.example.fileName is required" .fileName | quote }}
252-
{{- end }}
253-
{{- end }}
254-
255260
{{- end }}
256261
# InitDB
257262
{{- if (.Values).initDB }}

helm/mysql-operator/crds/crd.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,29 @@ spec:
103103
type: object
104104
description: "Keyring specification"
105105
properties:
106+
kmip:
107+
type: object
108+
description: "Keyring 'KMIP' specification"
109+
required: ["configuration", "server"]
110+
properties:
111+
configuration:
112+
type: string
113+
default: ""
114+
description: "Name of a secret that contains TLS certificates"
115+
cacheKeys:
116+
type: boolean
117+
default: true
118+
description: "Whether the keys are cached by the MySQL Server in RAM in plaintext. If set to false the keys are decrypted on every access"
119+
server:
120+
type: string
121+
default: ""
122+
description: "Primary OKV Server host with port number in the format <host>:<port>"
123+
standbyServer:
124+
type: array
125+
default: []
126+
description: "A list of standby servers in the format <host>:<port>"
127+
items:
128+
type: string
106129
file:
107130
type: object
108131
description: "Keyring 'File' specification"

0 commit comments

Comments
 (0)