Skip to content

[Bug] Updating RBG roleTemplate do not trigger a rolling update of pods in some cases #85

@Syspretor

Description

@Syspretor

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.
  • 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
  • 5. Please use English, otherwise it will be closed.

Describe the bug

In the following two cases, updates to RBG’s role.template field do not trigger a pod rolling update:

  1. 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.

  1. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions