Commit Graph

1073 Commits

Author SHA1 Message Date
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
Justin SB 46c8cc6d86 makefile: use more hash helpers when building images
It's cleaner & more consistent.
2020-02-16 13:10:31 -05:00
John Gardiner Myers 8844b97fe3 Fix field names in api validation 2020-02-15 14:52:27 -08:00
John Gardiner Myers 323130ebbf Merge branch 'master' into validate-multiple 2020-02-10 09:05:47 -08:00
Justin SB 0cb35638f2
Stop logging to /var/log/kops-controller.log
Writing to a hostPath from a non-root container requires file
ownership changes, which is difficult to roll out today.  See
discussion in #8454

We were primarily using the logfile for e2e diagnostics, so we're
going to look into collecting the information via other means instead.

We also haven't yet shipped this logfile in a released version (though
we have shipped it in beta releases)
2020-02-04 06:41:25 -05:00
Kubernetes Prow Robot b9623543ba
Merge pull request #7319 from lcrisci/fix-template-clustername-behavior
Fix template clusterName behavior
2020-01-28 08:23:40 -08:00
John Gardiner Myers 8f6529879b Return more errors at once during InstanceGroup validation 2020-01-28 08:22:44 -08:00
Kubernetes Prow Robot 34caaf2d82
Merge pull request #8145 from mccare/gce-terraform-json-output
Enabling JSON output for Terraform instead of writing the HCL syntax …
2020-01-22 22:16:48 -08:00
Peter Rifel 3f8c85c7e4 Add a warning when using file:// state store 2020-01-17 16:45:08 -06:00
Christian van der Leeden 549f54de48 Enabling JSON output for Terraform instead of writing the HCL syntax tf file. JSON syntax is officially supported in 0.12 and a terraform version requirement will be set. For previous installations you need to delete the .tf file by hand. JSON generation will fail if kubernetes.tf is present.
Added Integration Test using minimal test setup

Added documentation. For terraform 0.12 support the resource names need to be changed still
2020-01-17 22:03:19 +01:00
Justin Santa Barbara a8831b5df0
Move kubectl dependency to k8s.io/kubectl
Helps pare down our dependency on kubernetes/kubernetes
2020-01-17 06:24:24 -05:00
Austin Moore 4a88f7b5a5
Add ability to specify no ssh key by setting sshKeyName to empty
Add tests for no ssh key functionality

Add docs for setting no ssh key

Disable sshKey rendering for cloudformation if nosshkey is set

Fix broken test

make goimports

Fix

Formatting fix

Update kubernetes version for tests

Update expected test output

Fix imports in mesh.pb.go

Run hack/update-expected.sh

Change digital ocean logic to handle *string for SSHKeyName

Fix expected output

Missed a few
2020-01-15 15:24:32 -05:00
Nicolas Vanheuverzwijn 8d3df18a51 test: fix integration test to always include bastion userdata 2020-01-13 15:53:13 -05:00
Justin SB cf5c53c87d
Add tests for manifest normalization
(The tests are split out for easier cherry-picking, should we choose to)
2020-01-11 22:41:18 -05:00
Kubernetes Prow Robot 6cf867198f
Merge pull request #7914 from joshbranham/remove-disabling-darwin-cgos
Remove forcing disabled cgos Darwin
2020-01-06 00:23:41 -08:00
Kubernetes Prow Robot 121d9f461f
Merge pull request #7909 from johngmyers/remove-drain-feature-flag
Remove DrainAndValidateRollingUpdate feature flag
2020-01-05 11:15:40 -08:00
Peter Rifel 21c5a82ed3 Update mock kops version 2020-01-03 08:17:02 -06:00
tanjunchen 6d584b63d6 cmd/kops/ staticcheck and remove one mom 2019-12-31 14:23:30 +08:00
Ciprian Hacman 4c4400c5f3 Add code simplifications for staticheck 2019-12-30 17:40:24 +02:00
vvbogdanov87@gmail.com 607666228b Fix typo 2019-12-28 15:50:12 +08:00