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

feat: Add Stage CR namespace validation for multitenancy (#96) #97

Merged
merged 1 commit into from
Dec 23, 2024
Merged

Conversation

zmotso
Copy link
Contributor

@zmotso zmotso commented Dec 19, 2024

Pull Request Template

Description

This change adds validation for the Stage.spec.namespace field to avoid conflicts when Stage CRs from different namespaces can point to the same namespace.
Before creating the Stage, the webhook checks namespaces and returns an error if the namespace(with tenant label) already exists in the cluster.

Fixes #96

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking change which improves an existing feature or documentation)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

How Has This Been Tested?

  • Unit test.
  • Manual testing.

Checklist:

  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Pull Request contains one commit. I squash my commits.

This change adds validation for the `Stage.spec.namespace`
field to avoid conflicts when Stage CRs from different
namespaces can point to the same namespace.
Before creating the Stage, the webhook checks namespaces and
returns an error if the namespace(with tenant label)
already exists in the cluster.
@zmotso zmotso added the enhancement New feature or request label Dec 19, 2024
@zmotso zmotso self-assigned this Dec 19, 2024
@zmotso zmotso requested a review from a team as a code owner December 19, 2024 15:19
@SergK SergK merged commit be6695b into master Dec 23, 2024
3 checks passed
@SergK SergK deleted the i/96 branch December 23, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add Stage CR namespace validation for multitenancy
2 participants