-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(argo-cd): Add support for application controller dynamic cluster distribution. #2539
Conversation
charts/argo-cd/templates/argocd-application-controller/deployment.yaml
Outdated
Show resolved
Hide resolved
@oscrx Great work. Can you also please run |
I think I already did that, but after removing the trailing space in Chart.yaml will do it again :) Also some helpful test/debug commands for anyone that's interested in reviewing: helm dep update
helm template test . > before.yaml
helm template test . --set controller.dynamicClusterDistribution=true > after.yaml
diff before.yaml after.yaml
# or in your favorite editor of course |
This is exactly why I asked for second drop-in implementation so it's easy to sync changes with upstream on 2.11 :) |
After running the docs generator again the space seems the only difference. I love the generator btw, never used it before. |
One more ask. We should probably create smoke test for this in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks again
I don't think the pipeline is detecting |
Filename needs to end in |
779a1da
to
bad0bfb
Compare
Tried testing it again to see if it's flaky. The error is a bit vague:
It's running fine in my cluster. Startup logs```text time="2024-02-22T00:44:29Z" level=info msg="ArgoCD Application Controller is starting" built="2024-02-14T17:37:43Z" commit=a79e0eaca415461dc36615470cecc25d6d38cefb namespace=argocd version=v2.10.1+a79e0ea time="2024-02-22T00:44:29Z" level=info msg="Processing all cluster shards" time="2024-02-22T00:44:29Z" level=info msg="Processing all cluster shards" time="2024-02-22T00:44:29Z" level=info msg="appResyncPeriod=3m0s, appHardResyncPeriod=0s, appResyncJitter=0s" time="2024-02-22T00:44:29Z" level=info msg="Starting configmap/secret informers" time="2024-02-22T00:44:29Z" level=info msg="Configmap/secret informer synced" time="2024-02-22T00:44:29Z" level=warning msg="The cluster https://kubernetes.default.svc has no assigned shard." time="2024-02-22T00:44:29Z" level=warning msg="The cluster https://kubernetes.default.svc has no assigned shard." time="2024-02-22T00:44:29Z" level=info msg="Cluster https://kubernetes.default.svc has been assigned to shard 0" time="2024-02-22T00:44:29Z" level=info msg="Starting secretInformer forcluster" time="2024-02-22T00:44:29Z" level=info msg="Start syncing cluster" server="https://kubernetes.default.svc" time="2024-02-22T00:44:29Z" level=info msg="0xc000ca59e0 subscribed to settings updates" time="2024-02-22T00:44:32Z" level=info msg="Cluster successfully synced" server="https://kubernetes.default.svc" ```The new configmap also gets refreshed every 10 seconds apiVersion: v1
data:
shardControllerMapping: >-
[{"ShardNumber":0,"ControllerName":"argocd-application-controller-5f656dbc96-qlq2s","HeartbeatTime":"2024-02-22T00:51:27Z"}]
kind: ConfigMap
metadata:
creationTimestamp: '2024-02-22T00:14:03Z'
name: argocd-app-controller-shard-cm
namespace: argocd
resourceVersion: '133966466'
uid: 4c1e03da-2c5a-48e3-9c56-e5f2508dd8d6 |
Even 2 typo's in the upstream repo :) |
Oh I figured it out, it's getting late :) It's because the name of the helm chart is dynamic during the smoketest, the code/container gets it's own name from an environment variable: It might be needed for other components in this helm chart as well.. Also checked where it is getting the number of replica's. That code is dynamic though. |
Any thoughts about the name variable? |
Signed-off-by: Oscar Wieman <[email protected]>
bumped and rebased |
I added the previously discussed variable names into a separate commit for easier review, let me know what you guys think and if we should configure this. |
There was a problem hiding this 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 ! LGTM
Resolves: #2537
Let me know if anyone has questions or suggestions.
Relevant issues and PR's:
Thanks! @ishitasequeira
Removed env:
Added env's:
Checklist: