Commit Graph

70 Commits

Author SHA1 Message Date
Kubernetes Prow Robot 4621df3c0a
Merge pull request #8155 from hakman/staticcheck-nodeup
nodeup/pkg/model - fix static check
2019-12-20 00:15:32 -08:00
Ciprian Hacman fa665943ac nodeup/pkg/model - fix static check 2019-12-18 22:07:31 +02:00
Ciprian Hacman ce9ed2e1fb Make sure Cluster.Spec.Containerd exists before checking the address 2019-12-16 15:26:52 +02:00
Ciprian Hacman 59ab0ca9d0 Pass containerd --address flag to kubelet if it exists 2019-12-16 00:59:26 +02:00
Ciprian Hacman 42b73b877d Add support for containerd container runtime 2019-12-15 21:37:57 +02:00
Salvatore Mazzarino f6908656bf Fix volume plugins dir
Signed-off-by: Salvatore Mazzarino <dev@mazzarino.cz>
2019-11-24 16:35:23 +01:00
Kubernetes Prow Robot 0c66a304c3
Merge pull request #7754 from tanjunchen/fix-up-gosimple-error
fix-up gosimple check error
2019-10-12 11:18:44 -07:00
liranp c6eb29a4b5
fix(nodeup): miscalculated `max-pods` when using amazon-vpc-cni 2019-10-10 12:02:12 +03:00
tanjunchen 43bf6bdab6 fix-up gosimple check error 2019-10-07 11:59:57 +08:00
Justin SB 728e582360
Fill out kops controller functionality
k8s 1.16 requires that we move label setting away from the kubelet, to
a central controller.  kops-controller is that controller.
2019-09-25 12:04:34 -04:00
mikesplain 9e55b8230a Update copyright notices
Also cleans some white spaces
2019-09-09 14:47:51 -04:00
Justin SB 8e2dbb6a99
Bootstrap: protokube labels its own node with node-role label
As of k8s 1.16, the node-role label is protected for security reasons.
We will introduce a controller to set those labels generically.
However, we need these labels to run the controller (only) on master
nodes.

To solve this bootstrapping problem, we use protokube to apply the
master role node labels to the master node only.  This isn't a
security problem because we assume that protokube on the master is
highly trusted - we are still administering labels centrally.

Then kops-controller can use this label to target the master nodes,
and run a central label controller.
2019-09-08 20:51:00 -04:00
Justin SB 810c65eb46
Copy well-known users from apiserver
This should eliminate the dependency on k8s.io/apiserver
2019-08-31 08:50:09 -07:00
Kashif Saadat 4514215656 Set and mount the correct volume plugin dir based on OS 2019-08-01 17:54:08 +01:00
Kubernetes Prow Robot a8e7109129
Merge pull request #7040 from spotinst/feature-spotinst-ocean
Spotinst: New instance group type: Ocean
2019-06-20 12:24:10 -07:00
liranp 80020052d3
feat(spotinst): new instance group type: ocean 2019-06-03 12:38:46 +03:00
Salvatore Mazzarino c7381f9a34 Flatcar support
Signed-off-by: Salvatore Mazzarino <dev@mazzarino.cz>
2019-05-31 12:20:27 +02: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
xichengliudui c02802f36d Using const() defines constants together (part:4) 2019-04-20 05:12:51 -04:00
Justin SB de581b1b64
Switch to golang 1.11.5
For cherry-picking to 1.13

https://github.com/kubernetes/kubernetes/blob/release-1.13/build/build-image/cross/Dockerfile
2019-04-20 17:36:56 -04:00
Kubernetes Prow Robot 3b907c81e4
Merge pull request #5982 from justinsb/create_var_lib_kubelet
Always create /var/lib/kubelet, even in bootstrap mode
2019-03-17 04:12:55 -07:00
Alex Williams c928b7e6c5
Use EnsureTask for create static pod directory 2019-03-14 12:22:43 +00:00
Justin SB ecbc34153b
Always create /var/lib/kubelet, even in bootstrap mode
Otherwise we end up with a circular dependency where we don't run the
node-authorizer until /var/lib/kubelet has been bind-mounted, but it
can't be bind-mounted until it exists.

This bind-mounting happens on Google's ContainerOS, which is why it
isn't always seen.
2019-03-14 01:07:52 -04:00
Kubernetes Prow Robot 53189d7e6b
Merge pull request #6210 from mmerrill3/feature/kops-4049
Fixing kops-4049
2019-02-18 02:43:00 -08:00
Derek Lemon -T (delemon - AEROTEK INC at Cisco) 4f0169bb79 codegen 2019-01-16 09:30:40 -07:00
mmerrill3 248f08b467 Fixing kops-4049 2018-12-16 11:59:16 -05:00
Rodrigo Menezes 7231c20f60 ExperimentalAllowedUnsafeSysctls has moved to AllowedUnsafeSysctls in k8s 1.11 2018-12-07 00:20:32 -08:00
Ripta Pasay 7ca6ddc9e0 Replace MaxPods in machine type data with InstanceENIs and InstanceIPsPerENI 2018-11-25 22:35:25 +00:00
Seth Pollack cd63aa5429 set max pods when using aws vpc cni
(cherry picked from commit 92fd86f04a)
2018-11-25 20:45:28 +00:00
mmerrill3 7c4b2a6a5e Setting the manifest directory when it is required by kubelet 2018-11-19 10:04:44 -05:00
SataQiu 0550d8d4e8 fix the typos 2018-10-19 17:35:26 +08:00
k8s-ci-robot 611a343823
Merge pull request #5745 from johanneswuerbach/add-conntrack
Explicitly install conntrack
2018-09-14 09:11:43 -07:00
Johannes Würbach 70ae068945
Explicitly install conntrack 2018-09-04 22:36:02 +02:00
Justin Santa Barbara 76f5ed2d9c Refactor tables package to be more reusable
We still need the reflect helpers, but we allow for clients to
register their own pretty-printers, which avoids the package
dependency for our pretty-printer.  We register our pretty printers in
an init function in the relevant package (in this case,
upup/pkg/fi/printers.go)

Fix #5551
2018-08-02 14:09:05 -04:00
Rodrigo Menezes 74e8973c6c Fix based on Justins suggestion 2018-07-20 12:25:23 -07:00
Rodrigo Menezes e8476499b0 Allow other CNI drivers to bind a hosts Primary IP 2018-07-20 12:16:38 -07:00
k8s-ci-robot 56ccfac26d
Merge pull request #5317 from gambol99/node_registration
Node Authorization Service
2018-07-19 05:17:41 -07:00
Corey O'Brien af5f877a38 Use /bin/bash in kubelet manifest ExecStartPre 2018-07-11 00:04:13 -04:00
Rohith 304d0ce8a9 - consuming the node authorization api spec in nodeup binary
- adding the options builder to fill in the model
- adding the spec into the bootstrap config
2018-07-06 20:14:35 +01:00
Rohith e77000f138 - fixing up the variable name to following a more suitable convention 2018-06-11 21:23:04 +01:00
Rohith d2bae64dd1 - adding the enable-bootstrap-token-auth to the kubeapi and fixing up the various compoents 2018-06-11 09:57:26 +01:00
Rohith 2d5bd2cfd9 - update the IAM policy to ensure the kubelet permision is skipped
- update the PKI to ensure on new clusters the certificate it not created
2018-06-11 09:57:26 +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
Simone Sciarrati e406dbf501 Bind the kubelet to the local ipv4 address if the cni plugin is AmazonVPC - #4218 2018-03-01 17:47:54 +01:00
Justin Santa Barbara 3b983dfabd gce: mounter asset has moved
The mounter asset is now available directly, no longer in
kubernetes-manifests.tar.gz
2018-01-07 17:07:54 -05:00
Justin Santa Barbara 7c695e7d00 Rename flag from network-plugin-dir -> cni-bin-dir
Per https://github.com/kubernetes/kubernetes/pull/53564
2017-10-23 00:54:37 -04:00
Justin Santa Barbara af6a7ef4d8 Containerized mounter fixes per code review 2017-10-08 11:41:09 -04:00
Justin Santa Barbara 3a38d05385 GCE: install containerized mounter on COS
The containerized mounter is a little tricky to install, with lots of
bind mounts.  This code path is only hit on GCE though.
2017-10-08 11:12:37 -04:00
Justin Santa Barbara 3478031533 API types changed package 2017-10-01 14:03:56 -04:00
Justin Santa Barbara df93d82bd8 Use IsKubernetesGTE helper instead of reparsing semver 2017-09-30 21:21:24 -04:00