Skip to content

Commit 3589c95

Browse files
committed
feat(chart): support appVersion as the default image tag
Signed-off-by: Zubiao Xiong <[email protected]>
1 parent 7fe6183 commit 3589c95

File tree

7 files changed

+7
-9
lines changed

7 files changed

+7
-9
lines changed

charts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ update-versions:
2020
hami_version="$(VERSION)"; \
2121
chart_version=` echo $(VERSION) | tr -d 'v' ` ; \
2222
sed -i 's/version: "*'$(VERSION_REGEX)'"*/version: '$$chart_version'/g' $(CHART_FILE); \
23-
sed -i 's/appVersion: "*'$(VERSION_REGEX)'"*/appVersion: "'$$chart_version'"/g' $(CHART_FILE); \
23+
sed -i 's/appVersion: "*'$(VERSION_REGEX)'"*/appVersion: "'$$hami_version'"/g' $(CHART_FILE); \
2424
sed -i 's/version: "*'$(VERSION_REGEX)'"*/version: "'$$hami_version'"/g' $(VALUES_FILE)
2525

2626
lint: update-versions

charts/hami/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ maintainers:
1212
1313
- name: zhangxiao
1414
15-
appVersion: "2.4.1"
15+
appVersion: "v2.4.1"
1616

charts/hami/templates/device-plugin/daemonsetnvidia.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
hostNetwork: true
4141
containers:
4242
- name: device-plugin
43-
image: {{ .Values.devicePlugin.image }}:{{ .Values.version }}
43+
image: {{ .Values.devicePlugin.image }}:{{ .Values.version | default .Chart.AppVersion }}
4444
imagePullPolicy: {{ .Values.devicePlugin.imagePullPolicy | quote }}
4545
lifecycle:
4646
postStart:
@@ -90,7 +90,7 @@ spec:
9090
mountPath: /device-config.yaml
9191
subPath: device-config.yaml
9292
- name: vgpu-monitor
93-
image: {{ .Values.devicePlugin.image }}:{{ .Values.version }}
93+
image: {{ .Values.devicePlugin.image }}:{{ .Values.version | default .Chart.AppVersion }}
9494
imagePullPolicy: {{ .Values.devicePlugin.imagePullPolicy | quote }}
9595
command: ["vGPUmonitor"]
9696
securityContext:

charts/hami/templates/scheduler/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ spec:
6969
timeoutSeconds: 15
7070
{{- end }}
7171
- name: vgpu-scheduler-extender
72-
image: {{ .Values.scheduler.extender.image }}:{{ .Values.version }}
72+
image: {{ .Values.scheduler.extender.image }}:{{ .Values.version | default .Chart.AppVersion }}
7373
imagePullPolicy: {{ .Values.scheduler.extender.imagePullPolicy | quote }}
7474
env:
7575
{{- if .Values.global.managedNodeSelectorEnable }}

charts/hami/values.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
nameOverride: ""
44
fullnameOverride: ""
5-
imagePullSecrets: [ ]
6-
version: "v2.4.1"
5+
imagePullSecrets: []
76

87
#Nvidia GPU Parameters
98
resourceName: "nvidia.com/gpu"

docs/release-process.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ This is the architecture diagram of the HAMi release process
5959
Update version information through PR and create a new tag
6060

6161
* update 'version' and 'appVersion' filed in 'charts/hami/Chart.yaml' by pr
62-
* update 'version' in 'charts/hami/values.yaml' by pr
6362
* update version in '/VERSION' by pr
6463
* a version tag should be set on right branch. The version should go with
6564
* v0.1.0

hack/verify-chart-version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ else
3131
util::install_helm
3232
fi
3333

34-
APP_VERSION=$(helm show chart ./charts/hami | grep '^appVersion' |grep -E '[0-9].*.[0-9]' | awk -F ':' '{print $2}' | tr -d ' ')
34+
APP_VERSION=$(helm show chart ./charts/hami | grep '^appVersion' |grep -E '[0-9].*.[0-9]' | awk -F ':' '{print $2}' | tr -d ' ' | cut -c2-)
3535
VERSION=$(helm show chart ./charts/hami | grep '^version' |grep -E '[0-9].*.[0-9]' | awk -F ':' '{print $2}' | tr -d ' ')
3636

3737
if [[ ${APP_VERSION} != ${VERSION} ]]; then

0 commit comments

Comments
 (0)