c12s-kubespray/roles
Chad Swenson 0c7e1889e4 Support for disabling apiserver insecure port
This allows `kube_apiserver_insecure_port` to be set to 0 (disabled). It's working, but so far I have had to:

1. Make the `uri` module "Wait for apiserver up" checks use `kube_apiserver_port` (HTTPS)
2. Add apiserver client cert/key to the "Wait for apiserver up" checks
3. Update apiserver liveness probe to use HTTPS ports
4. Set `kube_api_anonymous_auth` to true to allow liveness probe to hit apiserver's /healthz over HTTPS (livenessProbes can't use client cert/key unfortunately)
5. RBAC has to be enabled. Anonymous requests are in the `system:unauthenticated` group which is granted access to /healthz by one of RBAC's default ClusterRoleBindings. An equivalent ABAC rule could allow this as well.

Changes 1 and 2 should work for everyone, but 3, 4, and 5 require new coupling of currently independent configuration settings. So I also added a new settings check.

Options:

1. The problem goes away if you have both anonymous-auth and RBAC enabled. This is how kubeadm does it. This may be the best way to go since RBAC is already on by default but anonymous auth is not.
2. Include conditional templates to set a different liveness probe for possible combinations of `kube_apiserver_insecure_port = 0`, RBAC, and `kube_api_anonymous_auth` (won't be possible to cover every case without a guaranteed authorizer for the secure port)
3. Use basic auth headers for the liveness probe (I really don't like this, it adds a new dependency on basic auth which I'd also like to leave independently configurable, and it requires encoded passwords in the apiserver manifest)

Option 1 seems like the clear winner to me, but is there a reason we wouldn't want anonymous-auth on by default? The apiserver binary defaults anonymous-auth to true, but kubespray's default was false.
2017-11-06 14:01:10 -06:00
..
adduser Make etcd data dir configurable. 2017-02-27 21:35:51 +01:00
bastion-ssh-config change ssh_args/bastion configuration (#1883) 2017-10-27 12:18:39 +01:00
bootstrap-os Avoid that some read-only tasks cause an ansible-change (#1910) 2017-11-06 13:51:07 +00:00
dnsmasq Refactor downloads to use download role directly (#1824) 2017-10-19 09:17:11 +01:00
docker Docker Version Update 2017-11-03 12:34:45 -05:00
download update helm to v2.7.0 (#1875) 2017-11-03 07:15:00 +00:00
etcd Idempotency fixes (#1838) 2017-10-25 21:19:40 +01:00
kubernetes Support for disabling apiserver insecure port 2017-11-06 14:01:10 -06:00
kubernetes-apps Support for disabling apiserver insecure port 2017-11-06 14:01:10 -06:00
kubespray-defaults Add optional helm deployment mode for host (#1920) 2017-11-03 07:09:24 +00:00
network_plugin Flannel RBAC Fix 2017-11-02 23:20:23 -05:00
reset Normalize tags in all places to prepare for tag fixing in future (#1739) 2017-10-05 08:43:04 +01:00
rkt improved proxy support 2017-10-30 11:42:14 -04:00
upgrade Setting kubectl bin directory (#1635) 2017-09-09 23:54:13 +03:00
vault don't check for no_proxy, only http/https_proxy. fix linting issues. 2017-10-30 11:42:14 -04:00