This repository has been archived by the owner on Mar 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This enables our e2e tests to work w/ Kubernetes 1.24 which no longer implicitly creates the Secret when the ServiceAccount is created
nathancoleman
added
the
pr/no-changelog
Skip the CI check that requires a changelog entry
label
Sep 27, 2022
nathancoleman
commented
Sep 27, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal review
Comment on lines
-260
to
-275
serviceAccount := core.ServiceAccount{} | ||
if err := client.Resources().Get(ctx, account, namespace, &serviceAccount); err != nil { | ||
return nil, err | ||
} | ||
if len(serviceAccount.Secrets) == 0 { | ||
return nil, errors.New("can't find secret") | ||
} | ||
secretName := serviceAccount.Secrets[0].Name | ||
token := core.Secret{} | ||
if err := client.Resources().Get(ctx, secretName, namespace, &token); err != nil { | ||
return nil, err | ||
} | ||
tokenData, found := token.Data["token"] | ||
if !found { | ||
return nil, errors.New("token not found") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic was fetching the same K8s token that already existed on ctx
@@ -112,7 +112,7 @@ jobs: | |||
|
|||
- name: Install Dependencies | |||
run: | | |||
curl -L https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64 -o ./kind | |||
curl -L https://kind.sigs.k8s.io/dl/v0.16.0/kind-linux-amd64 -o ./kind |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New version of kind needed to support the 1.24 control plane image
mikemorris
reviewed
Sep 27, 2022
nathancoleman
force-pushed
the
e2e-k8s-124
branch
from
September 27, 2022 21:05
4e35b14
to
f4d9c9b
Compare
mikemorris
approved these changes
Sep 27, 2022
2 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this PR:
Kubernetes 1.24 no longer implicitly creates a
Secret
w/ a token in it when aServiceAccount
is created. This PR modifies our e2e tests to create theSecret
explicitly which is the documented solution.I found this to be a helpful explanation of what's happening.
How I've tested this PR:
🤖 tests pass
How I expect reviewers to test this PR:
See above
Checklist: