Skip to content

Commit

Permalink
Small helm chart fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Aug 16, 2020
1 parent 5508c2b commit 2c19665
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ spec:
spec:
serviceAccountName: gitjob
containers:
- image: "{{ .Values.image }}:{{ .Values.tag }}"
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
name: gitjob
command:
- gitjob
env:
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
fieldPath: metadata.namespace
5 changes: 3 additions & 2 deletions chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
image: rancher/gitjob
tag: ${VERSION}
image:
repository: rancher/gitjob
tag: ${VERSION}
7 changes: 4 additions & 3 deletions scripts/package-helm
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ cp -rf chart build/
rm -rf build/chart/crds

sed -i \
-e 's/${VERSION}/'${VERSION}'/' \
-e 's/version:.*/version: '${HELM_VERSION}'/' \
-e 's/appVersion:.*/appVersion: '${HELM_VERSION}'/' \
build/chart/Chart.yaml

sed -i \
-e 's/${VERSION}/'${VERSION}'/' \
-e 's/tag:.*/tag: '${HELM_TAG}'/' \
build/chart/values.yaml

mkdir build/chart/crds
go run pkg/crdgen/main.go > ./build/chart/crds/crds.yaml
helm package -d ./dist/artifacts ./build/chart
helm package -d ./dist/artifacts ./build/chart
4 changes: 4 additions & 0 deletions scripts/version
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ fi

SUFFIX="-${ARCH}"

HELM_TAG=${TAG:-${VERSION}}
HELM_VERSION=${HELM_TAG/v/}
TAG=${TAG:-${VERSION}${SUFFIX}}
REPO=${REPO:-rancher}

if echo $TAG | grep -q dirty; then
TAG=dev
HELM_TAG=dev
HELM_VERSION=v0.0.0
fi

0 comments on commit 2c19665

Please sign in to comment.