Skip to content

Commit 636a1d6

Browse files
authored
Put helm chart under lws/charts/ (#482)
* Update the helm chart location Signed-off-by: kerthcet <[email protected]> * Fix update helm chart error Signed-off-by: kerthcet <[email protected]> * add yq command to artifacts Signed-off-by: kerthcet <[email protected]> --------- Signed-off-by: kerthcet <[email protected]>
1 parent ee0de33 commit 636a1d6

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ IMAGE_REGISTRY ?= ${STAGING_IMAGE_REGISTRY}/lws
3535
IMAGE_NAME := lws
3636
IMAGE_REPO := $(IMAGE_REGISTRY)/$(IMAGE_NAME)
3737
IMG ?= $(IMAGE_REPO):$(GIT_TAG)
38-
HELM_CHART_REPO := ${STAGING_IMAGE_REGISTRY}/charts
38+
HELM_CHART_REPO := ${STAGING_IMAGE_REGISTRY}/lws/charts
3939
# Use distroless as minimal base image to package the manager binary
4040
# Refer to https://github.com/GoogleContainerTools/distroless for more details
4141
BASE_IMAGE ?= gcr.io/distroless/static:nonroot
@@ -270,7 +270,7 @@ code-generator:
270270

271271
##@ Release
272272
.PHONY: artifacts
273-
artifacts: kustomize helm
273+
artifacts: kustomize helm yq
274274
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
275275
if [ -d artifacts ]; then rm -rf artifacts; fi
276276
mkdir -p artifacts
@@ -282,7 +282,7 @@ artifacts: kustomize helm
282282
$(HELM) package --version $(GIT_TAG) --app-version $(GIT_TAG) charts/lws -d artifacts/
283283
mv artifacts/lws-$(GIT_TAG).tgz artifacts/lws-chart-$(GIT_TAG).tgz
284284
# Revert the image changes
285-
$(YQ) e '.image.manager.repository = "$(IMAGE_REGISTRY)/$(IMAGE_NAME)" | del(.image.manager.tag) | .image.manager.pullPolicy = "Always"' -i charts/lws/values.yaml
285+
$(YQ) e '.image.manager.repository = "$(IMAGE_REGISTRY)/$(IMAGE_NAME)" | .image.manager.tag = "main" | .image.manager.pullPolicy = "Always"' -i charts/lws/values.yaml
286286

287287

288288
.PHONY: prometheus

charts/lws/values.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ image:
1414
repository: us-central1-docker.pkg.dev/k8s-staging-images/lws/lws
1515
# tag, if defined will use the given image tag, else Chart.AppVersion will be used
1616
tag: main
17-
pullPolicy: IfNotPresent
17+
pullPolicy: Always
18+
tag: main
1819
podAnnotations: {}
1920
podSecurityContext:
2021
runAsNonRoot: true

config/manager/kustomization.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ generatorOptions:
55
disableNameSuffixHash: true
66

77
configMapGenerator:
8-
- files:
9-
- controller_manager_config.yaml
10-
name: manager-config
8+
- files:
9+
- controller_manager_config.yaml
10+
name: manager-config
1111

1212
apiVersion: kustomize.config.k8s.io/v1beta1
1313
kind: Kustomization

hack/push-chart.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ GIT_TAG=${GIT_TAG:-$(git describe --tags --dirty --always)}
2525

2626
STAGING_IMAGE_REGISTRY=${STAGING_IMAGE_REGISTRY:-us-central1-docker.pkg.dev/k8s-staging-images}
2727
IMAGE_REGISTRY=${IMAGE_REGISTRY:-${STAGING_IMAGE_REGISTRY}/lws}
28-
HELM_CHART_REPO=${HELM_CHART_REPO:-${STAGING_IMAGE_REGISTRY}/charts}
28+
HELM_CHART_REPO=${HELM_CHART_REPO:-${STAGING_IMAGE_REGISTRY}/lws/charts}
2929
IMAGE_REPO=${IMAGE_REPO:-${IMAGE_REGISTRY}/lws}
3030

3131
HELM=${HELM:-./bin/helm}
@@ -42,7 +42,7 @@ then
4242
chart_version=${EXTRA_TAG}
4343
fi
4444

45-
default_image_repo=$(${YQ} ".image.repository" charts/lws/values.yaml)
45+
default_image_repo=$(${YQ} ".image.manager.repository" charts/lws/values.yaml)
4646
readonly default_image_repo
4747

4848
# Update the image repo, tag and policy

0 commit comments

Comments
 (0)