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.
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
Initialize the cluster client cache from the kubeconfig in secrets #412
Initialize the cluster client cache from the kubeconfig in secrets #412
Changes from 3 commits
c047b40
21c2084
792221d
3cf8897
de603e7
60da134
44e8554
678fc40
0196128
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Check failure on line 95 in controllers/toolchaincluster/toolchaincluster_controller.go
GitHub Actions / GolangCI Lint
Check warning on line 165 in pkg/cluster/service.go
Codecov / codecov/patch
pkg/cluster/service.go#L165
Check warning on line 189 in pkg/cluster/service.go
Codecov / codecov/patch
pkg/cluster/service.go#L189
Check warning on line 224 in pkg/cluster/service.go
Codecov / codecov/patch
pkg/cluster/service.go#L224
Check warning on line 229 in pkg/cluster/service.go
Codecov / codecov/patch
pkg/cluster/service.go#L229
Check warning on line 235 in pkg/cluster/service.go
Codecov / codecov/patch
pkg/cluster/service.go#L235
Check warning on line 241 in pkg/cluster/service.go
Codecov / codecov/patch
pkg/cluster/service.go#L241
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.
do we need to add a test case that uses the
legacyTc
?basically:
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 essentially checks that if we detect a
kubeconfig
data field in the secret then we use that instead of the data in theToolchainCluster
and the token in the secret.So as soon as we see the data coming from the kubeconfig, we know that happened.
Now, you have a very good idea for a "defensive test" that would make sure any future changes wouldn't change that behavior. But we plan to completely remove the loading from the legacy fields in the upcoming PRs so I think we can afford to not have that and instead just make sure we use the new over the old.
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.
Right, I was asking since as soon as you push this PR to prod, the tc will still have the
legacy
format, and later will have the new one. But I guess it's not a concern since the only thing that matters is the loading mechanism and not the tc format.