What happened:
Given a CloneSet with InPlaceIfPossible update strategy and maxSurge set. If you update the annotation in the pod template which should trigger in-place update for the running pods but this is not happening. It creates new pods configured in the maxSurge and in-place updates the remaining pods.
What you expected to happen:
I expect all pods to be in-place updated.
How to reproduce it (as minimally and precisely as possible):
Create a CloneSet with InPlaceIfPossible update strategy and maxSurge
Cloneset
apiVersion: apps.kruise.io/v1alpha1
kind: CloneSet
metadata:
labels:
app: sample
name: sample
spec:
replicas: 5
selector:
matchLabels:
app: sample
updateStrategy:
type: InPlaceIfPossible
maxSurge: 3
template:
metadata:
labels:
app: sample
annotations:
tracking-number: one
spec:
containers:
- name: nginx
image: nginx:alpine
Update the pod template to update the annotation
annotations:
tracking-number: two
You can observe that 3 new pods are created, 3 old pods are deleted and the remaining 2 pods are in-place updated.
Anything else we need to know?:
Environment:
- Kruise version: v1.8.0
- Kubernetes version (use
kubectl version): Client Version: v1.35.0, Server Version: v1.35.0
- Install details (e.g. helm install args): helm install kruise openkruise/kruise --version 1.8.0
- Others:
What happened:
Given a CloneSet with
InPlaceIfPossibleupdate strategy andmaxSurgeset. If you update the annotation in the pod template which should trigger in-place update for the running pods but this is not happening. It creates new pods configured in themaxSurgeand in-place updates the remaining pods.What you expected to happen:
I expect all pods to be in-place updated.
How to reproduce it (as minimally and precisely as possible):
Create a CloneSet with
InPlaceIfPossibleupdate strategy andmaxSurgeCloneset
Update the pod template to update the annotation
You can observe that 3 new pods are created, 3 old pods are deleted and the remaining 2 pods are in-place updated.
Anything else we need to know?:
Environment:
kubectl version): Client Version: v1.35.0, Server Version: v1.35.0