Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (42 sloc) 1.32 KB
{{- if .Values.server.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ template "kiam.fullname" . }}-server
labels:
app: {{ template "kiam.name" . }}
chart: {{ template "kiam.chart" . }}
component: "{{ .Values.server.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- range $key, $value := .Values.server.serviceLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if or .Values.server.serviceAnnotations .Values.server.prometheus.scrape }}
annotations:
{{- range $key, $value := .Values.server.serviceAnnotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
{{- if .Values.server.prometheus.scrape }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.server.prometheus.port | quote }}
{{- end }}
{{- end }}
spec:
clusterIP: None
selector:
app: {{ template "kiam.name" . }}
component: "{{ .Values.server.name }}"
release: {{ .Release.Name }}
ports:
{{- if .Values.server.prometheus.scrape }}
- name: metrics
port: {{ .Values.server.prometheus.port }}
targetPort: {{ .Values.server.prometheus.port }}
protocol: TCP
{{- end }}
- name: grpclb
port: {{ .Values.server.service.port }}
targetPort: {{ .Values.server.service.targetPort }}
protocol: TCP
{{- end }}
You can’t perform that action at this time.