helm: helm upgrade is not recreating pod

Hello

I’m updating my deployment to add or remove a container with a flag but the deployment isn’t recreated My deployment looks like this

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ template "nginx.fullname" . }}
  labels:
    heritage: {{ .Release.Service }}
    release: {{ .Release.Name }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version }}
    app: {{ template "nginx.name" . }}
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    metadata:
      labels:
        app: {{ template "nginx.name" . }}
        release: {{ .Release.Name }}
    spec:
      containers:
        - name: {{ template "nginx.name" . }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - name: http
              containerPort: 80
              protocol: TCP
          # This (and the volumes section below) mount the config map as a volume.
          volumeMounts:
            - mountPath: /usr/share/nginx/html
              name: wwwdata-volume
            - name: nginx-logs
              mountPath: /var/log/nginx/
          resources:
## Filebeat
      {{- if .Values.filebeat.enabled }}
      - name: {{ .Values.filebeat.name }}
        image: "{{ .Values.filebeat.image.repository }}:{{ .Values.filebeat.image.tag }}"
        imagePullPolicy: {{ .Values.filebeat.image.pullPolicy }}
        volumeMounts:
          - name: nginx-logs
            mountPath: /var/log/nginx/
      {{- end }}
      volumes:
        - name: wwwdata-volume
          configMap:
            name: {{ template "nginx.fullname" . }}
        - name: nginx-logs
          emptyDir: {}

and the command that I’m using is like this helm upgrade <deployment> <chart> --set filebeat.enabled=True

I read some issues and I’ve found that it was a bug in earlier versions but I’m using the last one

Client: &version.Version{SemVer:"v2.6.2", GitCommit:"be3ae4ea91b2960be98c07e8f73754e67e87963c", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.6.2", GitCommit:"be3ae4ea91b2960be98c07e8f73754e67e87963c", GitTreeState:"clean"}

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

My bad, I figured out what was going on: the updateStrategy on StatefulSet is ‘onDelete’ by default, so as soon as I updated my statefulset to use RollingUpdate strategy, everything worked

here are the contents of one statefulset:

13 spec: 14 updateStrategy: 15 type: RollingUpdate

then i am doing this:

helm upgrade deploy-elasticsearch-0.2.0 --force --recreate-pods...

i see the revision changed, but don’t see any pods recreating