Commit Graph

726 Commits

Author SHA1 Message Date
Kubernetes Prow Robot 7111ae164f
Merge pull request #10799 from rifelpet/kubetest2-pod-logs
kubetest2 - Dump all pod logs in addition to host logs
2021-02-11 20:52:47 -08:00
Peter Rifel 47b0551014
kubetest2 - Dump all pod logs in addition to host logs 2021-02-11 20:00:36 -06:00
Steven E. Harris d44612cc84 Capture outcome of "hack/update-expected.sh" run 2021-02-11 10:49:49 -05:00
Kubernetes Prow Robot 63baa5b579
Merge pull request #10752 from rifelpet/lifecycle-integration-test
Add overrides testing in lifecycle integration tests
2021-02-11 00:56:16 -08:00
Alexander Block 684ff3498e Add back "omitempty" to cloudformation SubnetMapping 2021-02-10 18:02:13 +01:00
Alexander Block 091a18a128 Add omitempty to Subnets and SubnetMappings for terraform and cloudformation 2021-02-10 10:29:48 +01:00
Peter Rifel e325d8b72a
Kubetest2 - Fix splitting of --create-args 2021-02-09 07:07:25 -06:00
Peter Rifel 144d038b76
Kubetest2 - Use a shell lexer for passing extra args to `create cluster`
This way any spaces within a quoted value wont cause the value to be broken up into multiple arguments.
The CentOS image in AWS has spaces in its name which is what exposed this issue.
2021-02-08 22:12:30 -06:00
Peter Rifel 9f5e225424
Add integration test for one external CLB being attached to multiple ASGs 2021-02-07 10:47:55 -06:00
Peter Rifel dd1ebb8b77
Add overrides support in lifecycle integration tests
This allows specific changes to be tested during an `update cluster --yes` and ensuring a subsequent `update cluster` dryrun correctly reports no changes.

To specify changes, create a cluster.overrides.txt or instancegroup.<name>.overrides.txt file in the update_cluster integration test's directory.
Each line is a field=value format, each batch of changes is separated by a `---` line.
Each batch will be ran through `update cluster --yes`
2021-02-06 23:18:15 -06:00
Alexander Block 49e7ec8890 Use SubnetMappings for NLBs instead of Subnets
SubnetMappings allow to explicitely set the private IPv4 address that
must be used for the NLB.

SubnetMappings and Subnets in the AWS API are compatible as long as the
address settings are not changes, making this commit backwards compatible.
2021-02-05 17:53:20 +01:00
Ole Markus With 364b0ce9bf Fix additional tests 2021-02-04 18:22:40 +01:00
Ole Markus With dd035fa2bc Revert "Set IMDSv2 to "required" only for new clusters"
This reverts commit 12cb288df1.
2021-02-04 17:57:35 +01:00
Ole Markus With a4c36af9de Revert "Increse imdv2 hop limit on control plane nodes"
This reverts commit 4e00e29fc3.
2021-02-04 17:57:23 +01:00
Peter Rifel 2787218fa6
Update the skipped tests in the upgrade job to help the test stage pass
We'll look into these failures separately but for now we just want to get to the upgrade process
2021-02-02 12:09:52 -06:00
Peter Rifel 1ce2352646
Fix create args for upgrade test 2021-02-02 09:16:13 -06:00
Peter Rifel dd41a2f8fe
Update upgrade test to use 1.18->1.19 2021-02-02 07:41:45 -06:00
Peter Rifel 72ae782c04
Dont overwrite default feature flags when appending more flags 2021-02-01 12:27:33 -06:00
Peter Rifel 044cba7a7a
Kubetest2 - refactor how `kops create cluster` arguments are set
This allows kubetest's --create-args to take precedence over arguments we were otherwise hardcoding.
Specifically this will be used to hardcode the list of zones for some prow jobs with `--create-args="--zones us-east-1a"`.
2021-02-01 12:27:19 -06:00
Peter Rifel 942c48c04b
Remove unnecessary --networking flag from kubetest2.
this can be specified in --create-args
2021-02-01 12:27:18 -06:00
Ole Markus With 4e00e29fc3 Increse imdv2 hop limit on control plane nodes
Non-hostNetworking fails to talk to the instance metadata otherwise. Breaking e.g CSI controller
2021-01-31 19:35:07 +01:00
Ciprian Hacman 46aa146b31 Add integration tests for older Kubernetes versions 2021-01-29 14:33:36 +02:00
Ciprian Hacman 12cb288df1 Set IMDSv2 to "required" only for new clusters 2021-01-29 14:07:52 +02:00
Ciprian Hacman f8d3b76556 Default IMDSv2 to "optional" for AWS 2021-01-29 14:02:14 +02:00
Kubernetes Prow Robot 3d39be7721
Merge pull request #10661 from hakman/etcd-manager-defaults
Update AWS etcd-manager volumes defaults
2021-01-28 22:01:41 -08:00
Peter Rifel accbf7986d
kubetest2 - Use --ssh-user to dump logs 2021-01-28 19:45:06 -06:00
Ciprian Hacman bcc3c98cfb Bump Ubuntu images for AWS and GCE 2021-01-28 08:31:59 +02:00
Ciprian Hacman 5fcd4e4b28 Allow attaching same external load balancer to multiple instance groups 2021-01-27 16:25:39 +02:00
Ciprian Hacman 4c5d7ddabf Remove workaround for volume throughput when using Terraform 2021-01-27 06:33:15 +02:00
Ciprian Hacman ca408f7e8f Set default volume type to "gp3" for etcd-manager volumes in AWS 2021-01-27 06:23:27 +02:00
Ciprian Hacman fcea4f5b08 Set default volume encryption to "true" for etcd-manager volumes in AWS 2021-01-26 11:29:27 +02:00
Peter Rifel cf12fe4efd
Support additional feature flags specified via --env=KOPS_FEATURE_FLAGS=foo 2021-01-25 21:50:30 -06:00
Peter Rifel 39537d7190
Add --create-args kubetest2 flag
This allows us to customize the images, instance types, etc.

kubetest (1) named this --kops-args, I think --create-args is more appropriate because its only passed to `create cluster`
2021-01-25 20:48:38 -06:00
Justin SB 1d76a15f69 Set the tcp_rmem sysctl in bootstrap script
This ensures that we're using our settings for downloading nodeup
itself and any assets that nodeup downloads.  This is a workaround for
reported problems with the initial download on some kernels otherwise.

Issue #10206
2021-01-24 21:50:45 -05:00
Peter Rifel 6114c4fbfa
Use the same package marker for kubectl as for e2e binary 2021-01-23 19:21:47 -06:00
Kubernetes Prow Robot c3eda853a8
Merge pull request #10646 from rifelpet/kubetest-upgrade
Update kubetest2 library
2021-01-23 10:53:39 -08:00
Peter Rifel f492f3d82e
Update kubetest2 library
This picks up the --test-package-marker support used by the kops grid jobs
2021-01-23 12:10:53 -06:00
Kubernetes Prow Robot 3d03968083
Merge pull request #10622 from srikiz/DO-SupportCorrectRegions
[Digital Ocean] Add SFO3 region. Also update e2e tests to use full list of supported zones
2021-01-22 11:15:27 -08:00
srikiz dd5c386564 Fix trailing characters 2021-01-22 22:44:36 +05:30
srikiz bbe692486d Revert go.mod and go.sum 2021-01-22 21:19:30 +05:30
srikiz b04af61a4b Add SFO3 region for DO. Also update e2e tests to use the full list of supported zones 2021-01-22 21:19:30 +05:30
Peter Rifel 9e0bd463ad
Fix phony make target for setting up kubetest2 2021-01-22 07:04:23 -06:00
Kubernetes Prow Robot 7c93c3e7b1
Merge pull request #10632 from hakman/kubetest2-validation-timeout
kubetest2 - increase validation timeout for the upgrade scenario
2021-01-21 22:49:28 -08:00
Ciprian Hacman f124a19740 kubetest2 - increase validation timeout for the upgrade scenario 2021-01-22 07:35:19 +02:00
Kubernetes Prow Robot a466832896
Merge pull request #10631 from rifelpet/kubetest-upgrade
Fix unbound variable in upgrade scenario script
2021-01-21 18:25:26 -08:00
Peter Rifel 17eed0ead2
Fix unbound variable in upgrade scenario script 2021-01-21 14:58:02 -06:00
Kubernetes Prow Robot 43d294f4bd
Merge pull request #10628 from rifelpet/kubetest-upgrade
Ensure SpecOverrideFlag is set in upgrade test
2021-01-21 10:03:03 -08:00
Peter Rifel aa47981f07
Ensure SpecOverrideFlag is set in upgrade test 2021-01-21 11:21:43 -06:00
Kubernetes Prow Robot def4bcffa6
Merge pull request #10626 from rifelpet/kubetest-upgrade
kubetest2 - update the skip regex for the upgrade scenario
2021-01-21 04:57:01 -08:00
Peter Rifel 127d3bb712
kubetest2 - update the skip regex for the upgrade scenario 2021-01-21 06:17:37 -06:00
Ciprian Hacman d889d61ddb Set default IMDS v2 to "required" for instances in AWS 2021-01-21 11:35:41 +02:00
Ciprian Hacman c8a9b2fb3e Set default volume encryption to "true" for instances in AWS 2021-01-21 11:27:02 +02:00
Ciprian Hacman 18bb14ffed Set default volume type to "gp3" for instances in AWS 2021-01-21 11:27:02 +02:00
Peter Rifel 6da7c2ac33
kubetest 2 - fix parsing of k8s version semver values
it turns out "v1.2.3" parses as a URL, so try parsing values as a semver first before URL
2021-01-20 21:46:27 -06:00
Peter Rifel 631e0fe235
Add support for specifying a kubernetes version marker file 2021-01-20 19:18:55 -06:00
Peter Rifel c5664f7363
kubetest2 upgrade script - PATH needs to be a directory
another attempt at fixing https://prow.k8s.io/view/gcs/kubernetes-jenkins/logs/e2e-kops-aws-misc-upgrade/1351855654456791040
2021-01-20 06:21:24 -06:00
Peter Rifel 90a15a7977
Set --ssh-{private,public}-key-path defaults in all kubetest2-kops commands
Previously the default was only used in invocations using --up.
2021-01-19 22:10:01 -06:00
Peter Rifel 9e6218bcb4
Use kops binary built by kubetest2-kops in upgrade script 2021-01-19 22:07:11 -06:00
Kubernetes Prow Robot 53c80ebae3
Merge pull request #10602 from justinsb/terraform_renamed
Require KOPS_TERRAFORM_0_12_RENAMED, to guard against tf breakage
2021-01-19 00:05:46 -08:00
Ciprian Hacman 3799d135a3 Fix tests and spelling 2021-01-19 09:06:02 +02:00
Peter Rifel c2bfc3b2ac
update skip listo 2021-01-18 22:39:58 -06:00
Peter Rifel 9b7f3fb54e
Use calico in upgrade test 2021-01-18 21:37:59 -06:00
Peter Rifel 18c684590f
Temporarily set kops-version-marker on presubmit job
This should have kubetest use the kops binary and base url used in periodic jobs rather than building it using the PR's HEAD
2021-01-18 21:37:59 -06:00
Peter Rifel 2235496423
revert kubernetes version marker support in upgrade test 2021-01-18 21:33:10 -06:00
Peter Rifel 3d31c1aa11
Add --kops-version-marker for specifying an existing kops version to download
This allows us to use kubetest2-kops in periodic jobs without rebuilding kops every time
2021-01-18 21:33:10 -06:00
Peter Rifel 0ca76f91f8
Move http utils to pkg/util 2021-01-18 21:11:02 -06:00
Peter Rifel 3f0fb7f80d
Only require --kubernetes-version for --up not --test 2021-01-18 20:57:47 -06:00
Peter Rifel 2d365b4543
Add --networking flag 2021-01-18 20:56:52 -06:00
Kubernetes Prow Robot 470ff01ec0
Merge pull request #10600 from rifelpet/kubetest-upgrade
Provide required --kubernetes-version flags to kubetest2-kops --up
2021-01-18 08:59:44 -08:00
Peter Rifel 6f2260bee4
Provide required --kubernetes-version flags to kubetest2-kops --up
Also use version markers rather than hard-coded patch versions

Also dropping the --kubenretes-version requirement for kubetest2-kops --test because it is never used. Initially I was thinking we could use it to determine the e2e.test version to pull down but the ginkgo tester has its own --test-package-* flags for that. Perhaps in the future we can consolidate them into just the --kubernetes-version flag

Hoping to fix this periodic job: https://prow.k8s.io/view/gcs/kubernetes-jenkins/logs/e2e-kops-aws-misc-upgrade/1351188585260257280

```
 Error: missing required --kubernetes-version flag
```

No
2021-01-18 10:19:28 -06:00
Barry Melbourne 337c9c4c66 Set default container runtime to containerd 2021-01-16 14:55:35 +00:00
Ciprian Hacman b0cb0c77d4 Update integration tests for "update cluster" 2021-01-15 15:51:02 +02:00
Ciprian Hacman 19514f431c Update integration tests for "create cluster" 2021-01-15 15:40:33 +02:00
Ciprian Hacman 65ebf4760d Update integration test for gp3 with etcd volumes 2021-01-15 09:53:10 +02:00
Ciprian Hacman e20900a2de Add CF integration test for gp3 volumes 2021-01-15 09:53:10 +02:00
Kubernetes Prow Robot d441149cd0
Merge pull request #10575 from srikiz/DO-Add-E2E-Tests
[DigitalOcean] add e2e tests
2021-01-14 06:39:04 -08:00
Ole Markus With afbd057286 Use consistent naming for the remaining SGRs 2021-01-14 12:57:33 +01:00
Srikanth Rao 6eda2a4d7f
Update tests/e2e/kubetest2-kops/do/zones.go
Co-authored-by: Peter Rifel <rifelpet@users.noreply.github.com>
2021-01-14 13:40:05 +05:30
Peter Rifel 59c312ff5f
Give kubetest2 its own makefile
Use GOOS and GOARCH for running the kops binary

Also try deploying and testing against k8s 1.20.2
2021-01-13 21:59:15 -06:00
srikiz d2aa454465 Add zones for DO 2021-01-14 01:24:50 +05:30
Kubernetes Prow Robot 8e5f71702d
Merge pull request #10559 from rifelpet/kubetest2-tester
kubetest2 - Add manifest template support
2021-01-13 10:50:36 -08:00
Kubernetes Prow Robot 09bf333433
Merge pull request #10567 from rifelpet/nlb-listener-order
Fix NLB listener -> target group association for TF & CF
2021-01-13 01:04:35 -08:00
Peter Rifel 580d73bdc7
Fix NLB listener -> target group association for TF & CF
The old code made the incorrect assumption that the NLB's list of TargetGroup tasks is in the same order as the NLB's list of listeners for their associations.
Because the model adds them in opposite orders this resulted in the TLS listener being forwarded to the TCP TG and vice versa.

This updates the terraform and cloudformation generation code to search the NLB's list of target groups by name for the target group that should be associated with the listener.
This matches the logic used in the "direct" target.
2021-01-12 23:21:55 -06:00
Peter Rifel 2cff487a6d
export admin credentials after creating cluster 2021-01-12 22:52:09 -06:00
Peter Rifel cef43d2002
Use kops create -f for creating clusters via manifest 2021-01-12 19:58:58 -06:00
Bharath Vedartham a8d709acf2 Default cgroup driver to systemd from k8s 1.20
Currently, kOps uses cgroupfs cgroup driver for the kubelet and CRIs. This PR defaults
the cgroup driver to systemd for clusters created with k8s versions >= 1.20.

Using systemd as the cgroup-driver is the recommended way as per
https://kubernetes.io/docs/setup/production-environment/container-runtimes/
2021-01-12 20:39:25 +05:30
Peter Rifel 196e678205
kubetest2 - Add manifest template support
I'm updating the test-e2e make target as I go to make the presubmit job use it but soon I'll work on how we'll actually configure and invoke kubetest2 from our variety of jobs
2021-01-11 21:53:21 -06:00
Peter Rifel f671acc5d6
Use anonymous struct for wrapping ginkgo.Tester 2021-01-10 18:41:40 -06:00
Peter Rifel 720dcb6428
Add troubleshooting statements 2021-01-10 18:41:40 -06:00
Peter Rifel 5074f327a2
Ensure pretestSetup is ran
I was wrapping the ginkgo tester functions in a way that pretestSetup was never actually being called
2021-01-10 11:34:40 -06:00
Peter Rifel 1ffc565526
Fix kubectl PATH element, add logging verbosity 2021-01-10 11:18:38 -06:00
Peter Rifel 17468d496f
Kubetest2 - use our own tester that wraps kubetest2's ginkgo tester
This allows us to share tester flags (package version and bucket) for downloading kubectl while passing them to the ginkgo tester
2021-01-09 23:44:26 -06:00
Kubernetes Prow Robot 7df2521a09
Merge pull request #10523 from justinsb/test_upgrade
Simple upgrade test using kubetest2 framework
2021-01-09 15:51:05 -08:00
Justin Santa Barbara 116f81c5c9 Simple upgrade test using kubetest2 framework
Starting very simple and hard-coded!

Co-authored-by: Peter Rifel <rifelpet@users.noreply.github.com>
2021-01-09 17:06:08 -05:00
Justin Santa Barbara b04b5f556c kubetest2: support specifying admin-access value
Otherwise I was getting my IPv6 address, which doesn't work well.
2021-01-09 13:12:37 -05:00
srikiz d0d41fa649 Rebase deployer changes 2021-01-09 00:45:29 +05:30
srikiz 6e507478b5 Add DO for e2e tests 2021-01-08 23:58:19 +05:30
Ole Markus With 2b3a8f133e Add control-plane node role annotation to cp nodes
Update docs/releases/1.20-NOTES.md

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2021-01-08 12:39:42 +01:00
Kubernetes Prow Robot 0ca0e38518
Merge pull request #10424 from rifelpet/ebs-tf-012
Don't allow ebs volume TF resource names to begin with digit
2021-01-05 09:19:58 -08:00
Kubernetes Prow Robot 2e202badc5
Merge pull request #10361 from hakman/single-az-multi-master
Prefix etcd cluster names with letters
2021-01-05 07:51:58 -08:00