Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add kubevious/cli #10113

Merged
merged 3 commits into from Mar 2, 2023

Conversation

CrystalMethod
Copy link
Contributor

kubevious/cli: Kubevious CLI - Prevent Kubernetes disasters at the early stages

$ aqua g -i kubevious/cli

How to confirm if this package works well

Reviewers aren't necessarily familiar with this package, so please describe how to confirm if this package works well.
Please confirm if this package works well yourself as much as possible.

Command and output

$ kubevious
Usage: kubevious [options] [command]


                                                              NKXW
                                                           WXx:,;oKW
                                                          Nk;.....,oKW
                                                          No'.......,oKW
                                                           Nkc'.......,o0W
                                                        WKxkNNkc'.......,oKW
                                                        Kc.'ckNNkc'.......,oKW
                                    WWWNNNNWW          Nk;...'ckNNkc'.......cK
                              WX0kdocc:::::clodk0NW  NOc'......'ckNNkc'...'cON
                           N0dc;'...............:ONNOc'..........'ckNNkl:ckN
                        WKx:'.................'c0WKl'...........,,;oX  WNW
                      WKd;.....................;d0X0d;........;d0KXW
                     Nk:.........................'ckXKx;....;xXW
                    Xd,............................':kXKo,:xXW
                   Xo'...............................'l0NKXNXW
                  Wd'..................................;kXOc:O
                  Nkooooooooooooooooooooooooooooooooooooxkdod0W
             WNK0000000000000000000000000000000000KK0000KKK0000KKXW
             Kl,''''''''''''''''''''''''''''''''''''''''''''''''';xW
             NkdoooooooooooooooooooooooooooooooooooooooooooooooooxKW
                WNKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKNW
                Nd,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,dN
                Nl....................''''....................oN
                Nl................';ok000Oko;.................oN
                Nl...............'oXWKkxxkKWXo'...............oN
                Nl...............lXWO;....;kWXl...............oN
                Nl..............'dWWd'.....lNWd'.............'oN
                WKOkkkkkkkkkkkkkOXWWKOkkkkkKW XOOOOOOOOOOOOOOOKW

Kubevious CLI validates Kubernetes manifests for misconfigurations and violations.
Find more information at: https://github.com/kubevious/cli

Usage: kubevious [options] [command]

Options:
  -V, --version                      output the version number
  -h, --help                         display help for command

Commands:
  guard [options] [path...]          Lint local manifests and validate Kubernetes for cross-manifest violations and errors.
  lint [options] [path...]           Check Kubernetes manifests for API syntax validity.
  list-known-k8s-versions [options]  List of known K8s versions
  index-library [options] <dir>      Generate index for rules library repository. Creates index.yaml file.
  install-git-hook                   Set up GIT pre-commit hooks to validate Kubernetes manifests before committing.
  support                            Get help and support.
  help [command]                     display help for command

[kubevious/cli](https://github.com/kubevious/cli): Kubevious CLI - Prevent Kubernetes disasters at the early stages

```console
$ aqua g -i kubevious/cli
```

## How to confirm if this package works well

Reviewers aren't necessarily familiar with this package, so please describe how to confirm if this package works well.
Please confirm if this package works well yourself as much as possible.

Command and output

```console
$
```

If files such as configuration file are needed, please share them.

```
```

Reference

-
@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Feb 23, 2023
@suzuki-shunsuke suzuki-shunsuke added this to the v3.137.0 milestone Feb 23, 2023
@suzuki-shunsuke
Copy link
Member

Thanks!

description: Kubevious CLI - Prevent Kubernetes disasters at the early stages
files:
- name: kubevious
src: "{{.Asset}}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If format is raw, files.src isn't needed.
files.src is used to detect a file in an archived file.
In case of raw format, aqua can detect a file without files.src.
https://aquaproj.github.io/docs/reference/registry-style-guide/#if-the-format-is-raw-filessrc-isnt-needed

Suggested change
src: "{{.Asset}}"

registry.yaml Outdated Show resolved Hide resolved
@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Feb 23, 2023

🤔 I can't execute kubevious in darwin/arm64.

$ kubevious --help
FATA[0000] aqua failed                                   aqua_version=1.33.0 env=darwin/arm64 error="it failed to start the process" exe_name=kubevious package=kubevious/cli package_version=v1.0.52 program=aqua

$ aqua which kubevious
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/kubevious/cli/v1.0.52/kubevious-macos-arm64/kubevious-macos-arm64

$ /Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/kubevious/cli/v1.0.52/kubevious-macos-arm64/kubevious-macos-arm64 --help
zsh: killed      --help
$ file /Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/kubevious/cli/v1.0.52/kubevious-macos-arm64/kubevious-macos-arm64
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/kubevious/cli/v1.0.52/kubevious-macos-arm64/kubevious-macos-arm64: Mach-O 64-bit executable arm64

@suzuki-shunsuke
Copy link
Member

I could execute kubevious on lima-vm linux/arm64.

$ kubevious --help
Usage: kubevious [options] [command]


                                                              NKXW              
                                                           WXx:,;oKW            
                                                          Nk;.....,oKW          
                                                          No'.......,oKW        
                                                           Nkc'.......,o0W      
                                                        WKxkNNkc'.......,oKW    
                                                        Kc.'ckNNkc'.......,oKW  
                                    WWWNNNNWW          Nk;...'ckNNkc'.......cK  
                              WX0kdocc:::::clodk0NW  NOc'......'ckNNkc'...'cON  
                           N0dc;'...............:ONNOc'..........'ckNNkl:ckN    
                        WKx:'.................'c0WKl'...........,,;oX  WNW      
                      WKd;.....................;d0X0d;........;d0KXW            
                     Nk:.........................'ckXKx;....;xXW                
                    Xd,............................':kXKo,:xXW                  
                   Xo'...............................'l0NKXNXW                  
                  Wd'..................................;kXOc:O                  
                  Nkooooooooooooooooooooooooooooooooooooxkdod0W                 
             WNK0000000000000000000000000000000000KK0000KKK0000KKXW             
             Kl,''''''''''''''''''''''''''''''''''''''''''''''''';xW            
             NkdoooooooooooooooooooooooooooooooooooooooooooooooooxKW            
                WNKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKNW                
                Nd,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,dN                
                Nl....................''''....................oN                
                Nl................';ok000Oko;.................oN                
                Nl...............'oXWKkxxkKWXo'...............oN                
                Nl...............lXWO;....;kWXl...............oN                
                Nl..............'dWWd'.....lNWd'.............'oN                
                WKOkkkkkkkkkkkkkOXWWKOkkkkkKW XOOOOOOOOOOOOOOOKW                

Kubevious CLI validates Kubernetes manifests for misconfigurations and violations.
Find more information at: https://github.com/kubevious/cli

Usage: kubevious [options] [command]

Options:
  -V, --version                      output the version number
  -h, --help                         display help for command

Commands:
  guard [options] [path...]          Lint local manifests and validate Kubernetes for cross-manifest violations and errors.
  lint [options] [path...]           Check Kubernetes manifests for API syntax validity.
  list-known-k8s-versions [options]  List of known K8s versions
  index-library [options] <dir>      Generate index for rules library repository. Creates index.yaml file.
  install-git-hook                   Set up GIT pre-commit hooks to validate Kubernetes manifests before committing.
  support                            Get help and support.
  help [command]                     display help for command

@suzuki-shunsuke
Copy link
Member

When I install kubevious on darwin/arm64 by Homebrew, I can execute kubevious.

$ /opt/homebrew/bin/kubevious --help
Usage: kubevious [options] [command]


                                                              NKXW              
                                                           WXx:,;oKW            
                                                          Nk;.....,oKW          
                                                          No'.......,oKW        
                                                           Nkc'.......,o0W      
                                                        WKxkNNkc'.......,oKW    
                                                        Kc.'ckNNkc'.......,oKW  
                                    WWWNNNNWW          Nk;...'ckNNkc'.......cK  
                              WX0kdocc:::::clodk0NW  NOc'......'ckNNkc'...'cON  
                           N0dc;'...............:ONNOc'..........'ckNNkl:ckN    
                        WKx:'.................'c0WKl'...........,,;oX  WNW      
                      WKd;.....................;d0X0d;........;d0KXW            
                     Nk:.........................'ckXKx;....;xXW                
                    Xd,............................':kXKo,:xXW                  
                   Xo'...............................'l0NKXNXW                  
                  Wd'..................................;kXOc:O                  
                  Nkooooooooooooooooooooooooooooooooooooxkdod0W                 
             WNK0000000000000000000000000000000000KK0000KKK0000KKXW             
             Kl,''''''''''''''''''''''''''''''''''''''''''''''''';xW            
             NkdoooooooooooooooooooooooooooooooooooooooooooooooooxKW            
                WNKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKNW                
                Nd,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,dN                
                Nl....................''''....................oN                
                Nl................';ok000Oko;.................oN                
                Nl...............'oXWKkxxkKWXo'...............oN                
                Nl...............lXWO;....;kWXl...............oN                
                Nl..............'dWWd'.....lNWd'.............'oN                
                WKOkkkkkkkkkkkkkOXWWKOkkkkkKW XOOOOOOOOOOOOOOOKW                

Kubevious CLI validates Kubernetes manifests for misconfigurations and violations.
Find more information at: https://github.com/kubevious/cli

Usage: kubevious [options] [command]

Options:
  -V, --version                      output the version number
  -h, --help                         display help for command

Commands:
  guard [options] [path...]          Lint local manifests and validate Kubernetes for cross-manifest violations and errors.
  lint [options] [path...]           Check Kubernetes manifests for API syntax validity.
  list-known-k8s-versions [options]  List of known K8s versions
  index-library [options] <dir>      Generate index for rules library repository. Creates index.yaml file.
  install-git-hook                   Set up GIT pre-commit hooks to validate Kubernetes manifests before committing.
  support                            Get help and support.
  help [command]                     display help for command

@suzuki-shunsuke
Copy link
Member

I reinstalled kubevious by aqua just in case, but the issue still occurred. 🤔

@suzuki-shunsuke suzuki-shunsuke removed this from the v3.137.0 milestone Feb 24, 2023
@CrystalMethod
Copy link
Contributor Author

Unfortunately I can't help with this, since I don't have this arch in use (yet).

The checksums are identical for both binaries (homebrew vs. aqua) in that case?

@suzuki-shunsuke
Copy link
Member

Unfortunately I can't help with this, since I don't have this arch in use (yet).

The checksums are identical for both binaries (homebrew vs. aqua) in that case?

Thanks. Good point.

I found two files are different.

An asset downloaded from GitHub Releases is a binary file.

$ file /Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/kubevious/cli/v1.0.52/kubevious-macos-arm64/kubevious-macos-arm64
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/kubevious/cli/v1.0.52/kubevious-macos-arm64/kubevious-macos-arm64: Mach-O 64-bit executable arm64

On the other hand, kubevious installed by homebrew is scripts.

$ ls -lh /opt/homebrew/bin/kubevious
lrwxr-xr-x 1 shunsukesuzuki admin 40  2 28 23:24 /opt/homebrew/bin/kubevious -> ../Cellar/kubevious/1.0.52/bin/kubevious

/opt/homebrew/Cellar/kubevious/1.0.52/bin/kubevious

#!/bin/bash
PATH="/opt/homebrew/opt/node@14/bin:$PATH" exec "/opt/homebrew/Cellar/kubevious/1.0.52/libexec/bin/kubevious"  "$@"

/opt/homebrew/Cellar/kubevious/1.0.52/libexec/bin/kubevious

#!/usr/bin/env node
require('../dist/index')

@CrystalMethod
Copy link
Contributor Author

what about disabling macos-arm64 for now?

@suzuki-shunsuke
Copy link
Member

what about disabling macos-arm64 for now?

Sounds good. I've confirmed kubevious works on darwin/amd64.

@suzuki-shunsuke
Copy link
Member

Oh, I found the asset for darwin/amd64 works on darwin/arm64 by Rosetta 2.

@suzuki-shunsuke suzuki-shunsuke merged commit 5d7eb6a into aquaproj:main Mar 2, 2023
@suzuki-shunsuke suzuki-shunsuke added this to the v3.139.0 milestone Mar 2, 2023
@suzuki-shunsuke
Copy link
Member

@CrystalMethod CrystalMethod deleted the feat/kubevious/cli branch March 5, 2023 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants