-
Notifications
You must be signed in to change notification settings - Fork 137
consolidate template logic & remove kubeadm #351
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
Conversation
pkg/userdata/centos/userdata.go
Outdated
| cp /etc/sysconfig/kubelet-overwrite /etc/sysconfig/kubelet | ||
| # Download all required binaries | ||
| /opt/bin/download_binaries |
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't we simply remove the shebang from the downloadBinariesScript template and embed it here with a indent 4?
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.
Inlined download script with 0221895
alvaroaleman
left a comment
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.
Couple of nits, overall I actually like the change :)
pkg/userdata/helper/helper.go
Outdated
| net.bridge.bridge-nf-call-iptables = 1 | ||
| kernel.panic_on_oops = 1 | ||
| kernel.panic = 10 | ||
| vm.overcommit_memory = 1 |
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.
Why do we set this? From the docs[0]:
When this flag is 1, the kernel pretends there is always enough
memory until it actually runs out.
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.
No idea, was there before.
But looking it up revealed: kubernetes/kubernetes#15087
I'll remove it - the kubelet will set it.
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.
Though this seems outdated, a kubelet fatals with:
Failed to start ContainerManager Invalid kernel flag: vm/overcommit_memory, expected value: 1, actual value: 0
| if [ ! -f /opt/cni/bin/loopback ]; then | ||
| wget -O /opt/cni-plugins.tar.gz https://github.com/containernetworking/plugins/releases/download/v0.6.0/cni-plugins-amd64-v0.6.0.tgz | ||
| mkdir -p /opt/cni/bin /etc/cni/net.d | ||
| tar -xvf /opt/cni-plugins.tar.gz -C /opt/cni/bin/ |
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 please do this and all other archive downloads to come like this:
mkdir -p /opt/cni/bin /etc/cni/net.d
curl -L https://github.com/containernetworking/plugins/releases/download/v0.6.0/cni-plugins-amd64-v0.6.0.tgz|tar -xvzC /opt/cni/bin -f -
to avoid writing an archive to disk we will never touch again?
| ExecStart=/usr/local/bin/supervise.sh /usr/local/bin/setup | ||
| ExecStart=/opt/bin/supervise.sh /opt/bin/setup | ||
| - path: "/etc/profile.d/opt-bin-path.sh" |
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.
This will be sourced and should not be executable, hence have permissions: "0644"
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.
done
pkg/userdata/ubuntu/userdata.go
Outdated
| ExecStart=/opt/bin/supervise.sh /opt/bin/setup | ||
| - path: "/etc/profile.d/opt-bin-path.sh" | ||
| permissions: "0755" |
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.
This will be sourced and should not be executable, hence have permissions: "0644"
0221895 to
9a83f65
Compare
9a83f65 to
3210707
Compare
|
@alvaroaleman PTAL |
|
lgtm aside from the failing tests :) |
What this PR does / why we need it:
This PR will: