Skip to content

Commit

Permalink
fix: drop path normalization to MERGE_SLASHES to allow apps to handle…
Browse files Browse the repository at this point in the history
… 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 <micah.nagel@defenseunicorns.com>
  • Loading branch information
Racer159 and mjnagel authored Apr 11, 2024
1 parent c419574 commit 26e965f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/istio/values/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meshConfig:
accessLogFile: /dev/stdout
pathNormalization:
normalization: DECODE_AND_MERGE_SLASHES
normalization: MERGE_SLASHES
defaultConfig:
holdApplicationUntilProxyStarts: true
gatewayTopology:
Expand Down
4 changes: 2 additions & 2 deletions src/pepr/operator/controllers/istio/injection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

Expand Down

0 comments on commit 26e965f

Please sign in to comment.