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

Generate CRD and RBAC yaml templates from submariner-operator #595

Merged
merged 2 commits into from
Jan 22, 2025

Conversation

tpantelis
Copy link
Contributor

@tpantelis tpantelis commented Jan 20, 2025

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.

@submariner-bot
Copy link
Contributor

🤖 Created branch: z_pr595/tpantelis/generate_yamls
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

Makefile Outdated
Comment on lines 28 to 30
local-helm-repo: generate-yamls $(CHART_PACKAGES)
mkdir -p $(HELM_REPO_LOCATION)
for archive in $^; do \
for archive in $(CHART_PACKAGES); do \
Copy link
Member

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).

Copy link
Contributor Author

@tpantelis tpantelis Jan 21, 2025

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
%.tgz:
%.tgz: generate-yamls

Makefile Outdated
@@ -52,7 +55,7 @@ helm-docs:
exit 1; \
fi

release: $(CHART_PACKAGES)
release: generate-yamls $(CHART_PACKAGES)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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]>
@tpantelis tpantelis merged commit 1bb89ab into submariner-io:devel Jan 22, 2025
25 checks passed
@submariner-bot
Copy link
Contributor

🤖 Closed branches: [z_pr595/tpantelis/generate_yamls]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants