Skip to content

Fix Kubernetes version detection on EKS#19188

Merged
hugoShaka merged 8 commits intomasterfrom
hugo/fix-kube-join-eks
Dec 8, 2022
Merged

Fix Kubernetes version detection on EKS#19188
hugoShaka merged 8 commits intomasterfrom
hugo/fix-kube-join-eks

Conversation

@hugoShaka
Copy link
Copy Markdown
Contributor

This PR fixes a bug introduced in the kubernetes join method.

EKS is not formatting version.Minor as an integer, (e.g. I got 23+). It is not possible to reliably parse this field and this blocks nodes from joining.

Comment thread lib/auth/join_kubernetes.go Outdated
Co-authored-by: Noah Stride <noah.stride@goteleport.com>
Comment thread lib/kubernetestoken/token_validator_test.go Outdated
userInfo, err := a.kubernetesTokenValidator.Validate(ctx, req.IDToken)
if err != nil {
return trace.Wrap(err)
return trace.WrapWithMessage(err, "failed to validate the Kubernetes token")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

funny, I've never seen trace.WrapWithMessage before, probably since regular trace.Wrap lets you include a message already. I guess it avoids 2 checks when you already know err != nil && len(args) > 0. TIL

@github-actions github-actions Bot removed the request for review from LKozlowski December 8, 2022 17:35
@hugoShaka hugoShaka enabled auto-merge (squash) December 8, 2022 18:09
@hugoShaka hugoShaka merged commit 1babd9d into master Dec 8, 2022
@hugoShaka hugoShaka deleted the hugo/fix-kube-join-eks branch December 8, 2022 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants