Commit Graph

679 Commits

Author SHA1 Message Date
Justin Santa Barbara 86ca778da3 Refactor: clean up SecretStore to not use KeystoreItem
More moving to use API objects, except in this case we eventually want
to deprecate SecretStore entirely.
2017-12-19 11:45:04 -05:00
Kubernetes Submit Queue e88496a248
Merge pull request #4061 from meringu/create-subnets
Automatic merge from submit-queue.

Add --subnets and --utility-subnets to kops create cluster

This change adds two new options to `kops create cluster`

When specifying `--vpc`, `--subnets` can be specified as an unordered array of subnet ids. Kops will then look up the zones of the subnets to find which zone to add the subnet id to.

If `--topology private` is also specified, `--utility-subnets` can similarly be specified.

~If a zone was specified but a subnet wasn't given that matches the zone, then the subnet will be allocated a CIDR with the current behaviour.~ This case fails validation here 7bd0a6a703/pkg/apis/kops/validation/validation.go (L151)

I can add unit tests and docs changes if required, but I am keen to get feedback before I proceed much further.

I have only added support for AWS.

I have tested this by running a command similar to this:

```bash
kops create cluster \
  --zones=us-east-1a,us-east-1b,us-east-1c \
  --topology private \
  --master-zones=us-east-1a,us-east-1b,us-east-1c  \
  --vpc $vpc_id \
  --subnets subnet-111111,subnet-222222,subnet-333333 \
  --utility-subnets subnet-444444,subnet-555555,subnet-666666 \
  $cluster_hosted_zone_name
```

And the cluster spec was as expected.
2017-12-18 21:12:59 -08:00
Kubernetes Submit Queue ca0a720a7e
Merge pull request #3833 from justinsb/cleanup_ssh_2
Automatic merge from submit-queue.

Refactor CAStore to use API types

We now return KeySet objects


Builds on #3832
2017-12-18 20:08:41 -08:00
Kubernetes Submit Queue 15c7d61dfb
Merge pull request #3997 from aledbf/amazon-vpc-cni
Automatic merge from submit-queue.

Add support for Amazon VPC CNI plugin

TODO:
- [x] IAM perms so that the CNI provider only has perms for the nodes in the cluster
- [x] Cleanup of security groups
- [ ] Replace image aledbf/k8s-ec2-srcdst:v0.1.0-5 with the official after https://github.com/ottoyiu/k8s-ec2-srcdst/pull/5 and https://github.com/ottoyiu/k8s-ec2-srcdst/pull/6
2017-12-17 21:41:13 -08:00
Justin Santa Barbara bf74133fd4 Refactor CAStore to use API types
We now return KeySet objects
2017-12-17 20:09:00 -05:00
Kubernetes Submit Queue dd49d69399
Merge pull request #3254 from chrislovecnm/file-assets
Automatic merge from submit-queue.

work on using files assets

Basic MVP for file assests.

- using file assest builder
- able to upload files
- using URL structs instead of strings everywhere
2017-12-17 16:10:23 -08:00
Kubernetes Submit Queue 7768729cf2
Merge pull request #3832 from justinsb/cleanup_ssh
Automatic merge from submit-queue.

Refactor: separate out SSHCredentials from Keyset stores
2017-12-17 15:05:09 -08:00
chrislovecnm 7057aaf1bb Enabling the file assets
File assets and the SHA files are uploaded to the new location. Files
when are users uses s3 are upload public read only. The copyfile task
uses only the existing SHA value.

This PR include major refactoring of the use of URLs.  Strings are no
longer categnated, but converted into a URL struct and path.Join is
utlilized.

A new values.go file is included so that we can start refactoring more
code out of the "fi" package.

A
2017-12-17 15:26:57 -07:00
Henry Muru Paenga 0491530b6e Lookup vpc if not given to create cluster 2017-12-18 11:12:57 +13:00
Manuel de Brito Fontes 2e05dd17aa Add support for Amazon VPC CNI plugin 2017-12-17 18:08:24 -03:00
Kubernetes Submit Queue fb7c42cb4d
Merge pull request #3987 from justinsb/default_subnets_on_create_ig
Automatic merge from submit-queue.

Use default subnet when creating IG
2017-12-15 09:23:14 -08:00
Henry Muru Paenga 6fcd970191 create cluster only use --subnets in AWS 2017-12-15 18:59:12 +13:00
Henry Muru Paenga afc1b58722 Tests for create cluster in shared vpc 2017-12-15 18:29:20 +13:00
Justin Santa Barbara 3e236283f3 Tag 1.8.0 2017-12-13 22:13:27 -05:00
Justin Santa Barbara 65bcbe7729 Use default subnet when creating IG
We had this logic before, but I accidentally bypassed it in #2124.
2017-12-13 22:01:44 -05:00
Justin Santa Barbara 509b83ac7a Refactor: separate out SSHCredentials from Keyset stores
We've done this in the API already, but we had a single CAStore
interface that did Keysets and SSHCredentials.  Separate out
SSHCredentials into SSHCredentialStore, and start using API objects as
our primary representation.
2017-12-13 20:16:59 -05:00
Henry Muru Paenga 48d4a7cb1a Add --subnets and --utility-subnets to kops create cluster 2017-12-14 13:57:54 +13:00
Rohith 6b2f4a4c74 Bastion Username
- cleaning up the bastion username line
2017-12-13 13:09:22 +00:00
Kubernetes Submit Queue bfd747a873
Merge pull request #3933 from justinsb/lazy_ssh_keystore
Automatic merge from submit-queue.

SSH keys - be lazier about keystore creation
2017-12-03 20:40:42 -08:00
Justin Santa Barbara 33b7432d6a Fix segfault when updating non-existent object
Fix #3935
2017-12-01 11:00:46 -05:00
Justin Santa Barbara 2ada501c65 Fix typo in kops get cluster --full hint 2017-11-29 21:04:28 -05:00
Justin Santa Barbara b8b7287e4a Bump versions to 1.8.0-beta.2 2017-11-28 13:27:58 -05:00
Justin Santa Barbara ad60069d71 SSH keys - be lazier about keystore creation 2017-11-26 23:35:58 -05:00
Kashif Saadat 79eef3cc6c Support replacing kops secrets via force flag 2017-11-21 11:47:03 +00:00
Kubernetes Submit Queue d8e2ce211a
Merge pull request #3709 from chrislovecnm/placehold-dns-ux-updates
Automatic merge from submit-queue.

Improving UX for placeholder IP Address

Before the `kops validate cluster` attempts to connect to the K8s API
endpoint, the code now checks to see if the API DNS Entry is the kops
placeholder IP Address 203.0.113.123.  It prints a message to the user
and err's.  There is a new init func in validate cluster that disables
CGO based DNS for Darwin OS.  Darwin does two things with kops
validates; it caches the IP address, and it does not return the
placeholder IP address.  We cannot use CGO base DNS with kops validate with OSX.
2017-11-17 02:24:23 -08:00
Kubernetes Submit Queue 1dcc4a0ef1
Merge pull request #3864 from jonstacks/master
Automatic merge from submit-queue.

Fix spelling

Fix spelling of credential in the `kops create` command.
2017-11-16 22:49:59 -08:00
chrislovecnm c7ef856f92 Improving UX for kops validate cluster
Before the `kops validate cluster` attempts to connect to the K8s API
endpoint, the code now checks to see if the API DNS Entry is the kops
placeholder IP Address 203.0.113.123.  It prints a message to the user
and err's.  There is a new init func in validate cluster that disables
CGO based DNS for Darwin OS.  Darwin does two things with kops
validates; it caches the IP address, and it does not return the
placeholder IP address.  We cannot use CGO base DNS with kops validate.
2017-11-16 15:12:51 -07:00
Jonathan Stacks fb3f8f9424
Fix spelling 2017-11-15 13:22:47 -06:00
Rohith 316903fee1 Kops Template Config Value
- the use of %v is somewhat cleaner than trying to convert to a string
2017-11-15 16:57:59 +00:00
Justin Santa Barbara 3ab71d19ab Tweak kops create ig flag to edit, not editor
As EDITOR is the env var used to configure the editor, which will be
confusing.
2017-11-14 03:17:19 -05:00
Kubernetes Submit Queue ad50149769
Merge pull request #3787 from jchanam/master
Automatic merge from submit-queue.

Add edit flag so create instancegroup command is usable on scripts

Until now, the opening of an interactive editor when creating a new instance group was mandatory.

This this commit, a new flag is added, so this is now optional.

This commit is backwards compatible.
2017-11-13 21:47:37 -08:00
Julio Chana 9ca5f9ac98
Change no-edit flag to edit 2017-11-13 11:32:24 +01:00
Justin Santa Barbara 1d402ec962 Fix error message when not specify --cloud or --zones 2017-11-12 22:36:41 -05:00
Kubernetes Submit Queue e5ea6ba6a7
Merge pull request #3783 from georgebuckerfield/instancegroup-labels
Automatic merge from submit-queue.

Add a default NodeLabel with the InstanceGroup name

As requested in https://github.com/kubernetes/kops/issues/2999, this change just auto-populates new InstanceGroup specs with a default node label containing the name of the instance group. It would be really useful for those of us managing environments with multiple instance groups.

It allows an admin to easily view the instance groups using kubectl:
```
kubectl get nodes --label-columns kops.k8s.io/instancegroup
NAME                                           STATUS         AGE       VERSION   INSTANCEGROUP
ip-172-20-108-120.eu-west-1.compute.internal   Ready,node     3m        v1.7.4    xtra-large
ip-172-20-117-133.eu-west-1.compute.internal   Ready,master   14m       v1.7.4    master-eu-west-1c
ip-172-20-32-139.eu-west-1.compute.internal    Ready,master   14m       v1.7.4    master-eu-west-1a
ip-172-20-32-92.eu-west-1.compute.internal     Ready,node     12m       v1.7.4    nodes
ip-172-20-67-184.eu-west-1.compute.internal    Ready,master   13m       v1.7.4    master-eu-west-1b
```
2017-11-09 23:29:47 -08:00
Kubernetes Submit Queue ebef6beda1
Merge pull request #3814 from chrislovecnm/fixing-bazel-kops-version
Automatic merge from submit-queue.

updating bazel build version
2017-11-09 21:37:15 -08:00
Rodrigo Menezes ef24cec62b Fixing naming convention and adding running API machinery. 2017-11-09 14:30:48 -08:00
chrislovecnm a3a633457f updating bazel build version 2017-11-09 14:29:48 -07:00
Rodrigo Menezes 3cfa67c3e6 Merge remote-tracking branch 'upstream/master' into extra_user-data 2017-11-08 22:20:54 -08:00
Julio Chana e4afcd8869
Add no edit flag so create instancegroup command is usable on scripts 2017-11-07 12:43:56 +01:00
georgebuckerfield 8f60078d11 Move instance group node label functionality out of PopulateInstanceGroupSpec so that it's not mandatory 2017-11-07 11:25:37 +00:00
Rodrigo Menezes 1fe56a1603 Move user-data to IG spec 2017-11-06 23:25:37 -08:00
Justin Santa Barbara 07c221bf6b
Merge branch 'master' into feature/kops-add-master-public-name 2017-11-06 22:58:57 -05:00
Justin Santa Barbara a6e2e05c57 Remove nodeup static=on
Doesn't seem to build with that attribute
2017-11-06 17:22:15 -05:00
Justin Santa Barbara 132b428d64
Merge pull request #3776 from chrislovecnm/bazel-work
gazelle updates with new bazel version
2017-11-06 14:08:57 -05:00
chrislovecnm 609e268a1d gazelle updates with new bazel version 2017-11-05 17:41:53 -07:00
chrislovecnm a25b5d7364 adding -y to various commands that use --yes. kops create,
rolling-update and update now include -y.
2017-11-05 17:33:24 -07:00
Kubernetes Submit Queue df69d047f8
Merge pull request #3769 from chrislovecnm/bazel-work
Automatic merge from submit-queue.

updating to bazel 0.0.7 and adding verify scripts

/assign @geojaz
2017-11-05 14:15:06 -08:00
Kubernetes Submit Queue 9c30c30ec0
Merge pull request #3658 from justinsb/rationalize_rollingupdate_timeouts
Automatic merge from submit-queue.

Rationalize timeouts for rolling-update
2017-11-05 13:11:21 -08:00
chrislovecnm 30acda868a updating to bazel 0.0.7 and adding verify scripts 2017-11-04 20:59:01 -06:00
Rodrigo Menezes 565afae2c6 Merge remote-tracking branch 'upstream/master' into extra_user-data 2017-11-04 17:06:43 -07:00