You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you writing your operator in ansible, helm, or go?
go
Possible Solution
After a quick review of PR #2441, I suspect this is due to the change in cmd/operator-sdk/run/local.go ; previously the flag variables were declared globally. They are now part of a new structure called runLocalArgs.
Specifically, the function addToFlags is not getting a pointer to the object but is receiving a copy and so the StringVar declaration is pointing to a copy of ldFlags
Bug Report
What did you do?
I am trying to run locally an operator and pass the current version to the binary using a LDFLAG to the go build stage like this:
What did you expect to see?
I expected the version to be set and displayed properly in the log (at start)
What did you see instead? Under which circumstances?
The operator logs the placeholder value.
Environment
Installed on bare metal.
go
Possible Solution
After a quick review of PR #2441, I suspect this is due to the change in
cmd/operator-sdk/run/local.go
; previously the flag variables were declared globally. They are now part of a new structure calledrunLocalArgs
.Specifically, the function
addToFlags
is not getting a pointer to the object but is receiving a copy and so the StringVar declaration is pointing to a copy ofldFlags
I had some success with this patch:
The text was updated successfully, but these errors were encountered: