We have started working on a Go implementation of Pulp Operator. The POC is here.
Here is a list of considerations we made before starting this effort:
PROS:
- Better debugging
- Better control of the logs
- Faster deploy and execution ( parallel tasks execution)
- We will be able to add unit tests
- Tests (unit and functional ) can be run in parallel. Golang provides an embedded test package to write unit tests)
Does go test run unit tests concurrently? - Stack Overflow - Most of the operators are written in go. Kubernetes is also written in go, which gives a better control of the environment.
- Not really a golang benefit, but if we are willing to go ahead and rewrite the operator, we could take the opportunity to split it into multiple operators following the best practices
- Kubernetes community
- based on above points, faster development speed, less burden to maintain
CONS:
- re-write operator from ansible to go (translation from ansible to go is not that painful)
- rewrite/port existing tests
- learn go
- learn the migration process to generate the bundle https://github.com/operator-framework/operator-registry/blob/v1.16.1/docs/design/operator-bundle.md