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

Check whether provided base64 encoded data in KubeConfig is valid #183

Merged
merged 1 commit into from
Dec 31, 2021

Conversation

stefankonig
Copy link
Contributor

Hi again, thanks for the quick response on my last PR.

I came across another minor thing, while testing i inadvertently used an invalid base64 encoded certificate in my kube config. This did not result in a clear error message, as the file_put_contents function successfully wrote the bool false as contents of the certificate.pem file. Later down the line this resulted in an less obvious Curl error 58.

Therefore i added a check to make sure it at least was able to decoding something from the base64 contents.

@codecov
Copy link

codecov bot commented Dec 31, 2021

Codecov Report

Merging #183 (9edef5f) into master (9f72121) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #183   +/-   ##
=========================================
  Coverage     95.19%   95.20%           
- Complexity      693      694    +1     
=========================================
  Files            70       70           
  Lines          1685     1688    +3     
=========================================
+ Hits           1604     1607    +3     
  Misses           81       81           
Impacted Files Coverage Δ
src/Traits/Cluster/LoadsFromKubeConfig.php 93.75% <100.00%> (+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 9f72121...9edef5f. Read the comment docs.

@rennokki rennokki merged commit 09b15a5 into renoki-co:master Dec 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.

None yet

2 participants