mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-05 07:20:12 +01:00
49 lines
1.6 KiB
YAML
49 lines
1.6 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ .Values.service.servicename | default (include "stirlingpdf.fullname" .) }}
|
|
{{- with .Values.service.annotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "stirlingpdf.labels" . | nindent 4 }}
|
|
{{- with .Values.service.labels }}
|
|
{{- toYaml . | nindent 4 }}
|
|
{{- end }}
|
|
spec:
|
|
type: {{ .Values.service.type }}
|
|
{{- if (or (eq .Values.service.type "LoadBalancer") (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort)))) }}
|
|
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }}
|
|
{{- end }}
|
|
{{- if (and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerIP) }}
|
|
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
|
{{- end }}
|
|
{{- if (and (eq .Values.service.type "LoadBalancer") .Values.service.loadBalancerSourceRanges) }}
|
|
loadBalancerSourceRanges:
|
|
{{- with .Values.service.loadBalancerSourceRanges }}
|
|
{{ toYaml . | indent 2 }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- if eq .Values.service.type "ClusterIP" }}
|
|
{{- if .Values.service.clusterIP }}
|
|
clusterIP: {{ .Values.service.clusterIP }}
|
|
{{- end }}
|
|
{{- end }}
|
|
ports:
|
|
- port: {{ .Values.service.externalPort }}
|
|
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePort))) }}
|
|
nodePort: {{.Values.service.nodePort}}
|
|
{{- end }}
|
|
{{- if .Values.service.targetPort }}
|
|
targetPort: {{ .Values.service.targetPort }}
|
|
name: {{ .Values.service.targetPort }}
|
|
{{- else }}
|
|
targetPort: http
|
|
name: http
|
|
{{- end }}
|
|
protocol: TCP
|
|
|
|
selector:
|
|
{{- include "stirlingpdf.selectorLabels" . | nindent 4 }}
|