-
Notifications
You must be signed in to change notification settings - Fork 1.8k
doc/proposals/improved-scorecard-config.md: make proposal #1558
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
doc/proposals/improved-scorecard-config.md: make proposal #1558
Conversation
estroz
left a comment
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.
Content LGTM, just a few grammar nits.
Co-Authored-By: Eric Stroczynski <estroczy@redhat.com>
shawn-hurley
left a comment
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
estroz
left a comment
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
lilic
left a comment
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.
Overall I like this, makes it much simpler for the user! Few questions.
| and what they do: | ||
|
|
||
| - `kubeconfig` string - path to kubeconfig. This option sets the kubeconfig for internal plugins and sets the `KUBECONFIG` env var for external plugins | ||
| - `output` string - sets output format. Valid values: `human-readable` and `json` |
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.
Nit: Can we make this text instead of human-readable?
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.
The current config uses the term human-readable, this is just copied from that. This would probably be a good opportunity to change it though, since we're completely changing the way we configure this. I think text is a better naming than human-readable.
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.
@AlexNPavel I agree with text
| - `kubeconfig` string - path to kubeconfig. This option sets the kubeconfig for internal plugins and sets the `KUBECONFIG` env var for external plugins | ||
| - `output` string - sets output format. Valid values: `human-readable` and `json` | ||
| - `plugin-dir` string - path to scorecard plugin directory. This is the directory where the plugins are run from, and all executable files in a `bin` subdirectory of the `plugin-dir` are automtically run by default. | ||
| - `plugins` - an array of objects that configure both internal and external scorecard plugins |
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.
Can you give an example of how this command would in full with the 3 elements mentioned bellow? Thanks!
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.
I'm not sure I understand your question.
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.
Nevermind misunderstood, I thought those were commands for some reason.
| output: json | ||
| plugins: | ||
| - name: Basic Tests | ||
| internal: |
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.
Do you envision a scenario where we'll need to add flags to either the basic or OLM tests or where we'll have another internal test that has a different set of flags?
If so, WDYT of removing type from the internal map and have a separate map for each different type:
plugins:
- name: Basic Tests
basic:
cr-manifest:
- "deploy/crds/cache_v1alpha1_memcached_cr.yaml"
- "deploy/crds/cache_v1alpha1_memcachedrs_cr.yaml"
init-timeout: 60
csv-path: "deploy/olm-catalog/memcached-operator/0.0.3/memcached-operator.v0.0.3.clusterserviceversion.yaml"
proxy-image: "scorecard-proxy"
proxy-pull-policy: "Never"
- name: OLM Tests
olm:
cr-manifest:
- "deploy/crds/cache_v1alpha1_memcached_cr.yaml"
- "deploy/crds/cache_v1alpha1_memcachedrs_cr.yaml"
init-timeout: 60
csv-path: "deploy/olm-catalog/memcached-operator/0.0.3/memcached-operator.v0.0.3.clusterserviceversion.yaml"
proxy-image: "scorecard-proxy"
proxy-pull-policy: "Never"
- name: Custom Test
external:
command: bin/my-test.sh
- name: Custom Test v2
external:
command: bin/my-test.sh
args: ["--version=2"]
- name: Custom Test Cluster 2
external:
command: bin/my-test.sh
env:
- name: KUBECONFIG
value: "~/.kube/config2`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.
Well, the proposal for the YAML defined internal tests would definitely have a different config: #1241.
It would probably be better to define those as separate maps. I'll make that change
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.
Updated.
lilic
left a comment
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.
Apart from the one leftover suggestion to change value to text. lgtm
estroz
left a comment
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
|
New changes are detected. LGTM label has been removed. |
Description of the change: Make proposal for removing most command line arguments for the
scorecardsubcommand and replacing them with a new, comprehensive config file formatMotivation for the change: Reduce the excessive amount of command line flags in the scorecard and replace it with a cleaner config file format that also allows for more extensive configuration of external plugins.