Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns-controller: allow it to run on CNI networking mode and remove dependency on kube-proxy #8131

Merged
merged 1 commit into from
Dec 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ spec:
scheduler.alpha.kubernetes.io/critical-pod: ''
spec:
tolerations:
- key: "node-role.kubernetes.io/master"
effect: NoSchedule
- operator: Exists
nodeSelector:
node-role.kubernetes.io/master: ""
dnsPolicy: Default # Don't use cluster DNS (we are likely running before kube-dns)
Expand All @@ -36,15 +35,16 @@ spec:
{{ range $arg := DnsControllerArgv }}
- "{{ $arg }}"
{{ end }}
{{- if .EgressProxy }}
env:
- name: KUBERNETES_SERVICE_HOST
value: "127.0.0.1"
{{- if .EgressProxy }}
{{ range $name, $value := ProxyEnv }}
Copy link
Member

@justinsb justinsb Dec 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now you've refactored this, I'm wondering if we need the "if .EgressProxy" guard. For another PR though!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the if below to add the new environment variable by default. There was actually a bug here, since if using DigitalOcean and EgressProxy together a duplicated env: key would be rendered.
Given the range on ProxyEnv, I'm not sure we need the if either, but didn't want to change this right now, I'm not familiar with this feature.

- name: {{ $name }}
value: {{ $value }}
{{ end }}
{{- end }}
{{- if eq .CloudProvider "digitalocean" }}
env:
- name: DIGITALOCEAN_ACCESS_TOKEN
valueFrom:
secretKeyRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ spec:
- --zone=*/Z1AFAKE1ZON3YO
- --zone=*/*
- -v=2
env:
- name: KUBERNETES_SERVICE_HOST
value: 127.0.0.1
image: kope/dns-controller:1.17.0-alpha.1
name: dns-controller
resources:
Expand All @@ -41,8 +44,7 @@ spec:
node-role.kubernetes.io/master: ""
serviceAccount: dns-controller
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
- operator: Exists

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ spec:
- id: k8s-1.12
kubernetesVersion: '>=1.12.0'
manifest: dns-controller.addons.k8s.io/k8s-1.12.yaml
manifestHash: 4ba4be235e96068511965bf296375b45e152369a
manifestHash: a304440f4f7d2e289eb12c37adeac04253d84906
name: dns-controller.addons.k8s.io
selector:
k8s-addon: dns-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ spec:
- --zone=*/Z1AFAKE1ZON3YO
- --zone=*/*
- -v=2
env:
- name: KUBERNETES_SERVICE_HOST
value: 127.0.0.1
image: kope/dns-controller:1.17.0-alpha.1
name: dns-controller
resources:
Expand All @@ -41,8 +44,7 @@ spec:
node-role.kubernetes.io/master: ""
serviceAccount: dns-controller
tolerations:
- effect: NoSchedule
key: node-role.kubernetes.io/master
- operator: Exists

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ spec:
- id: k8s-1.12
kubernetesVersion: '>=1.12.0'
manifest: dns-controller.addons.k8s.io/k8s-1.12.yaml
manifestHash: 4ba4be235e96068511965bf296375b45e152369a
manifestHash: a304440f4f7d2e289eb12c37adeac04253d84906
name: dns-controller.addons.k8s.io
selector:
k8s-addon: dns-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ spec:
- id: k8s-1.12
kubernetesVersion: '>=1.12.0'
manifest: dns-controller.addons.k8s.io/k8s-1.12.yaml
manifestHash: 4ba4be235e96068511965bf296375b45e152369a
manifestHash: a304440f4f7d2e289eb12c37adeac04253d84906
name: dns-controller.addons.k8s.io
selector:
k8s-addon: dns-controller.addons.k8s.io
Expand Down