yonahd / kor

A Golang Tool to discover unused Kubernetes Resources
MIT License
974 stars 91 forks source link

feat: krew plugin workflow #214

Closed doronkg closed 7 months ago

doronkg commented 7 months ago

This PR resolves #209.


The mentioned below manifest will be initially submitted to krew-index under plugins/kor.yaml.

I've tested it locally for all OS types, using the following example command:

$ KREW_OS=windows KREW_ARCH=amd64 kubectl krew install --manifest=kor.yaml
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
  name: kor
spec:
  version: v0.3.5
  homepage: https://github.com/yonahd/kor
  shortDescription: Kor is a tool to discover unused K8s resources.
  description: |
    This plugin shows unused Kubernetes resources (namespaced or cluster-scoped).
    It provides additional capabilities such as exporting Prometheus metrics,
    deleting unused resources, and more!
  platforms:
  - selector:
      matchLabels:
        os: linux
        arch: amd64
    uri: https://github.com/yonahd/kor/releases/download/v0.3.5/kor_Linux_x86_64.tar.gz
    sha256: fe7a9c4a463eea91ba669c2acdcd0e8f31d0afb0274dcc6757f3f064cd764246
    bin: kor
  - selector:
      matchLabels:
        os: linux
        arch: arm64
    uri: https://github.com/yonahd/kor/releases/download/v0.3.5/kor_Linux_arm64.tar.gz
    sha256: fe3c4b391e339ee193876f52b443ec2b7701e3e73c241ab11dc123c72129333a
    bin: kor
  - selector:
      matchLabels:
        os: darwin
        arch: amd64
    uri: https://github.com/yonahd/kor/releases/download/v0.3.5/kor_Darwin_x86_64.tar.gz
    sha256: f72a3c2bf65f711de2214c0ac943d7e0ad2f99ce85204d5fd18ae17479e4329b
    bin: kor
  - selector:
      matchLabels:
        os: darwin
        arch: arm64
    uri: https://github.com/yonahd/kor/releases/download/v0.3.5/kor_Darwin_arm64.tar.gz
    sha256: 95331e60f7facb2b4790ef70805f49d1ec8dbfd7186a13993a2e92460c009cba
    bin: kor
  - selector:
      matchLabels:
        os: windows
        arch: amd64
    uri: https://github.com/yonahd/kor/releases/download/v0.3.5/kor_Windows_x86_64.zip
    sha256: 46e61db6ba2d4c181c09a5a34f6fdeee860b6c9111b8e1f2da39b8ee0111ddcc
    bin: kor.exe
codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 47.71%. Comparing base (01ef1a3) to head (2a84886). Report is 2 commits behind head on main.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #214 +/- ## ========================================== + Coverage 45.36% 47.71% +2.35% ========================================== Files 31 31 Lines 2665 2741 +76 ========================================== + Hits 1209 1308 +99 + Misses 1284 1274 -10 + Partials 172 159 -13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.