40 lines
1.2 KiB
YAML
40 lines
1.2 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: "{{ include "gateway.fullname" . }}-apitraffic"
|
|
labels:
|
|
{{- include "gateway.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: apitraffic
|
|
spec:
|
|
type: {{ .Values.apitraffic.service.type }}
|
|
ports:
|
|
- port: {{ .Values.apitraffic.service.ports.traffic.port }}
|
|
targetPort: {{ .Values.apitraffic.service.ports.traffic.port }}
|
|
protocol: {{ .Values.apitraffic.service.ports.traffic.protocol }}
|
|
name: apigatewaytraffic
|
|
selector:
|
|
{{- include "gateway.selectorLabels" . | nindent 4 }}
|
|
app.kubernetes.io/component: apitraffic
|
|
|
|
---
|
|
|
|
{{- if eq .Values.apitraffic.oauth.enabled true }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: "{{ include "gateway.fullname" . }}-oauth"
|
|
labels:
|
|
{{- include "gateway.labels" . | nindent 4 }}
|
|
app.kubernetes.io/component: apitraffic
|
|
spec:
|
|
type: {{ .Values.apitraffic.oauth.type }}
|
|
ports:
|
|
- port: {{ .Values.apitraffic.oauth.port }}
|
|
targetPort: {{ .Values.apitraffic.oauth.port }}
|
|
protocol: {{ .Values.apitraffic.oauth.protocol }}
|
|
name: oauth
|
|
selector:
|
|
{{- include "gateway.selectorLabels" . | nindent 4 }}
|
|
app.kubernetes.io/component: apitraffic
|
|
{{- end }}
|