Commit graph

392 commits

Author SHA1 Message Date
Chas Honton
92da06aa38 validate ObjectMeta
closes #287, #275, #286
2024-08-29 10:22:27 -07:00
Yann Hamon
1bd44986dd
Update some dependencies (#283) 2024-07-30 23:34:40 +02:00
Yann Hamon
43a2445cb4
Retry (#282)
* fix: use hashicorp/go-retryablehttp to retry failed schema downloads


---------

Co-authored-by: Carlos Sanchez <carlos@apache.org>
2024-07-30 23:22:45 +02:00
Yann Hamon
706cd56e87
Revert "fix: retry on download errors (#274)" (#279)
This reverts commit 50ce5f8ecb.
2024-07-29 10:37:43 +02:00
Carlos Sanchez
50ce5f8ecb
fix: retry on download errors (#274)
* Retry on download errors

---------

Co-authored-by: Yann Hamon <yann@mandragor.org>
2024-07-29 10:10:44 +02:00
guoguangwu
347cd5e4c9
fix: close resource (#272) 2024-06-30 15:15:53 +02:00
Yann Hamon
142517fc45 fix go.mod 2024-05-09 23:48:09 +02:00
Yann Hamon
7062384492
Slightly improve the coverage of the validator test (#271) 2024-05-09 16:37:20 +02:00
Michael Lee
20805f652c
Stop validating output of closed channel in Validate (#265)
Currently, Validate and ValidateWithContext always returns a
result with status `Empty` and a `missing 'kind' key` error as
the final item in the returned slice.

This is because ValidateWithContext currently will parse the output of
`resourcesChan`, even when the context is finished and we get back
a default `Resource` struct.

This PR modifies the code to skip validating this case.
2024-05-09 16:27:59 +02:00
Yann Hamon
9627dd185b
Update go version in go.mod (#269)
* Downgrade to latest version supported by goreleaser
2024-05-09 15:43:13 +02:00
Yann Hamon
14053aaa54
Update Go & Base images (#268)
* Update go and base images
2024-05-09 15:19:30 +02:00
Yann Hamon
71a59d74f2
Remove deprecated Maintainer tag in Dockerfile (#267) 2024-05-09 15:09:22 +02:00
PatDyn
ad166c7f0d
Sanitize csv strings (#258)
* Support spaces before/after commas when passing list of Kinds
2024-05-09 14:21:36 +02:00
David Ongaro
a8000fd445
Update kubeconform -h output (#260)
In particular, the `-output pretty` option is missing.
2024-02-02 22:17:49 +01:00
Yann Hamon
b6728f181c
Fix junit output, also ensure junit output is deterministic (#253) 2023-12-24 18:06:03 +01:00
Yann Hamon
a4d74ce7d2
Fail early on incorrect version of k8s (#254)
* Fail early on incorrect version of k8s

* fix tests
2023-12-24 18:05:04 +01:00
Yann Hamon
808e6d4aa5
Update GH actions and goreleaser (#252)
* Update GH actions and goreleaser
2023-12-24 14:26:09 +01:00
Yann Hamon
d8f00a3a30
Update Golang to 1.21.4 (#245) 2023-11-18 18:31:34 +01:00
Yann Hamon
6ae8c45bc1
openapi2jsonschema.py now correctly fails if no FILE is passed (#244)
* openapi2jsonschema.py now correctly fails if no FILE is passed
* Update acceptance tests
2023-11-18 18:08:18 +01:00
Lucien Boix
b7d7b4d0dc
Update Readme.md (#232)
* Update Readme.md

Just adding details for how to use the script command with args for the Gitlab CI usecase

* Update Readme.md

Good catch!

Co-authored-by: Yann Hamon <yannh@users.noreply.github.com>

---------

Co-authored-by: Yann Hamon <yannh@users.noreply.github.com>
2023-09-19 00:54:24 +02:00
Yann Hamon
2e50b79b16
Update Go and Goreleaser to 1.20, update dependencies (#231) 2023-09-04 00:11:25 +02:00
Yann Hamon
13a78ebad8
Avoid unnecessary type conversions (#222) 2023-07-16 10:27:26 +02:00
Yann Hamon
ae67bb4709
Force Draft version of JsonSchema (#221)
* Force Draft version of JsonSchema
* Add test validating using CRD that misses explicit draft version
2023-07-16 09:42:11 +02:00
Yamamoto, Hirotaka
278385f4c9
Update Readme.md to add fullgroup explanation (#220)
This is a follow-up to #219 to add a short description on how to use the `fullgroup` variable.
2023-07-09 13:46:12 +02:00
Yamamoto, Hirotaka
452f1fe1db
Fix #130 in a backward-compatible way (#219)
This is an alternative way to fix #130.
Instead of changing the `group` variable content, this commit adds
a new variable `fullgroup` that does not split the group components.

With this, users can specify the filename format like:

    FILENAME_FORMAT='{fullgroup}-{version}-{kind}'
2023-07-09 12:51:30 +02:00
Yann Hamon
f0a7d5203d
Update Readme.md 2023-06-26 14:48:15 +02:00
Will Yardley
71fd5f8386
fix: add missing output formats in error message (#213)
- Add missing 'junit' and 'pretty' output formats.
- Use quotes vs. backticks around command name
2023-06-14 22:41:51 +02:00
Denis N. Antonioli
c8bce62898
Fix for 196: Multi-architecture image (#204)
* 196: qemu

* 196: multi-arch; see also https://blog.devgenius.io/goreleaser-build-multi-arch-docker-images-8dd9a7903675
2023-06-07 12:26:22 +02:00
Juan Ignacio Donoso
065fad003f
Fix anchored link on Readme.md (#205)
The in page link to the CustomResourceDefinition (CRD) Support section is not working
2023-06-07 12:22:58 +02:00
Yann Hamon
c1a2c159de Revert "Add support for Arm64 Docker images (#201)"
This reverts commit 65cfe7e16e.
2023-05-14 12:52:13 +02:00
Yann Hamon
65cfe7e16e Add support for Arm64 Docker images (#201) 2023-05-14 12:51:53 +02:00
Yann Hamon
ce2f6de185 Move cfg parsing out of realmain, rename realmain to kubeconform 2023-04-23 14:34:25 +02:00
Yann Hamon
ad935b7e32 Add JSON/YAML annotations to Config struct
Co-authored-by: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com>
2023-04-23 13:55:09 +02:00
Yann Hamon
d038bf8840 Do not hardcode output stream in pkg/output
Co-authored-by: Ahmed AbouZaid <6760103+aabouzaid@users.noreply.github.com>
2023-04-23 13:39:43 +02:00
Yann Hamon
8bc9f42f39
Add support for "pretty" output (#195)
* feat: add pretty output format

---------

Co-authored-by: William Yardley <wyardley@users.noreply.github.com>
2023-04-22 18:41:51 +02:00
Mateusz Łoskot
9294e94a8d
docs: Add winget as installation method on Windows (#192)
The kubeconform package has been accepted to winget,
see https://github.com/microsoft/winget-pkgs/pull/101691
2023-04-13 09:56:49 +02:00
Benjamin Muschko
16d52804d4
Fix CI badge image (#184)
I guess the name of the CI build has been changed which led to a broken image.
2023-03-28 18:53:49 +02:00
Aleksey Levenstein
e3bb34851d
fix: expose error instance path instead of schema path (#177) 2023-02-27 16:16:00 +01:00
w7089
aaecabe0b7
support disabling ssl validation in openapi2jsonschema.py (#167)
* support disabling ssl validation in openapi2jsonschema.py
* added acceptance tests for disable ssl feature
* speed up bats docker build
2023-02-26 12:33:54 +01:00
Yann Hamon
563e1db94c
Try to expose JSON paths (#173)
* Try to expose JSON paths
* update validationErrors format in json output
* Add test to JSON output with validationError
2023-02-26 12:32:51 +01:00
Rick
9860cde144
feat: support to set an alternative image owner (#164)
Co-authored-by: rick <LinuxSuRen@users.noreply.github.com>
2023-01-25 01:26:53 +01:00
Yann Hamon
ee7c498580
Migrate to santhosh-tekuri/jsonschema (#168)
* Migrate to santhosh-tekuri/jsonschema
2023-01-23 19:22:20 +01:00
Jiri Tyr
84afe70659
Documenting Helm support via 3rd party repo (#158) 2022-12-27 17:21:12 +01:00
Jeffrey Ying
752a33eaeb
Fix typo in readme (#153) 2022-12-02 19:34:19 +01:00
Yann Hamon
33cdbf16a4 Update LICENSE 2022-11-28 10:02:25 +01:00
Eyar Zilberman
f94844183f
update anchor links in readme (#150)
* add constructor to handle equal sign (=)

Equal sign (=) was not parsed properly by pyyaml.
Added constructor to parse equal sign as string.
Related issue: https://github.com/yannh/kubeconform/issues/103

* Update Readme.md

* Update Readme.md
2022-11-10 13:28:58 +01:00
Eyar Zilberman
9d34445328
update readme structure and info (#149)
* add constructor to handle equal sign (=)

Equal sign (=) was not parsed properly by pyyaml.
Added constructor to parse equal sign as string.
Related issue: https://github.com/yannh/kubeconform/issues/103

* Update Readme.md
2022-11-10 12:36:28 +01:00
Yann Hamon
a31707ca58
Add opencontainers label (#138) 2022-10-16 15:50:02 +02:00
Yann Hamon
46b7622a08
Add informations how to use Kubeconform in Gitlab-CI (#139) 2022-10-16 15:46:22 +02:00
Andrea Tosatto
d8e348a597
Allow to skip resources using the GVK notation (#92)
* Allow to skip resources using the GVK notation
* Update flags description, add integration tests and update readme

Co-authored-by: Yann Hamon <yann@mandragor.org>
2022-10-16 14:59:48 +02:00