Skip to content

Comments

Add a linter check for environment selectors.#2619

Open
bergmannf wants to merge 1 commit intoopenshift:masterfrom
bergmannf:add-linter-clusterselection
Open

Add a linter check for environment selectors.#2619
bergmannf wants to merge 1 commit intoopenshift:masterfrom
bergmannf:add-linter-clusterselection

Conversation

@bergmannf
Copy link
Contributor

@bergmannf bergmannf commented Dec 23, 2025

This should prevent putting an invalid environment selector like 'stg' or 'int' into this repo.

What type of PR is this?

feature

What this PR does / why we need it?

Additional checks when using environment selectors.

Which Jira/Github issue(s) this PR fixes?

Special notes for your reviewer:

Pre-checks (if applicable):

  • Tested latest changes against a cluster

  • Included documentation changes with PR

  • If this is a new object that is not intended for the FedRAMP environment (if unsure, please reach out to team FedRAMP), please exclude it with:

    matchExpressions:
    - key: api.openshift.com/fedramp
      operator: NotIn
      values: ["true"]

@openshift-ci openshift-ci bot requested review from apahim and ravitri December 23, 2025 12:20
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 23, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bergmannf

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 23, 2025
@bergmannf bergmannf force-pushed the add-linter-clusterselection branch 2 times, most recently from b87e6c0 to 7abefbd Compare December 23, 2025 14:15
@joshbranham
Copy link
Contributor

/retest

operator: In
values:
- "staging"
- "stage"
Copy link
Contributor

Choose a reason for hiding this comment

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

I doubt this is the case, but would be good to check with fedramp folks to make sure they aren't using stage

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked with Fedramp and they indeed need to have stage as well - so I added it to the linter.

This should prevent putting an invalid environment selector like 'stage'
or 'int' into this repo.

A workaround exists for syncsets for FedRAMP as those allow 'stage'
until https://issues.redhat.com/browse/HCMSEC-2597 is implemented.

Also updated to ubi9 & python3.12 to allow match expressions.
@bergmannf bergmannf force-pushed the add-linter-clusterselection branch from 37d0b45 to cb0ad92 Compare January 12, 2026 15:34
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 12, 2026

@bergmannf: all tests passed!

Full PR test history. Your PR dashboard.

Details

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

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants