Repository navigation
fix: Rename clientID to be client_name to match env var - #95
Merged
Merged
Conversation
Alan-Cha
commented
Feb 3, 2026
|
|
||
| // Check and inject client-registration sidecar (with SPIRE option) | ||
| if !containerExists(podSpec.Containers, ClientRegistrationContainerName) { | ||
| clientID := fmt.Sprintf("%s/%s", namespace, crName) |
Member
Author
There was a problem hiding this comment.
It seems redundant to pass clientID here it not needed anywhere else and we also compose clientID in BuildClientRegistrationContainerWithSpireOption()
Alan-Cha
commented
Feb 3, 2026
Comment on lines
-94
to
+97
| func BuildClientRegistrationContainerWithSpireOption(clientID, name, namespace string, spireEnabled bool) corev1.Container { | ||
| func BuildClientRegistrationContainerWithSpireOption(name, namespace string, spireEnabled bool) corev1.Container { | ||
| builderLog.Info("building ClientRegistration Container", "spireEnabled", spireEnabled) | ||
|
|
||
| if clientID == "" { | ||
| clientID = namespace + "/" + name | ||
| } | ||
| clientName := namespace + "/" + name |
Member
Author
There was a problem hiding this comment.
Instead of passing clientID (which isn't being used anywhere else) and checking if it exists, we can just compose it here
Member
Author
|
@cwiklik Could clarify how I should go about testing this? I recall previous, I used your scripts and I also had to build images. I'm not sure what I would need for this |
Member
|
If you follow the instructions on demo-webhook.md you should be able to get it working |
Signed-off-by: Alan Cha <Alan.cha1@ibm.com>
Alan-Cha
force-pushed
the
client_id_rename
branch
from
February 4, 2026 02:56
fd7992d to
4c431c8
Compare
Member
Author
|
I've verified this PR and it seems to be working |
Member
Author
cwiklik
added a commit
to cwiklik/kagenti-extensions
that referenced
this pull request
Feb 16, 2026
…onfig Phase 4 of 5: PodMutator Wiring & Main Changes to pod_mutator.go: - Add Builder, GetPlatformConfig, GetFeatureGates fields - Update NewPodMutator to accept getter functions (not direct pointers) - Rewrite InjectAuthBridge to use PrecedenceEvaluator for injection decisions - Use ContainerBuilder with fresh config for each mutation - Remove duplicate constants (now in constants.go from Phase 2) - Update BuildClientRegistrationContainerWithSpireOption calls to remove clientID parameter (per upstream PR rossoctl#95) Changes to main.go: - Add --config-path and --feature-gates-path CLI flags - Create ConfigLoader and FeatureGateLoader with hot-reload via Watch() - Pass getter functions to NewPodMutator for dynamic config access - Move ctrl.SetupSignalHandler() before loaders (shared context) - Add OnChange callbacks for logging config updates Changes to authbridge_webhook.go: - Expand isAlreadyInjected to check EnvoyProxyContainerName Changes to webhook_suite_test.go: - Update NewPodMutator calls to pass lambda getters Part of epic rossoctl#109 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: cwiklik <cwiklikj@gmail.com>
6 tasks done
cwiklik
added a commit
to cwiklik/kagenti-extensions
that referenced
this pull request
Feb 17, 2026
…onfig Phase 4 of 5: PodMutator Wiring & Main Changes to pod_mutator.go: - Add Builder, GetPlatformConfig, GetFeatureGates fields - Update NewPodMutator to accept getter functions (not direct pointers) - Rewrite InjectAuthBridge to use PrecedenceEvaluator for injection decisions - Use ContainerBuilder with fresh config for each mutation - Remove redundant spireEnabled check on spiffe-helper injection (evaluateSpiffeHelper() already guarantees Inject=true only when SPIRE label is set) - Remove duplicate constants (now in constants.go from Phase 2) - Update BuildClientRegistrationContainerWithSpireOption calls to remove clientID parameter (per upstream PR rossoctl#95) Changes to main.go: - Add --config-path and --feature-gates-path CLI flags - Create ConfigLoader and FeatureGateLoader with hot-reload via Watch() - Pass getter functions to NewPodMutator for dynamic config access - Move ctrl.SetupSignalHandler() before loaders (shared context) - Add OnChange callbacks for logging config updates Changes to authbridge_webhook.go: - Expand isAlreadyInjected to check EnvoyProxyContainerName Changes to webhook_suite_test.go: - Update NewPodMutator calls to pass lambda getters Part of epic rossoctl#109 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: cwiklik <cwiklikj@gmail.com>
cwiklik
added a commit
to cwiklik/kagenti-extensions
that referenced
this pull request
Feb 17, 2026
…onfig Phase 4 of 5: PodMutator Wiring & Main Changes to pod_mutator.go: - Add Builder, GetPlatformConfig, GetFeatureGates fields - Update NewPodMutator to accept getter functions (not direct pointers) - Rewrite InjectAuthBridge to use PrecedenceEvaluator for injection decisions - Use ContainerBuilder with fresh config for each mutation - Remove redundant spireEnabled check on spiffe-helper injection (evaluateSpiffeHelper() already guarantees Inject=true only when SPIRE label is set) - Remove duplicate constants (now in constants.go from Phase 2) - Update BuildClientRegistrationContainerWithSpireOption calls to remove clientID parameter (per upstream PR rossoctl#95) Changes to main.go: - Add --config-path and --feature-gates-path CLI flags - Create ConfigLoader and FeatureGateLoader with hot-reload via Watch() - Pass getter functions to NewPodMutator for dynamic config access - Move ctrl.SetupSignalHandler() before loaders (shared context) - Add OnChange callbacks for logging config updates Changes to authbridge_webhook.go: - Expand isAlreadyInjected to check EnvoyProxyContainerName Changes to webhook_suite_test.go: - Update NewPodMutator calls to pass lambda getters Part of epic rossoctl#109 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: cwiklik <cwiklikj@gmail.com>
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.
Description
Fixes rossoctl/rossoctl#83
Type of Change
How Has This Been Tested?
I need some guidance for testing
Checklist