diff --git a/stable/app/Chart.yaml b/stable/app/Chart.yaml index d1c3aee3..0311583f 100644 --- a/stable/app/Chart.yaml +++ b/stable/app/Chart.yaml @@ -15,4 +15,4 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.6.9 +version: 0.7.0 diff --git a/stable/app/templates/service.yaml b/stable/app/templates/service.yaml index f9845fe0..0f3e584b 100644 --- a/stable/app/templates/service.yaml +++ b/stable/app/templates/service.yaml @@ -1,10 +1,13 @@ {{- if .Values.container.enabled }} +{{- $fullName := include "app.fullname" . -}} +{{- $labels := include "app.labels" . -}} +{{- $selectorLabels := include "app.selectorLabels" . -}} apiVersion: v1 kind: Service metadata: - name: {{ include "app.fullname" . }} + name: {{ $fullName }} labels: - {{- include "app.labels" . | nindent 4 }} + {{- $labels | nindent 4 }} {{- with .Values.service.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -19,5 +22,31 @@ spec: name: {{ $port.name }} {{- end }} selector: - {{- include "app.selectorLabels" . | nindent 4 }} + {{- $selectorLabels | nindent 4 }} +{{- if .Values.service.additionalService }} + {{- range .Values.service.additionalService }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ printf "%s-%s" $fullName .name }} + labels: + {{- $labels | nindent 4 }} + {{- with .annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + type: {{ .type }} + ports: + {{- range $port := .ports }} + - port: {{ $port.port }} + targetPort: {{ $port.targetPort }} + protocol: {{ $port.protocol }} + name: {{ $port.name }} + {{- end }} + selector: + {{- $selectorLabels | nindent 4 }} + {{- end }} +{{- end }} {{- end -}} \ No newline at end of file