Skip to content
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

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

sbueringer
Copy link
Member

Signed-off-by: Stefan Büringer buringerst@vmware.com

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 #

Signed-off-by: Stefan Büringer buringerst@vmware.com
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 26, 2023
@@ -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())
Copy link
Member Author

@sbueringer sbueringer Jun 26, 2023

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)) == "":
Copy link
Member Author

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)

Copy link
Contributor

@killianmuldoon killianmuldoon left a 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.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: e6fd73d690415df792e0ff19e6b8178af927ddad

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2023
@killianmuldoon
Copy link
Contributor

/retest

@sbueringer
Copy link
Member Author

No hold on this PR :D But yup should be good

@k8s-ci-robot k8s-ci-robot merged commit a1ec56a into kubernetes-sigs:main Jun 26, 2023
10 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone Jun 26, 2023
@killianmuldoon
Copy link
Contributor

No hold on this PR :D But yup should be good

Forgot to do /hold 😆

@sbueringer sbueringer deleted the pr-tilt-fixes branch June 26, 2023 19:22
@killianmuldoon
Copy link
Contributor

/area devtools

@k8s-ci-robot k8s-ci-robot added the area/devtools Issues or PRs related to devtools label Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/devtools Issues or PRs related to devtools cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants