Skip to content

Commit

Permalink
Add operator-chart target (#311)
Browse files Browse the repository at this point in the history
This makes sure our helm chart always points to the correct image.

Signed-off-by: Daniel Grimm <[email protected]>
Co-authored-by: Daniel Grimm <[email protected]>
  • Loading branch information
istio-testing and dgn authored Aug 21, 2024
1 parent da1b8fd commit 6310151
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
15 changes: 11 additions & 4 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ GINKGO_FLAGS := $(if $(VERBOSE),-v) $(if $(CI),--no-color)
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
# - use the CHANNELS as arg of the bundle target (e.g make bundle CHANNELS=candidate,fast,stable)
# - use environment variables to overwrite this value (e.g export CHANNELS="candidate,fast,stable")
CHANNELS ?= "0.1"
CHANNELS ?= ${MINOR_VERSION}
ifneq ($(origin CHANNELS), undefined)
BUNDLE_CHANNELS = --channels=\"$(CHANNELS)\"
endif
Expand Down Expand Up @@ -267,7 +267,7 @@ uninstall: verify-kubeconfig ## Uninstall CRDs from an existing cluster.
kubectl delete --ignore-not-found -f chart/crds

.PHONY: helm-package
helm-package: helm ## Package the helm chart.
helm-package: helm operator-chart ## Package the helm chart.
$(HELM) package chart --destination $(REPO_ROOT)/out

.PHONY: helm-publish
Expand Down Expand Up @@ -368,7 +368,7 @@ gen-charts: ## Pull charts from istio repository.
gen: gen-all-except-bundle bundle ## Generate everything.

.PHONY: gen-all-except-bundle
gen-all-except-bundle: operator-name controller-gen gen-api gen-charts gen-manifests gen-code gen-api-docs
gen-all-except-bundle: operator-name operator-chart controller-gen gen-api gen-charts gen-manifests gen-code gen-api-docs

.PHONY: gen-check
gen-check: gen restore-manifest-dates check-clean-repo ## Verify that changes in generated resources have been checked in.
Expand Down Expand Up @@ -405,6 +405,13 @@ endif
operator-name:
sed -i "s/\(projectName:\).*/\1 ${OPERATOR_NAME}/g" PROJECT

.PHONY: operator-chart
operator-chart:
sed -i -e "s/^\(version: \).*$$/\1${VERSION}/g" \
-e "s/^\(appVersion: \).*$$/\1\"${VERSION}\"/g" chart/Chart.yaml
sed -i -e "s|^\(image: \).*$$|\1${IMAGE}|g" \
-e "s/^\( version: \).*$$/\1${VERSION}/g" chart/values.yaml

.PHONY: update-istio
update-istio: ## Update the Istio commit hash in the 'latest' entry in versions.yaml to the latest commit in the branch.
@hack/update-istio.sh
Expand Down Expand Up @@ -600,7 +607,7 @@ git-hook: gitleaks ## Installs gitleaks as a git pre-commit hook.
chmod +x .git/hooks/pre-commit; \
fi

.SILENT: helm $(HELM) $(LOCALBIN) deploy-yaml gen-api operator-name
.SILENT: helm $(HELM) $(LOCALBIN) deploy-yaml gen-api operator-name operator-chart

COMMON_IMPORTS ?= lint-all lint-scripts lint-copyright-banner lint-go lint-yaml lint-helm format-go tidy-go check-clean-repo update-common
.PHONY: $(COMMON_IMPORTS)
Expand Down
5 changes: 2 additions & 3 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ csv:
[See this page](https://github.com/istio-ecosystem/sail-operator/blob/main/bundle/README.md) for instructions on how to use it.
support: Community based
version: 3.0.0
version: 0.1.0
icon:
base64data: iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAFiAAABYgFfJ9BTAAAHL0lEQVR4nO2du24bRxSGz5LL+01kaMuX2HShnmlSi2VUBM4bKG/gdGFnl+rsBwggvUHUsTT9AIGdnoWCIIWNIJZNWKLM5Uww1K4sC6JEQrP7z8yeDyDYCHuG3F/nNmeWnpSSTMXvD3tE9Ey9gp3e0NiFWkzGgqVvEtFLvz/c8/vDNQPW4xQ2CCBim4gO/P7wFzOW4wY2CUDRIKLnfn/4xu8PvzNgPdZjmwAiukT02u8Pn5mxHHuxVQART9kb3AzbBUDsDW6GFgEMRuNHwM8QobzBkCuF1dDlAfYGo/GeAULYDCuFHngd1qAzBKgy7c1gNEa74kbYN+CQsAS6cwD15T8djMZKCOj/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ediatype: image/png
Expand All @@ -40,8 +40,7 @@ csv:
features.operators.openshift.io/cnf: "false"
features.operators.openshift.io/cni: "true"
features.operators.openshift.io/csi: "false"
# !! note that this value is always overwritten in the makefile !!
image: quay.io/maistra-dev/istio-operator:3.0-latest
image: quay.io/maistra-dev/sail-operator:0.1-latest
imagePullPolicy: Always

# setting this to true will add resources required to generate the bundle using operator-sdk
Expand Down

0 comments on commit 6310151

Please sign in to comment.