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
This commit is contained in:
portdirect 2017-11-20 11:58:14 -05:00
parent e5029cba65
commit 475fc97d3a
4 changed files with 1 additions and 54 deletions

View File

@ -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 }}

View File

@ -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:

View File

@ -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 }}

View File

@ -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: