From 2a70efcb1df35d2b61eccd7d8a1c22402c2ffba1 Mon Sep 17 00:00:00 2001 From: Chad Beaulac Date: Mon, 15 Jan 2024 16:20:03 -0800 Subject: [PATCH 1/2] Added dnsConfig set to Default. \The default if not specified is ClusterFirst which causes a circular DNS lookup and crashes LocalStack --- charts/localstack/templates/deployment.yaml | 3 +++ charts/localstack/test-values.yaml | 5 +++++ charts/localstack/values.yaml | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/charts/localstack/templates/deployment.yaml b/charts/localstack/templates/deployment.yaml index ca2e668..c5a904d 100644 --- a/charts/localstack/templates/deployment.yaml +++ b/charts/localstack/templates/deployment.yaml @@ -35,6 +35,9 @@ spec: serviceAccountName: {{ include "localstack.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.dnsPolicy }} + dnsPolicy: {{ .Values.dnsPolicy }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: diff --git a/charts/localstack/test-values.yaml b/charts/localstack/test-values.yaml index 24f3409..9b76c8b 100644 --- a/charts/localstack/test-values.yaml +++ b/charts/localstack/test-values.yaml @@ -9,6 +9,11 @@ command: - -c - echo 'ulimit -Sn 32767' >> /root/.bashrc && echo 'ulimit -Su 16383' >> /root/.bashrc && docker-entrypoint.sh +## @param dnsPolicy Allows you to set the Pod dnsPolicy. +## The default is actually ClusterFirst. Uncomment this to avoid a circular DNS path that will +## cause the LocalStack instance to crash. +## Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +dnsPolicy: "Default" # enable startup scripts, create a startup script which creates an SQS queue enableStartupScripts: true diff --git a/charts/localstack/values.yaml b/charts/localstack/values.yaml index 72357a4..79ecdd1 100644 --- a/charts/localstack/values.yaml +++ b/charts/localstack/values.yaml @@ -66,6 +66,11 @@ debug: false ## command: [] +## @param dnsPolicy Allows you to set the Pod dnsPolicy. +## The default is actually ClusterFirst. Uncomment this to avoid a circular DNS path that will +## cause the LocalStack instance to crash. +## Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy +#dnsPolicy: "Default" startServices: "" # Comma-separated list of AWS CLI service names which are the only ones allowed to be used (other services will then by default be prevented from being loaded). From 231054f7996f6a1e0ecf48fd3fe1bc860fbfd57a Mon Sep 17 00:00:00 2001 From: Chad Beaulac Date: Mon, 15 Jan 2024 16:37:37 -0800 Subject: [PATCH 2/2] Update comment for linter --- charts/localstack/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/localstack/values.yaml b/charts/localstack/values.yaml index 79ecdd1..d4f4f8c 100644 --- a/charts/localstack/values.yaml +++ b/charts/localstack/values.yaml @@ -70,7 +70,7 @@ command: [] ## The default is actually ClusterFirst. Uncomment this to avoid a circular DNS path that will ## cause the LocalStack instance to crash. ## Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy -#dnsPolicy: "Default" +# dnsPolicy: "Default" startServices: "" # Comma-separated list of AWS CLI service names which are the only ones allowed to be used (other services will then by default be prevented from being loaded).