Support Harness Variable Rendering in Kustomize Files Managed via kustomization.yaml (Not Just Patches Defined in UI)
long-term
S
Silent Egret
Harness currently supports variable resolution (e.g., <+env.name>) in Kustomize patch files only when those patches are explicitly defined through the Harness UI under Service Manifests → Kustomize Patches.
However, if patches are defined directly in the kustomization.yaml using patchesStrategicMerge, Harness variables are not rendered, which can result in deployment failures due to unresolved values.
Use Case:
- Each environment (dev, QA, etc.) has its own overlay and unique patch files.
- Patch files may change across releases depending on what needs to be customized for each environment.
- Managing the patch file paths from the Harness UI adds friction and introduces risk (e.g., pipeline failure if a patch file doesn’t exist for a given release).
- Developers are more comfortable managing kustomization.yaml directly, as part of GitOps workflows.
- Having to switch between Git and the Harness UI to keep patches in sync can be error-prone and less scalable.
Proposed Enhancement:
Allow users to specify patches directly in kustomization.yaml using the standard Kustomize format:
================
bases:
- ../../base
resources:
- xyz.yaml
patchesStrategicMerge:
- abc.yaml
================
- Enable Harness variable resolution (e.g., <+env.name>, <+pipeline.variables.*>) within these patch files without requiring them to be added as separate Kustomize Patch manifests in the Harness UI.
- This would provide a more Git-native experience and allow flexible, environment-specific patch management without additional UI overhead.
Log In
Rohan Gupta
long-term