rancher-charts/charts/rancher-external-ip-webhook/100.0.0+up1.0.0/templates/service.yaml

35 lines
1.0 KiB
YAML
Raw Normal View History

2020-12-09 01:07:44 +00:00
apiVersion: v1
kind: Service
metadata:
labels: {{ include "externalip-webhook.labels" . | indent 4 }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
name: {{ template "externalip-webhook.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
ports:
- name: webhook-server
port: {{ .Values.service.webhookPort }}
protocol: TCP
targetPort: {{ .Values.webhookPort }}
selector:
app: {{ template "externalip-webhook.name" . }}
type: "ClusterIP"
{{- if .Values.metrics.enabled }}
---
apiVersion: v1
kind: Service
metadata:
labels: {{ include "externalip-webhook.labels" . | indent 4 }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
name: {{ template "externalip-webhook.fullname" . }}-metrics-service
namespace: {{ .Release.Namespace }}
spec:
ports:
- name: webhook-metrics
port: {{ .Values.service.metricsPort }}
protocol: TCP
targetPort: {{ .Values.metrics.port }}
selector:
app: {{ template "externalip-webhook.name" . }}
type: "ClusterIP"
{{- end }}