From 26e965fd71dd325bd8df451ce317456bf2d15073 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Thu, 11 Apr 2024 07:56:53 -0600 Subject: [PATCH] fix: drop path normalization to MERGE_SLASHES to allow apps to handle encoded slashes (#330) ## Description PR to address `DECODE_AND_MERGE_SLASHES` causing issues in certain applications. Gives the ability to selectively turn this off in a namespace with the `UDSPackage` CR. ## Related Issue Fixes #288 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [X] [Contributor Guide Steps](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)(https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md#submitting-a-pull-request) followed --------- Co-authored-by: Micah Nagel --- src/istio/values/values.yaml | 2 +- src/pepr/operator/controllers/istio/injection.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/istio/values/values.yaml b/src/istio/values/values.yaml index 184a11a9b..c7b28d2f4 100644 --- a/src/istio/values/values.yaml +++ b/src/istio/values/values.yaml @@ -1,7 +1,7 @@ meshConfig: accessLogFile: /dev/stdout pathNormalization: - normalization: DECODE_AND_MERGE_SLASHES + normalization: MERGE_SLASHES defaultConfig: holdApplicationUntilProxyStarts: true gatewayTopology: diff --git a/src/pepr/operator/controllers/istio/injection.ts b/src/pepr/operator/controllers/istio/injection.ts index e3a465619..b1562164e 100644 --- a/src/pepr/operator/controllers/istio/injection.ts +++ b/src/pepr/operator/controllers/istio/injection.ts @@ -20,8 +20,8 @@ export async function enableInjection(pkg: UDSPackage) { const annotations = sourceNS.metadata?.annotations || {}; const pkgKey = `uds.dev/pkg-${pkg.metadata.name}`; - // Save the original value of the istio-injection label only if it's not already set - if (!annotations[injectionLabel]) { + // Mark the original namespace injection setting for if all packages are removed + if (!annotations[injectionAnnotation]) { annotations[injectionAnnotation] = labels[injectionLabel] || "non-existent"; }