Skip to content
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(appset): add configurable max reconciliations to appset #13381

Merged
merged 3 commits into from
May 5, 2023

Conversation

gdsoumya
Copy link
Member

@gdsoumya gdsoumya commented May 1, 2023

This PR:

  1. Adds the ability to configure max concurrent reconciles for appset controller (depends on feat(appset): applicationset controller use repo server (#10952) #12714)
  2. Updated appset env vars to use appset config for repo server instead of reusing app controller config

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.
  • Optional. My organization is added to USERS.md.
  • 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.

Please see Contribution FAQs if you have questions about your pull-request.

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
Comment on lines +94 to +116
- name: ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER_PLAINTEXT
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: controller.repo.server.plaintext
key: applicationsetcontroller.repo.server.plaintext
optional: true
- name: ARGOCD_APPLICATION_CONTROLLER_REPO_SERVER_STRICT_TLS
- name: ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER_STRICT_TLS
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: controller.repo.server.strict.tls
key: applicationsetcontroller.repo.server.strict.tls
optional: true
- name: ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER_TIMEOUT_SECONDS
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: applicationsetcontroller.repo.server.timeout.seconds
optional: true
- name: ARGOCD_APPLICATIONSET_CONTROLLER_CONCURRENT_RECONCILIATIONS
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: applicationsetcontroller.concurrent.reconciliations.max
Copy link
Member Author

@gdsoumya gdsoumya May 1, 2023

Choose a reason for hiding this comment

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

updated the env var names from app controller to appset controller and also made them point to appset specific config instead of re-using app controller config.

command.Flags().BoolVar(&repoServerPlaintext, "repo-server-plaintext", env.ParseBoolFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER_PLAINTEXT", false), "Disable TLS on connections to repo server")
command.Flags().BoolVar(&repoServerStrictTLS, "repo-server-strict-tls", env.ParseBoolFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER_STRICT_TLS", false), "Whether to use strict validation of the TLS cert presented by the repo server")
command.Flags().IntVar(&repoServerTimeoutSeconds, "repo-server-timeout-seconds", env.ParseNumFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_REPO_SERVER_TIMEOUT_SECONDS", 60, 0, math.MaxInt64), "Repo server RPC call timeout seconds.")
command.Flags().IntVar(&maxConcurrentReconciliations, "concurrent-reconciliations", env.ParseNumFromEnv("ARGOCD_APPLICATIONSET_CONTROLLER_CONCURRENT_RECONCILIATIONS", 10, 1, 100), "Max concurrent reconciliations limit for the controller")
Copy link
Member Author

Choose a reason for hiding this comment

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

set the default to 10 and max to 100 for now, let me know if that needs to be changed.

@codecov
Copy link

codecov bot commented May 1, 2023

Codecov Report

Patch coverage: 63.63% and no project coverage change.

Comparison is base (064c8da) 49.14% compared to head (e6d046e) 49.15%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #13381   +/-   ##
=======================================
  Coverage   49.14%   49.15%           
=======================================
  Files         248      248           
  Lines       42891    42900    +9     
=======================================
+ Hits        21079    21087    +8     
- Misses      19693    19694    +1     
  Partials     2119     2119           
Impacted Files Coverage Δ
...cationset/controllers/applicationset_controller.go 63.37% <20.00%> (-0.07%) ⬇️
reposerver/repository/repository.go 60.45% <100.00%> (+0.16%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
@gdsoumya gdsoumya force-pushed the feat/appset_parallelization branch from eba9f2a to 51367b7 Compare May 1, 2023 02:15
@gdsoumya gdsoumya marked this pull request as ready for review May 1, 2023 15:16
@gdsoumya gdsoumya requested review from ishitasequeira, crenshaw-dev and alexmt and removed request for ishitasequeira May 2, 2023 02:46
Copy link
Collaborator

@alexmt alexmt left a comment

Choose a reason for hiding this comment

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

LGTM!

@alexmt alexmt merged commit 56d1733 into argoproj:master May 5, 2023
@rumstead
Copy link
Member

Chances this could be in 2.8 with the other repo server changes for caching?

yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
…j#13381)

* feat(appset): add configurable max reconciliations to appset

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

* fix: lint errors

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>

---------

Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com>
valueFrom:
configMapKeyRef:
name: argocd-cmd-params-cm
key: controller.repo.server.plaintext
key: applicationsetcontroller.repo.server.plaintext
Copy link

@vincentgna vincentgna Aug 23, 2023

Choose a reason for hiding this comment

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

I think we should add docs for ppl upgrading from 2.7 to 2.8 running without in-cluster TLS (this seems to have broken applicationset controller with error "transport: authentication handshake failed: tls: first record does not look like a TLS handshake" )

didn't see a notice about this cmd param config change here
https://argo-cd.readthedocs.io/en/stable/operator-manual/upgrading/2.7-2.8/

and missing from the sample in docs
https://github.com/argoproj/argo-cd/blob/v2.8.1/docs/operator-manual/argocd-cmd-params-cm.yaml

Choose a reason for hiding this comment

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

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.

4 participants