Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] sidecarset打散策略有问题 #1226

Open
13567436138 opened this issue Mar 18, 2023 · 0 comments
Open

[BUG] sidecarset打散策略有问题 #1226

13567436138 opened this issue Mar 18, 2023 · 0 comments
Assignees
Labels
kind/bug Something isn't working
Projects

Comments

@13567436138
Copy link

What happened:
sidecarset/ss-updateStrategy-scatterStrategy.yaml

kubectl apply -f ss-updateStrategy-scatterStrategy.yaml -n kruise

apiVersion: apps.kruise.io/v1alpha1
kind: SidecarSet
metadata:
  name: sidecarset
spec:
  selector:
    matchLabels:
      app: nginx
  containers:
  - name: sidecar1
    image: centos:6.7
    command: ["sleep", "999d"]
    podInjectPolicy: BeforeAppContainer
    volumeMounts:
    - name: log-volume
      mountPath: /var/log
  volumes:
  - name: log-volume
    emptyDir: {}
  updateStrategy:
    maxUnavailable: 1
    scatterStrategy:
    - key: foo
      value: bar

sidecarset/cloneset-nginx-updateStrategy.yaml

kubectl apply -f cloneset-nginx-updateStrategy.yaml -n kruise

apiVersion: apps.kruise.io/v1alpha1
kind: CloneSet
metadata:
  labels:
    app: nginx
  name: nginx
spec:
  replicas: 5
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:alpine
  updateStrategy:
    type: ReCreate
    maxUnavailable: 1
kubectl label pod -n kruise nginx-4znwb foo=bar
kubectl label pod -n kruise nginx-frrb9 foo=bar
kubectl label pod -n kruise nginx-m9j99 foo=bar

kubectl patch SidecarSet sidecarset --type='json'  -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"busybox:latest"}]' -n kruise

[root@node01 ~]# kubectl get pod -n kruise -w
NAME                                      READY   STATUS    RESTARTS   AGE
nfs-client-provisioner-69557bfdb8-hzplg   0/1     Unknown   0          98d
nginx-4znwb                               2/2     Running   0          78s
nginx-frrb9                               2/2     Running   0          78s
nginx-m9j99                               2/2     Running   0          78s
nginx-n8xd5                               2/2     Running   0          78s
nginx-rwtmb                               2/2     Running   0          78s
nginx-frrb9                               2/2     Running   0          93s
nginx-frrb9                               2/2     Running   1          2m3s
nginx-frrb9                               2/2     Running   1          2m4s
nginx-n8xd5                               2/2     Running   0          2m8s
nginx-n8xd5                               2/2     Running   1          2m39s
nginx-n8xd5                               2/2     Running   1          2m40s
nginx-rwtmb                               2/2     Running   0          2m44s
nginx-rwtmb                               2/2     Running   1          3m15s
nginx-rwtmb                               2/2     Running   1          3m16s
nginx-m9j99                               2/2     Running   0          3m20s
nginx-m9j99                               2/2     Running   1          3m52s
nginx-m9j99                               2/2     Running   1          3m53s
nginx-4znwb                               2/2     Running   0          3m57s
nginx-4znwb                               2/2     Running   1          4m28s
nginx-4znwb                               2/2     Running   1          4m29s


nginx-m9j99和nginx-4znwb 应该分开的

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kruise version:1.3.0
  • Kubernetes version (use kubectl version):
  • Install details (e.g. helm install args):
  • Others:
@13567436138 13567436138 added the kind/bug Something isn't working label Mar 18, 2023
@furykerry furykerry assigned zmberg and unassigned FillZpp Mar 20, 2023
@zmberg zmberg added this to Proposal in Roadmap via automation Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Roadmap
  
Proposal
Development

No branches or pull requests

3 participants