Skip to content

Commit

Permalink
Merge pull request #147 from chiayu-su/fix/labels-exist-bug
Browse files Browse the repository at this point in the history
fix(simple): fix cost tag
  • Loading branch information
chiayu-su authored Apr 15, 2024
2 parents fdf7015 + 0d1994a commit 3ca31a5
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion simple/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
description: Helm chart with simple deployment/service template
name: simple
version: 0.18.0
version: 0.18.1
appVersion: 0.0.1
tillerVersion: ">=2.14.3"
7 changes: 3 additions & 4 deletions simple/templates/_ingress_multiple.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ metadata:
name: {{ $ingress_name }}
labels:
businessid: {{ $businessid | quote }}
{{- with $ref.labels }}
{{- $labelsYaml := toYaml . | quote}}
{{- $labelsYaml | trim | nindent 4 }}
{{- end }}
{{- range $key, $value := $ref.labels }}
{{ $key }}: {{ $value }}
{{- end }}
annotations:
{{ toYaml $ref.annotations | indent 4 }}
spec:
Expand Down
7 changes: 3 additions & 4 deletions simple/templates/_ingress_single.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ metadata:
name: {{ .Values.name }}
labels:
businessid: {{ .Values.businessid | quote }}
{{- with .Values.ingress.labels }}
{{- $labelsYaml := toYaml . | quote }}
{{- $labelsYaml | trim | nindent 4 }}
{{- end }}
{{- range $key, $value := .Values.ingress.labels }}
{{ $key }}: {{ $value }}
{{- end }}
annotations:
{{ toYaml .Values.ingress.annotations | indent 4 }}
spec:
Expand Down
7 changes: 3 additions & 4 deletions simple/templates/_service_multiple.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ metadata:
annotations: {{ toYaml $ref.annotations | nindent 4 }}
labels:
businessid: {{ $businessid | quote }}
{{- with $ref.labels }}
{{- $labelsYaml := toYaml . | quote}}
{{- $labelsYaml | trim | nindent 4 }}
{{- end }}
{{- range $key, $value := $ref.labels }}
{{ $key }}: {{ $value }}
{{- end }}
spec:
{{- if and (hasKey $ref "type") (eq $ref.type "ExternalName")}}
type: {{ $ref.type}}
Expand Down
7 changes: 3 additions & 4 deletions simple/templates/_service_single.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ metadata:
annotations: {{ toYaml .Values.service.annotations | nindent 4 }}
labels:
businessid: {{ .Values.businessid | quote }}
{{- with .Values.service.labels }}
{{- $labelsYaml := toYaml . }}
{{- $labelsYaml | trim | nindent 4 }}
{{- end }}
{{- range $key, $value := .Values.service.labels }}
{{ $key }}: {{ $value }}
{{- end }}
spec:
{{- if hasKey .Values.service "type" }}
{{- if eq .Values.service.type "ExternalName" }}
Expand Down
1 change: 1 addition & 0 deletions simple/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ spec:
{{- end }}
{{- end}}
labels:
businessid: {{ $.Values.businessid | quote}}
app: {{ .Values.name }}
spec:
{{- if hasKey .Values "tolerations" }}
Expand Down

0 comments on commit 3ca31a5

Please sign in to comment.