Commit Graph

1092 Commits

Author SHA1 Message Date
Ole Markus With 6e04586361 Docs fixes 2020-05-22 08:08:58 +02:00
Ole Markus With e3055a6906 Inline supportsPrivateTopology 2020-05-22 08:08:58 +02:00
Ole Markus With eebb605c9c Remove as much of the classic networking logic as we can 2020-05-22 08:08:58 +02:00
Ole Markus With d1ff25bb4e Remove some rather long networking nil checks 2020-05-22 08:08:58 +02:00
Ole Markus With 95d2170fa6 Update networking in kops create
* Remove classic from cli docs. Add missing providers
* Use cilium instead of weave in example since we don't consider weave stable
2020-05-22 08:08:58 +02:00
John Gardiner Myers 8a6d29cd40 Remove support for reading legacy-format keypairs 2020-05-20 13:28:13 -07:00
Kubernetes Prow Robot 50a1a8edfb
Merge pull request #9121 from atmosx/master
Add EC2 Instance LifeCycle label
2020-05-15 11:17:37 -07:00
Panagiotis Atmatzidis 31acabf8cd
Add EC2 instance lifecycle label to nodes
When using a "mixed instance policy"[1] instance group spot and onDemand nodes are part of the same
ASG. The ASG handles the percentage of spot vs onDemand instances. There are no annotations, EC2 tags or labels to identify which
instances are onDemand vs spot. There is a field called `InstanceLifecycle` accessible through `EC2.DescribeInstances`.

The field `InstanceLifecycle` is available only in `spot` and
`scheduled` AWS EC2 instance types.

This PR introduces a new label to be attached on AWS EC2 spot nodes.

The label is:

```
node-role.kubernetes.io/spot-worker: "true"
```

or

```
node-role.kubernetes.io/scheduled-worker: "true"
```

[^1]: https://github.com/kubernetes/kops/blob/master/docs/instance_groups.md#mixedinstancepolicy-aws-only
2020-05-15 09:33:37 +03:00
John Gardiner Myers 154833e652 Fail cluster validation if too few nodes for ig's target size 2020-05-12 22:28:26 -07:00
Kubernetes Prow Robot 6e0aea35ce
Merge pull request #9108 from olemarkus/zsh-completion
Fix zsh completion
2020-05-12 06:14:21 -07:00
Jesse Haka b242c44dd2 use v3 api in kubernetes also 2020-05-11 08:17:47 +03:00
Ole Markus With 520ba275f3 Fix zsh completion 2020-05-10 15:40:54 +02:00
Kubernetes Prow Robot 8768178082
Merge pull request #9084 from rifelpet/gce-tf-metadata
Dont use terraform's file() for singleline strings in GCE metadata
2020-05-08 16:21:51 -07:00
Justin SB 75fd939a62
kube-apiserver: healthcheck via sidecar container
kube-apiserver doesn't expose the healthcheck via a dedicated
endpoint, instead relying on anonyomous-access being enabled.  That
has previously forced us to enable the unauthenticated endpoint on
127.0.0.1:8080.

Instead we now run a small sidecar container, which
proxies /healthz and /readyz requests (only) adding appropriate
authentication using a client certificate.

This will also enable better load balancer checks in future, as these
have previously been hampered by the custom CA certificate.

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2020-05-07 08:06:52 -04:00
Peter Rifel ef6abbcd5c
Don't use file references for single line strings in gce's metadata fields 2020-05-06 23:06:24 -05:00
Kubernetes Prow Robot 486c20f724
Merge pull request #9053 from johngmyers/channels-dependency
Allow cluster maintenance when channel is unavailable
2020-05-06 07:39:09 -07:00
John Gardiner Myers 843e5b9b16 Move GCEServiceAccount into CloudConfig 2020-05-03 20:35:32 -07:00
John Gardiner Myers 126c4c8d37 Allow cluster maintenance when channel is unavailable 2020-05-03 13:48:15 -07:00
Ole Markus With 4978932213 Make it possible to switch zone for an IG
* Ensure every master runs etcd
* Make it possible to remove masters
* "Cross" Validate on IG creation
2020-04-28 13:28:15 +02:00
Martin Tomes 462ca78f2a Import package aliases modified
Modified api -> kopsapi aliases of imports of k8s.io/kops/pkg/apis/kops
2020-04-17 16:55:08 +02:00
Justin Santa Barbara ffb6cd61aa Rolling-update validation harmonization
This is a follow-on to #8868; I believe the intent of that was to
expose the option to do more (or fewer) retries.

We previously had a single retry to prevent flapping; this basically
unifies the previous behaviour with the idea of making it
configurable.

* validate-count=0 effectively turns off validation.

* validate-count=1 will do a single validation, without flapping
  detection.

* validate-count>=2 will require N succesful validations in a row,
waiting ValidateSuccessDuration in between.

A nice side-effect of this is that the tests now explicitly specify
ValidateCount=1 instead of setting ValidateSuccessDuration=0, which
had the side effect of doing the equivalent to ValidateCount=1.
2020-04-17 01:40:02 -04:00
Ole Markus With d174faf116 Add some integration tests for cilium 2020-04-16 16:22:58 +02:00
Justin Santa Barbara 31bb16d4d1 Add context.Context to most signatures
The client-go signature for most methods adds a context.Context
object, and also makes Options mandatory.  Feed through a
context.Context through many of our methods (but use context.TODO to
stop it getting totally out of hand!)
2020-04-11 14:44:17 -04:00
Kubernetes Prow Robot 47b9b23a30
Merge pull request #8873 from justinsb/update_gomod_for_k8s_1_17
Update go.mod for k8s 1.17
2020-04-08 07:01:43 -07:00
Justin Santa Barbara dfb75b8f89 Skip GCE cloudprovider flag cloud-provider-gce-l7lb-src-cidrs
It isn't meaningful as a kops flag.
2020-04-08 08:52:34 -04:00
Jesse Haka 11eaacd53e validationtimes -> validationcount 2020-04-08 13:55:29 +03:00
Jesse Haka e1e79790ef validate cluster n times in rolling update 2020-04-08 13:55:24 +03:00
Peter Rifel fa2d64c3a3 Update expected outputs of terraform tests 2020-04-05 21:24:49 -05:00
eric-hole c59314a799 Adds some initial tests. Fixes some logic
Need to fix service account implementation first

Fixing tests and iterating on the serviceaccount logic

Run the gce_byo_sa test
2020-04-04 21:20:31 -07:00
eric-hole b3d65ffce0 Adds a gce-service-account flag so you BYO service-account
Generated code and some cleanup

Not sure where that code went

Tests for service account

fixes case on gceserviceaccount
2020-04-04 21:15:56 -07:00
Peter Rifel afd9aa1a4d Enable stamping on bazel image builds
Currently the images have a timestamp of epoch 0:

```
$ docker inspect kope/kops-controller:1.18.0-alpha.2 -f '{{ .Created }}'
1970-01-01T00:00:00Z
```

The `container_image` bazel rule [0] mentions that `creation_time` has a default value of 0 unless `stamp = True`, so this should be enabled on all container_image rules that are pushed to a docker registry.

[0] https://github.com/bazelbuild/rules_docker#container_image-1
2020-04-02 20:27:14 -05:00
Peter Rifel a0e1672cdc add terraform testing 2020-03-31 14:50:45 -05:00
Peter Rifel 54c3b2f69c Only check for bastion user data files in integration tests if they should exist 2020-03-31 09:40:55 -05:00
Peter Rifel db50663452 refactor integration tests 2020-03-31 07:34:16 -05:00
John Gardiner Myers b645dac752 Remove support for v1alpha1 and before 2020-03-24 19:49:15 -07:00
John Gardiner Myers d9e999d377 Convert TestMinimal_json to v1alpha2 API 2020-03-24 19:49:07 -07:00
Kubernetes Prow Robot 51e8563bd5
Merge pull request #8515 from hakman/validate-wait-consecutive
Wait for validation to succeed N consecutive times
2020-03-20 05:02:35 -07:00
eric-hole 31285f921b Adds a minimal GCE integration test 2020-03-17 01:19:49 -07:00
eric-hole c4daebfa8e Add lifecycleOverrides to runTestGCE 2020-03-17 01:01:26 -07:00
Kubernetes Prow Robot 4996383116
Merge pull request #8758 from hakman/launch-tepmplates-tests
Add LaunchTemplate integration tests
2020-03-16 09:34:43 -07:00
Ciprian Hacman 7398f9bd47 Add LaunchTemplate integration tests 2020-03-16 16:01:57 +02:00
John Gardiner Myers 2e920d75c1 Fix command descriptions to match new cluster validation behavior 2020-03-15 17:25:13 -07:00
eric-hole b52e322159 Adds metadata concealment addon for GCE node 2020-03-14 12:18:05 -07:00
John Gardiner Myers 33e23166e4 Support the kops.k8s.io/needs-update annotation on nodes 2020-03-09 22:43:09 -07:00
John Gardiner Myers b098e4c4c2 Fix punctuation 2020-03-02 19:11:12 -08:00
Ciprian Hacman e6076ee913 Fail validation if any consecutive validation fails 2020-03-02 18:33:49 +02:00
Kubernetes Prow Robot 92a8c1b0ed
Merge pull request #8573 from justinsb/fix_2881_option_2
Don't try to configure a bastion DNS name in gossip mode
2020-02-23 20:40:47 -08:00
Justin Santa Barbara 1e69835693
Don't try to configure a bastion DNS name in gossip mode
It can't be done anyway; instead we make it work (as far as we can),
and we document the workaround (which is to access it via the ELB DNS
name).

In future we could make it easier to discover this DNS name!

Issue #2881
2020-02-22 15:29:02 -05:00
Ciprian Hacman ad247a9c75 Wait for validation to succeed N consecutive times 2020-02-21 16:18:04 +02:00
Matt Ouille f025ff0e70
Add External Policies (AWS managed policy attachments) 2020-02-16 21:54:12 -08:00