Skip to content

Conversation

nobbs
Copy link
Contributor

@nobbs nobbs commented Jun 24, 2025

Checklist:

  • I have bumped the chart version according to versioning
  • I have updated the documentation according to documentation
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.
  • I have created a separate pull request for each chart according to pull requests
  • My build is green (troubleshooting builds).

@Copilot Copilot AI review requested due to automatic review settings June 24, 2025 13:16
Copilot

This comment was marked as outdated.

@nobbs nobbs force-pushed the fix/argo-cd-hardcoded-commit-server-url branch 2 times, most recently from 3bd9bfe to 4b19374 Compare June 24, 2025 13:18
@github-actions github-actions bot added size/M and removed size/XXL labels Jun 24, 2025
nobbs added 3 commits June 24, 2025 15:20
This commit adds the required template logic to the Argo CD Helm chart
to use the proper, release name dependent URL for the commit server. The current
implementation uses the default hardcoded URL `argocd-commit-server:8086`
from <https://github.com/argoproj/argo-cd/blob/v3.0.9/common/common.go#L31>.

Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
@nobbs nobbs force-pushed the fix/argo-cd-hardcoded-commit-server-url branch from 284ef73 to 5a969c8 Compare June 24, 2025 13:20
@nobbs nobbs changed the title Fix/argo cd hardcoded commit server url fix(argo-cd): do not use hardcoded commit server URL Jun 24, 2025
@nobbs nobbs requested a review from Copilot June 24, 2025 13:21
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

Addresses the hardcoded commit server URL by making the service port and port name configurable, propagating the dynamic address into presets and controller environments, and bumping the chart version.

  • Introduce commitServer.service.port and portName values in values.yaml
  • Update Service template to use those values, add env var in application-controller, and set the commit.server preset in helpers
  • Bump chart version to 8.1.2, update documentation and changelog

Reviewed Changes

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

Show a summary per file
File Description
charts/argo-cd/values.yaml Added commitServer.service.port and portName entries to replace the hardcoded port
charts/argo-cd/templates/argocd-commit-server/service.yaml Templatized Service port name and port values
charts/argo-cd/templates/argocd-application-controller/statefulset.yaml Inject ARGOCD_APPLICATION_CONTROLLER_COMMIT_SERVER via ConfigMap
charts/argo-cd/templates/argocd-application-controller/deployment.yaml Inject ARGOCD_APPLICATION_CONTROLLER_COMMIT_SERVER via ConfigMap
charts/argo-cd/templates/_helpers.tpl Set the commit.server preset dynamically based on service fullname and port
charts/argo-cd/README.md Documented the new commitServer.service.port and portName values
charts/argo-cd/Chart.yaml Bumped chart version to 8.1.2 and updated the changelog entry
Comments suppressed due to low confidence (1)

charts/argo-cd/templates/argocd-commit-server/service.yaml:23

  • Hardcoding the targetPort value to "server" breaks custom portName overrides. Use the templated portName (e.g., {{ .Values.commitServer.service.portName }}) instead of a static string.
    targetPort: server

Comment on lines +347 to +352
- name: ARGOCD_APPLICATION_CONTROLLER_COMMIT_SERVER
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: commit.server
optional: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

Though Argo CD itself has interface for this, ref, we follow upstream's manifests. Could you please refactor the upstream's manifest at first? Once upstream releases it, we will also follow it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, thanks for the heads up - I've raised a PR with the required changes upstream: argoproj/argo-cd#23536

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fyi: upstream changes have been merged

Copy link
Member

@mkilchhofer mkilchhofer 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 since the changes are already accepted upstream and it only added the env vars (no new Golang logic), we can already merge this even before upstream releases a new version.

LGTM and thanks @nobbs for your contribution

Copy link
Collaborator

@yu-croco yu-croco left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!

@yu-croco yu-croco merged commit 57aa1b7 into argoproj:main Jun 27, 2025
9 of 10 checks passed
yaringol pushed a commit to yaringol/argo-helm that referenced this pull request Jul 12, 2025
* fix(argo-cd): do not use hardcoded commit server URL

This commit adds the required template logic to the Argo CD Helm chart
to use the proper, release name dependent URL for the commit server. The current
implementation uses the default hardcoded URL `argocd-commit-server:8086`
from <https://github.com/argoproj/argo-cd/blob/v3.0.9/common/common.go#L31>.

Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>

* chore(argo-cd): update version to 8.1.2

Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>

* docs(argo-cd): add commit server service port and port name to README

Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>

---------

Signed-off-by: Alexej Disterhoft <alexej.disterhoft@redcare-pharmacy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants