Kubernetes- Helm upgrade not working

7/28/2017

I am trying to upgrade one of my chart. But the changes which I have made in the "deployment.yaml" template in the chart is not there after the upgrade. I added the following lines in the spec of my kubernetes deployment.yaml file

spec:
  containers:
  - env:
    - name: LOGBACK_DB_ACQUIRE_INCREMENT
      value: "1"
    - name: LOGBACK_DB_MAX_IDLE_TIME_EXCESS_CONNECTIONS
      value: "10"
    - name: LOGBACK_DB_MAX_POOL_SIZE
      value: "2"
    - name: LOGBACK_DB_MIN_POOL_SIZE
      value: "1"

I tried upgrading using the following command

helm upgrade ironic-molly spring-app-0.1.2.tgz --recreate-pods

Where "ironic-molly" is the release-name and spring-app-0.1.2.tgz is my chart with changes.

Helm output says that the package is upgraded, but the changes which i have made is missing in the deployment.yaml. What might be causing this issue.?

Regards,

Muhammed Roshan

-- Muhammed Roshan
kubernetes
kubernetes-helm

2 Answers

7/29/2017

I think issue with your indents. I tested with my cluster it works. env tag should start same place as image: in your example it start below containers.

spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: envtest
        release: ugly-lizzard
    spec:
      containers:
        - name: envtest
          image: "nginx:stable"
          imagePullPolicy: IfNotPresent
          env:
          - name: SSHD
            value: disalbe
          ports:
            - containerPort: 80
-- sfgroups
Source: StackOverflow

7/28/2017

syntax (indents)

spec:
  containers:
  - env:
    - name: LOGBACK_DB_ACQUIRE_INCREMENT
      value: "1"
    - name: LOGBACK_DB_MAX_IDLE_TIME_EXCESS_CONNECTIONS
      value: "10"
    - name: LOGBACK_DB_MAX_POOL_SIZE
      value: "2"
    - name: LOGBACK_DB_MIN_POOL_SIZE
      value: "1"

should do the trick

-- Radek 'Goblin' Pieczonka
Source: StackOverflow