百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
O

operatorkit

> 云原生
开源

一个具有主张的 Go 框架,用于开发 Kubernetes 运算器

198 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个具有主张的 Go 框架,用于开发 Kubernetes 运算器

operatorkit

:warning: Important: This library has been deprecated in favor of kubebuilder. Please, use kubebuilder if you want to create a new operator.

Package operatorkit implements an opinionated framework for developing Kubernetes operators. It emerged as we extracted common functionality from a number of the operators we developed at Giant Swarm. The goal of this library is to provide a common structure for operator projects and to encapsulate best practices we learned while running operators in production.

Features

  • CRD primitives to reliably create, watch and delete custom resources, as well as any Kubernetes runtime object.
  • Managing finalizers on reconciled objects, making sure the code is executed at least once for each create/delete/update event.
  • Guarantees to perform at least one successful deletion event reconciliation to avoid unnecessary, possibly expensive interactions with third party systems.
  • Resource wrapping to gain ability of composing resources like middlewares.
  • Control Flow Primitives that allow cancellation and repetition of resource implementations.
  • Independent packages. It is possible to use only certain parts of the library without being bound to all primitives it provides.
  • Ability to change behaviour that is often specific to an organization like logging and error handling.
  • Pause Reconciliation using pausing annotations on runtime objects to stop and resume reconciliation on demand.

Roadmap

For future planned features and breaking changes see the roadmap.

Docs

  • Control Flow Primitives
  • File Structure
  • Keeping Reconciliation Loops Short
  • Managing CR Status Sub Resources
  • Metrics Provider
  • Pause Reconciliation
  • Troubleshooting
  • Using Finalizers
  • Using Kubernetes Events

Integration Tests

You can simply create a kind cluster to run the integration tests.

nohighlight
kind create cluster

The tests need to figure out how to connect to the Kubernetes cluster. Therefore we need to set an environment variable pointing to your local kube config.

nohighlight
export E2E_KUBECONFIG=~/.kube/config

Now you can easily run the integration tests.

nohighlight
go test -v -tags=k8srequired ./integration/test/

Once you did your testing you may want to delete your local test cluster again.

nohighlight
kind delete cluster

Projects using operatorkit

Giant Swarm operators using operatorkit.

Example

For a detailed state of art implementation, please see giantswarm/aws-operator.

Contributing & Reporting Bugs

See CONTRIBUTING for details on submitting patches, the contribution workflow as well as reporting bugs.

License

operatorkit is under the Apache 2.0 license. See the LICENSE file for details.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goframeworkgokuberneteslibrary

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类云原生
定价开源

> 相关工具

K
Kubernetes
容器编排事实标准
H
Helm
Kubernetes 包管理器
S
seaweedfs
SeaweedFS is a distributed storage system for object storage (S3), file systems, and Iceberg tables,