grafana / grafana-app-sdk

An SDK for developing apps for grafana using kubernetes-like storage and operators
Apache License 2.0
45 stars 8 forks source link

[docs] Update Operator Docs #269

Closed IfSentient closed 6 months ago

IfSentient commented 6 months ago

Rather large docs enhancement, update the operator doc and add a new doc on Writing an Operator, which breaks down the simple.Operator and how to use more complex behavior with operator.Operator. As part of this enhancement, additions were made to the tutorial doc for adding functionality to the watcher and adding admission control to the operator. Some small fixes to local project setup and codegen were made along the way as a product of testing the new tutorial changes.

Resolves https://github.com/grafana/grafana-app-sdk/issues/255

A future PR should be made to introduce multiple versions to the tutorial to go alongside https://github.com/grafana/grafana-app-sdk/blob/main/docs/custom-kinds/managing-multiple-versions.md, but that is out-of-scope for this PR.

IfSentient commented 6 months ago

Nice! I just had an idea – do you think we should replace our current examples (since most of them are outdated) with the issue tracker code from the tutorial?

Possibly, I think we have some examples that use things the tutorial code doesn't (like more advanced store usage, and a non-simple operator), but there's aspects we can re-use.