Tornjak reuse spire-lib.cluster-domain macro (#292)

Resolves #291

Signed-off-by: Marco Franssen <[email protected]>
This commit is contained in:
Marco Franssen
2023-05-17 12:42:17 -07:00
committed by GitHub
parent 31ce704fa8
commit b30b412edb
2 changed files with 1 additions and 9 deletions
@@ -41,14 +41,6 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "tornjak-frontend.cluster-domain" -}}
{{- if ne (len (dig "k8s" "clusterDomain" "" .Values.global)) 0 }}
{{- .Values.global.k8s.clusterDomain }}
{{- else }}
{{- .Values.clusterDomain }}
{{- end }}
{{- end }}
{{/*
Common labels
*/}}
@@ -14,7 +14,7 @@ spec:
- name: curl-tornjak-frontend
image: cgr.dev/chainguard/bash:latest
command: ['curl']
args: ['-k', '-s', '-f', 'http://{{ include "tornjak-frontend.fullname" . }}.{{ include "tornjak-frontend.namespace" . }}.svc.{{ include "tornjak-frontend.cluster-domain" . }}:{{ .Values.service.port }}']
args: ['-k', '-s', '-f', 'http://{{ include "tornjak-frontend.fullname" . }}.{{ include "tornjak-frontend.namespace" . }}.svc.{{ include "spire-lib.cluster-domain" . }}:{{ .Values.service.port }}']
securityContext:
{{- toYaml .Values.securityContext | nindent 8 }}
restartPolicy: Never