# Argo CD - Parameter Overrides

# Problem Statement

When deploying a second version of an application in Argo CD commonly from a feature branch to test your changes prior to merging back to master and changing a parameter name override, such as from `ingress.hostname` to `ingress.host` so that you have a new entry point over DNS to your application, if the manifest continues to show the old parameter used by the application that was deployed for instance from the master branch, it indicates that Argo CD is still applying the previous override configuration. 

# This can happen due to several reasons:

-   **Stale Parameter Overrides:**

    Argo CD might be holding onto a cached or previously defined parameter override. If the override was applied via the Argo CD UI or `argocd app set` command, and not directly in the Git repository's application manifest, the old override might persist.

-   **Incorrect Override Location:**

    The new parameter override might be placed in the wrong location within the application's configuration. Ensure that the override for `ingress.host` is correctly defined in the `source.helm.parameters` or `source.kustomize.parameters` section of your Argo CD Application resource, or within a referenced `values.yaml` file if using Helm.

-   **Git Repository Not Synced:**

    If the parameter change was made directly in a Git repository, ensure that Argo CD has successfully synced with the repository and pulled the latest changes. Check the application's sync status in the Argo CD UI.

-   **Helm Chart or Kustomize Base Issues:**

    -   **Helm:** If using Helm, the chart itself might be explicitly defining `ingress.hostname` and not `ingress.host`, or the template logic might not be correctly picking up the new parameter name.
    -   **Kustomize:** If using Kustomize, ensure that the Kustomize base or overlay correctly reflects the new parameter name and that the patch or overlay is applied as expected.

# Resolution Steps:

-   **Verify Parameter Override Source:**

    -   **Git-based:** Confirm the `ingress.host` override is correctly defined in the `Application` manifest within your Git repository (e.g., `spec.source.helm.parameters` or a `valueFiles` reference).
    -   **Argo CD UI/CLI:** If overrides were set via the UI or `argocd app set` command, ensure the old `ingress.hostname` override is removed and the new `ingress.host` override is correctly applied.

-   **Force Sync or Refresh:**

    In the Argo CD UI, try a "Hard Refresh" or "Force Sync" on the application to ensure Argo CD re-evaluates the latest configuration from Git.

-   **Inspect Rendered Manifests:**

    Use the Argo CD UI to inspect the "Manifests" tab of the application. This will show the final rendered Kubernetes manifests that Argo CD is attempting to apply, which can help pinpoint where the old parameter is still being introduced.

-   **Review Helm Chart/Kustomize Configuration:**

    -   **Helm:** Examine the Helm chart's `values.yaml` and `templates` to confirm that `ingress.host` is the expected parameter and that `ingress.hostname` is not being hardcoded or implicitly used.
    -   **Kustomize:** Verify Kustomize patches or overlays are correctly targeting the `Ingress` resource and applying the `ingress.host` value.
