argocd-helm/charts/argo-rollouts/templates/dashboard/service.yaml

48 lines
1.7 KiB
YAML
Raw Permalink Normal View History

{{- if .Values.dashboard.enabled -}}
apiVersion: v1
kind: Service
metadata:
name: {{ include "argo-rollouts.fullname" . }}-dashboard
namespace: {{ .Release.Namespace | quote }}
labels:
app.kubernetes.io/component: {{ .Values.dashboard.component }}
{{- include "argo-rollouts.labels" . | nindent 4 }}
{{- with .Values.dashboard.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
annotations:
{{- with .Values.serviceAnnotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.dashboard.service.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.dashboard.service.externalIPs }}
externalIPs: {{- toYaml . | nindent 4 }}
{{- end }}
{{- if eq .Values.dashboard.service.type "LoadBalancer" }}
{{- with .Values.dashboard.service.loadBalancerClass }}
loadBalancerClass: {{ . }}
{{- end }}
{{- with .Values.dashboard.service.loadBalancerIP }}
loadBalancerIP: {{ . | quote }}
{{- end }}
{{- with .Values.dashboard.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
type: {{ .Values.dashboard.service.type }}
ports:
- name: {{ .Values.dashboard.service.portName }}
protocol: TCP
port: {{ .Values.dashboard.service.port }}
targetPort: {{ .Values.dashboard.service.targetPort }}
{{- if and (eq .Values.dashboard.service.type "NodePort") .Values.dashboard.service.nodePort }}
nodePort: {{ .Values.dashboard.service.nodePort }}
{{- end }}
selector:
app.kubernetes.io/component: {{ .Values.dashboard.component }}
{{- include "argo-rollouts.selectorLabels" . | nindent 4 }}
{{- end }}