Add env vars to the whisker deployment#3805
Merged
Brian-McM merged 2 commits intotigera:masterfrom Mar 28, 2025
Merged
Conversation
c0e660d to
eb419a3
Compare
f20da3f to
8d47f01
Compare
Brian-McM
reviewed
Mar 26, 2025
test/whisker_test.go
Outdated
| }() | ||
|
|
||
| // API server needs to be installed to use the v3 api | ||
| createAPIServer(c, mgr, shutdownContext, nil) |
Contributor
There was a problem hiding this comment.
This is supposed to run in an OS cluster, so we can't rely on the api server being installed.
Contributor
Author
There was a problem hiding this comment.
Fixed htis by copying over the clusterinformation cr reference to the repo.
Brian-McM
previously approved these changes
Mar 27, 2025
Brian-McM
requested changes
Mar 27, 2025
pkg/controller/whisker/controller.go
Outdated
| if err != nil { | ||
| reqLogger.Info("Unable to retrieve cluster context to Whisker. Proceeding without adding cluster context to Whisker.", err) | ||
| } | ||
| calicoVersion = clusterInfo.Spec.CalicoVersion |
Contributor
There was a problem hiding this comment.
This will panic if the clusterInfo isn't there, Spec will be nil. I would not set the cluster type or calico versions if this is nil.
The whisker backend should handle that appropriate if the env variables are not set.
Contributor
Author
There was a problem hiding this comment.
Just a note these values are fed to the whisker front end directly.
fdf5b4c to
9a93fd3
Compare
Update controller.go Update mainline_test.go Update whisker_test.go change scheme Update mainline_test.go Update mainline_test.go minor cleanup Update controller.go Use crdv1 instead of v3 code to get cluster information Update controller.go Change to using cluster ID Empty commit Empty commit
31d910f to
b2a5053
Compare
WilliamTigera
commented
Mar 28, 2025
Brian-McM
approved these changes
Mar 28, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Add ENV vars that the whisker UI to retrieve cluster context.
Copied over ClusterInformation CR so we don't need to use the V3 api (and wait for apiserver)
For PR author
make gen-filesmake gen-versionsFor PR reviewers
A note for code reviewers - all pull requests must have the following:
kind/bugif this is a bugfix.kind/enhancementif this is a a new feature.enterpriseif this PR applies to Calico Enterprise only.