Skip to content

elliotxx/kstatus

Repository files navigation

Low Dependency/Scalable Kubernetes Resource Status Check Library


This is a low dependency/scalable Kubernetes resource status check library that performs magic modifications based on kubernetes-sigs/cli-utils/kstatus.

📜 Language

English | 简体中文

✨ Core Feature

  • ⚡ Low Dependency
  • 🌲 Scalable

⚙️ Usage

go get github.com/elliotxx/kstatus

📖 Example

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