Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Kubernetes 1.24 #57

Merged
merged 9 commits into from
Jul 25, 2022
Merged

Support Kubernetes 1.24 #57

merged 9 commits into from
Jul 25, 2022

Conversation

masa213f
Copy link
Contributor

@masa213f masa213f commented Jul 21, 2022

#55
Support Kubernetes 1.24 and update dependencies.

  • Update go modules.
    • Update ginkgo to v2
  • Update build and test tools.
    • Stop using nilerr.
  • Update actions.
  • Build with go 1.18

And I update e2e test due to the following change in k8s 1.24.

https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.24.md#urgent-upgrade-notes

The LegacyServiceAccountTokenNoAutoGeneration feature gate is beta, and enabled by default. When enabled, Secret API objects containing service account tokens are no longer auto-generated for every ServiceAccount. Use the TokenRequest API to acquire service account tokens, or if a non-expiring token is required, create a Secret API object for the token controller to populate with a service account token by following this guide.

Signed-off-by: Masayuki Ishii [email protected]

masa213f added 4 commits July 21, 2022 04:24
Signed-off-by: Masayuki Ishii <[email protected]>
Signed-off-by: Masayuki Ishii <[email protected]>
Signed-off-by: Masayuki Ishii <[email protected]>
Signed-off-by: Masayuki Ishii <[email protected]>
@masa213f masa213f self-assigned this Jul 21, 2022
@masa213f masa213f changed the title Update go modules Support Kubernetes 1.24 Jul 21, 2022
@@ -74,9 +73,9 @@ check-generate:
.PHONY: envtest
envtest: setup-envtest
source <($(SETUP_ENVTEST) use -p env); \
TEST_CONFIG=1 go test -v -count 1 -race ./pkg/config -ginkgo.progress -ginkgo.v -ginkgo.failFast
TEST_CONFIG=1 go test -v -count 1 -race ./pkg/config -ginkgo.progress -ginkgo.v -ginkgo.fail-fast
Copy link
Contributor Author

@masa213f masa213f Jul 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ginkgo said as follows.

--ginkgo.failFast is deprecated, use --ginkgo.fail-fast instead
Learn more at:https://onsi.github.io/ginkgo/MIGRATING_TO_V2#changed-command-line-flags

masa213f added 4 commits July 21, 2022 12:21
Signed-off-by: Masayuki Ishii <[email protected]>
Signed-off-by: Masayuki Ishii <[email protected]>
Signed-off-by: Masayuki Ishii <[email protected]>
@masa213f masa213f marked this pull request as ready for review July 21, 2022 12:41
go.mod Show resolved Hide resolved
e2e/e2e_test.go Outdated
// some ServiceAccounts that have been created before the upgrade might have the secrets field.
// In this case, accurate should not copy the field.
kubectlSafe(serviceAccountWithDummySecretsYAML, "apply", "-f", "-")
Consistently(func() error {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The creation of sn1/test should be waited with Eventually().
This Consistently() can fail if the creation of sn1/test ServiceAccount is delayed.
As far as I know kubectl apply above is synchronous only for subroot1/test, not for sn1/test.

Once sn1/test is created, it would be enough to check the contents of the ServiceAccount just once because we know that the ServiceAccount is created atomically.
To test the stability of sn1/test seems excess for me.

You can check the contents even inside Eventually() as done in the previous It().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Consistently() can fail if the creation of sn1/test ServiceAccount is delayed.

Thank you. That's true. If the test machine has low spec, this test may be fail.
I'll use Eventually().

Signed-off-by: Masayuki Ishii <[email protected]>
Copy link

@morimoto-cybozu morimoto-cybozu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@kmdkuk kmdkuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@masa213f masa213f merged commit fd6475e into main Jul 25, 2022
@masa213f masa213f deleted the k8s-1.24 branch July 25, 2022 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants