rancher-partner-charts/charts/trilio/k8s-triliovault-operator/2.6.500/templates/TVMCustomResource.yaml

42 lines
2.0 KiB
YAML

{{- if .Values.installTVK.enabled }}
{{- if not (lookup "triliovault.trilio.io/v1" "TrilioVaultManager" "" "").items }}
{{template "k8s-triliovault-operator.tlsSecretValidation" .}}
apiVersion: triliovault.trilio.io/v1
kind: TrilioVaultManager
metadata:
name: {{ .Release.Name }}-tvk
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-install
spec:
{{- if eq .Chart.Version "0.1.0" }}
trilioVaultAppVersion: latest
{{- else}}
trilioVaultAppVersion: {{ .Chart.Version }}
{{- end }}
applicationScope: {{ .Values.installTVK.applicationScope }}
# User can configure the ingress hosts, annotations and TLS secret through the ingressConfig section
ingressConfig:
{{- if and (gt (len .Values.installTVK.ingressConfig.annotations) 0) (not .Values.installTVK.ComponentConfiguration.ingressController.enabled) }}
annotations:
{{- range $key, $value := .Values.installTVK.ingressConfig.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end -}}
{{- end }}
host: {{ .Values.installTVK.ingressConfig.host | default (printf "%s.k8s-tvk.com" $.Release.Namespace) | quote }}
{{- if not .Values.installTVK.ComponentConfiguration.ingressController.enabled }}
ingressClass: {{ .Values.installTVK.ingressConfig.ingressClass | quote }}
{{- end }}
{{- if .Values.installTVK.ingressConfig.tlsSecretName }}
tlsSecretName: {{ .Values.installTVK.ingressConfig.tlsSecretName | quote }}
{{- end }}
# TVK components configuration, currently supports control-plane, web, exporter, web-backend, ingress-controller, admission-webhook.
# User can configure resources for all componentes and can configure service type and host for the ingress-controller
componentConfiguration:
ingress-controller:
enabled: {{ .Values.installTVK.ComponentConfiguration.ingressController.enabled }}
service:
type: {{ .Values.installTVK.ComponentConfiguration.ingressController.service.type }}
{{- end -}}
{{- end -}}