From 062d813b2193295d3403f758684b70c4e2cc9eec Mon Sep 17 00:00:00 2001 From: MyGitHub Date: Sat, 27 Sep 2025 16:49:36 +0200 Subject: [PATCH] =?UTF-8?q?=E2=98=B8=EF=B8=8F=20feat:=20Helm=20`hostAliase?= =?UTF-8?q?s`=20Support=20For=20Custom=20DNS=20Mappings=20(#9857)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add ability to configure hostAliases in Helm chart to redirect traffic to proxy servers or custom endpoints via /etc/hosts entries. Co-authored-by: Feng Lu --- helm/librechat/examples/hostaliases-values.yaml | 6 ++++++ helm/librechat/templates/deployment.yaml | 4 ++++ helm/librechat/values.yaml | 8 ++++++++ 3 files changed, 18 insertions(+) create mode 100644 helm/librechat/examples/hostaliases-values.yaml diff --git a/helm/librechat/examples/hostaliases-values.yaml b/helm/librechat/examples/hostaliases-values.yaml new file mode 100644 index 0000000000..9f789b38a5 --- /dev/null +++ b/helm/librechat/examples/hostaliases-values.yaml @@ -0,0 +1,6 @@ +# Example: Redirect AWS Bedrock EU traffic to proxy server +hostAliases: + - ip: "10.1.2.3" # Your proxy server IP + hostnames: + - "bedrock-runtime.eu-central-1.amazonaws.com" + - "bedrock.eu-central-1.amazonaws.com" \ No newline at end of file diff --git a/helm/librechat/templates/deployment.yaml b/helm/librechat/templates/deployment.yaml index a645575357..1d1deec3ac 100755 --- a/helm/librechat/templates/deployment.yaml +++ b/helm/librechat/templates/deployment.yaml @@ -26,6 +26,10 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: + {{- with .Values.hostAliases }} + hostAliases: + {{- toYaml . | nindent 8 }} + {{- end }} {{- if .Values.dnsPolicy }} dnsPolicy: {{ .Values.dnsPolicy }} {{- end }} diff --git a/helm/librechat/values.yaml b/helm/librechat/values.yaml index 5430eca0ac..bef2075308 100755 --- a/helm/librechat/values.yaml +++ b/helm/librechat/values.yaml @@ -220,6 +220,14 @@ tolerations: [] affinity: {} +# Host aliases for custom domain-to-IP mappings (adds entries to /etc/hosts) +hostAliases: [] +# Example - Redirect AWS Bedrock to proxy: +# hostAliases: +# - ip: "10.1.2.3" +# hostnames: +# - "bedrock-runtime.eu-central-1.amazonaws.com" + # DNS Configuration # Customize DNS resolution for redirecting traffic to proxy servers dnsPolicy: "" # Options: ClusterFirst, Default, None, ClusterFirstWithHostNet