fix(operator): rename BackendAuthType enum value to camelCase#4563
Open
tmchow wants to merge 5 commits intostacklok:mainfrom
Open
fix(operator): rename BackendAuthType enum value to camelCase#4563tmchow wants to merge 5 commits intostacklok:mainfrom
tmchow wants to merge 5 commits intostacklok:mainfrom
Conversation
The enum value "external_auth_config_ref" was the only snake_case discriminator in the CRD codebase. All other values use camelCase (tokenExchange, headerInjection, bearerToken, etc.). This renames it to "externalAuthConfigRef" for consistency before the API stabilizes. Updated the constant, kubebuilder validation markers, CEL rules, converter logic, and all test fixtures. CRD manifests and API docs regenerated. Fixes stacklok#4542
jerm-dro
approved these changes
Apr 6, 2026
jerm-dro
requested changes
Apr 6, 2026
Keep the old "external_auth_config_ref" value as DeprecatedBackendAuthTypeExternalAuthConfigRef so existing CRDs continue to validate. The kubebuilder enum and validation switch now accept both the new camelCase and deprecated snake_case values.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4563 +/- ##
==========================================
+ Coverage 68.86% 68.91% +0.05%
==========================================
Files 505 505
Lines 52320 52387 +67
==========================================
+ Hits 36028 36105 +77
+ Misses 13504 13492 -12
- Partials 2788 2790 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Ran The deprecation warning is in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The enum value `external_auth_config_ref` was the only snake_case type discriminator in the CRD codebase. Every other value uses camelCase (`tokenExchange`, `headerInjection`, `bearerToken`, `embeddedAuthServer`, `awsSts`, etc.). Renamed to `externalAuthConfigRef` for consistency before the API moves past v1alpha1.
Changes:
Build, lint (0 issues), and compilation all pass.
Fixes #4542