test/chart/templates/service-db.yaml
ston1th 10ad216fcf
All checks were successful
the build was successful
fixed helm chart
2019-01-18 21:54:13 +01:00

25 lines
729 B
YAML

apiVersion: v1
kind: Service
metadata:
name: {{ template "testapp.fullname" . }}-db
annotations:
{{- range $key, $value := .Values.service.db.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
labels:
app: {{ template "testapp.name" . }}-db
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
type: {{ .Values.service.db.type }}
ports:
- name: http
port: {{ .Values.service.db.httpPort }}
targetPort: 8080
{{- if hasKey .Values.service.db "nodePort" }}
nodePort: {{ .Values.service.db.nodePort }}
{{- end }}
selector:
app: {{ template "testapp.name" . }}-db
release: {{ .Release.Name | quote }}