-
Notifications
You must be signed in to change notification settings - Fork 49
Use core-dns over kube-dns for clusters >= 1.10 #715
Conversation
d3655f0
to
a149500
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JoshVanL The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
f755d29
to
01fa4be
Compare
/test puppet-tarmak-acceptance-centos v1.11 |
20fd014
to
285174b
Compare
/unassign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of bits and pieces to change.
The delete is quite ugly, I would prefer a file{ensure => 'absent'}
/unassign
/assign @JoshVanL
metadata: | ||
labels: | ||
kubernetes.io/bootstrapping: rbac-defaults | ||
addonmanager.kubernetes.io/mode: EnsureExists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reconcile
metadata: | ||
annotations: | ||
rbac.authorization.kubernetes.io/autoupdate: "true" | ||
addonmanager.kubernetes.io/mode: EnsureExists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reconcile
upstream | ||
fallthrough in-addr.arpa ip6.arpa | ||
} | ||
prometheus :9153 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we setup the annotation to scrape it?
$protocol = 'http' | ||
} | ||
|
||
$command = "/bin/bash -c \"while true; do if [[ \$(curl -k -w '%{http_code}' -s -o /dev/null ${protocol}://localhost:${server_port}/healthz) == 200 ]]; then break; else sleep 2; fi; done; kubectl delete -f '${apply_file}'; rm -f '${apply_file}'; exit 0\"" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to run kubectl exec. I am bit concered, that we get some more race conditions back.
Deleting through kube-addon-manager would be way more beneficial. As it has some leader election builtin.
$post_1_10 = versioncmp($::kubernetes::version, '1.10.0') >= 0 | ||
|
||
if $post_1_10 { | ||
$service = 'core-dns' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep the service as kube-dns? That's at least what kubeadm is doing and a change is quite risky and affecting all applications during runtime
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
a2a411c
to
0f5c5e6
Compare
Tested Prometheus and was scraping core-dns |
Upgrade works well for me, thanks this is way cleaner @JoshVanL /lgtm |
What this PR does / why we need it:
Use core-dns instead of kube-dns by default for clusters >= 1.10
Ensures that kube-dns is replaced by core-dns when upgrading >= 1.10 and visa-versa.
fixes #422
/assign