tanishq-chugh commented on code in PR #6983:
URL: https://github.com/apache/hive/pull/6983#discussion_r4694720014


##########
packaging/src/kubernetes/helm/hive-operator/templates/deployment.yaml:
##########
@@ -37,5 +37,10 @@ spec:
         - name: operator
           image: "{{ .Values.operator.image.repository }}:{{ 
.Values.operator.image.tag }}"
           imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
+          {{- with .Values.operator.watchNamespaces }}
+          env:
+            - name: HIVE_OPERATOR_WATCH_NAMESPACES
+              value: {{ join "," . | quote }}
+          {{- end }}

Review Comment:
   This is invalid. This would have occurred in case `-` trimming had been used 
even with the ending delimiter `{{`. 
   With the current patch, it is rendered correctly:
   
   ```
   tanishqchugh@D7JR63VVY6 hive % helm template test 
packaging/src/kubernetes/helm/hive-operator \
     --set 'operator.watchNamespaces={ns1,ns2}' \
     -s templates/deployment.yaml
   ---
   # Source: hive-operator/templates/deployment.yaml
   apiVersion: apps/v1
   kind: Deployment
   metadata:
     name: test-hive-operator
     namespace: default
     labels:
       app.kubernetes.io/name: hive-kubernetes-operator
       app.kubernetes.io/instance: test
       app.kubernetes.io/version: "4.3.0-SNAPSHOT"
       app.kubernetes.io/managed-by: Helm
       helm.sh/chart: hive-operator-4.3.0-SNAPSHOT
   spec:
     replicas: 1
     selector:
       matchLabels:
         app.kubernetes.io/name: hive-kubernetes-operator
         app.kubernetes.io/instance: test
     template:
       metadata:
         labels:
           app.kubernetes.io/name: hive-kubernetes-operator
           app.kubernetes.io/instance: test
       spec:
         serviceAccountName: test-hive-operator
         containers:
           - name: operator
             image: "apache/hive:operator-4.3.0-SNAPSHOT"
             imagePullPolicy: IfNotPresent
             env:
               - name: HIVE_OPERATOR_WATCH_NAMESPACES
                 value: "ns1,ns2"
             resources:
               limits:
                 memory: 512Mi
               requests:
                 cpu: 200m
                 memory: 256Mi
   tanishqchugh@D7JR63VVY6 hive % 
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to