Giter Site home page Giter Site logo

是否只支持weight方式 about rollouts HOT 4 CLOSED

trestea avatar trestea commented on August 13, 2024
是否只支持weight方式

from rollouts.

Comments (4)

zmberg avatar zmberg commented on August 13, 2024

Let's make a schedule to support it

from rollouts.

chenshiwei-io avatar chenshiwei-io commented on August 13, 2024
apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
  name: echoserver-rollout
  namespace: sgt
spec:
  objectRef:
    workloadRef:
      apiVersion: apps/v1
      kind: Deployment
      name: echoserver
  strategy:
    canary:
      steps:
      - replicas: 1
        pause: {}
      - replicas: 2
        pause: {duration: 60}
      - replicas: 2
      trafficRoutings:
        - gateway:
            httpRouteName: echoserver
          service: echoserver

Error from server: error when applying patch:
{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{"apiVersion":"rollouts.kruise.io/v1alpha1","kind":"Rollout","metadata":{"annotations":{},"name":"echoserver-rollout","namespace":"sgt"},"spec":{"objectRef":{"workloadRef":{"apiVersion":"apps/v1","kind":"Deployment","name":"echoserver"}},"strategy":{"canary":{"steps":[{"pause":{},"replicas":1},{"pause":{"duration":60},"replicas":2},{"replicas":2}],"trafficRoutings":[{"gateway":{"httpRouteName":"echoserver"},"service":"echoserver"}]}}}}\n"}},"spec":{"strategy":{"canary":{"steps":[{"pause":{},"replicas":1},{"pause":{"duration":60},"replicas":2},{"replicas":2}]}}}}
to:
Resource: "rollouts.kruise.io/v1alpha1, Resource=rollouts", GroupVersionKind: "rollouts.kruise.io/v1alpha1, Kind=Rollout"
Name: "echoserver-rollout", Namespace: "sgt"
for: "a.yaml": admission webhook "vrollout.kb.io" denied the request: Spec.Strategy.Canary.Steps[0].steps: Invalid value: []v1alpha1.CanaryStep{v1alpha1.CanaryStep{Weight:(*int32)(nil), Replicas:(*intstr.IntOrString)(0xc000d6be20), Pause:v1alpha1.RolloutPause{Duration:(*int32)(nil)}}, v1alpha1.CanaryStep{Weight:(*int32)(nil), Replicas:(*intstr.IntOrString)(0xc000d6bec0), Pause:v1alpha1.RolloutPause{Duration:(*int32)(0xc0019e1f18)}}, v1alpha1.CanaryStep{Weight:(*int32)(nil), Replicas:(*intstr.IntOrString)(0xc000d6bf40), Pause:v1alpha1.RolloutPause{Duration:(*int32)(nil)}}}: weight cannot be empty for traffic routing

openkruise/kruise-rollout:v0.2.0 我也遇到了,weight 不允许 为空

from rollouts.

zmberg avatar zmberg commented on August 13, 2024

Because you have configured trafficRoutings, you need traffic scheduling, you must configure weight. why you want weight to be empty?

from rollouts.

chenshiwei-io avatar chenshiwei-io commented on August 13, 2024

嗯 了解了

因为之前参考微信文章的例子

https://mp.weixin.qq.com/s/LAg3jwGEwPF9MafcKlfmBA

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: echoserver
spec:
  replicas: 5
  template:
    spec:
      containers:
        - name: echoserver
          image: cilium/echoserver:latest
---
apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
  name: rollouts-demo
spec:
  objectRef:
    workloadRef:
      apiVersion: apps/v1
      kind: StatefulSet
      name: echoserver
  strategy:
    canary:
      steps:
      - replicas: 1
        pause: {}
      - replicas: 2
        pause: {duration: 60}
      - replicas: 2

from rollouts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.