helm-charts/openfaas/templates/gateway-external-svc.yaml

30 lines
763 B
YAML
Raw Normal View History

2021-01-17 01:09:41 +00:00
{{- if .Values.exposeServices }}
---
apiVersion: v1
kind: Service
metadata:
labels:
app: {{ template "openfaas.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: gateway
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
{{- if .Values.gatewayExternal.annotations }}
annotations: {{ toYaml .Values.gatewayExternal.annotations | nindent 4 }}
{{- end }}
name: gateway-external
namespace: {{ .Release.Namespace | quote }}
spec:
type: {{ .Values.serviceType }}
ports:
- name: http
port: 8080
protocol: TCP
targetPort: 8080
{{- if contains "NodePort" .Values.serviceType }}
nodePort: {{ .Values.gateway.nodePort }}
{{- end }}
selector:
app: gateway
{{- end }}