Remove provisioner code#2064
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: matzew The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
da0103d to
3c7288d
Compare
7911c0a to
037e396
Compare
|
/assign @Harwayne @nachocano |
|
|
||
| import ( | ||
| "flag" | ||
| "knative.dev/pkg/injection" |
|
|
||
| var env envConfig | ||
| if err := envconfig.Process("", &env); err != nil { | ||
| log.Fatal("Failed to process env var", zap.Error(err)) |
There was a problem hiding this comment.
@nachocano same as in the webhook/main.go this is the log package, as we have not here initialized the knative.dev/pkg logger
There was a problem hiding this comment.
ah, sorry - I was on wrong line :-)
will update
| ctx, _ = injection.Default.SetupInformers(ctx, cfg) | ||
| kubeClient := kubeclient.Get(ctx) | ||
|
|
||
| config, err := sharedmain.GetLoggingConfig(ctx) |
There was a problem hiding this comment.
there is already a cfg, and now this config. Might be clearer if we rename it to loggingCfg or loggingConfig ?
|
|
||
| import ( | ||
| "flag" | ||
| "knative.dev/pkg/logging" |
| ctx, informers := injection.Default.SetupInformers(ctx, cfg) | ||
|
|
||
| cfg, err := sharedmain.GetConfig(*masterURL, *kubeconfig) | ||
| config, err := sharedmain.GetLoggingConfig(ctx) |
There was a problem hiding this comment.
same as above with the naming
|
|
||
| var env envConfig | ||
| if err := envconfig.Process("", &env); err != nil { | ||
| log.Fatal("Failed to process env var", zap.Error(err)) |
|
Just as a note, I think in eventing-contrib we were using this. I think I saw it in NATSS... just so that you are aware. That will have to change as well... |
|
And thanks for doing this!!! |
| if err != nil { | ||
| log.Fatal("Error loading/parsing logging configuration:", err) | ||
| } | ||
| logger, _ := logging.NewLoggerFromConfig(loggingConfig, "broker_filter") |
There was a problem hiding this comment.
The rest of the file expected the desugared logger, do something like:
| logger, _ := logging.NewLoggerFromConfig(loggingConfig, "broker_filter") | |
| sl, _ := logging.NewLoggerFromConfig(loggingConfig, "broker_filter") | |
| logger := sl.Desugar() |
| log.Fatal("Error building kubeconfig", err) | ||
| log.Fatal("Error loading/parsing logging configuration:", err) | ||
| } | ||
| logger, _ := logging.NewLoggerFromConfig(loggingConfig, "broker_ingress") |
Fixes #
Proposed Changes
provisionerlogging on broker cmdsRelease Note