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

fix: argocd cluster add <context> --in-cluster #6276

Merged
merged 4 commits into from
May 24, 2021

Conversation

kshamajain99
Copy link
Contributor

fixes #6233

We set bearer token if either of certData and KeyData is missing, even if --in-cluster option is provided.

if len(tlsClientConfig.CertData) == 0 || len(tlsClientConfig.KeyData) == 0 {
clst.Config.BearerToken = managerBearerToken
}

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).
  • 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).

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
@codecov
Copy link

codecov bot commented May 19, 2021

Codecov Report

Merging #6276 (9f191cd) into master (cc4eea0) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6276      +/-   ##
==========================================
- Coverage   41.10%   41.06%   -0.05%     
==========================================
  Files         151      151              
  Lines       19930    19936       +6     
==========================================
- Hits         8192     8186       -6     
- Misses      10610    10622      +12     
  Partials     1128     1128              
Impacted Files Coverage Δ
pkg/apis/application/v1alpha1/types.go 58.07% <0.00%> (-0.64%) ⬇️
server/server.go 54.87% <0.00%> (-0.73%) ⬇️
controller/appcontroller.go 53.05% <0.00%> (-0.10%) ⬇️
server/application/application.go 30.88% <0.00%> (-0.04%) ⬇️
util/settings/settings.go 46.75% <0.00%> (ø)
util/session/sessionmanager.go 70.11% <0.00%> (ø)

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 cc4eea0...9f191cd. Read the comment docs.

Signed-off-by: kshamajain99 <kshamajain99@gmail.com>
@kshamajain99 kshamajain99 requested a review from alexmt May 23, 2021 21:06
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. Thank you!

@alexmt alexmt merged commit 20ba86b into argoproj:master May 24, 2021
@jannfis jannfis added the needs-verification PR requires pre-release verification label Jun 25, 2021
@mayzhang2000 mayzhang2000 removed the needs-verification PR requires pre-release verification label Aug 3, 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.

argocd cluster add <context> --in-cluster fails with x509: certificate signed by unknown authority
4 participants