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 kube-linter tool #948

Merged
merged 1 commit into from
Oct 2, 2023
Merged

Conversation

tvcsantos
Copy link
Contributor

Description

This PR adds kube-linter cli tool to arkade. KubeLinter is a static analysis tool that checks Kubernetes YAML files and Helm charts to ensure the applications represented in them adhere to best practices.

Motivation and Context

  • I have raised an issue to propose this change, which has been given a label of design/approved by a maintainer (required)

I would be nice to have kube-linter cli tool included on arkade. KubeLinter is a static analysis tool that checks Kubernetes YAML files and Helm charts to ensure the applications represented in them adhere to best practices.

How Has This Been Tested?

Added tests to get_test.go and also run ./hack/test-tool.sh kube-linter.

If updating or adding a new CLI to arkade get, run:

go build && ./hack/test-tool.sh TOOL_NAME

Logs attached below:

arkade_kube_linter.log

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Documentation

  • I have updated the list of tools in README.md if (required) with ./arkade get --format markdown
  • I have updated the list of apps in README.md if (required) with ./arkade install --help

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s
  • I have tested this on arm, or have added code to prevent deployment

@alexellis
Copy link
Owner

Thanks for the PR. @Jasstkn could you review please?

},
{
os: "linux",
arch: archARM64,
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like kube-linter doesn't support ARM at all, therefore this test is redundant.

I think that we need to hardcode the arch64 as the only supported architecture in the template and remove the redundant test. @alexellis what are your thoughts here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right I will remove it ;)

@Jasstkn
Copy link
Contributor

Jasstkn commented Aug 2, 2023

@tvcsantos can I also ask you to update your branch from master?

@tvcsantos
Copy link
Contributor Author

@tvcsantos can I also ask you to update your branch from master?

Will do that. Ty

@derek derek bot added the no-dco label Aug 2, 2023
@derek
Copy link

derek bot commented Aug 2, 2023

Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project.

Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken.

💡 Shall we fix this?

This will only take a few moments.

First, clone your fork and checkout this branch using the git CLI.

Next, set up your real name and email address:

git config --global user.name "Your Full Name"
git config --global user.email "[email protected]"

Finally, run one of these commands to add the "Signed-off-by" line to your commits.

If you only have one commit so far then run: git commit --amend --signoff and then git push --force.
If you have multiple commits, watch this video.

Check that the message has been added properly by running "git log".

@tvcsantos tvcsantos force-pushed the add-kube-linter branch 2 times, most recently from 7489e12 to 1abba21 Compare August 2, 2023 09:19
@derek derek bot removed the no-dco label Aug 2, 2023
@tvcsantos
Copy link
Contributor Author

All done. If you need something extra ping :)

Copy link
Contributor

@Jasstkn Jasstkn left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@alexellis
Copy link
Owner

@tvcsantos just need a rebase on the README file now, thanks.

@derek
Copy link

derek bot commented Sep 16, 2023

Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project.

Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken.

💡 Shall we fix this?

This will only take a few moments.

First, clone your fork and checkout this branch using the git CLI.

Next, set up your real name and email address:

git config --global user.name "Your Full Name"
git config --global user.email "[email protected]"

Finally, run one of these commands to add the "Signed-off-by" line to your commits.

If you only have one commit so far then run: git commit --amend --signoff and then git push --force.
If you have multiple commits, watch this video.

Check that the message has been added properly by running "git log".

@derek derek bot added the no-dco label Sep 16, 2023
@tvcsantos
Copy link
Contributor Author

@tvcsantos just need a rebase on the README file now, thanks.

Done ;)

@tvcsantos
Copy link
Contributor Author

@tvcsantos just need a rebase on the README file now, thanks.

Done ;)

okay not done. I will do it in a bit :D. Having some troubles with the signoff :D

@tvcsantos
Copy link
Contributor Author

Now all good :). If you need something ping me 👍

@alexellis
Copy link
Owner

alexellis commented Sep 26, 2023

Looks like we have 6x commits now, so if you follow my video it will walk you through how to squash them all down:

https://www.youtube.com/watch?v=8j0H6urZ-bU

But before you do that, rebase master with git pull origin master -r - or if master is your branch, add an upstream remote:

git remote add upstream https://github.com/alexellis/arkade
git pull upstream master -r

Signed-off-by: Tiago Santos <[email protected]>
@tvcsantos
Copy link
Contributor Author

Looks like we have 6x commits now, so if you follow my video it will walk you through how to squash them all down:

https://www.youtube.com/watch?v=8j0H6urZ-bU

But before you do that, rebase master with git pull origin master -r - or if master is your branch, add an upstream remote:

git remote add upstream https://github.com/alexellis/arkade
git pull upstream master -r

Okay I got it you only want one commit. Done ;) sorry for the delay

@alexellis
Copy link
Owner

Thanks Tiago. Looking forward to your next PR.

@alexellis alexellis merged commit 3b27f27 into alexellis:master Oct 2, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants