Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
fix: mount tmp emptyDir to stop CoreDNS restarts (#949)
Browse files Browse the repository at this point in the history
* revert: skip dns-liveness restarts check for k8s 1.14 (#931)

This reverts commit 9141412.

* fix: add tmp emptyDir to work around CoreDNS 1.3.1 restarting
  • Loading branch information
mboersma authored Apr 4, 2019
1 parent 5066abf commit 1cd2280
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions parts/k8s/addons/coredns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ spec:
- name: config-volume
mountPath: /etc/coredns
readOnly: true
- name: tmp
mountPath: /tmp
ports:
- containerPort: 53
name: dns
Expand Down Expand Up @@ -178,6 +180,8 @@ spec:
readOnlyRootFilesystem: true
dnsPolicy: Default
volumes:
- name: tmp
emptyDir: {}
- name: config-volume
configMap:
name: coredns
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu

Describe("after the cluster has been up for awhile", func() {
It("dns-liveness pod should not have any restarts", func() {
if !eng.HasNetworkPolicy("calico") && !common.IsKubernetesVersionGe(eng.ExpandedDefinition.Properties.OrchestratorProfile.OrchestratorVersion, "1.14.0") {
if !eng.HasNetworkPolicy("calico") {
pod, err := pod.Get("dns-liveness", "default")
Expect(err).NotTo(HaveOccurred())
running, err := pod.WaitOnReady(retryTimeWhenWaitingForPodReady, 3*time.Minute)
Expand Down

0 comments on commit 1cd2280

Please sign in to comment.