Skip to content

Conversation

@mikeshng
Copy link
Contributor

What type of PR is this?
/kind enhancement

What does this PR do / why we need it:
The ArgoCD operator is already capable of deploying the argocd-agent's principal components. This PR adds support for deploying the argocd-agent's agent components as well, allowing users to use the ArgoCD operator to deploy both the principal and agent components.

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:
Fixes #NA

How to test changes / Special notes to the reviewer:
I've intentionally avoided disrupting the existing Principal path to minimize regression risk. To keep concerns separated, this PR introduces an agent/ folder that mirrors the structure of the current Principal code. This separation is both safer (fewer unintended cross effects) and more future proof, since the Principal (server) and Agent (client) are likely to diverge further over time. While this does introduce some code duplication, sharing helpers between two components with distinct roles (server vs client) increases the chance that a change for one will accidentally impact the other. That's why I feel like clear boundaries are preferable here.
I also considered creating a principal folder and moving existing files, but that would add a lot inflate this PR. For now, the top level continues to represent the server (Principal), and the new agent folder represents the client, which still reflects a clean server–client structure without unnecessary file moves.

@mikeshng mikeshng force-pushed the add-agent-agent-components branch 4 times, most recently from 03b8db7 to 7fed99e Compare October 23, 2025 04:34
@mikeshng mikeshng force-pushed the add-agent-agent-components branch from 7fed99e to 8459234 Compare October 23, 2025 04:35
@mikeshng
Copy link
Contributor Author

/assign @jgwest @jparsai @svghadi

CC @jannfis

SecretKeyRef: &corev1.SecretKeySelector{
Key: AgentRedisPasswordKey,
LocalObjectReference: corev1.LocalObjectReference{
Name: AgentRedisSecretname,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should be <argocd name>-redis-initial-password otherwise it will not work if instance name in not "argocd", it seems I missed it in principal as well https://github.com/argoproj-labs/argocd-operator/blob/master/controllers/argocdagent/deployment.go#L379

Copy link
Collaborator

Choose a reason for hiding this comment

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

I fixed principal deployment #1926

@jparsai
Copy link
Collaborator

jparsai commented Oct 30, 2025

I tried it locally and connected it with principal, it worked for me.
It would be nice to have e2e test for this. E2E can not test actual scenario by connecting it with principal yet, but it verify that all agent resources are created successfully.

@mikeshng
Copy link
Contributor Author

Thank you @jparsai for the review and related PRs. I am going to wait until #1925 and #1926 then resolve conflict and address your comments.

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