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

Define API's sans field as a set to prevent duplicate entries #5723

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kahirokunn
Copy link

Description

This PR adds the +listType=set annotation to the SANs field in the API spec, ensuring that the field is treated as a set in the generated CRD. This prevents duplicate entries in the array, which can cause confusion and potential issues with certificate generation.

The change is minimal and only affects the CRD schema definition, maintaining backwards compatibility while improving data integrity.

Fixes #5722

Type of change

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

How Has This Been Tested?

  • Manual test
  • Auto test added

Manually verified that:

  1. The CRD generation works correctly with make codegen
  2. The generated CRD includes the x-kubernetes-list-type: set property for the sans field
  3. The change doesn't affect existing functionality

Checklist

  • My code follows the style guidelines of this project
  • My commit messages are signed-off
  • I have performed a self-review of my own code
  • I have commented 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
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Adds the +listType=set annotation to the SANs field in the API spec,
which ensures the field is treated as a set in the generated CRD
and prevents duplicate entries in the array.

Signed-off-by: kahirokunn <[email protected]>
@kahirokunn kahirokunn requested review from a team as code owners April 4, 2025 05:15
@kahirokunn kahirokunn requested review from ncopa and twz123 April 4, 2025 05:15
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.

Define API's sans field as a set to prevent duplicate entries
1 participant