operator-sdk scorecard fails to read default configuration file

Created on 27 Sep 2019  路  4Comments  路  Source: operator-framework/operator-sdk

Bug Report

What did you do?

  1. Created the .osdk-scorecard.yaml file in the root of my project:
$ cat .osdk-scorecard.yaml 
scorecard:
  output: json
  plugins:
    - basic:
        cr-manifest:
          - "deploy/crds/app_v1alpha1_kogitoapp_cr.yaml"
          - "deploy/crds/app_v1alpha1_kogitodataindex_cr.yaml"
        csv-path: "deploy/olm-catalog/kogito-cloud-operator/0.4.0/kogito-cloud-operator.v0.4.0.clusterserviceversion.yaml"
    - olm:
        cr-manifest:
          - "deploy/crds/app_v1alpha1_kogitoapp_cr.yaml"
          - "deploy/crds/app_v1alpha1_kogitodataindex_cr.yaml"
        csv-path: "deploy/olm-catalog/kogito-cloud-operator/0.4.0/kogito-cloud-operator.v0.4.0.clusterserviceversion.yaml"
  1. Then I ran the operator-sdk scorecard command without any flags, since all the info supposed to be in the config file:
operator-sdk scorecard
INFO[0000] Using config file: /home/ricferna/dev/go/src/github.com/kiegroup/kogito-cloud-operator/.osdk-scorecard.yaml 
WARN[0000] Plugin directory not found; skipping external plugins: stat scorecard: no such file or directory 
ERRO[0000] Plugin `basic-tests` failed with error (cr-manifest config option must be set) 
ERRO[0000] Plugin `olm-tests` failed with error (cr-manifest config option must be set) 
Failed Plugin: basic-tests:
Failed Plugin: olm-tests:

Total Score: 0%

What did you expect to see?
To the scorecard feature to work without errors, reading from this config file.

What did you see instead? Under which circumstances?
The following error:

ERRO[0000] Plugin `basic-tests` failed with error (cr-manifest config option must be set) 
ERRO[0000] Plugin `olm-tests` failed with error (cr-manifest config option must be set) 
Failed Plugin: basic-tests:
Failed Plugin: olm-tests:

It seems that the config file is being ignored

Environment

  • operator-sdk version:
operator-sdk version: v0.10.0, commit: ff80b17737a6a0aade663e4827e8af3ab5a21170
  • go version:
go version go1.12.9 linux/amd64
  • Kubernetes version information:

Testing on OpenShift:

Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.0", GitCommit:"cb455d664", GitTreeState:"clean", BuildDate:"2019-05-19T21:13:58Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+1c98dff", GitCommit:"1c98dff", GitTreeState:"clean", BuildDate:"2019-09-18T17:06:54Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}
  • Kubernetes cluster kind:

  • Are you writing your operator in ansible, helm, or go?

Go

kinbug scorecard

All 4 comments

I can verify the same thing with two different Ansible operators. Running with flags does appear to configure it properly, but the config file, despite being mentioned in the output properly doesn't actually get used.

My git repo is organized with the operator codebase in a folder off the root of the repo so I wondered if that might be a point of confusion. To illustrate what I mean here are some example files:

/my-operator/.git/config
/my-operator/my-real-operator/roles
/my-operator/my-real-operator/.osdk-scorecard.yaml
/my-operator/utils/op-build.sh

Version details:

operator-sdk version: v0.10.0, commit: ff80b17737a6a0aade663e4827e8af3ab5a21170
go version go1.10.4 linux/amd64
oc v3.11.0+0cbc58b
kubernetes v1.11.0+d4cacc0
features: Basic-Auth GSSAPI Kerberos SPNEGO

openshift v3.11.135
kubernetes v1.11.0+d4cacc0

The workaround I was using for this was to use the arguments like --namespace and --olm-deployed. These also no longer appear to be working in operator-sdk 0.11.0.

operator-sdk version: "v0.11.0", commit: "39c65c36159a9c249e5f3c178205cc6e86c16f8d", go version: "go1.12.7 linux/amd64"

@ricardozanini can you retry/retest using the latest operator-sdk version? I'm not able to recreate this one using the current version. thanks.

Hi @jmccormick2001 please go ahead and close this issue, I can confirm that it's working :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magescher picture magescher  路  3Comments

chowmean picture chowmean  路  5Comments

flickerfly picture flickerfly  路  5Comments

camilamacedo86 picture camilamacedo86  路  4Comments

camilamacedo86 picture camilamacedo86  路  5Comments