From 091f345189309de47642675b716cd1dfdf60a54b Mon Sep 17 00:00:00 2001 From: orangetangerine Date: Sun, 7 Jan 2024 13:30:08 +0800 Subject: [PATCH] Add clog plugin manifest (#3553) * add kubectl log plugin * add kubectl log plugin * add kubectl log plugin * doc: update clog.yaml for better understanding --- plugins/clog.yaml | 92 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 plugins/clog.yaml diff --git a/plugins/clog.yaml b/plugins/clog.yaml new file mode 100644 index 00000000000..ebd84f9534e --- /dev/null +++ b/plugins/clog.yaml @@ -0,0 +1,92 @@ +apiVersion: krew.googlecontainertools.github.com/v1alpha2 +kind: Plugin +metadata: + name: clog +spec: + version: "v0.1.1" + platforms: + - selector: + matchLabels: + os: linux + arch: amd64 + uri: "/~https://github.com/orangetangerine/kubectl-clog/releases/download/v0.1.1/clog_linux_amd64.tar.gz" + sha256: cf9039f6ee2a28d641a849b80dd1c070702775956e00974baf61b4a6646564bb + files: + - from: "./clog" + to: "." + - from: LICENSE + to: "." + bin: "clog" + - selector: + matchLabels: + os: linux + arch: arm64 + uri: "/~https://github.com/orangetangerine/kubectl-clog/releases/download/v0.1.1/clog_linux_arm64.tar.gz" + sha256: 0e3e534f26c8d17a25b42315dab1e9a2eb8e9260cb56c19d79c96dc3d8ce5c06 + files: + - from: "./clog" + to: "." + - from: LICENSE + to: "." + bin: "clog" + - selector: + matchLabels: + os: darwin + arch: amd64 + uri: "/~https://github.com/orangetangerine/kubectl-clog/releases/download/v0.1.1/clog_darwin_amd64.tar.gz" + sha256: df65d528c4ad967d59706fe1d6710b7558f8a53db9c3919bd30fd3f6f42578ac + files: + - from: "./clog" + to: "." + - from: LICENSE + to: "." + bin: "clog" + - selector: + matchLabels: + os: darwin + arch: arm64 + uri: "/~https://github.com/orangetangerine/kubectl-clog/releases/download/v0.1.1/clog_darwin_arm64.tar.gz" + sha256: 94320bcff6717ad2ad3565a93a1d5f8b20252780cd788a1f0327d5e9e0a5e45e + files: + - from: "./clog" + to: "." + - from: LICENSE + to: "." + bin: "clog" + - selector: + matchLabels: + os: windows + arch: amd64 + uri: "/~https://github.com/orangetangerine/kubectl-clog/releases/download/v0.1.1/clog_windows_amd64.zip" + sha256: 75c85ea50cb3089d3beaa9c63b14ed28a318c04b8409d8a467ab6d9356fc5329 + files: + - from: "/clog.exe" + to: "." + - from: LICENSE + to: "." + bin: "clog.exe" + - selector: + matchLabels: + os: windows + arch: arm64 + uri: "/~https://github.com/orangetangerine/kubectl-clog/releases/download/v0.1.1/clog_windows_arm64.zip" + sha256: 78f94391d38a2f60968daa6b835d1b13abca31e0ad95f7f661ac228c2165cec2 + files: + - from: "/clog.exe" + to: "." + - from: LICENSE + to: "." + bin: "clog.exe" + shortDescription: Colorize log outputs. + homepage: /~https://github.com/orangetangerine/kubectl-clog + description: | + This is a new plugin to colorize your kubectl logs. + clog is just a wrapper of built-in kubectl logs, with same command usage, + just replace `kubectl logs` with `kubectl clog`. + + Some frequent log content is detected to colorizing. + * json format log with level field. e.g. `{"level":"debug"}` + * envoy format log via istio-proxy. e.g. `2023-12-26T07:01:24.212130Z debug envoy upstream` + * istio access log. e.g. `[2023-12-26T05:45:58.421Z] "POST /package.service/method HTTP/2" 200 ...` + +