-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🐛 tilt: set CR logger in tilt-prepare, fix allowed contexts #8919
Conversation
Signed-off-by: Stefan Büringer [email protected]
@@ -157,6 +157,9 @@ func main() { | |||
// This makes it easier to see what clusterctl is doing and to debug it. | |||
logf.SetLogger(logf.NewLogger(logf.WithThreshold(pointer.Int(5)))) | |||
|
|||
// Set controller-runtime logger as well. | |||
ctrl.SetLogger(klog.Background()) |
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.
Without this at some point CR complains (in the log in the Tilt UI) that no logger has been set. We do this in all our other binaries as well
@@ -36,6 +29,13 @@ os.putenv("CAPI_KIND_CLUSTER_NAME", settings.get("kind_cluster_name")) | |||
|
|||
allow_k8s_contexts(settings.get("allowed_contexts")) | |||
|
|||
if str(local("command -v " + kubectl_cmd + " || true", quiet = True)) == "": |
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.
Apparently allow_k8s_contexts
has to be run above "local" otherwise the local calls fail if the context is not a kind cluster or something.
(ran into this issue with a cluster created via CAPV)
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.
/lgtm
/approve
Feel free to unhold if you're happy with this.
LGTM label has been added. Git tree hash: e6fd73d690415df792e0ff19e6b8178af927ddad
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: killianmuldoon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
No hold on this PR :D But yup should be good |
Forgot to do /hold 😆 |
/area devtools |
Signed-off-by: Stefan Büringer [email protected]
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #