-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add --operator-name flag to olm-catalog gen-csv #1571
Add --operator-name flag to olm-catalog gen-csv #1571
Conversation
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.
There are a few other changes required to use a different CSV name and path simultaneously in a reliable manner.
An OperatorName
field should be added to scaffold.CSV
so input.ProjectName
can be used elsewhere as expected. OperatorName
should be populated as ProjectName
is currently, and used instead of ProjectName
in internal/pkg/scaffold/olm-catalog/csv.go
where relevant. The --project-name
flag should be renamed to --operator-name
.
Are there currently (or do we envision in the future) any other subcommands that would need a similar flag? I wonder if we should add this flag to the |
@joelanford yes especially with OLM additions coming. There are quite a few changes to be made before we have a global config, but we can add it to the CSV config for now as |
b43078e
to
f652c8a
Compare
@estroz Thank you for the feedback 👍 I have updated my patch based on your review. Could take a look. |
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.
Needs changes.
This pactch adds a `--operator-name` flag to `operator-sdk olm-catalog gen-csv` command. At present operator-sdk assumes project-directory-name (ProjectName) is the operator name. The operator-name and the project-directory-name can be different. (because of change in source control, project home, organizational policies etc) Without an --operator-name flag we will have to rename, copy-paste generated CSVs Signed-off-by: Nikhil Thomas <nikthoma@redhat.com>
f652c8a
to
9b3b816
Compare
@estroz Thank you for the detailed review. I have made the changes. |
cc @estroz think this is ready for another look. |
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
/cc @joelanford I'll make a follow-up PR for a |
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.
/approve
Description of the change:
This patch adds a flag
--operator-name
to specify the operator namewhile generating CSV using
operator-sdk gen-csv
commandThe default value (when flag is absent) is base directory name as before
Motivation for the change:
At present operator-sdk assumes project-directory-name (ProjectName) is the operator name.
The operator-name and the project-directory-name can be different.
(because of change in source control, project home, organizational policies etc)
Without an --operator-name flag we will have to rename, copy-paste generated CSVs
Signed-off-by: Nikhil Thomas nikthoma@redhat.com