Skip to content

Helm install command failing for same deployment yaml #64

Open

Description

@arjunsbabu

Issue type: Question
Reported in: 1.10
Description of issue: I am trying deploying deployment in two git branches. One is successful and other is failing. The chart folder is same in both and all files..

Workaround (if possible): Recreating the branch by clonning working one will solve the issue. But like to know the reason

Error in devops pod

``

time="2019-05-09T13:50:15Z" level=info msg="Helm certificates detected"
time="2019-05-09T13:50:15Z" level=info msg="Issuing Helm command with arguments `[upgrade --install --wait --namespace myhealthcoach --values chart-845131195/pipeline.yaml dohmhc-98462966-adc0-4701-9dd5-e6401b6c3f9a chart-845131195/chart/dohnodemhc --tls --tls-ca-cert=/msb_helm_sec/ca.pem --tls-cert=/msb_helm_sec/cert.pem --tls-key=/msb_helm_sec/key.pem]`"
time="2019-05-09T13:50:15Z" level=info msg="Release "dohmhc-98462966-adc0-4701-9dd5-e6401b6c3f9a" does not exist. Installing it now.
Error: YAML parse error on dohmhc/templates/deployment.yaml: error converting YAML to JSON: yaml: invalid map key: map[interface {}]interface {}{".Values.replicaCount":interface {}(nil)}
"
time="2019-05-09T13:50:15Z" level=error msg="Error executing `upgrade --install --wait --namespace myhealthcoach --values chart-845131195/pipeline.yaml dohmhc-98462966-adc0-4701-9dd5-e6401b6c3f9a chart-845131195/chart/dohnodemhc`: exit status 1"
time="2019-05-09T13:50:27Z" level=debug msg="In status interval"

Activity

  1. sishida commented on May 9, 2019

    @sishida
    Collaborator

    Thank you for bringing this issue to our attention. The Microclimate team has been notified.

  2. arjunsbabu commented on May 9, 2019

    @arjunsbabu
    Author

    the same deployment.yaml is working for another branch . I can fix the error above . But like to know why the same error is not happening for a different branch
    issue deployment.yaml is as follows

    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
      name: "{{  .Chart.Name }}-deployment"
      labels:
        chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
    spec:
      replicas: {{ .Values.replicaCount }}
      template:
        metadata:
          labels:
            app: "{{ .Chart.Name }}-selector"
            version: "current"
        spec:
          containers:
          - name: "{{ .Chart.Name }}"
            image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
            imagePullPolicy: {{ .Values.image.pullPolicy }}
            ports:
            - containerPort: {{ .Values.service.servicePort }}
    
    

    values.yaml

    # Default values for templateExample.
    # This is a YAML-formatted file.
    # Declare variables to be passed into your templates.
    
    replicaCount: 1
    
    image:
      repository: sample
      tag: v0.1.0
      pullPolicy: Always
    
    service:
      name: http
      type: ClusterIP
      servicePort: 80
      targetPort: 3000
    
    resources:
      cpu: 100m
      memory: 128Mi
      requests:
        cpu: 100m
        memory: 128Mi
    

    I have tryed manual helm install command using the above files and it worked.
    The fix for the above is to add an "" in values.replicacount. After i have done it another error is coming in the microclimate deploy

    ie

    Error: release dohmhc-1eae8af9-978d-466a-9d67-3880463f6dcd failed: Deployment in version "v1beta1" cannot be handled as a Deployment: v1beta1.Deployment.Spec: v1beta1.DeploymentSpec.Replicas: readUint32: unexpected character: �, error found in #10 byte of ...|eplicas":"{ { .Value|..., bigger context ...|mespace":"dev-myhealthcoach"},"spec":{"replicas":"{ { .Values.replicaCount } }","template":{"metadat|...
    
    

    I have used the same deployment.yaml , values.yaml in another branch and its working. Infact what we have done is while we seen one branch working we merged the changes to another branch. ..But not working in new branch. Please help me find the route cause of tiller behaving differently in same situation. I have kept the issue branch for any testing
    @jagraj

  3. arjunsbabu commented on May 9, 2019

    @arjunsbabu
    Author

    i believe the reason is some other values provided by the microclimate to tiller..

  4. sishida commented on May 13, 2019

    @sishida
    Collaborator

    I am following up with the team again today to see if I can obtain more info for this question.

  5. jagraj commented on May 13, 2019

    @jagraj

    Arjun seems to be sick, I just had slack conversation with Arjun and requested test case so that we can reproduce in our environment. This will help to capture logs and debug this problem. He is going to share more information tomorrow.

  6. rajivnathan commented on May 13, 2019

    @rajivnathan

    I think there are 2 things related to naming that we should clarify:

    1. The helm chart folder name and the name in the Chart.yaml. I think those need to match because of helm limitations as I noted.
    2. The second is project name and the chart name. That's the one that I believe Arjun is talking about and those shouldn't need to match. It should work with Microcimate today.

    Steps to reproduce would help clarify whether that covers what Arjun is asking for and we can help verify it is working as expected.

  7. jagraj commented on May 14, 2019

    @jagraj

    I verified issue "2" above and this has been resolved in 18.06 release and the fix should be in your MC version 1.10 as well. I opened issue against our docs to take out the limitation that we currently documented in the current release of the docs.

  8. sishida commented on May 15, 2019

    @sishida
    Collaborator

    Thanks for opening the issue, Jag! I have merged a pull request that removes the limitation in our docs. The changes should appear with the next Microclimate release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions