You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2020/04/21 05:56:58 UTC

[pulsar-helm-chart] 19/34: [Issue-5958][helm]: Fixing templates for helm deployment (#6148)

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

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git

commit 97ed16d2c639642089f4d202aec1e80192aafa9f
Author: roman-popenov <58...@users.noreply.github.com>
AuthorDate: Sat Feb 1 02:56:09 2020 -0500

    [Issue-5958][helm]: Fixing templates for helm deployment (#6148)
    
    Motivation:
    Fixes #5958:
    
    The following error appears when trying to deploy Pulsar using helm and values-mini.yaml:
    
    ```unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError(Deployment.spec.template.spec.containers[0]): unknown field "requests" in io.k8s.api.core.v1.Container```
    
    Cause:
    Mistake in the `pulsar-manager-deployment.yaml` deployment file:
    
    First line **63** should be:
    `{{- if .Values.pulsar_manager.resources }}` and it is currently `{{- if .Values.grafana.resources }}`
    
    There is also a mistake at line **65**:
    `{{ toYaml .Values.grafana.resources | indent 10 }}` should be `{{ toYaml .Values.pulsar_manager.resources | indent 12 }}`
    
    Modifications:
    Changed values in `values.yaml` and `templates/pulsar-manager-deployment.yaml`
    
    Test:
    Deploy the application into a kubernetes local cluster with
    `helm install pulsar-cluster --values pulsar/values-mini.yaml pulsar`
    
    AND
    
    `helm install pulsar-cluster --values pulsar/values.yaml pulsar`
    
    Documentation:
    Does this pull request introduce a new feature? - **No**
---
 pulsar/templates/pulsar-manager-deployment.yaml |  4 ++--
 pulsar/values.yaml                              | 10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pulsar/templates/pulsar-manager-deployment.yaml b/pulsar/templates/pulsar-manager-deployment.yaml
index 674ebf4..bb153e7 100644
--- a/pulsar/templates/pulsar-manager-deployment.yaml
+++ b/pulsar/templates/pulsar-manager-deployment.yaml
@@ -60,9 +60,9 @@ spec:
         - name: "{{ template "pulsar.fullname" . }}-{{ .Values.pulsar_manager.component }}"
           image: "{{ .Values.pulsar_manager.image.repository }}:{{ .Values.pulsar_manager.image.tag }}"
           imagePullPolicy: {{ .Values.pulsar_manager.image.pullPolicy }}
-        {{- if .Values.grafana.resources }}
+        {{- if .Values.pulsar_manager.resources }}
           resources:
-{{ toYaml .Values.pulsar_manager.resources | indent 10 }}
+{{ toYaml .Values.pulsar_manager.resources | indent 12 }}
         {{- end }}
           ports:
           - containerPort: 9527
diff --git a/pulsar/values.yaml b/pulsar/values.yaml
index 90811b3..2343fd6 100644
--- a/pulsar/values.yaml
+++ b/pulsar/values.yaml
@@ -348,7 +348,7 @@ dashboard:
 
       ## Optional. Leave it blank if your Ingress Controller can provide a default certificate.
       secretName: ""
-    
+
     ## Required if ingress is enabled
     hostname: ""
     path: "/"
@@ -434,10 +434,10 @@ grafana:
     repository: apachepulsar/pulsar-grafana
     tag: latest
     pullPolicy: IfNotPresent
-#  resources:
-#    requests:
-#      memory: 4Gi
-#      cpu: 1
+  resources:
+    requests:
+      memory: 4Gi
+      cpu: 1
   ## Grafana service
   ## templates/grafana-service.yaml
   ##