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

Created non-essential canary service even though I didn't explicitly set enableExtraWorkloadForCanary=true #210

Open
kinnylee opened this issue Apr 10, 2024 · 0 comments

Comments

@kinnylee
Copy link

kinnylee commented Apr 10, 2024

// kruise rollout version
$ kubectl -n kruise-rollout get deploy kruise-rollout-controller-manager -oyaml|grep image:
image: openkruise/kruise-rollout:v0.5.0

// do not create extra canary deploy
$ kubectl -n devops-openkruise get deploy
NAME READY UP-TO-DATE AVAILABLE AGE
devops-backend 2/2 2 2 8d
devops-frontend 2/2 2 2 8d

// but create new canary service
$ kubectl -n devops-openkruise get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
devops-backend ClusterIP 10.100.20.105 8899/TCP 8d
devops-backend-canary ClusterIP 10.100.156.224 8899/TCP 11h
devops-frontend ClusterIP 10.100.196.115 80/TCP 8d
devops-frontend-canary ClusterIP 10.100.155.152 80/TCP 11h

// endpoint is none, access home page, report "no healthy upstream"
$ kubectl -n devops-openkruise get ep
NAME ENDPOINTS AGE
devops-backend 8d
devops-backend-canary 172.29.41.40:8899,172.29.50.112:8899 11h
devops-frontend 8d
devops-frontend-canary 172.29.35.158:80,172.29.78.232:80 11h

// rollout enableExtraWorkloadForCanary not found, use default false value
$ kubectl -n devops-openkruise get rollout
NAME STATUS CANARY_STEP CANARY_STATE MESSAGE AGE
devops-backend Progressing 2 StepPaused Rollout is in step(2/3), and you need manually confirm to enter the next step 11h
devops-frontend Progressing 2 StepPaused Rollout is in step(2/3), and you need manually confirm to enter the next step 11h

$ kubectl -n devops-openkruise get rollout -oyaml
apiVersion: v1
items:

  • apiVersion: rollouts.kruise.io/v1beta1
    kind: Rollout
    metadata:
    annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
    {"apiVersion":"rollouts.kruise.io/v1beta1","kind":"Rollout","metadata":{"annotations":{},"name":"devops-backend","namespace":"devops-openkruise"},"spec":{"strategy":{"canary":{"steps":[{"matches":[{"headers":[{"name":"version","type":"Exact","value":"canary"}]}],"replicas":1,"requestHeaderModifier":{"add":[{"name":"version","value":"canary"}]},"traffic":"10%"},{"replicas":2,"requestHeaderModifier":{"add":[{"name":"version","value":"canary"}]},"traffic":"50%"},{"replicas":"80%","traffic":"80%"}],"trafficRoutings":[{"customNetworkRefs":[{"apiVersion":"networking.istio.io/v1alpha3","kind":"VirtualService","name":"devops-backend"}],"service":"devops-backend"}]}},"workloadRef":{"apiVersion":"apps/v1","kind":"Deployment","name":"devops-backend"}}}
    rollouts.kruise.io/hash: 9492v4cx4v4f544wz48xvwv5vxxw82b8dxxbw548bx84567494496w5dfx6f54d8
    creationTimestamp: "2024-04-09T14:12:40Z"
    finalizers:
    • rollouts.kruise.io/rollout
      generation: 3
      name: devops-backend
      namespace: devops-openkruise
      resourceVersion: "33226578"
      uid: a49f36b8-2bb0-4d31-a276-657662d03529
      spec:
      disabled: false
      strategy:
      canary:
      steps:
      • matches:
        • headers:
          • name: version
            type: Exact
            value: canary
            replicas: 1
            requestHeaderModifier:
            add:
          • name: version
            value: canary
            traffic: 10%
      • replicas: 2
        requestHeaderModifier:
        add:
        • name: version
          value: canary
          traffic: 50%
      • replicas: 80%
        traffic: 80%
        trafficRoutings:
      • customNetworkRefs:
        • apiVersion: networking.istio.io/v1alpha3
          kind: VirtualService
          name: devops-backend
          service: devops-backend
          workloadRef:
          apiVersion: apps/v1
          kind: Deployment
          name: devops-backend
          status:
          canaryStatus:
          canaryReadyReplicas: 2
          canaryReplicas: 2
          canaryRevision: cc78bd69b
          currentStepIndex: 2
          currentStepState: StepPaused
          lastUpdateTime: "2024-04-09T14:22:33Z"
          message: BatchRelease is at state Ready, rollout-id , step 2
          observedWorkloadGeneration: 31
          podTemplateHash: 7598ddd48f
          rolloutHash: 9492v4cx4v4f544wz48xvwv5vxxw82b8dxxbw548bx84567494496w5dfx6f54d8
          stableRevision: 67b9cb9d5c
          conditions:
    • lastTransitionTime: "2024-04-09T14:19:44Z"
      lastUpdateTime: "2024-04-09T14:19:44Z"
      message: Rollout is in Progressing
      reason: InRolling
      status: "True"
      type: Progressing
      message: Rollout is in step(2/3), and you need manually confirm to enter the next
      step
      observedGeneration: 3
      phase: Progressing
  • apiVersion: rollouts.kruise.io/v1beta1
    kind: Rollout
    metadata:
    annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
    {"apiVersion":"rollouts.kruise.io/v1beta1","kind":"Rollout","metadata":{"annotations":{},"name":"devops-frontend","namespace":"devops-openkruise"},"spec":{"strategy":{"canary":{"steps":[{"matches":[{"headers":[{"name":"version","type":"Exact","value":"canary"}]}],"replicas":1,"requestHeaderModifier":{"add":[{"name":"version","value":"canary"}]},"traffic":"10%"},{"replicas":2,"requestHeaderModifier":{"add":[{"name":"version","value":"canary"}]},"traffic":"50%"},{"replicas":"80%","traffic":"80%"}],"trafficRoutings":[{"customNetworkRefs":[{"apiVersion":"networking.istio.io/v1alpha3","kind":"VirtualService","name":"devops-frontend"}],"service":"devops-frontend"}]}},"workloadRef":{"apiVersion":"apps/v1","kind":"Deployment","name":"devops-frontend"}}}
    rollouts.kruise.io/hash: w4zx9474dwz9cxvccw4x8wbvb644z4d2227vxc5f6x8d94bd4wxdfz7zx989c7wf
    creationTimestamp: "2024-04-09T14:12:24Z"
    finalizers:
    • rollouts.kruise.io/rollout
      generation: 3
      name: devops-frontend
      namespace: devops-openkruise
      resourceVersion: "33226454"
      uid: 3547bcd7-8073-48d9-9684-f4482e2c3742
      spec:
      disabled: false
      strategy:
      canary:
      steps:
      • matches:
        • headers:
          • name: version
            type: Exact
            value: canary
            replicas: 1
            requestHeaderModifier:
            add:
          • name: version
            value: canary
            traffic: 10%
      • replicas: 2
        requestHeaderModifier:
        add:
        • name: version
          value: canary
          traffic: 50%
      • replicas: 80%
        traffic: 80%
        trafficRoutings:
      • customNetworkRefs:
        • apiVersion: networking.istio.io/v1alpha3
          kind: VirtualService
          name: devops-frontend
          service: devops-frontend
          workloadRef:
          apiVersion: apps/v1
          kind: Deployment
          name: devops-frontend
          status:
          canaryStatus:
          canaryReadyReplicas: 2
          canaryReplicas: 2
          canaryRevision: 65f894dc5d
          currentStepIndex: 2
          currentStepState: StepPaused
          lastUpdateTime: "2024-04-09T14:22:25Z"
          message: BatchRelease is at state Ready, rollout-id , step 2
          observedWorkloadGeneration: 196
          podTemplateHash: 65f894dc5d
          rolloutHash: w4zx9474dwz9cxvccw4x8wbvb644z4d2227vxc5f6x8d94bd4wxdfz7zx989c7wf
          stableRevision: 756b7c88f5
          conditions:
    • lastTransitionTime: "2024-04-09T14:19:45Z"
      lastUpdateTime: "2024-04-09T14:19:45Z"
      message: Rollout is in Progressing
      reason: InRolling
      status: "True"
      type: Progressing
      message: Rollout is in step(2/3), and you need manually confirm to enter the next
      step
      observedGeneration: 3
      phase: Progressing
      kind: List
      metadata:
      resourceVersion: ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant