Commit Graph

989 Commits

Author SHA1 Message Date
Johannes Würbach 02855fc13f
Enable metrics for AutoScalingGroups
Those metrics simplify monitoring the created ASGs and are free [0].

Enable them by default.

[0] https://aws.amazon.com/about-aws/whats-new/2016/08/free-auto-scaling-group-metrics-with-graphs/
2018-01-25 20:06:10 +01:00
Dennis Webb 5855787574 returns latest image if more than 1 found 2018-01-25 10:04:12 -06:00
k8s-ci-robot d2bb0ba233
Merge pull request #4317 from justinsb/ensure_gce_disk_name_does_not_start_with_number
Ensure GCE disk name does not start with a number
2018-01-24 12:02:33 -08:00
k8s-ci-robot e190741cc7
Merge pull request #4320 from mikn/iam_region_fix
Fix ASG scaling by adding in ec2:DescribeRegions permission to the nodes IAM role
2018-01-23 17:22:30 -08:00
k8s-ci-robot b68ff3893f
Merge pull request #4308 from justinsb/stop_specifying_require_kubeconfig
Don't specify require-kubeconfig from 1.10
2018-01-23 15:44:01 -08:00
Mikael Knutsson 1dbd435019 Fix ASG scaling by adding in ec2:DescribeRegions permission 2018-01-22 17:11:49 +08:00
Justin Santa Barbara ec4a916f62 Ensure GCE disk name does not start with a number
As this could not have worked before, we don't have to worry about
compatability with existing users.
2018-01-22 00:24:16 -05:00
Justin Santa Barbara 4dccf6d56d Don't specify require-kubeconfig from 1.10
Should fix https://github.com/kubernetes/kubernetes/pull/58367
2018-01-20 17:57:58 -05:00
k8s-ci-robot 77c21509b0
Merge pull request #4298 from blakebarnett/bdb/bazel_updates
bazel 0.9.0 running `make bazel-build` updates
2018-01-19 12:54:28 -08:00
k8s-ci-robot 7f67d33db0
Merge pull request #4299 from blakebarnett/bdb/k8s_1-9_default_admission_controllers
Update list of AdmissionControllers for k8s 1.9
2018-01-19 12:00:28 -08:00
Todd Lyons 5c1b646896 Maintainer recommended code/style updates 2018-01-18 22:22:34 -08:00
Blake e37be9a88c Update list of AdmissionControllers for k8s 1.9 2018-01-18 13:40:23 -08:00
Blake 0450d08c0b bazel 0.9.0 running `make bazel-build` updates 2018-01-18 13:26:27 -08:00
Mike Splain 3dfc8a3a18 Validate IG MaxSize is not less than MinSize. 2018-01-15 19:45:26 -05:00
k8s-ci-robot 961564a4e7
Merge pull request #4198 from KashifSaadat/subnet-tags
Add SubnetType Tag to Subnets
2018-01-14 10:02:22 -08:00
Hidetake Iwata d97e0e6205 Fix rootVolumeType accepts all volume types #4256 2018-01-14 17:57:35 +09:00
Otto Yiu e4427e9672 improve S3 url parsing for vfsPath to support more naming conventions 2018-01-12 16:07:18 -08:00
Otto Yiu 2b12b59d75 add ability to override etcd image and update apimachinery generated files from EtcdClusterSpec changes 2018-01-10 13:39:07 -08:00
Brian Schultz e25ae6f776 Ran goimports make target 2018-01-09 13:55:24 -06:00
Brian Schultz 0f0caa7807 Undo go import reordering from apimachinery make target 2018-01-09 12:50:48 -06:00
Brian Schultz 432c13ffab Makefile command "apimachinery" run
- Updated copyright to 2018
- Reordered some imports
- Added ImagePullProgressDeadline copy code
2018-01-09 12:40:06 -06:00
Brian Schultz 93a33bc70b Expose the --fail-swap-on flag for kubelet 2018-01-09 11:08:23 -06:00
k8s-ci-robot 18e7e369e7
Merge pull request #4221 from justinsb/dont_need_gfs_list_permission
GCE: Don't set bucket-level permissions
2018-01-08 16:08:11 -08:00
Kashif Saadat 5850b434b4 Add SubnetType Tag to Subnets 2018-01-08 10:53:58 +00:00
k8s-ci-robot b8a701b2da
Merge pull request #4107 from chrislovecnm/validate-ouput
kops validate cluster can output YAML or JSON
2018-01-08 02:47:11 -08:00
Justin Santa Barbara 7b04ede10e GCE: Don't set bucket-level permissions
We previously needed them to allow list operations; however we now use a
keyset.yaml file instead of listing keys.  That should be the sole use,
so we should no longer need this permission.

If not, we can re-enable the code easily.
2018-01-08 00:58:36 -05:00
k8s-ci-robot 2f3f0548c2
Merge pull request #4154 from chrislovecnm/missed-lifecycle-elb
adding missed lifecycles in elb code
2018-01-05 12:14:12 -08:00
Justin Santa Barbara ec8db8b78c Initial implementation of bundle command
The bundle command will support enrollment of a machine via SSH.
2018-01-04 18:55:28 -05:00
k8s-ci-robot fcc904f468
Merge pull request #4170 from chrislovecnm/bazel-improvements
Improving bazel make targets, adding a target for kops cli, bumping go_rules version
2018-01-04 08:48:31 -08:00
chrislovecnm 88baba38de fixing security lifecycle for additional security groups 2017-12-30 09:00:11 -07:00
Justin Santa Barbara 8c23031561 Add roundtrip tests for certs & private keys
Travis should cover all our supported go versions.
2017-12-29 21:18:29 -05:00
chrislovecnm 4dd3bb1dea Updating bazel BUILD files with new go_rules version 2017-12-29 15:03:14 -07:00
chrislovecnm 9448e66f1b openapi docs update 2017-12-28 19:07:41 -07:00
Todd Lyons 7f7306d4f9 Lint fixes by make gofmt 2017-12-28 15:42:53 -08:00
Todd Lyons 73b29b68e6 User input to continue/abort rolling update 2017-12-28 14:57:28 -08:00
Todd Lyons 2f0d888d18 Remove useless line 2017-12-28 11:00:55 -08:00
Todd Lyons 40eed60dd8 Interactive cli arg framework
Just builds, haven't tested yet.
2017-12-28 10:54:17 -08:00
chrislovecnm 9c2f6cc890 adding missed lifecycles in elb code 2017-12-27 16:19:34 -07:00
Albert c52472cfa8 Add support for cn-northwest-1. 2017-12-27 15:37:09 +08:00
Justin Santa Barbara 5cc5a936f9 Force nodeup to use the bundle
We disable fallback entirely for nodeup, so we can still share code, but
won't accidentally be using the wrong code path.
2017-12-21 16:06:11 -05:00
Kubernetes Submit Queue fb6725a7c7
Merge pull request #4060 from audip/feature/add-audit-log-format-flag
Automatic merge from submit-queue.

Add audit log format flag for api server

In kubernetes 1.8, a flag for audit-log format has been added, this flag can be set to `legacy` or `json` format on the kubernetes API server.
2017-12-21 10:52:31 -08:00
Purandare, Aditya 9900c8afeb
Add auditlogformat flag for kubernetes api server 2017-12-21 11:31:12 -06:00
chrislovecnm 18ea92f696 updating bazel files 2017-12-20 00:26:28 -07:00
chrislovecnm 7cb9384d70 kops validate clsuter can output YAML or JSON
Adding the capbility for kops validate cluster command to output YAML or JSON.
The validate.ValidationCluster struct is used as body of the JSON or
YAML document.
2017-12-19 23:07:55 -07:00
Justin Santa Barbara bf24a6443c Avoid ListSecrets call in nodeup
This helps up with GCE permissions, but also helps us get rid of auth
tokens.
2017-12-19 11:45:04 -05: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 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
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
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
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
Isac Petruzzi 92abe3676f capitalize imagePullProgressDeadline in docstrings 2017-12-17 18:35:09 +01: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
Justin Santa Barbara 65aea59418 Return apierrors NotFound when object not found 2017-12-15 01:19:54 -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
Kubernetes Submit Queue 210a22458c
Merge pull request #4026 from ihoegen/patch-1
Automatic merge from submit-queue.

Fix node counts

When running `kops validate`, and the cluster size is greater than the minimum configuration, the display message is 
<img width="153" alt="screen shot 2017-12-07 at 1 10 14 pm" src="https://user-images.githubusercontent.com/11003242/33738958-1571943e-db50-11e7-9156-f034c9af7d9c.png">

This PR sets the NodeCount value to the length of the nodes array instead of the configuration.
2017-12-14 10:25:42 -08:00
Kubernetes Submit Queue bea129142a
Merge pull request #4051 from robinpercy/autoscaler-perms
Automatic merge from submit-queue.

Adding DescribeTags to masters

/fixes #2681
2017-12-14 09:25:42 -08:00
Kubernetes Submit Queue d533714aa8
Merge pull request #4036 from almariah/feature-api-elb-security-groups
Automatic merge from submit-queue.

Allow additional SGs to be added to API loadbalancer

Allow adding precreated additional security groups to the API loadbalancer using cluster spec:
```yaml
spec:
  api:
    loadBalancer:
      type: Public
      additionalSecurityGroups:
      - sg-exampleid3
      - sg-exampleid4
```

- [x] Adding additionalSecurityGroups cluster spec
- [x] Adding validation for repeated security groups
- [x] Adding validation for API loadbalancer security groups
- [x] Integration test for API loadbalancer and its security groups
- [x] Update API docs and cluster.spec docs
2017-12-14 02:25:40 -08:00
Justin Santa Barbara a8a83f3ce9 Update gazelle 2017-12-14 01:31:28 -05:00
Kubernetes Submit Queue 0d837bcea8
Merge pull request #3947 from chrislovecnm/goimports
Automatic merge from submit-queue.

updating goimports
2017-12-13 19:25:43 -08:00
Kubernetes Submit Queue 7bd0a6a703
Merge pull request #3898 from rdrgmnzs/additional_cidr
Automatic merge from submit-queue.

Add additionalNetworkCIDRs to support VPCs with multiple CIDRs in AWS

Add additionalNetworkCIDRs to support VPCs with multiple CIDRs in AWS.

@justinsb I cannot find anywhere that does a check on an existing VPC to see if the networkCIDR matches what is on the VPC defined, I was looking for that so I can add a similar check for this. Am I missing something or is there really no check like that?
2017-12-13 18:25:41 -08:00
Abdullah Almariah 4b0aa1d320 Add API docs 2017-12-14 03:11:44 +01:00
Abdullah Almariah 5b4c9e2a14 Add API docs 2017-12-14 03:09:08 +01:00
Kubernetes Submit Queue ac7ae3fd58
Merge pull request #3809 from rdrgmnzs/hostnameOverride_use_hostname
Automatic merge from submit-queue.

Let a user set a hostnameOverride when the cloud provider is aws.

Let a user use the hostname or set a hostnameOverride when the cloud provider is aws. This would allow for a more descriptive name to be used. The name of the hosts when using @hostname can be set by using a hook or some other method.
2017-12-13 17:46:21 -08:00
Justin Santa Barbara f03cc5dbd9 Update dnsprovider imports to use our version 2017-12-13 20:43:01 -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
Rodrigo Menezes 04506582ad add a check in validation.go 2017-12-13 16:58:52 -08:00
Rodrigo Menezes be85dfc438 Fix typo 2017-12-13 15:48:14 -08:00
Robin Percy 6a2ded4681 Adding DescribeTags to masters 2017-12-13 11:48:24 -08:00
Abdullah Almariah d181ecf885 awsValidateAdditionalSecurityGroups for API loadbalancer 2017-12-12 23:54:22 +01:00
Ian Hoegen 9ea5008da4 Make node counts and master counts autoscale friendly 2017-12-12 08:42:28 -08:00
Abdullah Almariah 5a46228927 awsValidateAdditionalSecurityGroups for API loadbalancer 2017-12-12 15:27:00 +01:00
Isac Petruzzi 2dfa262b3b add imagePullProgressDeadline to kubelet config 2017-12-12 12:02:10 +01:00
Kubernetes Submit Queue d931c229f7
Merge pull request #4020 from rifelpet/fix_shared_igw_rename
Automatic merge from submit-queue.

Fix spurious shared InternetGateway renaming

This fixes the original issue described in #476 where `kops update cluster` would continuously report renaming a shared IGW even though it never actually renames it. I also added tests to confirm the behavior change.

I removed the bug mention from the docs although if you would prefer to keep it and instead say `In kops versions before X, ...` I can do that too
2017-12-11 08:15:05 -08:00
Abdullah Almariah 1dbc6064a5 Allow additional SGs to be added to API loadbalancer 2017-12-11 15:24:08 +01:00
Kubernetes Submit Queue e07d610fb4
Merge pull request #3934 from justinsb/roles_in_toolbox
Automatic merge from submit-queue.

Include roles in toolbox dump structured output
2017-12-11 02:36:29 -08:00
Peter Rifel 358e2e222c Create mock igw in integration tests 2017-12-07 16:38:06 -08:00
Nico Piderman 69519f558b Spelling fix in instancegroups.go error msg 2017-12-07 10:08:15 -05:00
Rodrigo Menezes 3942185698 Merge remote-tracking branch 'upstream/master' into additional_cidr 2017-12-04 12:53:20 -08:00
Kubernetes Submit Queue 23319a0974
Merge pull request #3941 from vainu-arto/private_dns_cert_fix
Automatic merge from submit-queue.

When using private DNS add ELB name to the api certificate

This fixes issue #2032 by using the gossip paths with private dns as well:

* When creating the api server certificate, include the ELB hostname
* When generating kubeconfig, use the ELB hostname as the api server name
2017-12-04 06:01:25 -08:00
Kubernetes Submit Queue 8f927cdc68
Merge pull request #4000 from justinsb/update_bazel
Automatic merge from submit-queue.

Update bazel / gazelle
2017-12-03 21:51:52 -08:00
Kubernetes Submit Queue 2b7b0f6cc7
Merge pull request #3978 from justinsb/dump_instances_in_order
Automatic merge from submit-queue.

toolbox dump now dumps instances in alphabetical order
2017-12-03 20:09:53 -08:00
Kubernetes Submit Queue 26d931eab1
Merge pull request #3976 from aledbf/missing-elb-permission
Automatic merge from submit-queue.

Add missing permissions for NLB creation

Without this permissions is not possible to create a network load balancer (alpha in k8s >= 1.9)
2017-12-03 19:03:42 -08:00
Justin Santa Barbara 0a02aa2955 Update bazel / gazelle 2017-12-03 12:45:45 -05:00
Kubernetes Submit Queue 90a70996a0
Merge pull request #3988 from justinsb/gce_networks_mode
Automatic merge from submit-queue.

Allow GCE network to be reconfigured
2017-12-02 06:50:16 -08:00
Justin Santa Barbara 0872cb74d7 Allow GCE network to be reconfigured 2017-12-02 02:43:21 -05:00
Justin Santa Barbara 33b7432d6a Fix segfault when updating non-existent object
Fix #3935
2017-12-01 11:00:46 -05:00
Manuel de Brito Fontes 683799c9ab Add missing permissions for NLB creation 2017-12-01 08:56:55 -03:00
Justin Santa Barbara f02595e915 toolbox dump now dumps instances in alphabetical order 2017-12-01 00:25:07 -05:00
Kubernetes Submit Queue fd7acd1ce6
Merge pull request #3948 from chrislovecnm/openapi-updates
Automatic merge from submit-queue.

openapi doc updates
2017-11-29 09:49:26 -08:00
Arto Jantunen 7639487e4f Use ELB hostname in the generated kubeconfig when using private DNS 2017-11-29 15:12:58 +02:00