https://github.com/elliotxx/kstatus
Low Dependency/Scalable Kubernetes Resource Status Check Library
https://github.com/elliotxx/kstatus
Last synced: 3 months ago
JSON representation
Low Dependency/Scalable Kubernetes Resource Status Check Library
- Host: GitHub
- URL: https://github.com/elliotxx/kstatus
- Owner: elliotxx
- License: mit
- Created: 2023-09-04T13:02:50.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-16T07:48:43.000Z (almost 2 years ago)
- Last Synced: 2025-04-13T00:16:20.087Z (7 months ago)
- Language: Go
- Homepage: https://pkg.go.dev/github.com/elliotxx/kstatus
- Size: 101 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README-zh.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
这是一个低依赖/可扩展的 Kubernetes 资源状态检查库,它基于 [kubernetes-sigs/cli-utils/kstatus](https://github.com/kubernetes-sigs/cli-utils/blob/master/pkg/kstatus/README.md) 进行魔改.
## 📜 多语言
[English](https://github.com/elliotxx/kstatus/blob/main/README.md) | [简体中文](https://github.com/elliotxx/kstatus/blob/main/README-zh.md)
## ✨ 核心特性
* ⚡ 低依赖
* 🌲 可扩展
## ⚙️ 使用方法
```shell
go get github.com/elliotxx/kstatus
```
## 📖 样例
```go
package main
import (
"github.com/elliotxx/kstatus"
)
func main() {
// deployment := getDeploymentFromCluster()
res, err := Compute(deployment)
if err != nil {
panic(err)
}
fmt.Println(toJSON(res))
}
```
输出:
```shell
{
"type": "Reconciling",
"status": "True",
"reason": "LessUpdated",
"message": "Updated: 0/1"
}
```
更多样例可以参考: [./example_test.go](./example_test.go)