add helm charts
This commit is contained in:
51
backing-services/vault/templates/NOTES.txt
Normal file
51
backing-services/vault/templates/NOTES.txt
Normal file
@@ -0,0 +1,51 @@
|
||||
CHART NAME: {{ .Chart.Name }}
|
||||
CHART VERSION: {{ .Chart.Version }}
|
||||
APP VERSION: {{ .Chart.AppVersion }}
|
||||
|
||||
** Please be patient while the chart is being deployed **
|
||||
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:
|
||||
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}
|
||||
|
||||
Get the list of pods by executing:
|
||||
|
||||
kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}
|
||||
|
||||
Access the pod you want to debug by executing
|
||||
|
||||
kubectl exec --namespace {{ include "common.names.namespace" . | quote }} -ti <NAME OF THE POD> -- bash
|
||||
|
||||
{{- else }}
|
||||
|
||||
The following controllers have been deployed:
|
||||
|
||||
{{- if .Values.server.enabled }}
|
||||
- server
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.enabled }}
|
||||
- csi-provider
|
||||
{{- end }}
|
||||
{{- if .Values.injector.enabled }}
|
||||
- injector
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
Check the status of the pods by running this command:
|
||||
|
||||
kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}
|
||||
|
||||
IMPORTANT: The chart is deploying a sealed Vault instance. The service will not be ready until the instance is unsealed.
|
||||
This is a manual process that must be performed with maximum precaution.
|
||||
|
||||
Read the upstream vault documentation for unsealing and initializing the instance:
|
||||
|
||||
https://developer.hashicorp.com/vault/docs/platform/k8s/helm/run#initialize-and-unseal-vault
|
||||
|
||||
{{- include "common.warnings.rollingTag" .Values.server.image }}
|
||||
{{- include "common.warnings.rollingTag" .Values.injector.image }}
|
||||
{{- include "common.warnings.rollingTag" .Values.csiProvider.image }}
|
||||
{{- include "vault.validateValues" . }}
|
||||
159
backing-services/vault/templates/_helpers.tpl
Normal file
159
backing-services/vault/templates/_helpers.tpl
Normal file
@@ -0,0 +1,159 @@
|
||||
{{/*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "vault.imagePullSecrets" -}}
|
||||
{{- include "common.images.renderPullSecrets" (dict "images" (list .Values.server.image .Values.csiProvider.image .Values.injector.image .Values.volumePermissions.image ) "context" $) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Vault Server fullname
|
||||
*/}}
|
||||
{{- define "vault.server.fullname" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) "server" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Vault Server fullname (with namespace)
|
||||
*/}}
|
||||
{{- define "vault.server.fullname.namespace" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname.namespace" .) "server" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Vault Server image name
|
||||
*/}}
|
||||
{{- define "vault.server.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.server.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use (Vault Server)
|
||||
*/}}
|
||||
{{- define "vault.server.serviceAccountName" -}}
|
||||
{{- if .Values.server.serviceAccount.create -}}
|
||||
{{ default (include "vault.server.fullname" .) .Values.server.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.server.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Name of the server ConfigMap
|
||||
*/}}
|
||||
{{- define "vault.server.configmapName" -}}
|
||||
{{- if .Values.server.existingConfigMap -}}
|
||||
{{ include "common.tplvalues.render" (dict "value" .Values.server.existingConfigMap "context" $) }}
|
||||
{{- else -}}
|
||||
{{ include "vault.server.fullname" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Vault Kubernetes Injector fullname
|
||||
*/}}
|
||||
{{- define "vault.injector.fullname" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) "injector" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Vault Kubernetes Injector fullname (with namespace)
|
||||
(removing image- prefix to avoid name length issues)
|
||||
*/}}
|
||||
{{- define "vault.injector.fullname.namespace" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname.namespace" .) "injector" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Vault Kubernetes Injector image name
|
||||
*/}}
|
||||
{{- define "vault.injector.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.injector.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use (Vault Kubernetes Injector)
|
||||
*/}}
|
||||
{{- define "vault.injector.serviceAccountName" -}}
|
||||
{{- if .Values.injector.serviceAccount.create -}}
|
||||
{{ default (include "vault.injector.fullname" .) .Values.injector.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.injector.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Vault CSI Provider fullname
|
||||
*/}}
|
||||
{{- define "vault.csi-provider.fullname" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname" .) "csi-provider" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Vault CSI Provider fullname (with namespace)
|
||||
*/}}
|
||||
{{- define "vault.csi-provider.fullname.namespace" -}}
|
||||
{{- printf "%s-%s" (include "common.names.fullname.namespace" .) "csi-provider" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Vault CSI Provider image name
|
||||
*/}}
|
||||
{{- define "vault.csi-provider.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.csiProvider.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use (Vault CSI Provider)
|
||||
*/}}
|
||||
{{- define "vault.csi-provider.serviceAccountName" -}}
|
||||
{{- if .Values.csiProvider.serviceAccount.create -}}
|
||||
{{ default (include "vault.csi-provider.fullname" .) .Values.csiProvider.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.csiProvider.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Name of the server ConfigMap
|
||||
*/}}
|
||||
{{- define "vault.csi-provider.configmapName" -}}
|
||||
{{- if .Values.csiProvider.existingConfigMap -}}
|
||||
{{ include "common.tplvalues.render" (dict "value" .Values.csiProvider.existingConfigMap "context" $) }}
|
||||
{{- else -}}
|
||||
{{ include "vault.server.fullname" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper image name (for the init container volume-permissions image)
|
||||
*/}}
|
||||
{{- define "vault.volumePermissions.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.volumePermissions.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Validate values for Vault.
|
||||
*/}}
|
||||
{{- define "vault.validateValues" -}}
|
||||
{{- $messages := list -}}
|
||||
{{- $messages := append $messages (include "vault.validateValues.controllers" .) -}}
|
||||
{{- $messages := without $messages "" -}}
|
||||
{{- $message := join "\n" $messages -}}
|
||||
{{- if $message -}}
|
||||
{{- printf "\nVALUES VALIDATION:\n%s" $message -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Function to validate the controller deployment
|
||||
*/}}
|
||||
{{- define "vault.validateValues.controllers" -}}
|
||||
{{- if not (or .Values.server.enabled .Values.csiProvider.enabled .Values.injector.enabled) -}}
|
||||
vault: Missing controllers. At least one controller should be enabled.
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,29 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.csiProvider.enabled .Values.csiProvider.rbac.create }}
|
||||
kind: ClusterRole
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "vault.csi-provider.fullname.namespace" . }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.csiProvider.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: csi-provider
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- serviceaccounts/token
|
||||
verbs:
|
||||
- create
|
||||
{{- if .Values.csiProvider.rbac.rules }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.csiProvider.rbac.rules "context" $ ) | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
23
backing-services/vault/templates/csi-provider/configmap.yaml
Normal file
23
backing-services/vault/templates/csi-provider/configmap.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.csiProvider.enabled (not .Values.csiProvider.existingConfigMap) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "vault.csi-provider.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.csiProvider.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: csi-provider
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
config.hcl: |
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.config "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
250
backing-services/vault/templates/csi-provider/daemonset.yaml
Normal file
250
backing-services/vault/templates/csi-provider/daemonset.yaml
Normal file
@@ -0,0 +1,250 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.csiProvider.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: {{ template "vault.csi-provider.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.csiProvider.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: csi-provider
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.csiProvider.updateStrategy }}
|
||||
updateStrategy: {{- toYaml .Values.csiProvider.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.csiProvider.podLabels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: csi-provider
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.csiProvider.podAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: csi-provider
|
||||
spec:
|
||||
serviceAccountName: {{ template "vault.csi-provider.serviceAccountName" . }}
|
||||
{{- include "vault.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.csiProvider.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.csiProvider.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.csiProvider.podAffinityPreset "component" "csi-provider" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.csiProvider.podAntiAffinityPreset "component" "csi-provider" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.csiProvider.nodeAffinityPreset.type "key" .Values.csiProvider.nodeAffinityPreset.key "values" .Values.csiProvider.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.csiProvider.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.tolerations "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.priorityClassName }}
|
||||
priorityClassName: {{ .Values.csiProvider.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.schedulerName }}
|
||||
schedulerName: {{ .Values.csiProvider.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.csiProvider.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.csiProvider.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
{{- if .Values.csiProvider.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: csi-provider
|
||||
image: {{ template "vault.csi-provider.image" . }}
|
||||
imagePullPolicy: {{ .Values.csiProvider.image.pullPolicy }}
|
||||
{{- if .Values.csiProvider.provider.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.csiProvider.provider.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.provider.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.provider.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- --endpoint=/provider/vault.sock
|
||||
- --hmac-secret-name={{ printf "%s-hmac-key" (include "vault.csi-provider.fullname" .) }}
|
||||
- --debug={{ .Values.csiProvider.image.debug }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: VAULT_ADDR
|
||||
value: "unix:///var/run/vault/agent.sock"
|
||||
{{- if .Values.csiProvider.provider.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.csiProvider.provider.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.provider.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.provider.resources }}
|
||||
resources: {{- toYaml .Values.csiProvider.provider.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http-health
|
||||
containerPort: {{ .Values.csiProvider.provider.containerPorts.health }}
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.csiProvider.provider.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.provider.livenessProbe.enabled }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.csiProvider.provider.livenessProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /health/ready
|
||||
port: http-health
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.provider.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.provider.readinessProbe.enabled }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.csiProvider.provider.readinessProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /health/ready
|
||||
port: http-health
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.provider.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.provider.startupProbe.enabled }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.csiProvider.provider.startupProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /health/ready
|
||||
port: http-health
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.provider.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: providervol
|
||||
mountPath: "/provider"
|
||||
- name: agent-unix-socket
|
||||
mountPath: /var/run/vault
|
||||
{{- if .Values.csiProvider.provider.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.provider.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: agent
|
||||
image: {{ template "vault.csi-provider.image" . }}
|
||||
imagePullPolicy: {{ .Values.csiProvider.image.pullPolicy }}
|
||||
{{- if .Values.csiProvider.agent.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.csiProvider.agent.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.agent.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.agent.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- agent
|
||||
- -config=/bitnami/vault/conf/config.hcl
|
||||
{{- if .Values.csiProvider.image.debug }}
|
||||
- -log-level=debug
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.csiProvider.agent.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.csiProvider.agent.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.agent.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.agent.resources }}
|
||||
resources: {{- toYaml .Values.csiProvider.agent.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: tcp
|
||||
containerPort: {{ .Values.csiProvider.agent.containerPorts.tcp }}
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.csiProvider.agent.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.agent.livenessProbe.enabled }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.csiProvider.agent.livenessProbe "enabled") "context" $) | nindent 12 }}
|
||||
tcpSocket:
|
||||
port: tcp
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.agent.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.agent.readinessProbe.enabled }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.csiProvider.agent.readinessProbe "enabled") "context" $) | nindent 12 }}
|
||||
tcpSocket:
|
||||
port: tcp
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.agent.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.csiProvider.agent.startupProbe.enabled }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.csiProvider.agent.startupProbe "enabled") "context" $) | nindent 12 }}
|
||||
tcpSocket:
|
||||
port: tcp
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.agent.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /bitnami/vault/config
|
||||
- name: agent-unix-socket
|
||||
mountPath: /var/run/vault
|
||||
{{- if .Values.csiProvider.agent.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.agent.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.csiProvider.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.csiProvider.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: providervol
|
||||
hostPath:
|
||||
path: {{ .Values.csiProvider.secretStoreHostPath }}
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ include "vault.csi-provider.configmapName" . }}
|
||||
- name: agent-unix-socket
|
||||
emptyDir:
|
||||
medium: Memory
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
{{- if .Values.csiProvider.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.csiProvider.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
29
backing-services/vault/templates/csi-provider/role.yaml
Normal file
29
backing-services/vault/templates/csi-provider/role.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.csiProvider.enabled .Values.csiProvider.rbac.create }}
|
||||
kind: Role
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "vault.csi-provider.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.csiProvider.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: csi-provider
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get"]
|
||||
resourceNames:
|
||||
- {{ include "vault.csi-provider.fullname" . }}
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["create"]
|
||||
{{- end }}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.csiProvider.enabled .Values.csiProvider.rbac.create }}
|
||||
kind: RoleBinding
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "vault.csi-provider.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.csiProvider.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: csi-provider
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ include "vault.csi-provider.fullname" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "vault.csi-provider.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.csiProvider.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "vault.csi-provider.serviceAccountName" . }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.csiProvider.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
{{- if or .Values.csiProvider.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.csiProvider.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.csiProvider.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
9
backing-services/vault/templates/extra-list.yaml
Normal file
9
backing-services/vault/templates/extra-list.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- range .Values.extraDeploy }}
|
||||
---
|
||||
{{ include "common.tplvalues.render" (dict "value" . "context" $) }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.injector.enabled .Values.injector.rbac.create }}
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "vault.injector.fullname.namespace" . }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ include "vault.injector.fullname.namespace" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "vault.injector.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
30
backing-services/vault/templates/injector/clusterroles.yaml
Normal file
30
backing-services/vault/templates/injector/clusterroles.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.injector.enabled .Values.injector.rbac.create }}
|
||||
kind: ClusterRole
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "vault.injector.fullname.namespace" . }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups: ["admissionregistration.k8s.io"]
|
||||
resources: ["mutatingwebhookconfigurations"]
|
||||
verbs:
|
||||
- "get"
|
||||
- "list"
|
||||
- "watch"
|
||||
- "patch"
|
||||
{{- if .Values.injector.rbac.rules }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.injector.rbac.rules "context" $ ) | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
183
backing-services/vault/templates/injector/deployment.yaml
Normal file
183
backing-services/vault/templates/injector/deployment.yaml
Normal file
@@ -0,0 +1,183 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.injector.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "vault.injector.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if not .Values.injector.autoscaling.enabled }}
|
||||
replicas: {{ .Values.injector.replicaCount }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.updateStrategy }}
|
||||
strategy: {{- toYaml .Values.injector.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.injector.podLabels .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.injector.podAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.injector.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
spec:
|
||||
serviceAccountName: {{ template "vault.injector.serviceAccountName" . }}
|
||||
{{- include "vault.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.injector.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.injector.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.injector.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.injector.podAffinityPreset "component" "injector" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.injector.podAntiAffinityPreset "component" "injector" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.injector.nodeAffinityPreset.type "key" .Values.injector.nodeAffinityPreset.key "values" .Values.injector.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.injector.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.injector.tolerations "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.priorityClassName }}
|
||||
priorityClassName: {{ .Values.injector.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.schedulerName }}
|
||||
schedulerName: {{ .Values.injector.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.injector.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.injector.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.injector.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.initContainers }}
|
||||
initContainers:
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.injector.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: sidecar-injector
|
||||
image: {{ template "vault.injector.image" . }}
|
||||
imagePullPolicy: {{ .Values.injector.image.pullPolicy }}
|
||||
{{- if .Values.injector.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.injector.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if .Values.injector.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.injector.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if .Values.injector.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.injector.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- agent-inject
|
||||
- 2>&1
|
||||
{{- if .Values.injector.image.debug }}
|
||||
- -log-level=debug
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: AGENT_INJECT_LISTEN
|
||||
value: :{{ .Values.injector.containerPorts.https }}
|
||||
- name: AGENT_INJECT_VAULT_ADDR
|
||||
value: http://{{ include "vault.server.fullname" . }}:{{ .Values.server.service.general.ports.http }}
|
||||
- name: AGENT_INJECT_VAULT_AUTH_PATH
|
||||
value: auth/kubernetes
|
||||
- name: AGENT_INJECT_VAULT_IMAGE
|
||||
value: {{ include "vault.server.image" . | quote }}
|
||||
- name: AGENT_INJECT_TLS_AUTO
|
||||
value: {{ include "vault.injector.fullname.namespace" . | quote }}
|
||||
{{- $host := include "vault.injector.fullname" . }}
|
||||
{{- $ns := include "common.names.namespace" . }}
|
||||
- name: AGENT_INJECT_TLS_AUTO_HOSTS
|
||||
value: {{ $host }},{{ printf "%s.%s" $host $ns }},{{ printf "%s.%s.svc" $host $ns }}
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
{{- if .Values.injector.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.injector.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.injector.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.injector.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.injector.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.resources }}
|
||||
resources: {{- toYaml .Values.injector.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: https
|
||||
containerPort: {{ .Values.injector.containerPorts.https }}
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.injector.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.injector.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.injector.livenessProbe.enabled }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.injector.livenessProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /health/ready
|
||||
port: https
|
||||
scheme: HTTPS
|
||||
{{- end }}
|
||||
{{- if .Values.injector.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.injector.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.injector.readinessProbe.enabled }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.injector.readinessProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /health/ready
|
||||
port: https
|
||||
scheme: HTTPS
|
||||
{{- end }}
|
||||
{{- if .Values.injector.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.injector.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.injector.startupProbe.enabled }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.injector.startupProbe "enabled") "context" $) | nindent 12 }}
|
||||
httpGet:
|
||||
path: /health/ready
|
||||
port: https
|
||||
scheme: HTTPS
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.injector.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.injector.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.injector.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.injector.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.injector.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.injector.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
50
backing-services/vault/templates/injector/hpa.yaml
Normal file
50
backing-services/vault/templates/injector/hpa.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.injector.autoscaling.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ template "vault.injector.fullname" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
name: {{ template "vault.injector.fullname" . }}
|
||||
minReplicas: {{ .Values.injector.autoscaling.minReplicas }}
|
||||
maxReplicas: {{ .Values.injector.autoscaling.maxReplicas }}
|
||||
metrics:
|
||||
{{- if .Values.injector.autoscaling.targetCPU }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
|
||||
targetAverageUtilization: {{ .Values.injector.autoscaling.targetCPU }}
|
||||
{{- else }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.injector.autoscaling.targetCPU }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.autoscaling.targetMemory }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }}
|
||||
targetAverageUtilization: {{ .Values.injector.autoscaling.targetMemory }}
|
||||
{{- else }}
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ .Values.injector.autoscaling.targetMemory }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,43 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.injector.enabled }}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: {{ include "vault.injector.fullname.namespace" . }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
webhooks:
|
||||
- name: vault.hashicorp.com
|
||||
failurePolicy: Ignore
|
||||
matchPolicy: Exact
|
||||
sideEffects: None
|
||||
timeoutSeconds: 30
|
||||
admissionReviewVersions: ["v1", "v1beta1"]
|
||||
clientConfig:
|
||||
service:
|
||||
name: {{ include "vault.injector.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
path: "/mutate"
|
||||
caBundle: ""
|
||||
rules:
|
||||
- operations: ["CREATE", "UPDATE"]
|
||||
apiGroups: [""]
|
||||
apiVersions: ["v1"]
|
||||
resources: ["pods"]
|
||||
objectSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/component
|
||||
operator: NotIn
|
||||
values:
|
||||
- injector
|
||||
{{- end }}
|
||||
32
backing-services/vault/templates/injector/pdb.yaml
Normal file
32
backing-services/vault/templates/injector/pdb.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.injector.pdb.create }}
|
||||
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "vault.injector.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.injector.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.injector.pdb.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.injector.pdb.maxUnavailable }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.injector.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- end }}
|
||||
59
backing-services/vault/templates/injector/role.yaml
Normal file
59
backing-services/vault/templates/injector/role.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.injector.enabled .Values.injector.rbac.create }}
|
||||
kind: Role
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ printf "%s-leader-election" (include "vault.injector.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps/status
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- "coordination.k8s.io"
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
{{- end }}
|
||||
28
backing-services/vault/templates/injector/rolebinding.yaml
Normal file
28
backing-services/vault/templates/injector/rolebinding.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.injector.enabled .Values.injector.rbac.create }}
|
||||
kind: RoleBinding
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ printf "%s-leader-election" (include "vault.injector.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ printf "%s-leader-election" (include "vault.injector.fullname.namespace" .) | trunc 63 | trimSuffix "-" }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "vault.injector.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.injector.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "vault.injector.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
{{- if or .Values.injector.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.injector.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.injector.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
58
backing-services/vault/templates/injector/service.yaml
Normal file
58
backing-services/vault/templates/injector/service.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.injector.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "vault.injector.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.injector.image "chart" .Chart ) ) }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- if or .Values.injector.service.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.injector.service.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.injector.service.type }}
|
||||
{{- if and .Values.injector.service.clusterIP (eq .Values.injector.service.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.injector.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.injector.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.injector.service.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.injector.service.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (eq .Values.injector.service.type "LoadBalancer") (eq .Values.injector.service.type "NodePort") }}
|
||||
externalTrafficPolicy: {{ .Values.injector.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.injector.service.type "LoadBalancer") (not (empty .Values.injector.service.loadBalancerSourceRanges)) }}
|
||||
loadBalancerSourceRanges: {{ .Values.injector.service.loadBalancerSourceRanges }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.injector.service.type "LoadBalancer") (not (empty .Values.injector.service.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.injector.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: https
|
||||
port: {{ .Values.injector.service.ports.https }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.injector.service.type "NodePort") (eq .Values.injector.service.type "LoadBalancer")) (not (empty .Values.injector.service.nodePorts.https)) }}
|
||||
nodePort: {{ .Values.injector.service.nodePorts.https }}
|
||||
{{- else if eq .Values.injector.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
targetPort: https
|
||||
{{- if .Values.injector.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.injector.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.injector.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: injector
|
||||
{{- end }}
|
||||
72
backing-services/vault/templates/server/active-service.yaml
Normal file
72
backing-services/vault/templates/server/active-service.yaml
Normal file
@@ -0,0 +1,72 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.server.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-active" (include "vault.server.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if or .Values.server.service.active.annotations .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- if or .Values.server.service.active.annotations .Values.commonAnnotations (and .Values.server.metrics.enabled .Values.server.metrics.annotations) }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.service.active.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.server.metrics.enabled .Values.server.metrics.annotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.server.metrics.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.server.service.active.type }}
|
||||
{{- if and .Values.server.service.active.clusterIP (eq .Values.server.service.active.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.server.service.active.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.service.active.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.server.service.active.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.service.active.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.server.service.active.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (eq .Values.server.service.active.type "LoadBalancer") (eq .Values.server.service.active.type "NodePort") }}
|
||||
externalTrafficPolicy: {{ .Values.server.service.active.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.server.service.active.type "LoadBalancer") (not (empty .Values.server.service.active.loadBalancerSourceRanges)) }}
|
||||
loadBalancerSourceRanges: {{ .Values.server.service.active.loadBalancerSourceRanges }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.server.service.active.type "LoadBalancer") (not (empty .Values.server.service.active.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.server.service.active.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.server.service.active.ports.http }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.server.service.active.type "NodePort") (eq .Values.server.service.active.type "LoadBalancer")) (not (empty .Values.server.service.active.nodePorts.http)) }}
|
||||
nodePort: {{ .Values.server.service.active.nodePorts.http }}
|
||||
{{- else if eq .Values.server.service.active.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
targetPort: http
|
||||
- name: https-internal
|
||||
port: {{ .Values.server.service.active.ports.internal }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.server.service.active.type "NodePort") (eq .Values.server.service.active.type "LoadBalancer")) (not (empty .Values.server.service.active.nodePorts.internal)) }}
|
||||
nodePort: {{ .Values.server.service.active.nodePorts.internal }}
|
||||
{{- else if eq .Values.server.service.active.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
targetPort: https-internal
|
||||
{{- if .Values.server.service.active.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.service.active.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.injector.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/component: server
|
||||
app.kubernetes.io/part-of: vault
|
||||
vault-active: "true"
|
||||
{{- end }}
|
||||
@@ -0,0 +1,25 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.server.enabled .Values.server.rbac.create }}
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ include "vault.server.fullname.namespace" . }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:auth-delegator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "vault.server.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
21
backing-services/vault/templates/server/configmap.yaml
Normal file
21
backing-services/vault/templates/server/configmap.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.server.enabled (not .Values.server.existingConfigMap) }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "vault.server.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
config.hcl: |
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.config "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
61
backing-services/vault/templates/server/ingress.yaml
Normal file
61
backing-services/vault/templates/server/ingress.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.server.ingress.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ template "vault.server.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if or .Values.server.ingress.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.ingress.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.server.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
|
||||
ingressClassName: {{ .Values.server.ingress.ingressClassName | quote }}
|
||||
{{- end }}
|
||||
rules:
|
||||
{{- if .Values.server.ingress.hostname }}
|
||||
- host: {{ .Values.server.ingress.hostname }}
|
||||
http:
|
||||
paths:
|
||||
{{- if .Values.server.ingress.extraPaths }}
|
||||
{{- toYaml .Values.server.ingress.extraPaths | nindent 10 }}
|
||||
{{- end }}
|
||||
- path: {{ .Values.server.ingress.path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
||||
pathType: {{ .Values.server.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-active" (include "vault.server.fullname" .) | trunc 63 | trimSuffix "-") "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- range .Values.server.ingress.extraHosts }}
|
||||
- host: {{ .name | quote }}
|
||||
http:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (printf "%s-active" (include "vault.server.fullname" $) | trunc 63 | trimSuffix "-") "servicePort" "http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.ingress.extraRules }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.ingress.extraRules "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (and .Values.server.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.server.ingress.annotations )) .Values.server.ingress.selfSigned)) .Values.server.ingress.extraTls }}
|
||||
tls:
|
||||
{{- if and .Values.server.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.server.ingress.annotations )) .Values.server.ingress.selfSigned) }}
|
||||
- hosts:
|
||||
- {{ .Values.server.ingress.hostname | quote }}
|
||||
secretName: {{ printf "%s-tls" .Values.server.ingress.hostname }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.ingress.extraTls }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.ingress.extraTls "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
30
backing-services/vault/templates/server/pdb.yaml
Normal file
30
backing-services/vault/templates/server/pdb.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.server.pdb.create }}
|
||||
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "vault.server.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.server.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.server.pdb.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.server.pdb.maxUnavailable }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- end }}
|
||||
46
backing-services/vault/templates/server/rolebinding.yaml
Normal file
46
backing-services/vault/templates/server/rolebinding.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.server.enabled .Values.server.rbac.create }}
|
||||
kind: RoleBinding
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ printf "%s-leader-election" (include "vault.server.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ printf "%s-leader-election" (include "vault.server.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "vault.server.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ printf "%s-discovery" (include "vault.server.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ printf "%s-discovery" (include "vault.server.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "vault.server.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
73
backing-services/vault/templates/server/roles.yaml
Normal file
73
backing-services/vault/templates/server/roles.yaml
Normal file
@@ -0,0 +1,73 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.server.enabled .Values.server.rbac.create }}
|
||||
kind: Role
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ printf "%s-leader-election" (include "vault.server.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- configmaps/status
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- "coordination.k8s.io"
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
- patch
|
||||
- delete
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
|
||||
metadata:
|
||||
name: {{ printf "%s-discovery" (include "vault.server.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "watch", "list", "update", "patch"]
|
||||
{{- end }}
|
||||
18
backing-services/vault/templates/server/service-account.yaml
Normal file
18
backing-services/vault/templates/server/service-account.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.server.serviceAccount.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "vault.server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- if or .Values.server.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.server.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,34 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.server.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ printf "%s-headless" (include "vault.server.fullname" .) }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if or .Values.server.service.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.service.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
publishNotReadyAddresses: true
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.server.service.general.ports.http }}
|
||||
targetPort: http
|
||||
- name: https-internal
|
||||
port: {{ .Values.server.service.general.ports.internal }}
|
||||
targetPort: https-internal
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- end }}
|
||||
65
backing-services/vault/templates/server/service.yaml
Normal file
65
backing-services/vault/templates/server/service.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.server.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "vault.server.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if or .Values.server.service.general.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.service.general.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.server.service.general.type }}
|
||||
{{- if and .Values.server.service.general.clusterIP (eq .Values.server.service.general.type "ClusterIP") }}
|
||||
clusterIP: {{ .Values.server.service.general.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.service.general.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.server.service.general.sessionAffinity }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.service.general.sessionAffinityConfig }}
|
||||
sessionAffinityConfig: {{- include "common.tplvalues.render" (dict "value" .Values.server.service.general.sessionAffinityConfig "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or (eq .Values.server.service.general.type "LoadBalancer") (eq .Values.server.service.general.type "NodePort") }}
|
||||
externalTrafficPolicy: {{ .Values.server.service.general.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.server.service.general.type "LoadBalancer") (not (empty .Values.server.service.general.loadBalancerSourceRanges)) }}
|
||||
loadBalancerSourceRanges: {{ .Values.server.service.general.loadBalancerSourceRanges }}
|
||||
{{- end }}
|
||||
{{- if and (eq .Values.server.service.general.type "LoadBalancer") (not (empty .Values.server.service.general.loadBalancerIP)) }}
|
||||
loadBalancerIP: {{ .Values.server.service.general.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.server.service.general.ports.http }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.server.service.general.type "NodePort") (eq .Values.server.service.general.type "LoadBalancer")) (not (empty .Values.server.service.general.nodePorts.http)) }}
|
||||
nodePort: {{ .Values.server.service.general.nodePorts.http }}
|
||||
{{- else if eq .Values.server.service.general.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
targetPort: http
|
||||
- name: https-internal
|
||||
port: {{ .Values.server.service.general.ports.internal }}
|
||||
protocol: TCP
|
||||
{{- if and (or (eq .Values.server.service.general.type "NodePort") (eq .Values.server.service.general.type "LoadBalancer")) (not (empty .Values.server.service.general.nodePorts.internal)) }}
|
||||
nodePort: {{ .Values.server.service.general.nodePorts.internal }}
|
||||
{{- else if eq .Values.server.service.general.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
targetPort: https-internal
|
||||
{{- if .Values.server.service.general.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.service.general.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- end }}
|
||||
50
backing-services/vault/templates/server/servicemonitor.yaml
Normal file
50
backing-services/vault/templates/server/servicemonitor.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if and .Values.server.metrics.enabled .Values.server.metrics.serviceMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: {{ template "vault.server.fullname" . }}
|
||||
namespace: {{ default (include "common.names.namespace" .) .Values.server.metrics.serviceMonitor.namespace | quote }}
|
||||
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if or .Values.server.metrics.serviceMonitor.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.metrics.serviceMonitor.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
jobLabel: {{ .Values.server.metrics.serviceMonitor.jobLabel | quote }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.server.metrics.serviceMonitor.selector }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.metrics.serviceMonitor.selector "context" $) | nindent 6 }}
|
||||
{{- end }}
|
||||
endpoints:
|
||||
- port: http-metrics
|
||||
path: "/metrics"
|
||||
{{- if .Values.server.metrics.serviceMonitor.interval }}
|
||||
interval: {{ .Values.server.metrics.serviceMonitor.interval }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.metrics.serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ .Values.server.metrics.serviceMonitor.scrapeTimeout }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.metrics.serviceMonitor.honorLabels }}
|
||||
honorLabels: {{ .Values.server.metrics.serviceMonitor.honorLabels }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.metrics.serviceMonitor.metricRelabelings }}
|
||||
metricRelabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.server.metrics.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.metrics.serviceMonitor.relabelings }}
|
||||
relabelings: {{- include "common.tplvalues.render" ( dict "value" .Values.server.metrics.serviceMonitor.relabelings "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ include "common.names.namespace" . | quote }}
|
||||
{{- end }}
|
||||
271
backing-services/vault/templates/server/statefulset.yaml
Normal file
271
backing-services/vault/templates/server/statefulset.yaml
Normal file
@@ -0,0 +1,271 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.server.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: {{ template "vault.server.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.server.replicaCount }}
|
||||
serviceName: {{ printf "%s-headless" (include "vault.server.fullname" .) }}
|
||||
podManagementPolicy: {{ .Values.server.podManagementPolicy }}
|
||||
{{- if .Values.server.updateStrategy }}
|
||||
updateStrategy: {{- toYaml .Values.server.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.server.podLabels .Values.commonLabels ) "context" . ) }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.server.podAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.server.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
spec:
|
||||
serviceAccountName: {{ template "vault.server.serviceAccountName" . }}
|
||||
{{- include "vault.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.server.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.server.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.server.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.server.podAffinityPreset "component" "server" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.server.podAntiAffinityPreset "component" "server" "customLabels" $podLabels "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.server.nodeAffinityPreset.type "key" .Values.server.nodeAffinityPreset.key "values" .Values.server.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.server.nodeSelector "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.server.tolerations "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.priorityClassName }}
|
||||
priorityClassName: {{ .Values.server.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.schedulerName }}
|
||||
schedulerName: {{ .Values.server.schedulerName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.server.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.podSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.server.podSecurityContext "enabled" | toYaml | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.terminationGracePeriodSeconds }}
|
||||
terminationGracePeriodSeconds: {{ .Values.server.terminationGracePeriodSeconds }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
{{- if and .Values.volumePermissions.enabled .Values.server.containerSecurityContext.enabled }}
|
||||
- name: volume-permissions
|
||||
image: {{ include "vault.volumePermissions.image" . }}
|
||||
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p {{ .Values.server.persistence.mountPath }}
|
||||
find {{ .Values.server.persistence.mountPath }} -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs --no-run-if-empty chown -R {{ .Values.server.containerSecurityContext.runAsUser }}:{{ .Values.server.podSecurityContext.fsGroup }}
|
||||
{{- if .Values.volumePermissions.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.volumePermissions.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: {{ .Values.server.persistence.mountPath }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: server
|
||||
image: {{ template "vault.server.image" . }}
|
||||
imagePullPolicy: {{ .Values.server.image.pullPolicy }}
|
||||
{{- if .Values.server.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.server.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if .Values.server.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.server.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if .Values.server.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.server.args "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
args:
|
||||
- server
|
||||
- -config=/bitnami/vault/config/config.hcl
|
||||
{{- if .Values.server.image.debug }}
|
||||
- -log-level=debug
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: HOST_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.hostIP
|
||||
- name: POD_IP
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: status.podIP
|
||||
- name: VAULT_K8S_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: VAULT_K8S_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: VAULT_ADDR
|
||||
value: {{ printf "http://127.0.0.1:%v" .Values.server.containerPorts.http | quote }}
|
||||
- name: VAULT_API_ADDR
|
||||
value: {{ printf "http://$(POD_IP):%v" .Values.server.containerPorts.http | quote }}
|
||||
- name: HOSTNAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: VAULT_CLUSTER_ADDR
|
||||
value: {{ printf "https://$(HOSTNAME).%s-headless:%v" ( include "vault.server.fullname" . ) .Values.server.containerPorts.internal | quote }}
|
||||
- name: HOME
|
||||
value: "/bitnami/vault/home"
|
||||
{{- if .Values.server.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
{{- if .Values.server.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.server.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.server.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.resources }}
|
||||
resources: {{- toYaml .Values.server.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.server.containerPorts.http }}
|
||||
- name: https-internal
|
||||
containerPort: {{ .Values.server.containerPorts.internal }}
|
||||
{{- if not .Values.diagnosticMode.enabled }}
|
||||
{{- if .Values.server.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.server.livenessProbe.enabled }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.server.livenessProbe "enabled") "context" $) | nindent 12 }}
|
||||
exec:
|
||||
command:
|
||||
- vault
|
||||
- status
|
||||
- -tls-skip-verify
|
||||
{{- end }}
|
||||
{{- if .Values.server.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.server.readinessProbe.enabled }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.server.readinessProbe "enabled") "context" $) | nindent 12 }}
|
||||
exec:
|
||||
command:
|
||||
- vault
|
||||
- status
|
||||
- -tls-skip-verify
|
||||
{{- end }}
|
||||
{{- if .Values.server.customStartupProbe }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" .Values.server.customStartupProbe "context" $) | nindent 12 }}
|
||||
{{- else if .Values.server.startupProbe.enabled }}
|
||||
startupProbe: {{- include "common.tplvalues.render" (dict "value" (omit .Values.server.startupProbe "enabled") "context" $) | nindent 12 }}
|
||||
exec:
|
||||
command:
|
||||
- vault
|
||||
- status
|
||||
- -tls-skip-verify
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.server.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- else }}
|
||||
lifecycle:
|
||||
# From upstream Vault helm chart:
|
||||
# Vault container doesn't receive SIGTERM from Kubernetes
|
||||
# and after the grace period ends, Kube sends SIGKILL. This
|
||||
# causes issues with graceful shutdowns such as deregistering itself
|
||||
# from Consul (zombie services).
|
||||
preStop:
|
||||
exec:
|
||||
command: [
|
||||
"/bin/sh", "-ec",
|
||||
# Adding a sleep here to give the pod eviction a
|
||||
# chance to propagate, so requests will not be made
|
||||
# to this pod while it's terminating
|
||||
"sleep 5 && kill -SIGTERM $(pidof vault)",
|
||||
]
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: {{ .Values.server.persistence.mountPath }}
|
||||
- name: config
|
||||
mountPath: /bitnami/vault/config
|
||||
- name: home
|
||||
mountPath: /bitnami/vault/home
|
||||
{{- if .Values.server.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.server.sidecars }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.server.sidecars "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: {{ include "vault.server.configmapName" . }}
|
||||
- name: home
|
||||
emptyDir: {}
|
||||
{{- if .Values.server.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.server.persistence.enabled (not .Values.server.persistence.existingClaim) }}
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: data
|
||||
annotations:
|
||||
{{- if .Values.server.persistence.annotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.server.persistence.annotations "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
labels: {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.server.persistence.dataSource }}
|
||||
dataSource: {{- include "common.tplvalues.render" (dict "value" .Values.server.persistence.dataSource "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
accessModes:
|
||||
{{- range .Values.server.persistence.accessModes }}
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.server.persistence.size | quote }}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.server.persistence "global" .Values.global) | nindent 8 }}
|
||||
{{- if .Values.server.persistence.selector }}
|
||||
selector: {{- include "common.tplvalues.render" (dict "value" .Values.server.persistence.selector "context" $) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
48
backing-services/vault/templates/server/tls-secret.yaml
Normal file
48
backing-services/vault/templates/server/tls-secret.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
{{- /*
|
||||
Copyright VMware, Inc.
|
||||
SPDX-License-Identifier: APACHE-2.0
|
||||
*/}}
|
||||
|
||||
{{- if .Values.server.ingress.enabled }}
|
||||
{{- if .Values.server.ingress.secrets }}
|
||||
{{- range .Values.server.ingress.secrets }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
namespace: {{ include "common.names.namespace" $ | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if $.Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ .certificate | b64enc }}
|
||||
tls.key: {{ .key | b64enc }}
|
||||
---
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.server.ingress.tls .Values.server.ingress.selfSigned }}
|
||||
{{- $secretName := printf "%s-tls" .Values.server.ingress.hostname }}
|
||||
{{- $ca := genCA "server-ca" 365 }}
|
||||
{{- $cert := genSignedCert .Values.server.ingress.hostname nil (list .Values.server.ingress.hostname) 365 $ca }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ $secretName }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
app.kubernetes.io/part-of: vault
|
||||
app.kubernetes.io/component: server
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
tls.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.crt" "defaultValue" $cert.Cert "context" $) }}
|
||||
tls.key: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "tls.key" "defaultValue" $cert.Key "context" $) }}
|
||||
ca.crt: {{ include "common.secrets.lookup" (dict "secret" $secretName "key" "ca.crt" "defaultValue" $ca.Cert "context" $) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user