Skip to content

Conversation

nobbs
Copy link
Contributor

@nobbs nobbs commented Jun 24, 2025

This commit updates the ArgoCD application controller deployment to retrieve the commit server URL from an environment variable / the params configmap, allowing for more flexible configuration.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • The title of the PR conforms to the Toolchain Guide
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.
  • Optional. My organization is added to USERS.md.
  • Optional. For bug fixes, I've indicated what older releases this fix should be cherry-picked into (this may or may not happen depending on risk/complexity).

Copy link

bunnyshell bot commented Jun 24, 2025

❌ Preview Environment deleted from Bunnyshell

Available commands (reply to this comment):

  • 🚀 /bns:deploy to deploy the environment

This commit updates the ArgoCD application controller to retrieve the
commit server URL from an environment variable, allowing for more flexible configuration.

Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
@nobbs nobbs marked this pull request as ready for review June 24, 2025 14:23
@Copilot Copilot AI review requested due to automatic review settings June 24, 2025 14:23
@nobbs nobbs requested a review from a team as a code owner June 24, 2025 14:23
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the ArgoCD Application Controller deployment by sourcing the commit server URL from an environment variable backed by the argocd-cmd-params-cm ConfigMap, making the commit server endpoint configurable.

  • Added ARGOCD_APPLICATION_CONTROLLER_COMMIT_SERVER env var (from commit.server key) to controller StatefulSet and Deployment manifests.
  • Marked the new env var as optional for backward compatibility.
  • Applied this change across standard, HA, and hydrator-enabled install manifests.

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
manifests/namespace-install.yaml Added commit server env var to controller container
manifests/namespace-install-with-hydrator.yaml Added commit server env var to controller container
manifests/install.yaml Added commit server env var to controller container
manifests/install-with-hydrator.yaml Added commit server env var to controller container
manifests/ha/namespace-install.yaml Added commit server env var to controller container
manifests/ha/namespace-install-with-hydrator.yaml Added commit server env var to controller container
manifests/ha/install.yaml Added commit server env var to controller container
manifests/ha/install-with-hydrator.yaml Added commit server env var to controller container
manifests/core-install.yaml Added commit server env var to controller container
manifests/core-install-with-hydrator.yaml Added commit server env var to controller container
manifests/base/application-controller/argocd-application-controller-statefulset.yaml Added commit server env var to controller container
manifests/base/application-controller-deployment/argocd-application-controller-deployment.yaml Added commit server env var to controller container
Comments suppressed due to low confidence (3)

manifests/namespace-install.yaml:2341

  • [nitpick] This env var is added repeatedly across many manifests, which could be hard to maintain. Consider centralizing it with a common patch or using a templating tool (Helm/Kustomize) to reduce duplication.
        - name: ARGOCD_APPLICATION_CONTROLLER_COMMIT_SERVER

manifests/namespace-install.yaml:2341

  • [nitpick] There is no documentation update for users on how to configure ARGOCD_APPLICATION_CONTROLLER_COMMIT_SERVER. Please update the relevant docs or README to describe this new parameter and its effect.
        - name: ARGOCD_APPLICATION_CONTROLLER_COMMIT_SERVER

manifests/namespace-install.yaml:2341

  • No tests have been added to verify that the controller picks up and uses this new env var. Please include unit or e2e tests to cover this behavior.
        - name: ARGOCD_APPLICATION_CONTROLLER_COMMIT_SERVER

@crenshaw-dev
Copy link
Member

@nobbs thanks for the PR! Out of curiosity, what kind of setup are you going for?

@nobbs
Copy link
Contributor Author

nobbs commented Jun 24, 2025

Hey @crenshaw-dev - I mostly was playing around with the hydrator (which I've somehow missed the last months). I've deployed ArgoCD with the Helm chart and noticed errors along the lines of "k8s internal dns can't resolve argocd-commit-server to an IP".

Eventually, I figured out that the services deployed by the Helm chart are all prefixed with the release name, so the name is something along the lines of $release-name-argocd-commit-server. For basically all other services, this is dealt with, just for the commit server url, there was no templating build into the chart yet so the application server falls back to the default and leads to the above errors.

I raised a PR on the chart argoproj/argo-helm#3367 and was told to first raise a PR on the upstream manifests :D

Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think failing to include this was an oversight. Cherry-picking back.

@crenshaw-dev
Copy link
Member

/cherry-pick release-3.1

@crenshaw-dev
Copy link
Member

/cherry-pick release-3.0

@crenshaw-dev
Copy link
Member

/cherry-pick release-2.14

Copy link

codecov bot commented Jun 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.29%. Comparing base (a1bcd42) to head (0074667).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #23536      +/-   ##
==========================================
+ Coverage   60.22%   60.29%   +0.07%     
==========================================
  Files         345      345              
  Lines       59084    59084              
==========================================
+ Hits        35583    35625      +42     
+ Misses      20626    20592      -34     
+ Partials     2875     2867       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@crenshaw-dev crenshaw-dev merged commit e981167 into argoproj:master Jun 24, 2025
29 checks passed
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jun 24, 2025
Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jun 24, 2025
Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Jun 24, 2025
Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
crenshaw-dev pushed a commit that referenced this pull request Jun 24, 2025
…23541)

Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
Co-authored-by: Alexej Disterhoft <alexej@disterhoft.de>
cjcocokrisp pushed a commit to cjcocokrisp/argo-cd that referenced this pull request Jun 24, 2025
Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
crenshaw-dev pushed a commit that referenced this pull request Jun 24, 2025
…23542)

Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
Co-authored-by: Alexej Disterhoft <alexej@disterhoft.de>
crenshaw-dev pushed a commit that referenced this pull request Jun 24, 2025
…23543)

Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
Co-authored-by: Alexej Disterhoft <alexej@disterhoft.de>
enneitex pushed a commit to enneitex/argo-cd that referenced this pull request Aug 24, 2025
Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
Signed-off-by: enneitex <etienne.divet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants