From 475fc97d3a269514a0a95abd32bc679b52f556bb Mon Sep 17 00:00:00 2001 From: portdirect Date: Mon, 20 Nov 2017 11:58:14 -0500 Subject: [PATCH] Ingress: Remove resolv.conf workaround This PS removes the resolv.conf workaround as it has not been required for some time, now that we can set the Pod DNS policy to "ClusterFirstWithHostNet". Change-Id: Ibdef3357e69f1f06f3d0c0b398466d1b9d24b8ca --- ingress/templates/configmap-etc.yaml | 31 ----------------------- ingress/templates/deployment-error.yaml | 2 -- ingress/templates/deployment-ingress.yaml | 15 +---------- ingress/values.yaml | 7 ----- 4 files changed, 1 insertion(+), 54 deletions(-) delete mode 100644 ingress/templates/configmap-etc.yaml diff --git a/ingress/templates/configmap-etc.yaml b/ingress/templates/configmap-etc.yaml deleted file mode 100644 index ae3a4b9121..0000000000 --- a/ingress/templates/configmap-etc.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{/* -Copyright 2017 The Openstack-Helm Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/}} - -{{- $envAll := . }} -{{- if .Values.network.host_namespace }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: ingress-etc -data: - resolv.conf: | - search {{ .Release.Namespace }}.svc.{{ .Values.network.dns.kubernetes_domain }} svc.{{ .Values.network.dns.kubernetes_domain }} {{ .Values.network.dns.kubernetes_domain }} - {{- range .Values.network.dns.servers }} - nameserver {{ . | title }} - {{- end }} - options ndots:5 -{{- end }} diff --git a/ingress/templates/deployment-error.yaml b/ingress/templates/deployment-error.yaml index f46c2365fb..49c3d02863 100644 --- a/ingress/templates/deployment-error.yaml +++ b/ingress/templates/deployment-error.yaml @@ -25,8 +25,6 @@ spec: {{ tuple $envAll | include "helm-toolkit.snippets.kubernetes_upgrades_deployment" | indent 2 }} template: metadata: - annotations: - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} labels: {{ tuple $envAll "ingress" "error-pages" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} spec: diff --git a/ingress/templates/deployment-ingress.yaml b/ingress/templates/deployment-ingress.yaml index 1af6ce36a9..9fbf6efe6c 100644 --- a/ingress/templates/deployment-ingress.yaml +++ b/ingress/templates/deployment-ingress.yaml @@ -35,8 +35,6 @@ spec: labels: {{ tuple $envAll "ingress" "api" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }} app: ingress-api - annotations: - configmap-etc-hash: {{ tuple "configmap-etc.yaml" . | include "helm-toolkit.utils.hash" }} spec: {{- if eq .Values.deployment_type "Deployment" }} affinity: @@ -47,6 +45,7 @@ spec: {{- if .Values.network.host_namespace }} hostNetwork: true {{- end }} + dnsPolicy: "ClusterFirstWithHostNet" terminationGracePeriodSeconds: 60 containers: - name: ingress-api @@ -83,15 +82,3 @@ spec: - /nginx-ingress-controller - '--default-backend-service=$(POD_NAMESPACE)/ingress-error-pages' - --configmap=$(POD_NAMESPACE)/nginx-custom-configuration -{{- if .Values.network.host_namespace }} - volumeMounts: - - name: ingress-etc - mountPath: /etc/resolv.conf - subPath: resolv.conf - readOnly: true - volumes: - - name: ingress-etc - configMap: - name: ingress-etc - defaultMode: 0444 -{{- end }} diff --git a/ingress/values.yaml b/ingress/values.yaml index 349de67b69..de31b32012 100644 --- a/ingress/values.yaml +++ b/ingress/values.yaml @@ -66,13 +66,6 @@ labels: network: host_namespace: true - dns: - kubernetes_domain: cluster.local - # this must list the skydns server first, and in calico - # this is consistently 10.96.0.10 - servers: - - 10.96.0.10 - - 8.8.8.8 endpoints: ingress: