File tree Expand file tree Collapse file tree 6 files changed +38
-8
lines changed
Expand file tree Collapse file tree 6 files changed +38
-8
lines changed Original file line number Diff line number Diff line change 6464 images : |
6565 ghcr.io/baizeai/snapshot-controller
6666 tags : |
67- type=semver,pattern={{version }}
67+ type=semver,pattern={{raw }}
6868
6969 - name : Build
7070 uses : docker/build-push-action@v4
@@ -102,7 +102,7 @@ jobs:
102102
103103 - name : Tag helm chart image
104104 run : |
105- image_tag=${{ steps.get_version.outputs.VERSION }}
105+ image_tag=v ${{ steps.get_version.outputs.VERSION }}
106106 chart_version=${{ steps.get_version.outputs.VERSION }}
107107 sed -i "s/latest/${image_tag}/g" $HELM_CHARTS_DIR/values.yaml
108108 chart_smever=${chart_version#"v"}
Original file line number Diff line number Diff line change 1+ { {/* vim: set filetype= mustache: */} }
2+ { {/*
3+ Return the proper image name
4+ {{ include " common.images.image" ( dict " imageRoot" .Values.path.to.the.image " global" $) } }
5+ */}}
6+ { {- define " common.images.image" -} }
7+ { {- $registryName := .imageRoot.registry -} }
8+ { {- $repositoryName := .imageRoot.repository -} }
9+ { {- $tag := .imageRoot.tag | toString -} }
10+ { {- if .global } }
11+ { {- if .global.imageRegistry } }
12+ { {- $registryName = .global.imageRegistry -} }
13+ { {- end -} }
14+ { {- end -} }
15+ { {- if $registryName } }
16+ { {- printf " %s/%s:%s" $registryName $repositoryName $tag -} }
17+ { {- else -} }
18+ { {- printf " %s:%s" $repositoryName $tag -} }
19+ { {- end -} }
20+ { {- end -} }
Original file line number Diff line number Diff line change @@ -60,3 +60,8 @@ Create the name of the service account to use
6060{ {- default " default" .Values.serviceAccount.name } }
6161{ {- end } }
6262{ {- end } }
63+
64+
65+ { {- define " snapshot-pod.image" -} }
66+ { { include " common.images.image" (dict " imageRoot" .Values.image " global" .Values.global) } }
67+ { {- end -} }
Original file line number Diff line number Diff line change 3838 - name : {{ .Chart.Name }}
3939 securityContext :
4040 {{- toYaml .Values.securityContext | nindent 12 }}
41- image : " {{ .Values.image.repository }}:{{ .Values. image.tag | default .Chart.AppVersion }}"
41+ image : {{ template "snapshot-pod. image" . }}
4242 imagePullPolicy : {{ .Values.image.pullPolicy }}
4343 args :
4444 - --leader-elect=false
Original file line number Diff line number Diff line change 3333 - name : {{ .Chart.Name }}
3434 securityContext :
3535 {{- toYaml .Values.securityContext | nindent 12 }}
36- image : " {{ .Values.image.repository }}:{{ .Values. image.tag | default .Chart.AppVersion }}"
36+ image : {{ template "snapshot-pod. image" . }}
3737 imagePullPolicy : {{ .Values.image.pullPolicy }}
3838 args :
3939 - --leader-elect=true
Original file line number Diff line number Diff line change 22# This is a YAML-formatted file.
33# Declare variables to be passed into your templates.
44
5+ global :
6+ # # @param global.imageRegistry Global image registry
7+ imageRegistry : " "
8+
59replicaCount : 1
610
711image :
8- repository : aiharbor.daocloud.io/baize/snapshot-pod-controller
12+ registry : ghcr.io
13+ repository : baizeai/snapshot-controller
914 pullPolicy : IfNotPresent
1015 # Overrides the image tag whose default is the chart appVersion.
1116 tag : " latest"
@@ -28,15 +33,15 @@ serviceAccount:
2833podAnnotations : {}
2934
3035podSecurityContext : {}
31- # fsGroup: 2000
36+ # fsGroup: 2000
3237
3338securityContext : {}
3439 # capabilities:
3540 # drop:
3641 # - ALL
3742 # readOnlyRootFilesystem: true
3843 # runAsNonRoot: true
39- # runAsUser: 1000
44+ # runAsUser: 1000
4045
4146service :
4247 type : ClusterIP
@@ -45,7 +50,7 @@ resources: {}
4550 # We usually recommend not to specify default resources and to leave this as a conscious
4651 # choice for the user. This also increases chances charts run on environments with little
4752 # resources, such as Minikube. If you do want to specify resources, uncomment the following
48- # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
53+ # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
4954
5055nodeSelector : {}
5156
You can’t perform that action at this time.
0 commit comments