wave-k8s / wave

Kubernetes configuration tracking controller
Apache License 2.0
646 stars 82 forks source link

Wave is not starting the stateful set pods #121

Closed azeemkhan0917 closed 2 years ago

azeemkhan0917 commented 2 years ago

I am trying to use wave to restart my StatefulSet Pods, on a Kubernetes secret change. One thing to highlight here is that I am using the RolloutStrategy to be Delete. I see that the secret is being updated, however I don't see the rollout / restart happening for the same. Here is the StatefulSet Yaml for reference.

apiVersion: v1
kind: Service
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  ports:
  - port: 80
    name: web
  clusterIP: None
  selector:
    app: nginx
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: web
  annotations:
    reloader.stakater.com/auto: "true"
spec:
  serviceName: "nginx"
  replicas: 2
  updateStrategy:
    type: "OnDelete"
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      volumes:
      - name: foo
        secret:
          secretName: test
      containers:
      - name: nginx
        image: k8s.gcr.io/nginx-slim:0.8
        ports:
        - containerPort: 80
          name: web
        volumeMounts:
        - name: www
          mountPath: /usr/share/nginx/html
        - name: foo
          mountPath: "/tmp/foo"
          readOnly: true
  volumeClaimTemplates:
  - metadata:
      name: www
    spec:
      accessModes: [ "ReadWriteOnce" ]
      resources:
        requests:
          storage: 1Gi
michalgar commented 2 years ago

Looks like you are using "reloader" annotations instead of "wave" ones... You need to set: wave.pusher.com/update-on-config-change: "true"

github-actions[bot] commented 2 years ago

This issue has been inactive for 60 days. If the issue is still relevant please comment to re-activate the issue. If no action is taken within 7 days, the issue will be marked closed.