Skip to content

Commit

Permalink
wip: branch to use with kaptain's using-helmfile branch.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Sep 7, 2022
1 parent 604e782 commit 25dddd5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/kargo/templates/_ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ spec:
tls:
- hosts:
- {{ include "kargo.names.host" . }}
secretName: {{ include "kargo.names.name" . }}-tls
secretName: {{ include "kargo.names.host" . }}-tls
{{- end }}
{{- end -}}
13 changes: 9 additions & 4 deletions charts/kargo/templates/_names.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Names ares truncated at 63 chars because some Kubernetes name fields are limited
Expand the name of the chart.
*/}}
{{- define "kargo.names.name" -}}
{{- .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Expand All @@ -22,7 +22,7 @@ Create chart name and version as used by the chart label.
Create host name used by ingress host.
*/}}
{{- define "kargo.names.host" -}}
{{- printf "%s.%s" ((hasKey .Values "hostOverride") | ternary .Values.hostOverride .Chart.Name) .Values.global.subdomain | trunc 63 | trimSuffix "-" -}}
{{- printf "%s.%s" (default .Chart.Name .Values.hostOverride) .Values.global.subdomain | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Expand All @@ -37,9 +37,14 @@ Create a default fully qualified app name.
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kargo.names.fullname" -}}
{{- if contains .Chart.Name .Release.Name -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name .Chart.Name | trunc 63 | trimSuffix "-" -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
9 changes: 6 additions & 3 deletions charts/mapcache/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ spec:
volumeMounts:
- mountPath: /cache
name: mapcache-data
{{- if .Values.dataSubPath }}
subPath: {{ include "kargo.tplvalues.render" ( dict "value" .Values.dataSubPath "context" $ ) }}
{{- end }}
- mountPath: /config/rclone/rclone.conf
name: rclone-config
subPath: rclone.conf
Expand Down Expand Up @@ -74,10 +77,10 @@ spec:
{{- include "kargo.tplvalues.render" ( dict "value" .Values.configVolume "context" $ ) | nindent 10 }}
{{- end }}
- name: mapcache-data
{{- if .Values.localCacheSource }}
emptyDir: {}
{{- else if .Values.dataVolume }}
{{- if .Values.dataVolume }}
{{- include "kargo.tplvalues.render" ( dict "value" .Values.dataVolume "context" $ ) | nindent 10 }}
{{- else if .Values.localCacheSource }}
emptyDir: {}
{{- end }}
{{- if .Values.envsubstConfig }}
{{- include "kargo.envsubstConfig.renderVolume" ( dict "args" .Values.envsubstConfig "context" $ ) | nindent 8 }}
Expand Down

0 comments on commit 25dddd5

Please sign in to comment.