sample-controller-kubebuilder
controller-runtime
Our great sponsors
sample-controller-kubebuilder | controller-runtime | |
---|---|---|
1 | 53 | |
14 | 2,275 | |
- | 2.1% | |
0.0 | 9.3 | |
over 4 years ago | 6 days ago | |
Go | Go | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sample-controller-kubebuilder
-
InterSystems Kubernetes Operator Deep Dive: Introduction to Kubernetes Operators
Sample implementations of the Kubebuilder project can be found in the sample-controller-kubebuilder and in kubebuilder-sample-controller repositories.
controller-runtime
-
AWS open source newsletter, #176
operatorpkg is a set of packages used to develop Kubernetes operators at AWS. It contains opinions on top of existing projects like https://github.com/kubernetes/apimachinery and https://github.com/kubernetes-sigs/controller-runtime. In many cases, we plan to mature packages in operatorpkg before commiting them upstream.
-
My CNCF LFX Mentorship Spring 2023 Project at Kubescape
(rejected) kubernetes-sigs/controller-runtime #2266 🐛 Support get config inside snap with SNAP_REAL_HOME
- 深入解析kubernetes中的选举机制
-
How we wrote Tarantool Kubernetes Operator
• You can download Tarantool on the official website • Get help in our Telegram chat • Read more about Operator SDK here • Creating fake Kubernetes topology • The testify library we used for unit tests • E2E framework
-
Loft Labs Releases vcluster Plugin System and SDK To Make Integrations
The vcluster project maintainers have created an SDK for writing plugins that abstract a lot of the syncer complexity away from the user, but still provides access to the underlying data structures if needed. Internally, the vcluster SDK uses the popular controller-runtime project, that is used by vcluster itself to create the controllers. The vcluster SDK makes it possible to write custom plugins with just a few lines of code.
-
Golang Design Patterns in Kubernetes Codebase
// https://github.com/kubernetes-sigs/controller-runtime/blob/master/alias.go var ( // GetConfigOrDie creates a *rest.Config for talking to a Kubernetes apiserver. // If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running // in cluster and use the cluster provided kubeconfig. // // Will log an error and exit if there is an error creating the rest.Config. GetConfigOrDie = config.GetConfigOrDie GetConfig = config.GetConfig // NewControllerManagedBy returns a new controller builder that will be started by the provided Manager. NewControllerManagedBy = builder.ControllerManagedBy // NewWebhookManagedBy returns a new webhook builder that will be started by the provided Manager. NewWebhookManagedBy = builder.WebhookManagedBy // NewManager returns a new Manager for creating Controllers. NewManager = manager.New // Log is the base logger used by controller-runtime. It delegates // to another logr.Logger. You *must* call SetLogger to // get any actual logging. Log = log.Log )
-
How to start combining kubernetes and go knowledge
controller-runtime, uses client-go but adds an additional layer of abstraction to make life easier for you: https://github.com/kubernetes-sigs/controller-runtime
-
InterSystems Kubernetes Operator Deep Dive: Introduction to Kubernetes Operators
Scaffolding includes many files and manifests. The main.go file, for instance, is the entrypoint of code. It imports the controller-runtime library, instantiates and runs a special manager that keeps track of the controller run. Nothing to change in any of these files.
-
Autobucket Operator
The operator controller watches the Deployments and whenever it finds a Deployment with the special annotation “ab.leclouddev.com/cloud”, it will create (if missing) a matching Bucket CR. Luckily kubebuilder and controller-runtime do the heavy lifting for us here and we basically just have to define our deployment’s “Reconcile Loop”, which checks deployments and reconciles the Bucket resources:
What are some alternatives?
client-go - Go client for Kubernetes.
controller-tools - Tools to use with the controller-runtime libraries
operator-sdk - SDK for building Kubernetes applications. Provides high level APIs, useful abstractions, and project scaffolding.
yaml - A better way to marshal and unmarshal YAML in Golang
golang-design-pattern - 设计模式 Golang实现-《研磨设计模式》读书笔记
apimachinery
bucket-text-api - Simple REST API (built with Go) to write text files to Cloud Buckets.
autobucket-operator - Cloud Storage Kubernetes Operator with Go and Operator SDK
kubebuilder - Kubebuilder - SDK for building Kubernetes APIs using CRDs
vcluster-sdk - Provides a toolset to create custom vcluster syncers
reviewdog - 🐶 Automated code review tool integrated with any code analysis tools regardless of programming language