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

Keep user and cluster name when add kubeconfig #536

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

astraw99
Copy link
Contributor

@astraw99 astraw99 commented Sep 7, 2022

Fixes: #351

To keep the user and cluster name when add kubeconfig.
When user or cluster name already exists, will add a hash suffix, e.g. cls-orig-gtch2cf96d user-orig-gtch2cf96d.

Also updated test cases to check it correctly.

@gitguardian
Copy link

gitguardian bot commented Sep 7, 2022

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
- Generic High Entropy Secret fc07952 cmd/add_test.go View secret
- Generic High Entropy Secret fc07952 cmd/add_test.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Merging #536 (fc07952) into master (c32d19e) will increase coverage by 1.35%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #536      +/-   ##
==========================================
+ Coverage   11.43%   12.79%   +1.35%     
==========================================
  Files          19       19              
  Lines        1862     1891      +29     
==========================================
+ Hits          213      242      +29     
  Misses       1632     1632              
  Partials       17       17              
Flag Coverage Δ
unittests 12.79% <100.00%> (+1.35%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/add.go 38.51% <100.00%> (+14.98%) ⬆️

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

@sunny0826
Copy link
Owner

Thanks, I haven't had time to deal with this.

Copy link
Owner

@sunny0826 sunny0826 left a comment

Choose a reason for hiding this comment

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

Only a small change is required.

cmd/add.go Outdated Show resolved Hide resolved
cmd/add.go Outdated Show resolved Hide resolved
@astraw99 astraw99 force-pushed the ftr-keep-cluster-name branch from 78c45ea to fc07952 Compare September 8, 2022 07:08
Copy link
Owner

@sunny0826 sunny0826 left a comment

Choose a reason for hiding this comment

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

LGTM

@sunny0826 sunny0826 merged commit cd223f7 into sunny0826:master Sep 8, 2022
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.

kubecm uses wrong user and cluster name
2 participants