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

Scorecard fixes #11

Open
matzew opened this issue Jun 6, 2019 · 2 comments
Open

Scorecard fixes #11

matzew opened this issue Jun 6, 2019 · 2 comments

Comments

@matzew
Copy link
Member

matzew commented Jun 6, 2019

Running

operator-sdk scorecard --cr-manifest deploy/crds/eventing_v1alpha1_knativeeventingkafka_cr.yaml --csv-path deploy/olm-catalog/knative-kafka-operator/0.6.0/knative-kafka-operator.v0.6.0.clusterserviceversion.yaml

Gives the following

WARN[0000] Could not load config file; using flags      
WARN[0009] Invalid URI: "/api/v1/namespaces/default/pods/knative-kafka-operator-f97c64d7b-qspgf" 
WARN[0009] Invalid URI: "/api/v1/namespaces/default/configmaps/knative-kafka-operator-lock" 
Basic Tests:
	Spec Block Exists: 1/1
	Status Block Exists: 1/1
	Writing into CRs has an effect: 1/1
OLM Tests:
	Provided APIs have validation: 0/1
	Owned CRDs have resources listed: 0/1
	CRs have at least 1 example: 1/1
	Spec fields with descriptors: 0/1
	Status fields with descriptors: 0/2

Total Score: 60%
SUGGESTION: Add CRD validation for spec field `bootstrapServers` in KnativeEventingKafka/v1alpha1
SUGGESTION: Add CRD validation for status field `conditions` in KnativeEventingKafka/v1alpha1
SUGGESTION: Add CRD validation for status field `version` in KnativeEventingKafka/v1alpha1
SUGGESTION: Add resources to owned CRDs
SUGGESTION: Add a spec descriptor for bootstrapServers
SUGGESTION: Add a status descriptor for conditions
SUGGESTION: Add a status descriptor for version
@matzew
Copy link
Member Author

matzew commented Jun 6, 2019

With the advent of #12 we are down to 76%

WARN[0000] Could not load config file; using flags      
WARN[0009] Invalid URI: "/api/v1/namespaces/default/pods/knative-kafka-operator-f97c64d7b-ghbhz" 
WARN[0009] Invalid URI: "/api/v1/namespaces/default/configmaps/knative-kafka-operator-lock" 
Basic Tests:
	Spec Block Exists: 1/1
	Status Block Exists: 1/1
	Writing into CRs has an effect: 1/1
OLM Tests:
	Provided APIs have validation: 1/1
	Owned CRDs have resources listed: 0/1
	CRs have at least 1 example: 1/1
	Spec fields with descriptors: 0/1
	Status fields with descriptors: 1/2

Total Score: 76%
SUGGESTION: Add resources to owned CRDs
SUGGESTION: Add a spec descriptor for bootstrapServers
SUGGESTION: Add a status descriptor for conditions

@syedriko
Copy link
Contributor

syedriko commented Jun 8, 2019

#20 gets the score to 90%:
[syedriko@localhost knative-kafka-operator]$ operator-sdk scorecard --cr-manifest deploy/crds/eventing_v1alpha1_knativeeventingkafka_cr.yaml --csv-path deploy/olm-catalog/knative-kafka-operator/0.6.0/knative-kafka-operator.v0.6.0.clusterserviceversion.yaml --verbose
DEBU[0000] Debug logging is set
WARN[0000] Could not load config file; using flags
Running for cr: deploy/crds/eventing_v1alpha1_knativeeventingkafka_cr.yaml
WARN[0006] Plugin directory not found; skipping plugin tests: stat scorecard: no such file or directory
Basic Tests:
Spec Block Exists: 1/1
Status Block Exists: 1/1
Writing into CRs has an effect: 1/1
OLM Tests:
Provided APIs have validation: 1/1
Owned CRDs have resources listed: 0/1
CRs have at least 1 example: 1/1
Spec fields with descriptors: 2/2
Status fields with descriptors: 2/2

Total Score: 90%
SUGGESTION: If it would be helpful to an end-user to understand or troubleshoot your CR, consider adding resources [pods/v1 configmaps/v1] to the resources section for owned CRD KnativeEventingKafka
[syedriko@localhost knative-kafka-operator]$

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants