forked from hashicorp/terraform-enterprise-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecret.yaml
More file actions
55 lines (50 loc) · 1.29 KB
/
secret.yaml
File metadata and controls
55 lines (50 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{{/*
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
*/}}
{{- if and .Values.tls.certData .Values.tls.keyData }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.tls.certificateSecret }}
namespace: {{ .Release.Namespace }}
type: kubernetes.io/tls
data:
tls.crt: {{ .Values.tls.certData }}
tls.key: {{ .Values.tls.keyData }}
{{- end }}
{{- if and .Values.tlsSecondary.certData .Values.tlsSecondary.keyData }}
---
apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.tlsSecondary.certificateSecret | default "terraform-enterprise-certificates-secondary" }}
namespace: {{ .Release.Namespace }}
type: kubernetes.io/tls
data:
tls.crt: {{ .Values.tlsSecondary.certData }}
tls.key: {{ .Values.tlsSecondary.keyData }}
{{- end }}
{{- if .Values.tls.caCertData }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: terraform-enterprise-ca-certificates
namespace: {{ .Release.Namespace }}
data:
{{ .Values.tls.caCertFileName }}: {{ .Values.tls.caCertData }}
{{- end }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: terraform-enterprise-env-secrets
namespace: {{ .Release.Namespace }}
data:
{{- include "helpers.list-env-secrets" . | indent 2 }}
{{- if .Values.env.secretsFilePath }}
{{- include "helpers.enc-b64-secrets-file" . | indent 2 }}
{{- end }}