Commit Graph

4766 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 78b61a5b6e
Merge pull request #4106 from justinsb/fix_comment_onPhaseiam
Automatic merge from submit-queue.

Fix code comment on PhaseSecurity
2017-12-18 20:38:33 -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
Justin Santa Barbara be9d15b565 Fix code comment on PhaseSecurity 2017-12-18 22:33:05 -05:00
Kubernetes Submit Queue cac47e7a74
Merge pull request #4096 from chrislovecnm/goimports
Automatic merge from submit-queue.

fixing goimports formatting
2017-12-18 11:18:41 -08:00
Kubernetes Submit Queue 3311020d38
Merge pull request #4101 from maciaszczykm/patch-1
Automatic merge from submit-queue.

Add Dashboard v1.8.1

https://github.com/kubernetes/dashboard/releases/tag/v1.8.1
2017-12-18 10:49:13 -08:00
Kubernetes Submit Queue 43b79a29b5
Merge pull request #4102 from rcuza/patch-1
Automatic merge from submit-queue.

make it go to f
2017-12-18 10:13:42 -08:00
chrislovecnm 509b8e285f fixing goimports formatting 2017-12-18 11:09:04 -07:00
Kubernetes Submit Queue 2eae62d460
Merge pull request #4085 from xoen/ag-oidc-prefixes-config
Automatic merge from submit-queue.

Support for OIDC 'username-prefix' and 'groups-prefix' flags

### What
Added support for `--oidc-username-prefix` and `--oidc-groups-prefix`.
By passing these it's possible to override the default prefixes used to map the OIDC user with the username in kubernetes.

### See
See: https://kubernetes.io/docs/admin/authentication/#configuring-the-api-server

### IMPORTANT
I'm far from a kubernetes/KOPS, this is not tested so someone needs to have a look and see if something is missing or if this can cause troubles! (don't want to accidentally cause the destruction of the universe 💥 )

It's basically the same done in this other PR: https://github.com/kubernetes/kops/pull/1438/files

I did **not** change the `zz_generated.conversion.go` files as according to comment at the top of them they're autogenerated:
```go
// This file was autogenerated by conversion-gen. Do not edit it manually!
```
(I wonder if they should be `.gitignore`d)

### Fixes
This should fix [#4007: field oidcUsernamePrefix is not recognized in cluster configuration file](https://github.com/kubernetes/kops/issues/4007)
2017-12-18 09:37:31 -08:00
Aldo "xoen" Giambelluca 9e30999d06 Support for OIDC 'username-prefix' and 'groups-prefix' flags
See: https://kubernetes.io/docs/admin/authentication/#configuring-the-api-server

This is very similar to this other PR: https://github.com/kubernetes/kops/pull/1438/files

I also updated the format of the documentation for the OIDC API Server fields
to follow the Go Style guide: https://blog.golang.org/godoc-documenting-go-code

Fixes: https://github.com/kubernetes/kops/issues/4007
2017-12-18 15:34:37 +00:00
Raúl Cuza cd442b3560
make it go to f
`aws ec2 describe-availability-zones` returns 1a-1f for my account. This change allows me to provision things in the 1f availability zone.
2017-12-18 10:05:41 -05:00
Marcin Maciaszczyk 339363dbd0
Rename v1.8.1 to v1.8.1.yaml 2017-12-18 10:08:10 +01:00
Marcin Maciaszczyk 005f845cf3
Update addon.yaml 2017-12-18 10:07:31 +01:00
Marcin Maciaszczyk b5934bd593
Add Dashboard v1.8.1 2017-12-18 10:06:08 +01: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
Kubernetes Submit Queue ff857218df
Merge pull request #4098 from chrislovecnm/gazelle-updates
Automatic merge from submit-queue.

fixing bazel

man we need a ci test for this :(
2017-12-17 17:36: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
chrislovecnm c0da5e7fbb fixing bazel 2017-12-17 17:03:58 -07:00
Kubernetes Submit Queue 0bfb273f72
Merge pull request #4095 from reactiveops/fix_3883
Automatic merge from submit-queue.

Adds permissions for ELB and NLB req'd by 1.9

Adds appropriate IAM permissions to Masters (in restrictive mode) for ELB and NLB.

Closes https://github.com/kubernetes/kops/issues/3883
2017-12-17 15:38:32 -08:00
Henry Muru Paenga 9f3382f072
Add docs for create cluster --subnets option 2017-12-18 12:33:06 +13: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
Kubernetes Submit Queue 0d07cc9f4c
Merge pull request #4046 from artsy/master
Automatic merge from submit-queue.

add imagePullProgressDeadline to kubelet config

Support the kubelet runtime flag `--image-pull-progress-deadline` by mapping the config key `imagePullProgressDeadline`

This supports extending the deadline to pull new images, as detailed in [this issue](https://github.com/openshift/origin/issues/13122)
2017-12-17 13:32:43 -08:00
Manuel de Brito Fontes 2e05dd17aa Add support for Amazon VPC CNI plugin 2017-12-17 18:08:24 -03:00
Eric Hole 59bc52a05a Adds permissions for ELB and NLB req'd by 1.9 2017-12-17 13:03:54 -08:00
Kubernetes Submit Queue b4157ffba4
Merge pull request #4077 from justinsb/admin_or_root
Automatic merge from submit-queue.

nodeup: create kubeconfig under admin or root
2017-12-17 09:41:09 -08:00
Isac Petruzzi 92abe3676f capitalize imagePullProgressDeadline in docstrings 2017-12-17 18:35:09 +01:00
Kubernetes Submit Queue 922a0d3ac6
Merge pull request #3924 from justinsb/remove_nodeup_templates
Automatic merge from submit-queue.

Remove nodeup templating
2017-12-16 09:58:09 -08:00
Kubernetes Submit Queue b44d894813
Merge pull request #3860 from justinsb/batching
Automatic merge from submit-queue.

Copy dnsprovider into our code, implement route53 batching

Fixes #3121
2017-12-15 15:44:12 -08:00
Kubernetes Submit Queue ce7fe5142c
Merge pull request #3981 from justinsb/return_not_found_error
Automatic merge from submit-queue.

Return apierrors NotFound when object not found
2017-12-15 15:05:46 -08: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
Kubernetes Submit Queue 09ba34c116 Merge pull request #4079 from justinsb/validation_baremetal_no_subnet_cidrs
Automatic merge from submit-queue.

validation: don't require subnet CIDRs on baremetal
2017-12-15 07:30:21 -08:00
Kubernetes Submit Queue 96ee92a4b3
Merge pull request #4063 from rajivm/fix-canal-hostport
Automatic merge from submit-queue.

Support for hostPort when using canal

Similar to: https://github.com/kubernetes/kops/pull/3206

Without this, we are unable to get `hostPort` working with `canal`. The same is true for `flannel`, but this does add support for plain flannel.
2017-12-15 07:00:22 -08:00
Kubernetes Submit Queue 794b7a12f4
Merge pull request #4075 from justinsb/assetstore_atomic_expand
Automatic merge from submit-queue.

assetstore: extract tar files to a temp directory
2017-12-15 06:09:19 -08:00
Kubernetes Submit Queue 576f3dc603
Merge pull request #4076 from justinsb/refactor_hosts
Automatic merge from submit-queue.

Refactor protokube hosts file into its own package
2017-12-15 05:35:12 -08:00
Kubernetes Submit Queue 490f860bc9
Merge pull request #4078 from justinsb/protokube_local_addresses
Automatic merge from submit-queue.

protokube: better discovery of local address
2017-12-15 05:03:47 -08:00
Kubernetes Submit Queue 6eb1de3825
Merge pull request #4080 from justinsb/protokube_cluster_id_logging
Automatic merge from submit-queue.

protokube: fix logging / logic around cluster-id
2017-12-15 04:19:58 -08:00
Kubernetes Submit Queue 56da7ed34e
Merge pull request #4081 from justinsb/files_npe
Automatic merge from submit-queue.

files task: fix potential nil pointer error
2017-12-15 03:47:04 -08:00
Kubernetes Submit Queue f0303c80dc
Merge pull request #4082 from justinsb/unattended_apt_get
Automatic merge from submit-queue.

apt-get: specify unattended installation
2017-12-15 03:14:37 -08:00
Justin Santa Barbara 743e482660 nodeup: create kubeconfig under admin or root
While the admin account is created on stock debian images, it isn't on
all of them.  Check admin first, then check root, and don't treat it as
an error if neither is found - this is only a convenience.
2017-12-15 01:29:48 -05:00
Justin Santa Barbara 6d166a41dd Refactor protokube hosts file into its own package
So we can bring this in without our gossip layer

This supports an imminent implementation that uses DNS-SD
2017-12-15 01:22:51 -05:00
Justin Santa Barbara 6cedbbf456 Remove nodeup templating
As it is now unused
2017-12-15 01:20:34 -05:00
Justin Santa Barbara 65aea59418 Return apierrors NotFound when object not found 2017-12-15 01:19:54 -05:00
Justin Santa Barbara 78b84d6c2c apt-get: specify unattended installation
Otherwise we risk getting stuck on a prompt
2017-12-15 01:12:37 -05:00
Justin Santa Barbara 060d94e9e8 files task: fix potential nil pointer error
If the user didn't exist, we would panic with a nil pointer error
2017-12-15 01:12:20 -05:00
Justin Santa Barbara 3472b0dc6d protokube: fix logging / logic around cluster-id
Remove superfluous if statement
2017-12-15 01:11:56 -05:00
Justin Santa Barbara 6ef414e040 validation: don't require subnet CIDRs on baremetal
They aren't needed!
2017-12-15 01:10:54 -05:00