Commit Graph

91 Commits

Author SHA1 Message Date
Justin SB 23646b6546 Install dbus if needed for protokube with kope.io 2021-01-21 18:17:35 +02:00
Kenji Kaneda a61caea8d2 Add Azure support
This commit contains all changes required to support Azure
(https://github.com/kubernetes/kops/issues/3957).
2020-12-21 08:27:54 -08:00
Ciprian Hacman 416fd15e3c Mount /lib64 for Protokube only on AMD64 2020-12-09 18:58:18 +02:00
Ciprian Hacman f267c54b9a Stop trying to pull the Protokube image 2020-08-25 09:04:45 +03: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
John Gardiner Myers 321035f460 Allow cert/key file tasks to specify owner 2020-08-15 10:30:20 -07:00
Ciprian Hacman 331d223043 ARM64 support - Side-load multi-arch images 2020-08-10 13:47:07 +03:00
Ole Markus With a708a96c05 Adds support for using OS application credentials
Application credentials allows you to export a purpose-specific set of
credentials for a user instead of exposing user login credentials.
Especially useful when using LDAP or similar for Openstack users.
Also lets you rotate credentials more easily since multiple application
credentials can be provisioned per user.

Update pkg/model/bootstrapscript.go

Co-authored-by: Ciprian Hacman <ciprianhacman@gmail.com>
2020-08-07 14:26:47 +02:00
Ciprian Hacman 64fff220c9 Mount host bin dirs for "utils/nsenter" and "utils/mount" 2020-07-05 14:41:29 +03:00
Ciprian Hacman 3a057aa27c Use distroless image as base for protokube 2020-07-05 14:41:29 +03:00
Ciprian Hacman a7c8d2087c Use github.com/blang/semver/v4 2020-07-01 08:54:42 +03:00
John Gardiner Myers 0f77055f63 Issue kops cert in nodeup 2020-06-11 23:54:59 -07:00
Ole Markus With 7342525872 Remove vsphere from kops files 2020-05-30 13:36:55 +02:00
Ciprian Hacman 7114c475ff Fix containerd image side-loading 2020-05-08 23:47:09 +03:00
Thomas Jackson 328f261f34 Include secondary protocol flag always
This way if you have the value set in config (even as "") it'll get
passed down to allow you to override the default config

Related to #9006
2020-04-27 17:03:54 -07:00
John Gardiner Myers 6e9dc8fc0f Remove code for unsupported k8s versions from nodeup 2020-01-12 19:30:34 -08:00
Justin Santa Barbara e4ed13ed57 Move protokube image task to ProtokubeBuilder
More logically consistent, and allows us to be lazier about loading
it when not needed.
2020-01-04 17:46:16 -05:00
Ciprian Hacman b563e4e815 Run Protokube in the "default" container namespace 2019-12-29 05:42:29 +02:00
Ciprian Hacman b234d0687a Add back Protokube image pull during service start 2019-12-16 00:59:19 +02:00
Ciprian Hacman f401342d8f Update Protokube tests 2019-12-15 22:31:52 +02:00
Ciprian Hacman bdb395f722 Fix container remove command on failed start 2019-12-15 21:37:57 +02:00
Ciprian Hacman 42b73b877d Add support for containerd container runtime 2019-12-15 21:37:57 +02:00
Srikanth afe59ba7cc Remove clusterID to be passed as a parameter for protokube 2019-10-29 09:40:38 +05:30
Srikanth cb4a8ef6fc Rebase with latest master 2019-10-29 09:40:38 +05:30
tanjunchen 6a01525de5 fix-up bug in nodeup/pkg/model 2019-10-16 00:35:26 +08:00
Thomas Jackson cfcb93e822 Misc fixes 2019-10-10 13:09:22 -07:00
Thomas Jackson f8c416d6ce Add configs for gossip dns 2019-10-10 13:09:22 -07:00
Jesse Haka 4ccad007ce mountcerts -> usehostcerts 2019-09-30 11:36:32 +03:00
Jesse Haka 352bc1eaa2 Allow to use custom rootCAs 2019-09-30 11:35:58 +03:00
yuxiaobo 0bd700781e Correct word misspelling 2019-09-29 22:23:07 +08: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
Kashif Saadat 2b61ace49c goimports update 2019-07-03 16:43:20 +01:00
Austin Moore 67d9f5f190
Move getProxyEnvVars into a util package 2019-06-05 15:59:19 -04: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
Justin SB 7bd4a7e262
Support download protokube from mirror 2019-03-26 00:45:54 -04:00
Kubernetes Prow Robot 93988d8fdd
Merge pull request #6359 from justinsb/integration_etcd
Enable etcd-manager / etcd3 / etcd-tls in kops 1.12
2019-03-19 10:28:23 -07:00
LilyFaFa 12d54b6a1f support gossip for AliCloud 2019-03-15 15:26:12 +08:00
Justin SB 31f408c978
Support etcd-manager in kops 1.12
In 1.12 (kops & kubenetes):

* We default etcd-manager on
* We default to etcd3
* We default to full TLS for etcd (client and peer)
* We stop allowing external access to etcd
2019-03-14 23:13:06 -04:00
Kubernetes Prow Robot ea420dac78
Merge pull request #6351 from cisco-sso/os_full
Kops for Openstack
2019-01-23 10:35:20 -08:00
Rohith 6c814f3e73 Changes
- removed all the systemd unit creation and use the volume mount code from kubele (SafeFormatAndMount)
- added some documentation to highlight the feature and show how it might be used in both ebs and ephemeral storage
2019-01-18 22:49:54 +00:00
Rohith 0e155b4c78 - changed tack and making them two separate features for now, one adding additional volumes and two mounting them. This should always allow for user to use epherimal devices as well
- updated the api specs and machinery
- adding the dependecies on the services when the volume mounts are enable (should probably false this if they don't effect the docker filesystem)
2019-01-18 22:49:38 +00:00
Derek Lemon -T (delemon - AEROTEK INC at Cisco) b1aaef1885 Proper escaping of openstack environment variables 2019-01-15 14:21:50 -07:00
Derek Lemon -T (delemon - AEROTEK INC at Cisco) 4e752ca62d Openstack Environment Variable Mapping 2019-01-15 14:21:41 -07:00
Justin Santa Barbara 3405ee1382 Create separate certificate for etcd peer authentication
This works around the (very unusual) etcd changes for validation of
peer certificates by DNS lookup, which were introduced in etcd 3.2.

Issue #6024
2018-11-24 22:26:52 -05:00
k8s-ci-robot 2dbb6e84f6
Merge pull request #5077 from yancl/master
change gossip dns conn limit by ENV
2018-07-19 21:40:52 -07:00
Rohith c9db958696 - cleanup up elements, imports and comments 2018-06-20 09:26:31 +01:00
Justin Santa Barbara 45eeddb560 protokube: only specify etcd flags when managing etcd
If we're using etcd-manager, we don't need to pass the flags to protokube.
2018-06-14 17:40:51 -04: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
Rohith 67296c2db9 - fixing up the spelling mistakes found 2018-06-06 10:03:51 +01:00