Commit Graph

36 Commits

Author SHA1 Message Date
Rob Graham 8ccf42f4a2 GH-4252 Better name for the config value and also add to v1alpha1 API 2018-07-23 13:48:35 +01:00
Rob Graham e307021a6c remove log 2018-07-03 10:26:13 +01:00
Rob Graham ae327e1e8c wrestling with the api stuff 2018-07-02 15:16:37 +01:00
Rob Graham cc589ae538 Reworked to use loadbalancer only if config is specified 2018-07-02 12:02:50 +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
Justin Santa Barbara a7f82a6380 Fix shared subnet/vpc tags
* Stop setting the Name tag on a shared subnet/vpc

* Stop setting the legacy KubernetesCluster tag on a shared subnet/vpc
that is new enough (>=1.6); we rely on the shared tags instead

* Set tags on shared subnets; i.e. we _do_ set the shared tag on a
shared subnet; that is important for ELBs

* Set tags on shared VPCs; i.e. we _do_ set the shared tag on a shared
VPC; that is not used but consistent with subnets.

* Add tests for shared subnet
2017-10-23 11:30:25 -04:00
Justin Santa Barbara 7fd1196708 Add Zones field to InstanceGroup
The Zones field can specify zones where they are not specified on a
Subnet, for example on GCE where we have regional subnets.
2017-09-30 19:44:35 -04:00
Justin Santa Barbara b29f3a7505 Honor ServiceNodePortRange when opening NodePort access 2017-09-15 00:39:41 -04:00
Rohith f61e1ebe08 Etcd TLS Options
- changed the location of this variable to be in the etcd cluster spec rather the kops cluster spec
- reflected the changes against the models
2017-08-06 20:50:05 +01:00
Seth Pollack 888702b1a9
populate cloud labels with cluster autoscaler tags 2017-07-21 10:47:25 -04:00
Justin Santa Barbara d2df318ecc Move CloudProvider to kops API
This avoids a circular reference when breaking up the fi package
2017-06-17 16:27:07 -04:00
Justin Santa Barbara 383c2bf5ed Use explicit tag management in network tasks
This lets us use the new shared cluster tags, for shared networking
objects - in particular subnets.

We continue to add the existing tags also, for compatability. When we
add direct management of shared networks, we will likely address that.
2017-05-01 22:55:27 -04:00
Justin Santa Barbara 864a999602 Fix automatic private DNS zone creation
We have to defer creation of the IAM policy until we have created the
hosted zone.

Fix #2444
2017-04-29 17:01:18 -04:00
Justin Santa Barbara 18886749d9 Always include hash, per code review
Thanks @kris-nova
2017-03-09 09:35:09 -05:00
Justin Santa Barbara 69c38f721e Switch how we build ELB names, but keep a feature flag 2017-03-09 09:18:31 -05:00
Justin Santa Barbara 724bd95e0b Use Name tag to match ELBs
Rather than using the LoadBalancerName to match, we match on the Name
tag.

Related to #2019
2017-03-09 09:18:31 -05:00
Justin Santa Barbara bf2edddb8d Merge pull request #1935 from justinsb/terraform_variable_output
Output variables from terraform, for reuse in a module
2017-02-24 09:06:20 -05:00
Justin Santa Barbara e09037dff0 Merge pull request #1969 from zytek/fix-1949
Resolve DNS Hosted Zone ID while building IAM policy
2017-02-23 10:21:39 -05:00
Robin Percy f9b3c5e584 Now applying the tags to IGs at render time.
- Previous method would have caused issues with the way tags are used
  for filtering resources.
- Updated docs and comments to only refer to instance groups, rather
  than all AWS resources
2017-02-23 06:10:15 -08:00
Jakub Paweł Głazik cd795d0c8c Resolve DNS Hosted Zone ID while building IAM policy
Fixes #1949
2017-02-23 11:45:58 +01:00
Justin Santa Barbara 2a34e6d00e Output variables from terraform, for reuse in a module
Issue #1026
2017-02-17 11:05:06 -05:00
Justin Santa Barbara 55b6d86454 Move more options to code
User reports of kubelet flags not being passed; moved more to code.

Also found & fixed the likely root-cause issue: we have two copies of
the cluster spec and were not being precise about which one we wanted to
use at all times.
2017-02-15 13:11:12 -05:00
Manuel de Brito Fontes da2630638b Fix build 2017-02-11 13:57:30 -03:00
Justin Santa Barbara 7b694d4b04 Fixes per code review 2017-01-29 02:55:31 -05:00
Justin Santa Barbara ba5434caf0 Relax DNS requirements on shared VPCs
Don't require EnableDNSHostnames on a shared VPC in >= 1.5.0

Create a feature flag for tolerating EnableDNSSupport=false.

Issue #786
2017-01-29 00:09:09 -05:00
Justin Santa Barbara d4122c03c7 Use instance group subnets instead of topology type
It looks like we can infer this from the instance group types, keeping
topology as an argument to `kops create cluster`.
2017-01-20 23:16:48 -05:00
Justin Santa Barbara 61011650dd Support private hosted zones in DNS 2017-01-09 09:32:52 -05:00
Kris Nova 336237e879 Bug fixes and bastion reworking 2017-01-05 07:45:52 -07:00
Justin Santa Barbara 2912dee6e1 Rename -> AccessSpec, ELB -> LoadBalancer
Also add docs
2017-01-04 23:04:30 -05:00
Justin Santa Barbara 9314575953 Working on expressing how we expose services like the API 2017-01-04 23:04:30 -05:00
Justin Santa Barbara d449f40a37 Pre-create DNS records with placeholder values
Fixes #928
2016-12-28 13:33:23 -05:00
Justin Santa Barbara ef14a1d172 Private DNS initial implementation - via feature flag 2016-12-26 14:03:31 -05:00
Justin Santa Barbara a03ea54365 Rename SubnetName -> Name
No schema impact
2016-12-19 00:01:38 -05:00
Justin Santa Barbara fed68310fa Schema v1alpha2
* Zones are now subnets
* Utility subnet is no longer part of Zone
* Bastion InstanceGroup type added instead
* Etcd clusters defined in terms of InstanceGroups, not zones
* AdminAccess split into SSHAccess & APIAccess
* Dropped unused Multizone flag
2016-12-18 21:56:57 -05:00