-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 k8s manifest support to skaffold lint and one sample rule #6795
feat: add k8s manifest support to skaffold lint and one sample rule #6795
Conversation
4bad89b
to
428bff0
Compare
Codecov Report
@@ Coverage Diff @@
## main #6795 +/- ##
==========================================
- Coverage 70.48% 69.28% -1.20%
==========================================
Files 515 544 +29
Lines 23150 24823 +1673
==========================================
+ Hits 16317 17199 +882
- Misses 5776 6472 +696
- Partials 1057 1152 +95
Continue to review full report at Codecov.
|
428bff0
to
f748cee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor nit
pkg/skaffold/lint/k8smanifests.go
Outdated
for _, pattern := range c.Deploy.KubectlDeploy.Manifests { | ||
// NOTE: pattern is a pattern that can have wildcards, eg: leeroy-app/kubernetes/* | ||
if util.IsURL(pattern) { | ||
log.Entry(ctx).Infof("skaffold lint found url manifest and is skipping lint rules for: %s", pattern) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shd we move this to debug instead? Additional log lines to users for default level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, done
f748cee
to
1b388a7
Compare
Related to #6098, adds k8s manifest support to
skaffold lint
and one sample rule:The sample rule has the following output when triggered (note
skaffold lint
is run against modified version ofexamples/microservices
here w/ misconfigurations added to the Dockerfiles, not the actualexamples/microservices
):Future work for #6098 includes implementing the top 2 lint rules for k8s manifests on top of the framework in this PR.