diff --git a/common/templates/_endpointslice.tpl b/common/templates/_endpointslice.tpl new file mode 100644 index 0000000000000000000000000000000000000000..6244004f66aecbe683b7f6532f1a2aceb571e4a4 --- /dev/null +++ b/common/templates/_endpointslice.tpl @@ -0,0 +1,25 @@ +{{- define "common.endpointslice" -}} +apiVersion: discovery.k8s.io/v1 +kind: EndpointSlice +metadata: + name: {{ .Values.name }} + {{- with .Values.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} + labels: + {{- with .Values.serviceName }} + kubernetes.io/service-name: {{ . }} + {{- end }} + {{- include "common.variables.labels" . | nindent 4 }} +addressType: {{ .Values.addressType | default "IPv4" }} +{{- with .Values.ports }} +ports: + {{- toYaml . | nindent 2 }} +{{- end }} +{{- with .Values.endpoints }} +endpoints: + {{- toYaml . | nindent 2 }} +{{- end }} +--- +{{- end }}