Giter Site home page Giter Site logo

kusionstack / operating Goto Github PK

View Code? Open in Web Editor NEW
64.0 64.0 10.0 1.5 MB

Manage k8s resources effectively with risk under control.

Home Page: https://www.kusionstack.io/operating/introduction/

License: Apache License 2.0

Dockerfile 0.12% Makefile 0.88% Go 98.39% Shell 0.61%
cloud-native kubernetes kubernetes-operator

operating's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

operating's Issues

Document: ResourceConsist Introduction

What would you like to be added?

A doc to introduce ResourceConsistent.

Why is this needed?

Introduce ResourceConsistent:

  • background
  • adapter catalog and how to customize

FeatureRequest: Install by Helm

Is your feature request related to a problem? Please describe:

No response

Describe the feature you'd like:

Support install cafed by helm

$ helm repo add kusionstack https://kusionstack.io/charts

$ helm repo update

$ helm install kafed kusionstack/kafed --version v0.1.0

$ helm uninstall kafed

Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

No response

Bug: index out range when collaset spec.replicas < partition

Minimal reproduce step

  • 问题复现:Collaset缩容时,replicas值可能小于partion值,导致崩溃
apiVersion: apps.kusionstack.io/v1alpha1
kind: CollaSet
metadata:
  name: server
  namespace: operating-tutorial
spec:
  replicas: 2 # scale down from 3 to 2
  selector:
    matchLabels:
      app: server
  updateStrategy:
    podUpgradePolicy: InPlaceIfPossible
    rollingUpdate:
      byPartition:
        partition: 3
  template:
    metadata:
      labels:
        app: server
    spec:
      containers:
      - image: wu8685/echo:1.3
        name: server
        command:
        - /server
        resources:
          limits:
            cpu: "0.1"
            ephemeral-storage: 100Mi
            memory: 100Mi
          requests:
            cpu: "0.1"
            ephemeral-storage: 100Mi
            memory: 100Mi
        readinessProbe:
          httpGet:
            path: /healthz
            port: 8080
          initialDelaySeconds: 5
          periodSeconds: 3

What did you expect to see?

  • 校验或拦截

What did you see instead

  • kusionstack-controller-aneger崩溃
NAMESPACE            NAME                                              READY   STATUS    RESTARTS        AGE
kusionstack-system   kusionstack-controller-manager-6b6db85868-mgxc2   0/1     Error     8 (5m24s ago)   22m
  • 关键日志
panic: runtime error: slice bounds out of range [:3] with capacity 2

goroutine 328 [running]:
kusionstack.io/operating/pkg/controllers/collaset/synccontrol.decidePodToUpdateByPartition(0xc000158a00, {0xc00094d8c0?, 0x1b78b80?, 0x2})
	/home/runner/work/operating/operating/pkg/controllers/collaset/synccontrol/update.go:108 +0xb2
kusionstack.io/operating/pkg/controllers/collaset/synccontrol.decidePodToUpdate(0xc00094d850?, {0xc00094d8c0?, 0x2?, 0xc00094c790?})
	/home/runner/work/operating/operating/pkg/controllers/collaset/synccontrol/update.go:85 +0x4f
kusionstack.io/operating/pkg/controllers/collaset/synccontrol.(*RealSyncControl).Update(0xc0003e7e80, 0xc000158a00, {0xc00094d850, 0x2, 0x2}, {0xc00094c790, 0x2, 0x2}, 0xc000108f20, 0xc000745800, ...)
	/home/runner/work/operating/operating/pkg/controllers/collaset/synccontrol/sync_control.go:358 +0x193
kusionstack.io/operating/pkg/controllers/collaset.(*CollaSetReconciler).doSync(0xc000324a40, 0x58?, 0x7f21f1aeb5b8?, {0xc00094c790, 0x2, 0x2}, 0x0?)
	/home/runner/work/operating/operating/pkg/controllers/collaset/collaset_controller.go:193 +0x1b5
kusionstack.io/operating/pkg/controllers/collaset.(*CollaSetReconciler).DoReconcile(0xc000339260?, 0x1b88c18?, 0xc000158a00?, {0xc00094c790?, 0x8?, 0xc000860350?}, 0x0?)
	/home/runner/work/operating/operating/pkg/controllers/collaset/collaset_controller.go:174 +0x2b
kusionstack.io/operating/pkg/controllers/collaset.(*CollaSetReconciler).Reconcile(0xc000324a40, {0x1b775b8, 0xc000652b10}, {{{0xc000846168?, 0x186e6a0?}, {0xc000860350?, 0x281b890?}}})
	/home/runner/work/operating/operating/pkg/controllers/collaset/collaset_controller.go:164 +0x63b
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0xc000000fa0, {0x1b775b8, 0xc000652ab0}, {{{0xc000846168?, 0x186e6a0?}, {0xc000860350?, 0xc000628380?}}})
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:114 +0x22c
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc000000fa0, {0x1b77510, 0xc0003165c0}, {0x174b160?, 0xc00080fb20?})
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:311 +0x2f2
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc000000fa0, {0x1b77510, 0xc0003165c0})
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266 +0x1d9
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227 +0x85
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:223 +0x30c

What is your KusionStack components and its version?

operating 版本: latest
Kubernetes 版本: v1.27.3

Enhancement: refact resource consist & alibabacloudslb adapter

What would you like to be added?

Resourceconsist will be moved to kusionstack.io/resourceconsist, alibabacloudslb controller will be added by importing kusionstack.io/resourceconsist.

Why is this needed?

Resourceconsist in operating is no longer used. All adapters need be started by importing kusionstack.io/resourceconsist.

FeatureRequest: CollaSet supports delaying a period before do scaling-in or updating Pods

Is your feature request related to a problem? Please describe:

After the traffic is turned off, if CollaSet immediately act some operation on Pods, the traffic on the fly will get chance to fail.

Describe the feature you'd like:

CollaSet provides users a options to indicate a operationDelaySeconds to delay the operation for a while.

Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

No response

提供灰度流量的能力

What would you like to be added?

灰度流量的能力,比如一个应用有4个节点,如果使用beta发布,会有1/4的流量进来,这个流量比较大,能不能增加参数控制流量大小,比如10%这种

Why is this needed?

beta发布不能精准控制流量,生产环境发布,如果发现异常影响较大

Enhancement: e2e test framework

What would you like to be added?

build e2e test framework

Why is this needed?

to promote kafed quality by running kafed e2e test

Enhancement: CollaSet supports maxSurge feature when upgrading

What would you like to be added?

When upgrading pods under CollaSet, maxSurge is supposed to be supported.
If maxSurege works, a new pod need to be created and turn to ServiceAvailable podOpsLifecycle status, before upgrading the target pod by recreating it.

Why is this needed?

MaxSurge could provide more stable operation experience, when upgrading pods under CollaSet.

Enhancement: CollaSet basic features

What would you like to be added?

CollaSet basic features:

  • scale pods
  • update pods
  • pvc template support

Why is this needed?

Provide CollaSet to run application base on PodOpsLifecycle.

Enhancement: CollaSet supports exclude/include Pods

What would you like to be added?

CollaSets are able to exclude their owned Pods and designate them as orphaned. Conversely, they can also include these orphaned Pods to build the ownerReference relationship.

Why is this needed?

In order to support some features like migrating Pods from other workloads, preserving a specific scene, etc.

Document: Kafed introduction

What would you like to be added?

Doc to introduce kafed project.

Why is this needed?

Basic intro for kafed including goal, arch, roadmap, etc.

Enhancement: we should unite label value format

What would you like to be added?

We should use united format to set as label value

for example:

  • time.Now().Format(time.RFC3339)
  • time.Now()

Why is this needed?

label value on Pod is not united

    operating.podopslifecycle.kusionstack.io/collaset: "1692352738414032929"
    operation-permission.podopslifecycle.kusionstack.io/update: "1692352738"
    operation-type.podopslifecycle.kusionstack.io/collaset: update
    podopslifecycle.kusionstack.io/pod-instance-id: "1"
    pre-checked.podopslifecycle.kusionstack.io/collaset: "1692352738"

Document: kafed get started

What would you like to be added?

A doc to help users getting started with kafed.

Why is this needed?

We need a document to help users to install kafed components in their environment and run a simple demo.

Enhancement: add compensation logic in service-available calculation

What would you like to be added?

add compensation logic in service-available calculation.
if service-available condition not matched, get the resource from expected finalizer, check whether the resource still select the pod.

Why is this needed?

if pod labels changed or service selector changed, the pod won't be service-available anymore if the expected finalizer not removed correctly.
we can't fully rely on others do the clean job successfully in the case of label/selector change.

Enhancemen容器发布流程优化

What would you like to be added?

容器发布时,希望先部署新的容器,再去掉旧的容器

Why is this needed?

目前先去掉容器,节点较少的情况下,对剩下节点压力比较大

FeatureRequest: Release Action

Is your feature request related to a problem? Please describe:

Release automation by github release action.
(binary build & archive & docker build/push & release)

Describe the feature you'd like:

No response

Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

No response

Enhancement: 提供灰度流量的能力

What would you like to be added?

灰度流量的能力,比如一个应用有4个节点,如果使用beta发布,会有1/4的流量进来,这个流量比较大,能不能增加参数控制流量大小,比如10%这种

Why is this needed?

beta发布不能精准控制流量,生产环境发布,如果发现异常影响较大

Enhancement: move resourceconsist controller to an individual repo

What would you like to be added?

Nothing to add.

ResourceConsist controller will be moved to an individual repo, offering an ability of getReconciler/addToMgr.

Built-in adapters will be added into the repo so that common-used controller can be started by calling AddBuiltinAdaptersToMgr.
Customized adapters can import the new repo to add a customized controller to Manager.

Why is this needed?

Make customized adapters independent with KusionStack/Operating.

Enhancement:

What would you like to be added?

helm charts yaml not found

Why is this needed?

$ helm repo add kusionstack https://kusionstack.io/charts
$ Error: looks like "https://kusionstack.io/charts" is not a valid chart repository or cannot be reached: failed to fetch https://kusionstack.io/charts/index.yaml : 404 Not Found

Enhancement: Pod additional configuration management supports

What would you like to be added?

A workload designed to manage additional Pod configurations, such as sidecars, PVC, environment variables, as well as extra labels and annotations. These configurations are independent of the CollaSet control to enable parallel updates.

Why is this needed?

In many scenarios, configurations such as sidecars, associated PVCs, and environment variables are typically handled by separate teams. This approach allows different departments to manage different aspects of Pod configuration independently.

Document: PodOpsLifecycle introduction

What would you like to be added?

Introduction to tell the background, mechanism and implementation of PodOpsLifecycle.

Why is this needed?

PodOpsLifecycle is a important feature in kafed, we should provide a detail introduction.

Enhancement: ResourceConsist features

What would you like to be added?

ResourceConsistant Controller to reconcile service spec and backend resource status.

Why is this needed?

It enables users to include traffic control around Pod operation conveniently.

Enhancement: PodOpsLifecycle features

What would you like to be added?

PodOpsLifecycle features in v0.1.0

Why is this needed?

It is the important feature in kafed, which provide the base for kafed other features.

Document: PodTransitionRule introduction

What would you like to be added?

A doc to introduce RuleSet features in v0.1.0

Why is this needed?

Introduce users the background of RuleSet and how it works.

Enhancement: change the label controll

What would you like to be added?

change the label "podopslifecycle.kusionstack.io/control" to "kusionstack.io/control"

Why is this needed?

No response

容器发布流程优化

What would you like to be added?

容器发布时,希望先部署新的容器,再去掉旧的容器

Why is this needed?

目前先去掉容器,节点较少的情况下,对剩下节点压力比较大

FeatureRequest: deploy controllers and webhooks using kind

Is your feature request related to a problem? Please describe:

No response

Describe the feature you'd like:

No response

Describe alternatives you've considered

No response

Teachability, Documentation, Adoption, Migration Strategy

No response

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.