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: switch from kubeval to kubeconform #1199

Merged
merged 8 commits into from
Feb 13, 2024

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Oct 7, 2023

What this PR does / why we need it:

Screenshot from local example:
image

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

Special notes for your reviewer:

Note: I don't know if any chart changes are triggered. I tested this locally, but may be good to do some additional testing in CI if you'd like.

CI changes only; let me know if you want me to bump version / changelog, though I imagine not relevant here.

I'm happy to remove v1.18.20 or add / remove other versions from the matrices - just let me know.

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Chart Version bumped
  • CHANGELOG.md has been updated

@wyardley wyardley requested a review from a team October 7, 2023 20:38
@wyardley wyardley requested review from a team as code owners October 7, 2023 20:38
@wyardley wyardley force-pushed the wyardley/kubeconform branch 5 times, most recently from 4d81cf4 to 5aeabac Compare October 7, 2023 20:47
@wyardley wyardley force-pushed the wyardley/kubeconform branch from 5aeabac to bd52d91 Compare October 10, 2023 00:08
@wyardley wyardley force-pushed the wyardley/kubeconform branch 3 times, most recently from 72d7335 to fd266b3 Compare October 30, 2023 21:40
@wyardley wyardley force-pushed the wyardley/kubeconform branch from fd266b3 to 5455352 Compare November 2, 2023 02:41
@wyardley
Copy link
Contributor Author

wyardley commented Nov 2, 2023

Note: I just updated it to resolve a deprecation warning with set-output - once the job is approved, I will double-check that it looks correct

And, as mentioned before, I can bump the chart version if / when you all want, which is one of the test failures.

I don't think the go test failure is related to my changes?

@wyardley
Copy link
Contributor Author

wyardley commented Nov 2, 2023

There is a separate (and similar) matrix of Kube versions for the go integration tests, which I'm happy to edit there / make standard with he ones in this PR if it helps (though I haven't yet)

@wyardley wyardley force-pushed the wyardley/kubeconform branch from 5455352 to 177ec91 Compare November 16, 2023 23:47
@wyardley
Copy link
Contributor Author

@clamoriniere would you be able to get someone to review / comment on this, and / or is there anything you'd like me to do / update?

@wyardley wyardley force-pushed the wyardley/kubeconform branch from 177ec91 to e74981c Compare January 3, 2024 03:38
@wyardley wyardley force-pushed the wyardley/kubeconform branch from e74981c to 66033b5 Compare January 17, 2024 22:46
Copy link
Contributor

@loutPhilipps loutPhilipps left a comment

Choose a reason for hiding this comment

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

It looks like there's an issue with the output format:

Error: Unable to process file command 'output' successfully.
Error: Invalid format 'charts/datadog-operator'

@wyardley
Copy link
Contributor Author

wyardley commented Feb 5, 2024

It looks like there's an issue with the output format:

Ah! probably shouldn't have tried to fix this error at the same time.
https://stackoverflow.com/questions/74137120/how-to-fix-or-avoid-error-unable-to-process-file-command-output-successfully

I think it should have been changed anyway vs {changed}; not sure if just changing {changed}= to changed= will be sufficient, but I can just add in the solution using a heredoc and we can see if that works...

@wyardley wyardley force-pushed the wyardley/kubeconform branch from 66033b5 to 68fc91e Compare February 5, 2024 16:39
@wyardley wyardley requested a review from a team as a code owner February 5, 2024 16:39
@wyardley
Copy link
Contributor Author

wyardley commented Feb 5, 2024

@loutPhilipps if you want to trigger again, we can see if my output fixes now work.

@wyardley wyardley force-pushed the wyardley/kubeconform branch from 3b2bb44 to 915d952 Compare February 7, 2024 22:40
- Switch from kubeval, which is unmaintained and outdated, to
  kubeconform
- Update kubernetes versions in test matrices
- Use upstream schema for CRDs, so we don't have to ignore missing
  schemas in validation
- Switch away from deprecated output
  https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
- Switch CI nodeSelector examples to use disktype: ssd to avoid
  creating duplicates with baked in os defaults
@wyardley wyardley force-pushed the wyardley/kubeconform branch from 915d952 to 7cfcd3f Compare February 7, 2024 22:41
@@ -80,12 +82,12 @@ jobs:
# https://github.com/instrumenta/kubernetes-json-schema is no
# longer updated
k8s:
# - v1.14.10 (deprecated with kind 1.16)
- v1.16.15
- v1.16.4
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note: https://github.com/instrumenta/kubernetes-json-schema doesn't seem to have 1.16.15; 1.16.4 is the latest. Presumably this is Good Enough, but if someone can find the right schema version (I'm surprised kubeval worked with this) online in the right format, I can update the secondary schema location 🤷

@wyardley
Copy link
Contributor Author

wyardley commented Feb 7, 2024

I rebased locally and slightly tweaked the wording, since there were conflicts from something merged after the previous version bump. Sorry for squashing your changes @clamoriniere

@wyardley
Copy link
Contributor Author

wyardley commented Feb 8, 2024

Seems like it wanted additional bumps?
I bumped charts/datadog-crds and charts/datadog-operator too, in a separate commit, but let me know if you want me to revert it to how it was.

clamoriniere added a commit that referenced this pull request Feb 12, 2024
the goal is to ease the CI migration from `kubeval` to `kubeconform` introduced by the PR #1199
clamoriniere added a commit that referenced this pull request Feb 12, 2024
the goal is to ease the CI migration from `kubeval` to `kubeconform` introduced by the PR #1199
@clamoriniere clamoriniere enabled auto-merge (squash) February 12, 2024 19:44
Copy link
Collaborator

@clamoriniere clamoriniere left a comment

Choose a reason for hiding this comment

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

Hi @wyardley
thanks again for all your work on this PR. Our CI is finally green ! 🥳
We will be able to merge it

@clamoriniere clamoriniere merged commit 2e320f7 into DataDog:main Feb 13, 2024
19 checks passed
@wyardley wyardley deleted the wyardley/kubeconform branch February 13, 2024 14:38
@wyardley
Copy link
Contributor Author

Thanks all!

@wyardley wyardley mentioned this pull request Aug 10, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants