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: Allow setting ARGOCD_EXEC_TIMEOUT in repo server #415

Merged

Conversation

jannfis
Copy link
Collaborator

@jannfis jannfis commented Aug 31, 2021

What type of PR is this?

/kind enhancement

What does this PR do / why we need it:

There's currently no way to set the environment variable for ARGOCD_EXEC_TIMEOUT in the repository server. This PR introduces this setting as first class feature by introducing .spec.repo.execTimeout, which if set, will add the appropriate environment variable to the repo server's pod template.

Have you updated the necessary documentation?

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

how are the referenced docs actually updated? can't find refdocs anywhere 😁

Which issue(s) this PR fixes:

Fixes #?

How to test changes / Special notes to the reviewer:

  • Create ArgoCD CR:
apiVersion: argoproj.io/v1alpha1
kind: ArgoCD
metadata:
   name: argocd
spec:
  route:
    enabled: true
  repo:
    execTimeout: 600
  • Apply to cluster in some-ns
  • Get environment variables from repo server pod: kubectl get deployment argocd-repo-server -o jsonpath='{.spec.template.spec.containers[0].env}'
  • It should contain ARGOCD_EXEC_TIMEOUT with value of 600
  • Set .spec.repo.execTimeout to value 300
  • Get environment variables from repo server pod: kubectl get deployment argocd-repo-server -o jsonpath='{.spec.template.spec.containers[0].env}'
  • It should contain ARGOCD_EXEC_TIMEOUT with value of 300
  • Remove .spec.repo.execTimeout from ArgoCD CR in cluster
  • Wait for reconciliation
  • Get environment variables from repo server pod: kubectl get deployment argocd-repo-server -o jsonpath='{.spec.template.spec.containers[0].env}'
  • It should not contain any ARGOCD_EXEC_TIMEOUT variable anymore

Copy link
Collaborator

@iam-veeramalla iam-veeramalla left a comment

Choose a reason for hiding this comment

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

LGTM !! Thanks @jannfis for the quick PR

@@ -111,6 +111,59 @@ func TestReconcileArgoCD_reconcileRepoDeployment_volumes(t *testing.T) {
}
}

func TestReconcileArgoCD_reconcileRepoDeployment_env(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@iam-veeramalla iam-veeramalla merged commit 2da7728 into argoproj-labs:master Aug 31, 2021
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