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

strategy 更新策略 怎么配置 #26

Closed
cx2c opened this issue Oct 23, 2024 · 10 comments
Closed

strategy 更新策略 怎么配置 #26

cx2c opened this issue Oct 23, 2024 · 10 comments

Comments

@cx2c
Copy link

cx2c commented Oct 23, 2024

General Question

...
spec:
  selector:
    matchLabels:
      app: release-rest-server
      mesh: prod
  strategy:
    rollingUpdate:
      maxSurge: 50%
      maxUnavailable: 50%
    type: RollingUpdate
  replicas: 2
  template:
    metadata:
...

strategy 这一段,rollingUpdate 和 type, 用konfig怎么配置

@Peefy
Copy link
Contributor

Peefy commented Oct 23, 2024

cc @zong-zhe Can you help provide more detailed examples or documentation in this repo?

@cx2c
Copy link
Author

cx2c commented Oct 24, 2024

image 文档里 SchedulingStrategy 在 strategy 下, 一个是更新策略 一个是调度策略吧。 这俩不是一回事,卡在更新策略这里了,能尽快给个 使用例子么~

@zong-zhe
Copy link
Contributor

zong-zhe commented Oct 24, 2024

Hi @cx2c 😄

This is not currently supported in konfig, I will provide a PR later today to complete this part of the function and provide corresponding examples, if you are interested in this part, we can also complete this part of the work together, PR welcome 🎉.

The location of the code that needs to be adjusted is here:

_workloadInstance = appsv1.Deployment {**workloadAttributes}

The hard code example:

image

@cx2c
Copy link
Author

cx2c commented Oct 24, 2024

还有亲和性这一段 能给个例子么

    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - release-rest-server
            topologyKey: kubernetes.io/hostname

@zong-zhe
Copy link
Contributor

zong-zhe commented Oct 25, 2024

Hi @cx2c 😄 , this part of the content also needs to be extended, but it seems not a good solution to transfer the backend model to the frontend model all the time, because it will eventually cause the frontend to become messy, I will spend some time this weekend to try to find a suitable way to extend this part. And if you are in a hurry, you can also, refer to the PR I provided above, to extend it. If you have any suitable ways to expand that you can also communicate with us in this issue.
AND, We welcome you to become a KCL community commiter, or if possible, a community maintainer 😄

@cx2c
Copy link
Author

cx2c commented Oct 29, 2024

有进展么~

@Peefy
Copy link
Contributor

Peefy commented Oct 29, 2024

cc @zong-zhe

@zong-zhe
Copy link
Contributor

Hi @cx2c 😄

This has not been completed yet, and I will provide a PR similar to #27 to support affinity temporarily so that this issue will not block your work.

@cx2c
Copy link
Author

cx2c commented Oct 29, 2024

感谢~

@Peefy
Copy link
Contributor

Peefy commented Oct 31, 2024

The affinity example is in the PR #29

@Peefy Peefy closed this as completed Nov 4, 2024
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

3 participants