Commit Graph

1449 Commits

Author SHA1 Message Date
Matt Moyer f69d095a69
Merge pull request #515 from mattmoyer/bump-kube-deps-1.20.5
Upgrade Kubernetes runtime libraries to v1.20.5.
2021-03-22 08:30:53 -07:00
Matt Moyer 1e7f2c7735
Upgrade Kubernetes runtime libraries to v0.20.5.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-22 09:33:29 -05:00
Andrew Keesler 9af75d23fb
Merge pull request #514 from enj/enj/i/whoami_ctx
pinniped whoami: print correct cluster info when --kubeconfig-context is used
2021-03-22 09:22:45 -04:00
Monis Khan 964d4889c4
pinniped whoami: print correct cluster info when --kubeconfig-context is used
Signed-off-by: Monis Khan <mok@vmware.com>
2021-03-19 18:42:40 -04:00
Mo Khan 50e4531215
Merge pull request #505 from enj/enj/i/jwt-go_cve
Move to github.com/form3tech-oss/jwt-go
2021-03-18 19:34:19 -04:00
Monis Khan d162cb9adf
Move to github.com/form3tech-oss/jwt-go
Signed-off-by: Monis Khan <mok@vmware.com>
2021-03-18 16:56:04 -04:00
Ryan Richard 08c446a3e1 Use openssl to generate the test user password instead of /dev/urandom
Because it's more portable across different operating systems and
it is already pre-installed on MacOS.
2021-03-18 11:20:33 -07:00
Andrew Keesler a36914f5ca
Merge pull request #476 from ankeesler/whoami-cli
cmd/pinniped: add whoami cli command
2021-03-18 09:46:48 -04:00
Andrew Keesler cc8f0b623c
test/integration: add pinniped whoami tests
Signed-off-by: Andrew Keesler <akeesler@vmware.com>
2021-03-18 08:56:35 -04:00
Andrew Keesler de6837226e
cmd/pinniped: add whoami command
Signed-off-by: Andrew Keesler <akeesler@vmware.com>
2021-03-18 08:56:34 -04:00
Matt Moyer 3a32833306
Merge pull request #503 from mattmoyer/rework-restart-assertions-helper
Rework integration test assertions for pod restarts.
2021-03-17 14:38:39 -07:00
Matt Moyer 74df6d138b
Memoize library.IntegrationEnv so it's only constructed once per test.
This is probably a good idea regardless, but it also avoids an infinite recursion from IntegrationEnv() -> assertNoRestartsDuringTest() -> NewKubeclient() -> IntegrationEnv() -> ...

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-17 13:37:48 -05:00
Matt Moyer 0dd2b358fb
Extend assertNoRestartsDuringTest to dump logs from containers that restarted.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-17 13:37:47 -05:00
Matt Moyer 6520c5a3a1
Extend library.DumpLogs() to dump logs from the previous container, if one exists.
This is important in case the container has crashed and has been restarted.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-17 11:46:40 -05:00
Matt Moyer 5a43a5d53a
Remove library.AssertNoRestartsDuringTest and make that assertion implicit in library.IntegrationEnv.
This means we (hopefully) can't forget to include these assertions in any integration test.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-17 11:18:10 -05:00
Matt Moyer d85135c12e
Merge pull request #501 from mattmoyer/deflake-get-category-test
Improve the reliability of TestGetPinnipedCategory.
2021-03-16 16:18:22 -07:00
Matt Moyer 30a392b900
Improve the reliability of TestGetPinnipedCategory.
This test could flake in some rare scenarios. This change adds a bunch of retries, improves the debugging output if the tests fail, and puts all of the subtests in parallel which saves ~10s on my local machine.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-16 17:39:02 -05:00
Mo Khan 4ab3c64b70
Merge pull request #500 from mattmoyer/deflake-cert-rotation-test
Make TestAPIServingCertificateAutoCreationAndRotation more reliable.
2021-03-16 17:03:07 -04:00
Matt Moyer 2515b2d710
Make TestAPIServingCertificateAutoCreationAndRotation more reliable.
This test has occasionally flaked because it only waited for the APIService GET to finish, but did not wait for the controller to successfully update the target object.

The new code should be more patient and allow the controller up to 10s to perform the expected action.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-16 15:14:24 -05:00
Matt Moyer 2319606cd2
Fix some nits from the previous commit that I accidentally merged before fixing.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-16 14:24:13 -05:00
Matt Moyer 10168ab2e7
Merge pull request #499 from vmware-tanzu/add-anon-auth-capability
Describe "anonymousAuthenticationSupported" test cluster capability and add more managed cluster types.
2021-03-16 12:21:47 -07:00
Matt Moyer c5b784465b
Describe "anonymousAuthenticationSupported" test cluster capability and add more managed cluster types.
This new capability describes whether a cluster is expected to allow anonymous requests (most do since k8s 1.6.x, but AKS has it disabled).

This commit also contains new capability YAML files for AKS and EKS, mostly to document publicly how we expect our tests to function in those environments.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-16 13:54:29 -05:00
Ryan Richard ab6452ace7 Remove linting from pre-commit because it is slow and messes up GoLand
It seems to confusing committing in the GoLand IDE.
2021-03-15 16:25:45 -07:00
Matt Moyer c46aa1c29d
Merge pull request #490 from vmware-tanzu/dependabot/docker/golang-1.16.2
Bump golang from 1.16.1 to 1.16.2
2021-03-15 15:08:03 -07:00
dependabot[bot] e64f2fe7fb
Bump golang from 1.16.1 to 1.16.2
Bumps golang from 1.16.1 to 1.16.2.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-15 19:55:44 +00:00
Matt Moyer 035362f4d3
Merge pull request #494 from vmware-tanzu/dependabot/go_modules/k8s.io/klog/v2-2.8.0
Bump k8s.io/klog/v2 from 2.6.0 to 2.8.0
2021-03-15 12:54:46 -07:00
dependabot[bot] c2b0acf241
Bump k8s.io/klog/v2 from 2.6.0 to 2.8.0
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.6.0 to 2.8.0.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/master/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.6.0...v2.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-15 17:36:36 +00:00
Matt Moyer dc96f398da
Merge pull request #497 from mattmoyer/ignore-local-user-authenticator-coverage
Ignore test coverage for local-user-authenticator.
2021-03-15 08:46:28 -07:00
Matt Moyer 755a87cdbb
Ignore test coverage for local-user-authenticator.
This should ignore coverage changes in this test-only component, using the syntax described here: https://docs.codecov.io/docs/ignoring-paths.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-15 10:43:17 -05:00
Matt Moyer c538a4e8e8
Merge pull request #495 from mattmoyer/add-golangci-lint-to-pre-commit-hooks
Add golangci-lint to .pre-commit-config.yaml.
2021-03-15 08:23:09 -07:00
Matt Moyer 41949d8e07
Add golangci-lint to .pre-commit-config.yaml.
This is the configuration for https://pre-commit.com/, which now also runs golangci-lint using the same version as CI (currently v1.33.0).

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-15 10:20:59 -05:00
Matt Moyer d5beba354b
Merge pull request #487 from vmware-tanzu/dependabot/docker/golang-1.16.1
Bump golang from 1.16.0 to 1.16.1
2021-03-11 16:12:07 -08:00
dependabot[bot] ad3f04a982
Bump golang from 1.16.0 to 1.16.1
Bumps golang from 1.16.0 to 1.16.1.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-11 22:25:17 +00:00
Pablo Schuhmacher 1af25552a0
Update ROADMAP.md 2021-03-11 13:58:34 -08:00
Matt Moyer 3449b896d6
Merge pull request #488 from mattmoyer/add-retries-for-supervisor-discovery-tests
Add retries to TestSupervisorTLSTerminationWithSNI and TestSupervisorOIDCDiscovery.
2021-03-11 12:22:22 -08:00
Matt Moyer e98c6dfdd8
Add retries to TestSupervisorTLSTerminationWithSNI and TestSupervisorOIDCDiscovery.
These tests occasionally flake because of a conflict error such as:

```
    supervisor_discovery_test.go:105:
        	Error Trace:	supervisor_discovery_test.go:587
        	            				supervisor_discovery_test.go:105
        	Error:      	Received unexpected error:
        	            	Operation cannot be fulfilled on federationdomains.config.supervisor.pinniped.dev "test-oidc-provider-lvjfw": the object has been modified; please apply your changes to the latest version and try again
        	Test:       	TestSupervisorOIDCDiscovery
```

These retries should improve the reliability of the tests.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-11 13:18:15 -06:00
Matt Moyer c14621428f
Merge pull request #485 from vmware-tanzu/pabloschuhmacher-patch-2
Create ROADMAP.md
2021-03-10 12:43:55 -08:00
Pablo Schuhmacher 876f0a55d8
Create ROADMAP.md in actual markdown
fixed the random html generated when converting the google doc to markdown
2021-03-09 18:41:40 -08:00
Matt Moyer eef1fd0c64
Merge pull request #481 from vmware-tanzu/dependabot/go_modules/github.com/ory/fosite-0.39.0
Bump github.com/ory/fosite from 0.38.0 to 0.39.0
2021-03-09 07:51:27 -06:00
dependabot[bot] b2be83ee45
Bump github.com/ory/fosite from 0.38.0 to 0.39.0
Bumps [github.com/ory/fosite](https://github.com/ory/fosite) from 0.38.0 to 0.39.0.
- [Release notes](https://github.com/ory/fosite/releases)
- [Changelog](https://github.com/ory/fosite/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ory/fosite/compare/v0.38.0...v0.39.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-09 05:50:01 +00:00
Matt Moyer eac108aee5
Merge pull request #478 from vmware-tanzu/prepare-script-macos-big-sur
Fix hack/prepare-for-integration-tests.sh for MacOS Big Sur
2021-03-08 10:02:52 -06:00
Margo Crawford 4bd68b1fa1 Use LC_ALL=C instead of LC_CTYPE=C because it works on Big Sur
It also works on the slightly older MacOS Catalina.
This script is only used on development laptops, so hopefully
this will work for more laptop OS's now.

Signed-off-by: Ryan Richard <richardry@vmware.com>
2021-03-05 15:25:52 -08:00
Matt Moyer 832bc2726e
Merge pull request #477 from vmware-tanzu/dependabot/go_modules/github.com/google/go-cmp-0.5.5
Bump github.com/google/go-cmp from 0.5.4 to 0.5.5
2021-03-05 08:20:51 -06:00
dependabot[bot] 3833ba0430
Bump github.com/google/go-cmp from 0.5.4 to 0.5.5
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.4...v0.5.5)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-05 05:59:54 +00:00
Matt Moyer f99c186c55
Merge pull request #475 from vmware-tanzu/dependabot/go_modules/k8s.io/klog/v2-2.6.0
Bump k8s.io/klog/v2 from 2.5.0 to 2.6.0
2021-03-04 10:04:08 -06:00
dependabot[bot] 14b8def320
Bump k8s.io/klog/v2 from 2.5.0 to 2.6.0
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/master/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.5.0...v2.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-04 06:10:36 +00:00
Mo Khan 4f700d4811
Merge pull request #473 from enj/enj/r/oidc_discovery_json
oidc discovery: encode metadata once and reuse
2021-03-03 14:12:33 -05:00
Monis Khan d7edc41c24
oidc discovery: encode metadata once and reuse
Signed-off-by: Monis Khan <mok@vmware.com>
2021-03-03 13:37:43 -05:00
Matt Moyer aa826a1579
Merge pull request #472 from mattmoyer/deflake-getpinnipedcategory-test
Make TestGetPinnipedCategory and TestKubeClientOwnerRef tests more resilient.
2021-03-02 16:42:23 -06:00
Matt Moyer df27c2e1fc
Use randomly generated API groups in TestKubeClientOwnerRef.
I think this is another aspect of the test flakes we're trying to fix. This matters especially for the "Multiple Pinnipeds" test environment where two copies of the test suite are running concurrently.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-03-02 15:48:13 -06:00