This is a low dependency/scalable Kubernetes resource status check library that performs magic modifications based on kubernetes-sigs/cli-utils/kstatus.
- ⚡ Low Dependency
- 🌲 Scalable
go get github.com/elliotxx/kstatus
package main
import (
"github.com/elliotxx/kstatus"
)
func main() {
// deployment := getDeploymentFromCluster()
res, err := Compute(deployment)
if err != nil {
panic(err)
}
fmt.Println(toJSON(res))
}
Output:
{
"type": "Reconciling",
"status": "True",
"reason": "LessUpdated",
"message": "Updated: 0/1"
}
More examples: ./example_test.go