Closed mohittalele closed 2 months ago
For each replica, LWS will create a leader pod at first, after the leader pos is scheduled, it will create a worker statefulset, and set a owner reference to the leader pod. This may caused some issue when running on openshift, seems it doesn't allow mutating that resource.
@liurupeng thanks for your explanation. Yes i suspect the openshift is unable to mutate the required resources. Can you elaborate which permissions and specific role needs to be changed in order it work.
@liurupeng Any pointers would really appreciated :)
Hi @mohittalele this is the required rbac roles: https://github.com/kubernetes-sigs/lws/blob/main/config/rbac/role.yaml @Edwinhr716 could you reproduce this issue and see if with a proper permission we can run the controller on openshift
@liurupeng thanks for your reply. I get same errors even after updating rbac roles as given in file. This is test example I used
apiVersion: leaderworkerset.x-k8s.io/v1
kind: LeaderWorkerSet
metadata:
name: leaderworkerset-multi-template
namespace: dl-llmaas-test
spec:
leaderWorkerTemplate:
leaderTemplate:
metadata: {}
spec:
containers:
- command:
- sh
- -c
- |
sleep 3600
env:
- name: HOME
value: /tmp
image: busybox
name: busybox
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 100m
requests:
cpu: 50m
restartPolicy: Default
size: 4
workerTemplate:
metadata: {}
spec:
containers:
- command:
- sh
- -c
- |
sleep 3600
image: busybox
name: nginx
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 100m
requests:
cpu: 50m
replicas: 2
rolloutStrategy:
rollingUpdateConfiguration:
maxSurge: 0
maxUnavailable: 1
type: RollingUpdate
startupPolicy: LeaderCreated
/assign
Can confirm that I see the same behavior on 4.15 as user.
What happened: On openshift LWS was deployed using instructions given in repository. When I create a LWS CR, I expect leader and worker pods as described in documentation. However only leader pod is spin up and no worker pods are provisioned by lws. The controller logs below error -
What you expected to happen: I expect leader and worker groups to be in running set. How to reproduce it (as minimally and precisely as possible):
Use below template and create lws
Anything else we need to know?:
Environment:
kubectl version
): v1.28.10+a2c84a5git describe --tags --dirty --always
):cat /etc/os-release
): 0.3.0