operator-sdk-extra

module
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: MIT

README

operator-sdk-extra

This framework is an extention of operator-sdk framework. The goal is to not rewrite all operator logic each time you implement new operator: Add finalizer, handle the deletion, read resources, compute expected resources and diffing resources to know if operator need update or create resources.

After write some operators, we know 3 different use case:

  • Multi phase reconciler: Use it when you need to handle some K8s resources from your own CRD (configmap, deployment, ingress, etc.)
  • Remote reconciler: Use it when you need to handle remote resources (not K8s resource) from API (create role, user, on databse server for example)
  • Sentinel reconciler: Use it when you need to track K8s resources that you doesn't own CRD (create some resources from ingress, etc ...)

Use cases

We will treat each use case with a real operator sample.

Multi phase reconciler

Read the dedicated documentation

Remote reconciler

Read the dedicated documentation

Sentinel reconciler

Read the dedicated documentation

Tips

Ignore reconcile

If you should to manually change ressources handled by operator, it can be usefull to ignore reconcilation on them. To to that, you can add the following annotation: operator-sdk-extra.webcenter.fr/ignoreReconcile: "true"

Directories

Path Synopsis
pkg
apis
Package shared contains types and functions used by API definitions in the operators package +groupName=operators.example.com
Package shared contains types and functions used by API definitions in the operators package +groupName=operators.example.com
apis/shared
Package shared contains types and functions used by API definitions in the operators package +groupName=operators.example.com
Package shared contains types and functions used by API definitions in the operators package +groupName=operators.example.com

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL