helm-charts/openfaas/templates/gateway-external-svc.yaml
2021-01-17 04:09:41 +03:00

30 lines
763 B
YAML

{{- 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 }}