-
Notifications
You must be signed in to change notification settings - Fork 295
Replace docker with rkt in "kube-node-drainer.service". #48
Conversation
Current coverage is 56.90% (diff: 100%)@@ master #48 diff @@
==========================================
Files 4 4
Lines 949 949
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 540 540
Misses 329 329
Partials 80 80
|
ExecStart=/bin/true | ||
ExecStop=/bin/sh -c '/usr/bin/docker run --rm -v /etc/kubernetes:/etc/kubernetes {{.HyperkubeImageRepo}}:{{.K8sVer}} \ | ||
/hyperkube kubectl \ | ||
TimeoutStopSec=30s |
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.
Just a question but any specific reason why this is 30s
?
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.
Just wanted to make sure this is properly stopped. This configures the amount of time that systemd will wait when stopping the service. Had several intents with rkt
without this and the node wasn't marked SchedulingDisabled
.
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.
Got it!
I was just reading https://www.freedesktop.org/software/systemd/man/systemd.service.html#TimeoutStopSec= which says that TimeoutStopSec
defaults to the system-wide value configured via DefaultTimeoutStopSec
.
Regardless of the default, setting enough timeout like this would be good.
This is what we couldn't have without your effort 👍
--server=https://{{.ExternalDNSName}}:443 \ | ||
--kubeconfig=/etc/kubernetes/worker-kubeconfig.yaml \ | ||
drain $$(hostname) \ | ||
drain $(hostname) \ |
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.
I now understand that $$
and $
to be equivalent in this context because it isn't recognized/expanded as a systemd variable anyways. Good!
ref #40 (comment)
ref #41 (comment)
--volume=kube,kind=host,source=/etc/kubernetes,readOnly=true \ | ||
--mount=volume=kube,target=/etc/kubernetes \ | ||
--net=host \ | ||
quay.io/coreos/hyperkube:v1.4.5_coreos.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.
Would it be ok to keep using {{.HyperkubeImageRepo}}:{{.K8sVer}}
instead of quay.io/coreos/hyperkube:v1.4.5_coreos.0
to avoid hard-coding for future ease in maintenance/more customizability?
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.
Yes, think I was copying this from another place.
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.
👍
Would it be ok to let me fix this after merging, or would you like to do on your side?
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.
Yes, no problem.
1aeb256
to
7af1a45
Compare
Fixed {{.HyperkubeImageRepo}}:{{.K8sVer}} using |
LGTM 👍 |
…ndle-cidr-changes to hcom-flavour * commit '15698292f0a7d5ac9ef64bff8c900cc4d2187b12': Handle changing pod or service CIDRs by cleaning up incompatible api objects.
Fix
kube-node-drainer.service
ExecStart
andExecStop
errors . #40