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

set KUBECONFIG before argocd login #126

Merged
merged 3 commits into from
Jul 12, 2021

Conversation

noam-codefresh
Copy link
Collaborator

No description provided.

origKubeConfig := os.Getenv("KUBECONFIG")
defer func() { os.Setenv("KUBECONFIG", origKubeConfig) }()
if err := os.Setenv("KUBECONFIG", opts.KubeConfig); err != nil {
return err
Copy link
Contributor

Choose a reason for hiding this comment

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

return a wrapped error here: failed to set KUBECONFIG env var, cause I'm not sure the error returned here would be clear

Namespace string
Username string
Password string
KubeConfig string
Copy link
Contributor

Choose a reason for hiding this comment

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

what about kube context?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed most kube flags (except for timeout, kubeconfig and namespace).

@roi-codefresh
Copy link
Contributor

/ci

@codecov
Copy link

codecov bot commented Jul 12, 2021

Codecov Report

Merging #126 (65e931e) into main (b91f468) will decrease coverage by 0.05%.
The diff coverage is 76.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #126      +/-   ##
==========================================
- Coverage   59.59%   59.53%   -0.06%     
==========================================
  Files          14       14              
  Lines        2445     2439       -6     
==========================================
- Hits         1457     1452       -5     
+ Misses        900      899       -1     
  Partials       88       88              
Impacted Files Coverage Δ
cmd/commands/repo.go 60.45% <76.47%> (-0.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b91f468...65e931e. Read the comment docs.

@noam-codefresh noam-codefresh merged commit 26c7eea into argoproj-labs:main Jul 12, 2021
@noam-codefresh noam-codefresh deleted the login_fix branch July 12, 2021 07:50
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.

repo bootstrap fails when running argocd login if passing different --kubeconfig argument
3 participants