Skip to content

Commit

Permalink
fxi make chart
Browse files Browse the repository at this point in the history
Signed-off-by: hejianpeng <[email protected]>
  • Loading branch information
zirain authored and hzxuzhonghu committed Feb 9, 2023
1 parent 0085abd commit a995fc8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ sync-crds: gen-crd

.PHONY: gen-chart
gen-chart: sync-crds
HELM_CHART_VERSION=$(HELM_CHART_VERSION) hack/gen-chart.sh
HELM_CHART_VERSION=$(HELM_CHART_VERSION) IMAGE_TAG=$(IMAGE_TAG) hack/gen-chart.sh

.PHONY: test
test: clean tidy
Expand Down
3 changes: 2 additions & 1 deletion hack/gen-chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ MAINIFESTS_CHART_PATH=${REPO_ROOT}/manifests/charts
HELM_CHARTS=(base cluster-operator)
HELM_CHART_VERSION=${HELM_CHART_VERSION:-"0.1.0"}
IMAGE_HUB=${IMAGE_HUB:-"ghcr.io/kurator-dev"}
IMAGE_TAG=${IMAGE_TAG:-"latest"}

for c in "${HELM_CHARTS[@]}"
do
echo "gen chart $c"
cp -r "${MAINIFESTS_CHART_PATH}/${c}" "${CHART_OUT_PATH}/${c}"
sed -i "s|hub: ghcr.io/kurator-dev|hub: ${IMAGE_HUB}|g" $(find ${CHART_OUT_PATH}/${HELM_CHART_NAME} -type f | grep values.yaml)
sed -i "s|tag: latest|tag: ${IMAGE_VERSION}|g" $(find ${CHART_OUT_PATH}/${HELM_CHART_NAME} -type f | grep values.yaml)
sed -i "s|tag: latest|tag: ${IMAGE_TAG}|g" $(find ${CHART_OUT_PATH}/${HELM_CHART_NAME} -type f | grep values.yaml)
sed -i "s|version: 0.1.0|version: ${HELM_CHART_VERSION}|g" $(find ${CHART_OUT_PATH}/${HELM_CHART_NAME} -type f | grep Chart.yaml)
helm package "${CHART_OUT_PATH}/${c}" -d "${CHART_OUT_PATH}"
done
Expand Down
2 changes: 1 addition & 1 deletion manifests/charts/cluster-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ image:
hub: ghcr.io/kurator-dev
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "latest"
tag: latest

logging:
level: 0
Expand Down

0 comments on commit a995fc8

Please sign in to comment.