Operator SDK

operator-sdk是operator framework的一部分,是一个致力于简化整个opearator creation的整个过程的一个社区项目。有了operator-sdk,我们只需要在control loop里面写定制的operational逻辑就可以了。

三种operator SDK supports:

类型 生成的objects 你需要做
Go Operator
  • General go program structure
  • Boilerplate code to talk to the Kubernetes API
  • Boilerplate code to watch for Kubernetes objects of interest
  • An entry point to the reconciliation loop
  • An example YAML files based on CRDs
  • Custom objects via CRDs
  • Control loop logic in Go
  • Potentially artistic stunts only possible by talking directly to the API from Go
Ansible Operator
  • A Go program that runs an Ansible playbook or role every time a certain type of object is detected / modified
  • Ansible playbook or role
  • Custom objects via CRD

你可能感兴趣的:(ocp,operator,kubernetes,容器,云原生)