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

CI: Add reviewdog-k8s #824

Merged
merged 3 commits into from
Nov 10, 2020
Merged

CI: Add reviewdog-k8s #824

merged 3 commits into from
Nov 10, 2020

Conversation

rinx
Copy link
Contributor

@rinx rinx commented Nov 10, 2020

Description:

  • Add kubeval-conflint to detect invalid type field in k8s manifests.
  • Add kubelinter (without reviewdog)

Related Issue:

nothing

How Has This Been Tested?:

nothing

Environment:

  • Go Version: 1.15.2
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.12.1

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master

@@ -29,7 +29,7 @@ metadata:
spec:
serviceName: vald-agent-ngt
podManagementPolicy: Parallel
replicas: 5
replicas: ""
Copy link
Contributor

Choose a reason for hiding this comment

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

reported by reviewdog 🐶
Invalid type. Expected: [integer,null], given: string

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
@rinx rinx force-pushed the ci/reviewdog/add-conflint-kubeval branch from a095763 to 390b88e Compare November 10, 2020 03:23
@rinx rinx marked this pull request as ready for review November 10, 2020 03:23
@rinx rinx requested a review from kpango November 10, 2020 03:24
@kpango
Copy link
Collaborator

kpango commented Nov 10, 2020

LGTM

But, I think it's better to integrate kubeval with https://github.com/stackrox/kube-linter
kubeval finds yaml mistake, but kube-linter can find bad practice about k8s yaml, so I recommend adding kube-linter to job

@rinx rinx marked this pull request as draft November 10, 2020 03:28
@rinx
Copy link
Contributor Author

rinx commented Nov 10, 2020

aha, i'll revise this PR to integrate with it. thanks.
after finished, i'll change back to open again. @kpango

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
@rinx rinx force-pushed the ci/reviewdog/add-conflint-kubeval branch from a1a0b5b to 4405748 Compare November 10, 2020 06:26
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
@rinx
Copy link
Contributor Author

rinx commented Nov 10, 2020

https://github.com/vdaas/vald/runs/1378253698?check_suite_focus=true
kubelinter is really noisy, we can exclude some check rules from the defaults like "unset-cpu-requirements", "unset-memory-requirements".

@rinx rinx marked this pull request as ready for review November 10, 2020 06:33
@rinx
Copy link
Contributor Author

rinx commented Nov 10, 2020

@kpango ready again.

Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

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

LGTM

@kpango kpango merged commit 27b5a16 into master Nov 10, 2020
@kpango kpango deleted the ci/reviewdog/add-conflint-kubeval branch November 10, 2020 06:45
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