argo-cd icon indicating copy to clipboard operation
argo-cd copied to clipboard

fix: defaulting to in-cluster is misleading for disconnected clusters

Open rbreeze opened this issue 2 years ago • 3 comments

Signed-off-by: Remington Breeze [email protected]

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

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

rbreeze avatar Jul 28 '22 21:07 rbreeze

Codecov Report

Base: 45.62% // Head: 45.62% // No change to project coverage :thumbsup:

Coverage data is based on head (b6d2754) compared to base (cac0de1). Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10132   +/-   ##
=======================================
  Coverage   45.62%   45.62%           
=======================================
  Files         236      236           
  Lines       28699    28699           
=======================================
  Hits        13093    13093           
  Misses      13805    13805           
  Partials     1801     1801           
Impacted Files Coverage Δ
util/settings/settings.go 51.25% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jul 28 '22 22:07 codecov[bot]

Maybe this is a dumb question but will it have any impact of not showing the in-cluster cluster correctly (e.g. showing them as Unknown)?

jessesuen avatar Jul 28 '22 22:07 jessesuen

Not a dumb question at all, I'll have to double check to make sure that's not the case. Thanks for catching that.

It appears the local cluster is explicitly named in-cluster in the API: https://github.com/argoproj/argo-cd/blob/c1d81738d3089958832908e9a2460e28387cc46a/util/db/cluster.go#L28

which would lead me to believe this name var would be populated explicitly as well, but I want to test to confirm first.

rbreeze avatar Jul 28 '22 23:07 rbreeze

@rbreeze did you have a chance to test? Would be happy to review.

crenshaw-dev avatar Aug 08 '22 21:08 crenshaw-dev

@crenshaw-dev tested! in-cluster is explicitly set when the cluster is in fact in-cluster.

rbreeze avatar Sep 26 '22 20:09 rbreeze