rancher-partner-charts/charts/prophetstor/federatorai/templates/federatorai-dashboard-frontend/tls-secrets.yaml

54 lines
1.8 KiB
YAML

---
{{- if .Values.federatoraiDashboardFrontend.ingress.enabled }}
{{- if .Values.federatoraiDashboardFrontend.ingress.secrets }}
{{- range .Values.federatoraiDashboardFrontend.ingress.secrets }}
apiVersion: v1
kind: Secret
metadata:
annotations:
{{- if .Values.global.commonAnnotations }}
{{- include "render-value" ( dict "value" .Values.global.commonAnnotations "context" .) | nindent 4 }}
{{- end }}
labels:
{{- if .Values.global.commonLabels }}
{{- include "render-value" ( dict "value" .Values.global.commonLabels "context" .) | nindent 4 }}
{{- end }}
app.kubernetes.io/part-of: federatorai
app: alameda
component: federatorai-dashboard-frontend
name: federatorai-ingress
namespace: {{ .Release.Namespace }}
type: kubernetes.io/tls
data:
tls.crt: {{ .certificate | b64enc }}
tls.key: {{ .key | b64enc }}
---
{{- end }}
{{- end }}
{{- if .Values.federatoraiDashboardFrontend.ingress.tls }}
{{- $ca := genCA "federatorai-dashboard-frontend-ca" 365 }}
{{- $cert := genSignedCert .Values.federatoraiDashboardFrontend.ingress.hostname nil (list .Values.federatoraiDashboardFrontend.ingress.hostname) 365 $ca }}
apiVersion: v1
kind: Secret
metadata:
annotations:
{{- if .Values.global.commonAnnotations }}
{{- include "render-value" ( dict "value" .Values.global.commonAnnotations "context" .) | nindent 4 }}
{{- end }}
labels:
{{- if .Values.global.commonLabels }}
{{- include "render-value" ( dict "value" .Values.global.commonLabels "context" .) | nindent 4 }}
{{- end }}
app.kubernetes.io/part-of: federatorai
app: alameda
component: federatorai-dashboard-frontend
name: federatorai-ingress-tls
namespace: {{ .Release.Namespace }}
type: kubernetes.io/tls
data:
tls.crt: {{ $cert.Cert | b64enc | quote }}
tls.key: {{ $cert.Key | b64enc | quote }}
ca.crt: {{ $ca.Cert | b64enc | quote }}
{{- end }}
{{- end }}