Description
While OpenShift Templates are excellent for dynamic, parameter-driven deployments (like PR environments), Kustomize has become the standard for managing structural differences between stable environments (TEST vs. PROD) without the "black box" complexity of Helm. Adding native Kustomize support would modernize the action and provide a cleaner path to GitOps for developers.
Proposed Change
Add a new optional input kustomization_path. When provided, the action will switch from "Template Mode" to "Kustomize Mode."
New Input
kustomization_path:
description: 'Path to the directory containing kustomization.yaml'
required: false
Execution Logic
- If
kustomization_path is set:
- (Optional) If in Lite Mode (PR deployment):
- Use
kustomize edit to remove HorizontalPodAutoscaler or PodDisruptionBudget objects on the fly.
- Use
kustomize edit set replicas ... to enforce 1 replica.
- Execute
oc apply -k <kustomization_path>.
- Else if
file is set:
- Continue with the existing
oc process | oc apply workflow.
Impact
- Zero Breaking Changes: Existing users of OpenShift Templates are unaffected.
- Improved Lite Mode: Leverages native Kustomize editing instead of manual manifest manipulation.
- Modern Standards: Aligns the action with OCP 4.x best practices and provides a bridge for teams moving toward ArgoCD.
Description
While OpenShift Templates are excellent for dynamic, parameter-driven deployments (like PR environments), Kustomize has become the standard for managing structural differences between stable environments (TEST vs. PROD) without the "black box" complexity of Helm. Adding native Kustomize support would modernize the action and provide a cleaner path to GitOps for developers.
Proposed Change
Add a new optional input
kustomization_path. When provided, the action will switch from "Template Mode" to "Kustomize Mode."New Input
Execution Logic
kustomization_pathis set:kustomize editto removeHorizontalPodAutoscalerorPodDisruptionBudgetobjects on the fly.kustomize edit set replicas ...to enforce 1 replica.oc apply -k <kustomization_path>.fileis set:oc process | oc applyworkflow.Impact