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..d4f4f8c 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).