From 1266d23a119477311f0be66f848bb90b2b695f7f Mon Sep 17 00:00:00 2001 From: Rabieh Fashwall Date: Tue, 10 Dec 2024 14:52:52 +0100 Subject: [PATCH] expose svc to values --- chart/templates/minetest.yaml | 6 +++--- chart/values.yaml | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/chart/templates/minetest.yaml b/chart/templates/minetest.yaml index f8007d0..325445c 100644 --- a/chart/templates/minetest.yaml +++ b/chart/templates/minetest.yaml @@ -129,10 +129,10 @@ metadata: labels: app: {{ include "minetest.fullname" . }} component: minetest +{{- if .Values.service.annotations }} annotations: - service.beta.kubernetes.io/aws-load-balancer-type: "nlb" - service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing" - service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "udp" +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} spec: type: {{ .Values.service.type }} {{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }} diff --git a/chart/values.yaml b/chart/values.yaml index db80e70..bed9232 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -121,6 +121,10 @@ service: ## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip ## externalTrafficPolicy: Cluster + annotations: + service.beta.kubernetes.io/aws-load-balancer-type: "nlb" + service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing" + service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "udp" ## Configure resource requests and limits ## ref: http://kubernetes.io/docs/user-guide/compute-resources/