setup-kind icon indicating copy to clipboard operation
setup-kind copied to clipboard

Identify more platforms and externalize environment checking

Open mmorel-35 opened this issue 4 years ago • 2 comments

Hi @radu-matei , this PR includes the npm audit fix. Please merge it first so the other PR won't fail.

  1. This PR externalizes the environment checking in a dedicated file.

The checking consist in :

  • ensure that the required environment variables are available
  • ensure that docker is available
  • ensure that the request version of Kind supports the current platform
  • print a warning if setup-kind doesn't support the current platform
  • print a warning if the image doesn't include a sha256
  1. Kubectl is now installed with the right version when kubernetes version can be identified throught the provided image or the kind config file

  2. A metallb load-balancer can be installed with loadBalancer : true

  3. A local registry can be installed with localRegistry : true

NB : latest can be a valid value for the kind version input parameter

closes #9 closes #16 closes #81

mmorel-35 avatar Jan 18 '22 07:01 mmorel-35

Codecov Report

Merging #71 (5c5bbdf) into master (eb0371b) will decrease coverage by 14.87%. The diff coverage is 34.56%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #71       +/-   ##
===========================================
- Coverage   62.81%   47.94%   -14.88%     
===========================================
  Files           6       10        +4     
  Lines         199      340      +141     
  Branches       34       53       +19     
===========================================
+ Hits          125      163       +38     
- Misses         70      171      +101     
- Partials        4        6        +2     
Impacted Files Coverage Δ
src/requirements.ts 14.14% <14.14%> (ø)
src/go.ts 29.41% <16.66%> (-3.93%) :arrow_down:
src/kind/post.ts 63.33% <40.00%> (-3.91%) :arrow_down:
src/local-registry.ts 42.00% <42.00%> (ø)
src/kubectl.ts 50.00% <50.00%> (ø)
src/yaml/helper.ts 50.00% <50.00%> (ø)
src/kind/main.ts 78.37% <57.14%> (+9.62%) :arrow_up:
src/docker.ts 66.66% <66.66%> (ø)
src/constants.ts 96.96% <90.90%> (-3.04%) :arrow_down:
src/kind/core.ts 75.00% <100.00%> (+15.00%) :arrow_up:
... and 1 more

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 eb0371b...5c5bbdf. Read the comment docs.

codecov-commenter avatar Jan 18 '22 07:01 codecov-commenter

Please @radu-matei , when do you think you'll find the time to review this ? Thank you!

mmorel-35 avatar Jun 17 '22 14:06 mmorel-35