This is an automated email from the ASF dual-hosted git repository.

zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new 7c5cf49fa [HELM] Fix: quote image tag
7c5cf49fa is described below

commit 7c5cf49fa765a18df6b1e2b8ed4081c4c093d25c
Author: wusphinx <[email protected]>
AuthorDate: Fri Oct 20 16:39:12 2023 +0800

    [HELM] Fix: quote image tag
    
    ### What changes were proposed in this pull request?
    
    quote for image tag when it is numeric characters
    
    ### Why are the changes needed?
    when the tag is 0.3
    ```
    helm upgrade --install celeborntest .  -f values.yaml  --set 
image.repository=myharbor/apache-celeborn --set image.tag=0.3
    ```
    some error as below:
    ```
    rror: StatefulSet in version "v1" cannot be handled as a StatefulSet: 
v1.StatefulSet.Spec: v1.StatefulSetSpec.Spec: v1.StatefulSetSpec.Template: 
v1.PodTemplateSpec.ObjectMeta: v1.ObjectMeta.Labels: ReadString: expects " or 
n, but found 0, error found in #10 byte of ...|.io/tag":0.3,"app.ku|..., bigger 
context 
...|rnetes.io/role":"worker","app.kubernetes.io/tag":0.3,"app.kubernetes.io/version":"0.3.0"}},"spec":{"|...
    ```
    K8s version: v1.22.12
    >[The label values must be strings. In yaml, that means all numeric values 
must be 
quoted.](https://github.com/kubernetes/kubernetes/issues/57509#issuecomment-353509068)
    
    just quote the tag with `| quote` to fix it
    
    ### Does this PR introduce _any_ user-facing change?
    
    ### How was this patch tested?
    
    Closes #2006 from wusphinx/helm-image-tag-quote.
    
    Authored-by: wusphinx <[email protected]>
    Signed-off-by: zky.zhoukeyong <[email protected]>
---
 charts/celeborn/templates/master-statefulset.yaml | 2 +-
 charts/celeborn/templates/worker-statefulset.yaml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/charts/celeborn/templates/master-statefulset.yaml 
b/charts/celeborn/templates/master-statefulset.yaml
index 3d2c6853f..fbd101929 100644
--- a/charts/celeborn/templates/master-statefulset.yaml
+++ b/charts/celeborn/templates/master-statefulset.yaml
@@ -48,7 +48,7 @@ spec:
         app.kubernetes.io/instance: {{ .Release.Name }}
         app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
         app.kubernetes.io/role: master
-        app.kubernetes.io/tag: {{ .Values.image.tag }}
+        app.kubernetes.io/tag: {{ .Values.image.tag | quote }}
         {{- include "celeborn.selectorLabels" . | nindent 8 }}
     spec:
       {{- with .Values.affinity.master }}
diff --git a/charts/celeborn/templates/worker-statefulset.yaml 
b/charts/celeborn/templates/worker-statefulset.yaml
index e6e71a9ba..11efd50de 100644
--- a/charts/celeborn/templates/worker-statefulset.yaml
+++ b/charts/celeborn/templates/worker-statefulset.yaml
@@ -48,7 +48,7 @@ spec:
         app.kubernetes.io/instance: {{ .Release.Name }}
         app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
         app.kubernetes.io/role: worker
-        app.kubernetes.io/tag: {{ .Values.image.tag }}
+        app.kubernetes.io/tag: {{ .Values.image.tag | quote }}
         {{- include "celeborn.selectorLabels" . | nindent 8 }}
     spec:
       {{- with .Values.affinity.worker }}

Reply via email to