-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Scorecard optional Config.yaml Service Account selection #5245
Scorecard optional Config.yaml Service Account selection #5245
Conversation
Signed-off-by: Ish Shah <[email protected]>
Signed-off-by: Ish Shah <[email protected]>
Signed-off-by: Ish Shah <[email protected]>
v0.10.6 has been released in operator-framework/api allowing this PR to proceed. |
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.
Simplify the logic a bit more.
runnerSA := "" | ||
if o.Config.ServiceAccount != "" { | ||
runnerSA = o.Config.ServiceAccount | ||
} else { | ||
runnerSA = c.serviceAccount | ||
} |
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.
Since you're already initializing it, might as well set it to the default value
runnerSA := "" | |
if o.Config.ServiceAccount != "" { | |
runnerSA = o.Config.ServiceAccount | |
} else { | |
runnerSA = c.serviceAccount | |
} | |
runnerSA := c.serviceAccount | |
if o.Config.ServiceAccount != "" { | |
runnerSA = o.Config.ServiceAccount | |
} |
Signed-off-by: Ish Shah <[email protected]>
Signed-off-by: Ish Shah <[email protected]>
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
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
This enables selecting the service account for the scorecard using the config.yaml in addition to the existing method of changing it at runtime in the CLI.
This blocked on an API release which should occur shortly.