Skip to content

Conversation

sadlerap
Copy link
Contributor

@sadlerap sadlerap commented Oct 2, 2025

Add and enforce some rules on yaml manifest styles.

Since most manifests were added by different teams following their own style conventions, we're not going to enforce a lot of strict rules, since that's just churn. However, we do want to have some rules, so we're only disabling the rules causing the most issues and aren't able to be autofixed: line-length and indentation lints.

Not all manifests will be checked. Helm charts aren't controlled by us, so there's little we can do to fix any warnings yamllint informs us about. Templates also usually have special characters that are technically invalid yaml syntax, so most of those should be ignored to avoid false positives.

While we're at it, yamllint caught some manifests with invalid syntax, so fix those. Let's also enforce these checks as a part of our CI checks so that we don't introduce manifests with syntax errors into our production environments.

Add a yamllint config to enforce yaml formatting standards.

Since infra-deployments hasn't had a standard until now, different
components follow different conventions for formatting.  In particular,
both the indentation and line-length rules were causing a lot of noise
in yamllint's output.  Until we have a better solution in place to fix
these conventions, ignore those rules.

Futhermore, ignore a few paths that are a common cause for lint
warnings:
- Helm charts, which may not necessarily follow our style guides.  Since
  there's little we can actually do to fix them in this repository,
  ignore them for yaml linting purposes.
- Templates ususally are invalid for one reason or another, and there's
  little we should do to fix them.  Ignore them.

Part-of: KFLUXINFRA-2285
Signed-off-by: Andy Sadler <[email protected]>
Run yamlfixer[^1] on our manifests.  There are still some manifests that
require fixing, but this takes care of most of the outliers.

[^1]: https://pypi.org/project/yamlfixer-opt-nc/

Part-of: KFLUXINFRA-2285
Signed-off-by: Andy Sadler <[email protected]>
After autoformatting, some of our manifests still don't pass yamllint
checks due to invalid syntax.  Fix the remaining errors.

Part-of: KFLUXINFRA-2285
Signed-off-by: Andy Sadler <[email protected]>
To ensure our manifests remain valid and comply with our linting rules,
run yaml linting checks as a part of CI.

Part-of: KFLUXINFRA-2284
Signed-off-by: Andy Sadler <[email protected]>
@openshift-ci openshift-ci bot requested review from 14rcole and aThorp96 October 2, 2025 22:36
Copy link
Contributor

github-actions bot commented Oct 2, 2025

🤖 Gemini AI Assistant Available

Hi @sadlerap! I'm here to help with your pull request. You can interact with me using the following commands:

Available Commands

  • @gemini-cli /review - Request a comprehensive code review

    • Example: @gemini-cli /review Please focus on security and performance
  • @gemini-cli <your question> - Ask me anything about the codebase

    • Example: @gemini-cli How can I improve this function?
    • Example: @gemini-cli What are the best practices for error handling here?

How to Use

  1. Simply type one of the commands above in a comment on this PR
  2. I'll analyze your code and provide detailed feedback
  3. You can track my progress in the workflow logs

Permissions

Only OWNER, MEMBER, or COLLABORATOR users can trigger my responses. This ensures secure and appropriate usage.


This message was automatically added to help you get started with the Gemini AI assistant. Feel free to delete this comment if you don't need assistance.

Copy link
Contributor

github-actions bot commented Oct 2, 2025

🤖 Hi @sadlerap, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@sadlerap
Copy link
Contributor Author

sadlerap commented Oct 3, 2025

/retest

kind: ApplicationSet
version: v1alpha1
name: has
- path: production-overlay-patch.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC this will result in a functional change, not just a yaml lint autofix, no?

kind: ApplicationSet
version: v1alpha1
name: has
- path: production-overlay-patch.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

Copy link

openshift-ci bot commented Oct 3, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: aThorp96, sadlerap
Once this PR has been reviewed and has the lgtm label, please assign lcarva for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

openshift-ci bot commented Oct 3, 2025

@sadlerap: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/appstudio-e2e-tests 10eea6b link true /test appstudio-e2e-tests
ci/prow/konflux-e2e-v418-optional 10eea6b link false /test konflux-e2e-v418-optional

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants