diff --git a/chart/templates/vault/twistlock-helmrelease.yaml b/chart/templates/vault/twistlock-helmrelease.yaml new file mode 100644 index 0000000000000000000000000000000000000000..14e476fc10595935352c30b82d1207dc0397f1ff --- /dev/null +++ b/chart/templates/vault/twistlock-helmrelease.yaml @@ -0,0 +1,56 @@ +{{- $fluxSettingsVault := merge .Values.vault.flux .Values.flux -}} +{{- if .Values.vault.enabled }} +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: vault + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: vault + app.kubernetes.io/component: "sandbox" + {{- include "commonLabels" . | nindent 4}} +spec: + targetNamespace: vault + chart: + spec: + chart: {{ .Values.vault.git.path }} + interval: 5m + sourceRef: + kind: GitRepository + name: vault + namespace: {{ .Release.Namespace }} + + {{- toYaml $fluxSettingsVault | nindent 2 }} + + {{- if .Values.vault.postRenderers }} + postRenderers: + {{ toYaml .Values.vault.postRenderers | nindent 4 }} + {{- end }} + valuesFrom: + - name: {{ .Release.Name }}-vault-values + kind: Secret + valuesKey: "common" + - name: {{ .Release.Name }}-vault-values + kind: Secret + valuesKey: "defaults" + - name: {{ .Release.Name }}-vault-values + kind: Secret + valuesKey: "overlays" + + # TODO: DRY this up + {{- if or .Values.gatekeeper.enabled .Values.istio.enabled }} + dependsOn: + {{- if .Values.gatekeeper.enabled }} + - name: gatekeeper + namespace: {{ .Release.Namespace }} + {{- end }} + {{- if .Values.istio.enabled }} + - name: istio + namespace: {{ .Release.Namespace }} + {{- end }} + {{- if .Values.monitoring.enabled }} + - name: monitoring + namespace: {{ .Release.Namespace }} + {{- end }} + {{- end }} +{{- end }} diff --git a/chart/templates/vault/values.yaml b/chart/templates/vault/values.yaml index 538c55645b1d8a852030303a99563c2fcb15e6a5..10ab479dee6abdf760a88e9f9a048fe91a5f2674 100644 --- a/chart/templates/vault/values.yaml +++ b/chart/templates/vault/values.yaml @@ -38,4 +38,4 @@ istio: gateways: - istio-system/{{ default "public" .Values.monitoring.ingress.gateway }} -{{- end -}} +{{- end -}} \ No newline at end of file diff --git a/chart/values.yaml b/chart/values.yaml index 147c67bff168e61b6628c64f9ada6cc61b1df49a..1798d44a5cfbf00e9bcd9e493e49e7da3054b157 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -563,6 +563,18 @@ addons: # -- Additional authservice chain configurations. chains: {} + # ---------------------------------------------------------------------------------------------------------------------- + # Vault + # + vault: + # -- Toggle deployment of vault. + enabled: true + git: + repo: https://repo1.dso.mil/platform-one/big-bang/apps/sandbox/vault.git + path: "./chart" + branch: "deploy-vault" + # ---------------------------------------------------------------------------------------------------------------------- + # ---------------------------------------------------------------------------------------------------------------------- # Minio Operator and Instance #