Checklist
Describe the bug
In the following two cases, updates to RBG’s role.template field do not trigger a pod rolling update:
- When the template has ReadinessProbe/LivenessProbe configured, updating the Image field does not trigger any Pod updates.
However, if the template does not have ReadinessProbe/LivenessProbe configured, updating the image correctly triggers a rolling update.
- Updating the SecurityContext field in the template does not trigger a rolling update of the Pods.
Reproduction
For case 1:
- Create an RBG with a readinessProbe configured.
apiVersion: workloads.x-k8s.io/v1alpha1
kind: RoleBasedGroup
metadata:
name: demo
spec:
roles:
- name: role-1
replicas: 1
template:
spec:
containers:
- name: demo
image: nginx:1.14.2
ports:
- containerPort: 8080
name: http
protocol: TCP
readinessProbe:
initialDelaySeconds: 30
periodSeconds: 30
tcpSocket:
port: 8080
- Update with image in RBG with following yaml
apiVersion: workloads.x-k8s.io/v1alpha1
kind: RoleBasedGroup
metadata:
name: demo
spec:
roles:
- name: role-1
replicas: 1
template:
spec:
containers:
- name: demo
image: nginx:latest #nginx:1.14.2
ports:
- containerPort: 8080
name: http
protocol: TCP
readinessProbe:
initialDelaySeconds: 30
periodSeconds: 30
tcpSocket:
port: 8080
The update will not trigger a pods rolling update.
For case 2:
- Create an RBG with a readinessProbe configured.
apiVersion: workloads.x-k8s.io/v1alpha1
kind: RoleBasedGroup
metadata:
name: demo
spec:
roles:
- name: role-1
replicas: 1
template:
spec:
containers:
- name: demo
image: nginx:1.14.2
- Update with securityContext in RBG with following yaml
apiVersion: workloads.x-k8s.io/v1alpha1
kind: RoleBasedGroup
metadata:
name: demo
spec:
roles:
- name: role-1
replicas: 1
template:
spec:
containers:
- name: demo
image: nginx:1.14.2
securityContext:
runAsUser: 0
privileged: true
The update will not trigger a pods rolling update.
Environment
- Kuberenetes Version: v1.31.1
- RBG Controller Version: v0.5.0.alpha3
Checklist
Describe the bug
In the following two cases, updates to RBG’s role.template field do not trigger a pod rolling update:
However, if the template does not have ReadinessProbe/LivenessProbe configured, updating the image correctly triggers a rolling update.
Reproduction
For case 1:
The update will not trigger a pods rolling update.
For case 2:
The update will not trigger a pods rolling update.
Environment