Skip to content
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

operator-name in csv-config.yaml is ignored #2266

Closed
aliok opened this issue Nov 25, 2019 · 3 comments · Fixed by #2297
Closed

operator-name in csv-config.yaml is ignored #2266

aliok opened this issue Nov 25, 2019 · 3 comments · Fixed by #2297
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. olm-integration Issue relates to the OLM integration

Comments

@aliok
Copy link
Contributor

aliok commented Nov 25, 2019

Bug Report

What did you do?
I ran this command:

operator-sdk olm-catalog gen-csv            \
  --csv-config    hack/csv-config.yaml      \
  --from-version  0.10.1                    \
  --csv-version   0.10.2                    \
  [...]

with hack/csv-config.yaml:

operator-name: knative-eventing-operator
[...]

Note that, operator's directory name does not match the operator name in csv-config.yaml.
Operator directory is called eventing-operator.

What did you expect to see?

  • A new directory created as deploy/olm-catalog/knative-eventing-operator/0.10.2.
  • CSV file with name field as knative-eventing-operator.v0.10.2

What did you see instead? Under which circumstances?

  • A new directory created as deploy/olm-catalog/eventing-operator/0.10.2.
  • CSV file with name field as eventing-operator.v0.10.2

Environment

  • operator-sdk version:

operator-sdk version: "v0.12.0", commit: "2445fcda834ca4b7cf0d6c38fba6317fb219b469", go version: "go1.13.3 linux/amd64"

  • go version:

go version go1.13.3 linux/amd64

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

This operator is not an Operator-SDK based operator. However, I think the gen-csv feature can still be used if some improvements are done.

Possible Solution

Pass --operator-name param.

Additional context

Operator name is read as the directory name here:

operatorName = filepath.Base(absProjectPath)

I guess that is carried over!

@camilamacedo86
Copy link
Contributor

hi @aliok,

Thank you for raising it.

c/c @estroz @joelanford

@estroz estroz self-assigned this Nov 25, 2019
@camilamacedo86 camilamacedo86 added kind/feature Categorizes issue or PR as related to a new feature. olm-integration Issue relates to the OLM integration labels Nov 25, 2019
@estroz
Copy link
Member

estroz commented Nov 26, 2019

@aliok thanks for filing an issue. This is fixed in #2249, which removes config file support in favor of --exclude=[paths]. You must set --operator-name explicitly if you want a different operator name for your CSV.

@estroz
Copy link
Member

estroz commented Dec 5, 2019

@aliok see #2297 for the immediate fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. olm-integration Issue relates to the OLM integration
Projects
None yet
3 participants