Skip to content

Commit

Permalink
Merge pull request #270 from epinio/1696-numeric-only-app-names
Browse files Browse the repository at this point in the history
Quote values coming from user when they should be strings
  • Loading branch information
Dimitris Karakasilis authored Sep 8, 2022
2 parents 253cd4c + 7a279ff commit 0c7230e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions chart/application/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Common labels
*/}}
{{- define "epinio-application.labels" -}}
app.kubernetes.io/managed-by: epinio
app.kubernetes.io/part-of: {{ .Release.Namespace }}
app.kubernetes.io/part-of: {{ .Release.Namespace | quote }}
helm.sh/chart: {{ include "epinio-application.chart" . }}
{{ include "epinio-application.selectorLabels" . }}
{{- end }}
Expand All @@ -19,14 +19,14 @@ helm.sh/chart: {{ include "epinio-application.chart" . }}
Common annotations
*/}}
{{- define "epinio-application.annotations" -}}
epinio.io/created-by: {{ .Values.epinio.username }}
epinio.io/created-by: {{ .Values.epinio.username | quote }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "epinio-application.selectorLabels" -}}
app.kubernetes.io/name: {{ .Values.epinio.appName }}
app.kubernetes.io/name: {{ .Values.epinio.appName | quote }}
app.kubernetes.io/component: application
{{- end }}

Expand Down
4 changes: 2 additions & 2 deletions chart/application/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ spec:
replicas: {{ .Values.epinio.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ .Values.epinio.appName }}
app.kubernetes.io/name: {{ .Values.epinio.appName | quote }}
template:
metadata:
annotations:
app.kubernetes.io/name: {{ .Values.epinio.appName }}
app.kubernetes.io/name: {{ .Values.epinio.appName | quote }}
{{- include "epinio-application.annotations" . | nindent 8 }}
{{- with .Values.epinio.start }}
epinio.io/start: {{ . | quote }}
Expand Down
6 changes: 3 additions & 3 deletions chart/application/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
spec:
secretName: {{ include "epinio-truncate" (print $.Values.epinio.appName "-" .id "-tls") }}
dnsNames:
- {{ .domain }}
- {{ .domain | quote }}
issuerRef:
name : {{ $.Values.epinio.tlsIssuer | quote }}
kind: ClusterIssuer
Expand All @@ -22,7 +22,7 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "epinio-truncate" (print $.Values.epinio.appName "-" .id) }}
namespace: {{ $.Release.Namespace }}
namespace: {{ $.Release.Namespace | quote }}
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
Expand All @@ -48,7 +48,7 @@ spec:
- hosts:
- {{ .domain | quote }}
{{- if .secret }}
secretName: {{ .secret }}
secretName: {{ .secret | quote }}
{{- else }}
secretName: {{ include "epinio-truncate" (print $.Values.epinio.appName "-" .id "-tls") }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion chart/application/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ metadata:
labels:
{{- include "epinio-application.labels" . | nindent 4 }}
name: {{ include "epinio-truncate" .Values.epinio.appName }}
namespace: {{ .Release.Namespace }}
namespace: {{ .Release.Namespace | quote }}
spec:
ports:
- port: 8080
Expand Down

0 comments on commit 0c7230e

Please sign in to comment.