From cb0c6b83e1629fd6427f2ce14547bc9cfc25d943 Mon Sep 17 00:00:00 2001 From: Shaun Elliott Date: Tue, 1 Aug 2023 17:29:06 -0700 Subject: [PATCH] allowing for internal only service --- charts/local-ai/templates/service.yaml | 3 +++ charts/local-ai/values.yaml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/charts/local-ai/templates/service.yaml b/charts/local-ai/templates/service.yaml index bc27e13..203d4fc 100644 --- a/charts/local-ai/templates/service.yaml +++ b/charts/local-ai/templates/service.yaml @@ -13,6 +13,9 @@ spec: selector: app.kubernetes.io/name: {{ include "local-ai.name" . }} type: "{{ .Values.service.type }}" +{{- if .Values.service.externalTrafficPolicy }} + externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} +{{- end }} ports: - protocol: TCP port: {{ .Values.service.port }} diff --git a/charts/local-ai/values.yaml b/charts/local-ai/values.yaml index cece1bc..88bfcc6 100644 --- a/charts/local-ai/values.yaml +++ b/charts/local-ai/values.yaml @@ -69,6 +69,8 @@ models: service: type: ClusterIP + # If deferring to an internal only load balancer + # externalTrafficPolicy: Local port: 80 annotations: {} # If using an AWS load balancer, you'll need to override the default 60s load balancer idle timeout