From 545f68b71c778c1feaa1ee260b4fa6320782f271 Mon Sep 17 00:00:00 2001
From: Andri Joos <andri@joos.io>
Date: Tue, 28 Jan 2025 22:09:51 +0100
Subject: [PATCH] add endpointslice template

---
 common/templates/_endpointslice.tpl | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 common/templates/_endpointslice.tpl

diff --git a/common/templates/_endpointslice.tpl b/common/templates/_endpointslice.tpl
new file mode 100644
index 0000000..6244004
--- /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 }}
-- 
GitLab