Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Initialize klog flags so it logs to stderr #1945

Merged
merged 1 commit into from
Apr 16, 2019
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Apr 16, 2019

This got not caught in CircleCI as it does not perform a rebase
on-top of latest master before testing.

We bumped client-go a while ago (#1829) which included a switch to klog,
the klog flags need to be intialized before they can be set, as we did
not have this initialization in place, the operator was unable to
start. Simply initialize the flags and we are good to go.


I am tempted to add the following to the CircleCI config in a separate PR to prevent this in the future:

if [[ "$CIRCLE_BRANCH" != "master" && "$CIRCLE_BRANCH" != release* ]]; then git fetch origin master && git rebase origin/master; fi

@hiddeco hiddeco force-pushed the helm/init-klog-flags branch from 4b0f1ad to f4e7dc0 Compare April 16, 2019 12:37
This got not caught in CircleCI as it does not perform a rebase
on-top of latest master before testing.

We bumped client-go a while ago which included a switch to klog,
the klog flags need to be intialized before they can be set, as we did
not have this initialization in place, the operator was unable to
start.

As logging to stderr is now the default for klog; only initialize the
flags so it is enabled.
@hiddeco hiddeco force-pushed the helm/init-klog-flags branch from f4e7dc0 to 780db3a Compare April 16, 2019 14:44
@hiddeco hiddeco changed the title Initialize klog flags so they can be set Initialize klog flags so it logs to stderr Apr 16, 2019
@stefanprodan
Copy link
Member

stefanprodan commented Apr 16, 2019

Hmm I wander why is this working... InitFlags should crash when used with clientcmd since the client will call it.

Ah they fixed it in Kubernetes 1.14

@hiddeco
Copy link
Member Author

hiddeco commented Apr 16, 2019

@2opremio I am going to merge this to get master going again, if you have any additional comments I will be happy to address them in another PR.

@hiddeco hiddeco merged commit 7563152 into master Apr 16, 2019
@hiddeco hiddeco deleted the helm/init-klog-flags branch April 16, 2019 14:59
@squaremo squaremo added this to the v1.12.1 milestone Apr 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants