Skip to content
Snippets Groups Projects
Verified Commit 562f67a0 authored by Varac's avatar Varac
Browse files

Dont template undefined values

parent 4d846d8b
Branches
No related tags found
No related merge requests found
Pipeline #46451 passed
......@@ -9,10 +9,10 @@ stages:
lint:
stage: test
image:
name: linkyard/docker-helm
name: alpine/helm
entrypoint: ["/bin/sh", "-c"]
script:
- find . -maxdepth 1 -type d | egrep -v '^(.|./.git)$' | xargs -n 1 helm lint
- find . -maxdepth 1 -type d | egrep -v '^(.|./.git)$' | xargs -n 1 -t helm lint
package_charts:
stage: package
......@@ -22,7 +22,7 @@ package_charts:
script:
- helm init -c
- mkdir public/
- find . -maxdepth 1 -type d | egrep -v '^(.|./.git|./public)$' | xargs -n 1 helm package -d public/
- find . -maxdepth 1 -type d | egrep -v '^(.|./.git|./public)$' | xargs -n 1 -t helm package -d public/
- helm repo index public/ --url https://charts.oas.varac.net
- apk add markdown
- markdown README.md > public/index.html
......
......@@ -9,15 +9,29 @@ metadata:
heritage: "{{ .Release.Service }}"
type: Opaque
data:
{{ if .Values.hostKey.ed25519 }}
ssh_host_ed25519_key: {{ .Values.hostKey.ed25519.sec | b64enc | indent 4 }}
ssh_host_ed25519_key.pub: {{ .Values.hostKey.ed25519.pub | b64enc | indent 4 }}
{{ end }}
{{ if .Values.hostKey.ecdsa }}
ssh_host_ecdsa_key: {{ .Values.hostKey.ecdsa.sec | b64enc | indent 4 }}
ssh_host_ecdsa_key.pub: {{ .Values.hostKey.ecdsa.pub | b64enc | indent 4 }}
{{ end }}
{{ if .Values.hostKey.rsa }}
ssh_host_rsa_key: {{ .Values.hostKey.rsa.sec | b64enc | indent 4 }}
ssh_host_rsa_key.pub: {{ .Values.hostKey.rsa.pub | b64enc | indent 4 }}
{{ end }}
{{- if .Values.hostKey }}
{{- if .Values.hostKey.ed25519 }}
{{- if .Values.hostKey.ed25519.sec }}
ssh_host_ed25519_key: {{ .Values.hostKey.ed25519.sec | b64enc }}
{{- end }}
{{- if .Values.hostKey.ed25519.pub }}
ssh_host_ed25519_key.pub: {{ .Values.hostKey.ed25519.pub | b64enc }}
{{- end }}
{{- end }}
{{- if .Values.hostKey.ecdsa }}
{{- if .Values.hostKey.ecdsa.sec }}
ssh_host_ecdsa_key: {{ .Values.hostKey.ecdsa.sec | b64enc }}
{{- end }}
{{- if .Values.hostKey.ecdsa.pub }}
ssh_host_ecdsa_key.pub: {{ .Values.hostKey.ecdsa.pub | b64enc }}
{{- end }}
{{- end }}
{{- if .Values.hostKey.rsa }}
{{- if .Values.hostKey.rsa.sec }}
ssh_host_rsa_key: {{ .Values.hostKey.rsa.sec | b64enc }}
{{- end }}
{{- if .Values.hostKey.rsa.pub }}
ssh_host_rsa_key.pub: {{ .Values.hostKey.rsa.pub | b64enc }}
{{- end }}
{{- end }}
{{- end }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment