Commit Graph

30 Commits

Author SHA1 Message Date
Ciprian Hacman 07ffd665a7 Allow container runtime to run before BootstrapKubeconfig 2020-09-12 08:13:40 +03:00
John Gardiner Myers 8e43c1d637 Use kops-controller to issue kube-proxy cert 2020-08-16 23:36:42 -07:00
Peter Rifel 4d9f0128a3
Upgrade to klog2
This splits up the kubernetes 1.19 PR to make it easier to keep up to date until we get it sorted out.
2020-08-16 20:56:48 -05:00
Ciprian Hacman 70a3a2e978 ARM64 support - Update side-loading for multi-arch 2020-06-19 04:42:11 +03:00
John Gardiner Myers 6e9dc8fc0f Remove code for unsupported k8s versions from nodeup 2020-01-12 19:30:34 -08:00
tanjunchen 7e25f9831d nodeup/pkg/ pkg/ staticcheck 2019-12-31 15:03:39 +08:00
Peter Rifel dbb74e76c4 Fix typo in KubeProxy model
very minor, but meant to ensure that KubeProxyBuilder satisfies the ModelBuilder interface
2019-12-27 19:38:32 -08:00
tanjunchen a19fb935e4 fix-up static-check 2019-10-29 14:06:12 +08:00
Kubernetes Prow Robot dd6b0314fc
Merge pull request #6897 from vainu-arto/set-priority-for-static-pods
Set priority for static pods
2019-07-12 00:41:07 -07:00
Justin SB 5f5f37a72c
Remove kube-proxy resource-container flag
Removed in https://github.com/kubernetes/kubernetes/pull/78294

(A k/k breaking change: `--resource-container=""` is now the default!)
2019-07-08 09:59:52 -04:00
Justin SB fe487df586
Use klog logging from 1.15
klog can now support logging both to a file and to streams, so we get the output both in docker & logfiles.

A few gotchas:

* The output previously was all on stdout, now it on stderr.  That is more correct
* If something writes to stdout or stderr outside of klog, it will no longer end up in the logfile.
* There's some oddities still to be ironed out about the flag syntax https://github.com/kubernetes/klog/issues/60
2019-05-10 00:17:30 -04:00
Arto Jantunen 48974521e1 Set priority classes for static pods
For the master pods (apiserver, controller manager, scheduler) this is
unlikely to ever matter (the masters aren't expected to run out of
resources and need to evict things) but evictions of kube-proxy from worker
nodes are easy to trigger in clusters with PodPriority enabled. Since these
are static pods the configuration is also somewhat difficult to change.
2019-05-09 16:03:08 +03:00
Justin SB 3e33ac7682
Change code from glog to klog
We don't call klog.InitFlags yet, because that will cause a flag
redefinition error until we get everyone to stop using glog.  That
will happen when we update to k8s 1.13.
2019-05-06 12:54:51 -04:00
Derek Lemon -T (delemon - AEROTEK INC at Cisco) 4f0169bb79 codegen 2019-01-16 09:30:40 -07:00
Justin SB 26bd75aecb
Bulk spelling fixes
Experimenting with my own spelling checker, these are the typos it caught.
2018-12-20 17:43:56 -05:00
mooncake 55425e16ae Fix some typos
Signed-off-by: mooncake <xcoder@tenxcloud.com>
2018-11-10 18:37:57 +08:00
Mike Splain 188824cba0 Add configurable conntrack settings 2018-07-18 12:11:30 -04:00
Rohith c9db958696 - cleanup up elements, imports and comments 2018-06-20 09:26:31 +01:00
Rohith 4531384649 This PR attempts to solve two issues
a) The current implementation use's a static kubelet which doesn't not conform to the Node authorization mode (i.e. system:nodes:<nodename>)
b) As present the kubeconfig is static and reused across all the masters and nodes

The PR firstly introduces the ability for users to use bootstrap tokens and secondly when enabled ensure the kubelets for the masters as have unique usernames.  Note, this PR does not attempt to address the distribution of the bootstrap tokens themselves, that's for cluster admins. One solution for this would be a daemonset on the masters running on hostNetwork and reuse dns-controller to annotated the pods and give as the DNS

Notes:
- the master node do not use bootstrap tokens, instead given they have access to the ca anyhow, we generate certificates for each.
- when bootstrap token is not enabled the behaviour will stay the same; i.e. a kubelet configuration brought down from the store.
- when bootstrap tokens are enabled, the Nodes sit in a timeout loop waiting for the configuration to appear (by third party).
- given the nodeup docker and manifests builders are executed before the kubelet builder, the assumption here is a unit file kicks of a custom container to bootstrap the rest.
- the current firewalls on between the master and nodes are fairly open so no need to open ports between the two
- much of the work was ported from @justinsb PR [here](https://github.com/kubernetes/kops/pull/4134/)
- we add a very presumptuous server and client certificates for use with an authorizer (node-bootstrap-internal.dns_zone)

I do have an additional PR which performs the entire thing. The process being a node_authorizer which runs on the master nodes via a daemonset, the service implements a series of authorizers (i.e. alwaysallow, aws, gce etc). For aws, the process is similar to how vault authorizes nodes [here](https://www.vaultproject.io/docs/auth/aws.html). Nodeup no then calls out to the node_authorizer on bootstrap and provisions the kubelet.
2018-06-11 09:56:32 +01:00
Justin Santa Barbara e93d88ecc2 Mount the iptables lock file
We only do this for >= 1.9 so we don't change existing clusters.

Equivalent of https://github.com/kubernetes/kubernetes/pull/46259
2018-03-20 18:07:17 -04:00
Rohith 23f9c63bf3 Kube Proxy IPVS Kernel Module
- fixing the the 'Could not get ipvs family information from the kernel. It is possible that ipvs is not enabled in your kernel. Native loadbalancing will not work until this is fixed.' error
2018-03-02 15:05:22 +00:00
Horace Heaven 13244a5ce8 Kube-proxy API to accept cpu: limit, mem: request and limit 2018-02-28 15:26:19 -04:00
Kashif Saadat ac25853cd5 - Add etcdClusterSpec Image & Version in bootstrap data for Master nodes
- Reuse execWithTee fn for ETCD Command (tee & mkfifo in different path for newer image versions)
2018-02-10 12:14:36 +00:00
Justin Santa Barbara 7ca593b994 exec target command, but still pipe it to tee
Equivalent of https://github.com/kubernetes/kubernetes/pull/57756
2018-01-25 10:15:24 -05:00
Rodrigo Menezes 8ad9b3c931 fix 2017-10-25 21:33:21 -07:00
Rodrigo Menezes 1edd99ccc1 Allow disabling kube-proxy 2017-10-25 14:23:58 -07:00
Justin Santa Barbara 95d4f3eb59 More code updates for 1.8 2017-10-01 21:13:00 -04:00
Justin Santa Barbara 3478031533 API types changed package 2017-10-01 14:03:56 -04:00
Justin Santa Barbara 383194780a Create helper function for critical pod annotations
In particularly I think we want a toleration also; easiest to put the
code in one function.
2017-09-30 17:38:20 -04:00
Rohith a7abb07d56 Component Manifests
The current kube manifest redirect all the logs into host located log files, this PR uses the tee command to pipe into both local logs (retaining the current) and docker stdout (which will be picked up by the journald or which every logging your using. Note also permits as to now need the logs via the kubectl command.

- renamed some of the files to make things cleaner
- redirecting the logs from the kubernetes components into local file and stdout
- cleaned up any vetting or linting error i came across
2017-09-27 15:48:41 +01:00