Skip to content

Conversation

@ozhuraki
Copy link
Contributor

Since we currently validate only the image name and the tag,
ignore registry, vendor and extract only relevant parts.

Closes #605

@ozhuraki ozhuraki requested review from bart0sh and rojkov as code owners June 10, 2021 12:48
@codecov-commenter
Copy link

codecov-commenter commented Jun 10, 2021

Codecov Report

Merging #648 (54c8e34) into main (0be8b23) will increase coverage by 0.05%.
The diff coverage is 100.00%.

❗ Current head 54c8e34 differs from pull request most recent head 748863a. Consider uploading reports for the commit 748863a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #648      +/-   ##
==========================================
+ Coverage   59.02%   59.07%   +0.05%     
==========================================
  Files          32       32              
  Lines        2372     2375       +3     
==========================================
+ Hits         1400     1403       +3     
  Misses        890      890              
  Partials       82       82              
Impacted Files Coverage Δ
cmd/gpu_nfdhook/labeler.go 71.42% <100.00%> (+1.21%) ⬆️
cmd/gpu_plugin/gpu_plugin.go 83.50% <100.00%> (-0.17%) ⬇️

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 0be8b23...748863a. Read the comment docs.

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
parts := strings.SplitN(r.Spec.Image, ":", 2)
return validatePluginImage(r.Spec.Image, "intel-qat-plugin", qatMinVersion)

we could just return the output from validatePluginImage (see, e.g., dsadeviceplugin_webhook.go)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the input. Done. Please take a look.

@ozhuraki ozhuraki force-pushed the qatdeviceplugin-webhook branch from 3d27f3c to 39d96f5 Compare June 14, 2021 08:58
@ozhuraki ozhuraki force-pushed the qatdeviceplugin-webhook branch from 39d96f5 to 748863a Compare June 14, 2021 09:01
@ozhuraki ozhuraki requested a review from mythi June 14, 2021 10:39
Copy link
Contributor

@mythi mythi left a comment

Choose a reason for hiding this comment

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

thanks!

@rojkov rojkov merged commit fa2a217 into intel:main Jun 14, 2021
@ozhuraki ozhuraki deleted the qatdeviceplugin-webhook branch December 17, 2021 10:44
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.

image name validation fails when registry hostname:port is specified

4 participants