-
Notifications
You must be signed in to change notification settings - Fork 27
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
Generate CRD and RBAC yaml templates from submariner-operator #595
Conversation
🤖 Created branch: z_pr595/tpantelis/generate_yamls |
5c2442a
to
e575826
Compare
Makefile
Outdated
local-helm-repo: generate-yamls $(CHART_PACKAGES) | ||
mkdir -p $(HELM_REPO_LOCATION) | ||
for archive in $^; do \ | ||
for archive in $(CHART_PACKAGES); do \ |
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.
This doesn’t need to be updated, updated YAMLs are required to correctly populate the tarballs (see below).
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 didn't add it as a dependency to the %.tgz
tag b/c there are multiple (2) tarballs and I thought generate-yamls
would get executed each time. But that doesn't seem to be the case...
Makefile
Outdated
@@ -25,15 +25,18 @@ REPO_URL=$(shell git config remote.origin.url) | |||
|
|||
CHART_PACKAGES := submariner-k8s-broker-$(CHARTS_VERSION).tgz submariner-operator-$(CHARTS_VERSION).tgz | |||
|
|||
local-helm-repo: $(CHART_PACKAGES) | |||
local-helm-repo: generate-yamls $(CHART_PACKAGES) |
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.
local-helm-repo: generate-yamls $(CHART_PACKAGES) | |
local-helm-repo: $(CHART_PACKAGES) |
Makefile
Outdated
mkdir -p $(HELM_REPO_LOCATION) | ||
for archive in $^; do \ | ||
for archive in $(CHART_PACKAGES); do \ |
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.
for archive in $(CHART_PACKAGES); do \ | |
for archive in $^; do \ |
Makefile
Outdated
tar xzf $$archive -C $(HELM_REPO_LOCATION); \ | ||
done | ||
|
||
e2e: local-helm-repo | ||
$(SCRIPTS_DIR)/e2e.sh | ||
|
||
generate-yamls: | ||
./generate-yamls.sh $(BASE_BRANCH) | ||
|
||
%.tgz: |
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.
%.tgz: | |
%.tgz: generate-yamls |
Makefile
Outdated
@@ -52,7 +55,7 @@ helm-docs: | |||
exit 1; \ | |||
fi | |||
|
|||
release: $(CHART_PACKAGES) | |||
release: generate-yamls $(CHART_PACKAGES) |
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.
release: generate-yamls $(CHART_PACKAGES) | |
release: $(CHART_PACKAGES) |
The submariner-operator repo is the source of truth for the CRD and RBAC resource yaml used by subctl and the ACM add-on so we should use it for the helm charts as well. This will avoid having to duplicate changes from the submariner-operator repo. All the yaml is assembled in the pkg/embeddedyamls/yamls.go file in submariner-operator so download and extract the yaml into template files in the chart templates directories which can then be included in other manifest files. Signed-off-by: Tom Pantelis <[email protected]>
These all default to true and there doesn't seem to be any reason a user would want to set any to false as Submariner woild not work without these resources. Removing them simplifies the charts. Signed-off-by: Tom Pantelis <[email protected]>
e575826
to
58c42a4
Compare
🤖 Closed branches: [z_pr595/tpantelis/generate_yamls] |
The submariner-operator repo is the source of truth for the CRD and RBAC resource yaml used by subctl and the ACM add-on so we should use it for the helm charts as well. This will avoid having to duplicate changes from the submariner-operator repo. All the yaml is assembled in the pkg/embeddedyamls/yamls.go file in submariner-operator so download and extract the yaml into files in the chart templates directories.
The second commit 5c2442a does some cleanup.