-
Notifications
You must be signed in to change notification settings - Fork 33
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
ci: add ability to have replaces,skips in CSV #147
Conversation
@Rakshith-R Did you try to run the make bundle after feeding only one of the values? Does it work well? |
It fills in empty quotes |
Makefile
Outdated
@@ -90,6 +100,8 @@ manifests: controller-gen kustomize ## Generate WebhookConfiguration, ClusterRol | |||
# generate the <package-name>.clusterserviceversion.yaml | |||
config/manifests/bases/$(PACKAGE_NAME).clusterserviceversion.yaml: config/manifests/bases/clusterserviceversion.yaml.in | |||
sed 's/@PACKAGE_NAME@/$(PACKAGE_NAME)/g' < $^ > $@ | |||
sed -i 's/@SKIP_RANGE@/$(SKIP_RANGE)/g' $@ |
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
is required?
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.
Yes, that tells sed to make the replace inplace
and what about the generated CSV, does it contain the "" quotes, or the key itself is gone? |
Yes, empty quotes. [rakshith@fedora kubernetes-csi-addons]$ make bundle |
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.
Requesting changes to avoid accidental merge. as still discussion is going on to see as the keys need to be dropped for empty values.
Each CSV has a replaces parameter that indicates which Operator it replaces. This builds a graph of CSVs that can be queried by OLM, and updates can be shared between channels. Channels can be thought of as entry points into the graph of updates: REPLACES ?= "" Creating the New CatalogSource requires publishing CSVs that replace one Operator, but can skip several. This can be accomplished using the skipRange annotation: SKIP_RANGE ?= "" Signed-off-by: Rakshith R <rar@redhat.com>
# generate the <package-name>.clusterserviceversion.yaml base | ||
gen-csv-base: | ||
sed 's/@PACKAGE_NAME@/$(PACKAGE_NAME)/g;s/@SKIP_RANGE@/$(SKIP_RANGE)/g;s/@REPLACES@/$(REPLACES)/g' \ | ||
< config/manifests/bases/clusterserviceversion.yaml.in > config/manifests/bases/$(PACKAGE_NAME).clusterserviceversion.yaml |
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.
Previously, changing replace and skip_range variables did not lead to creation of new base csv yaml.
Now, new file is generated each time.
Each CSV has a replaces parameter that indicates
which Operator it replaces. This builds a graph of
CSVs that can be queried by OLM, and updates can be
shared between channels. Channels can be thought of
as entry points into the graph of updates:
REPLACES ?= ""
Creating the New CatalogSource requires publishing CSVs
that replace one Operator, but can skip several. This can
be accomplished using the skipRange annotation:
SKIP_RANGE ?= ""
Signed-off-by: Rakshith R rar@redhat.com
Refer: red-hat-storage/odf-operator@e1c41be
cc @nixpanic @Madhu-1 @iamniting