Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Support configuring multiple default trusted registry for plugin downloads during build-time #2977

Merged
merged 1 commit into from
Jul 21, 2022

Conversation

anujc25
Copy link
Contributor

@anujc25 anujc25 commented Jul 19, 2022

What this PR does / why we need it

  • When building the tanzu-cli, by default we used to select TKG_DEFAULT_IMAGE_REPOSITORY as a default registry that we should trust when downloading the plugins. Also during build time TKG_DEFAULT_IMAGE_REPOSITORY we can only take 1 repository.

  • This change introduces more flexibility by introducing another TANZU_PLUGINS_ALLOWED_IMAGE_REPOSITORIES variable that can have multiple image repositories with comma separated strings.

Which issue(s) this PR fixes

Fixes #2978

Describe testing done for PR

  • Build the tanzu-cli by configuring TANZU_PLUGINS_ALLOWED_IMAGE_REPOSITORIES=projects.registry.vmware.com/tkg,projects.registry.vmware.com/vsphere
  • Verified that user is able to download plugins from both registries without configuring any additional environment variables

Release note

Support configuring multiple default trusted registry for plugin downloads during build-time using `TANZU_PLUGINS_ALLOWED_IMAGE_REPOSITORIES`

Additional information

Special notes for your reviewer

@anujc25 anujc25 requested a review from a team as a code owner July 19, 2022 21:23
@anujc25 anujc25 changed the title Support multiple default allowed registry for plugin downloads Support multiple default trusted registry for plugin downloads during build-time Jul 19, 2022
@anujc25 anujc25 changed the title Support multiple default trusted registry for plugin downloads during build-time Support configuring multiple default trusted registry for plugin downloads during build-time Jul 19, 2022
@codecov
Copy link

codecov bot commented Jul 20, 2022

Codecov Report

Merging #2977 (79084cd) into main (6d6ca50) will increase coverage by 0.03%.
The diff coverage is 0.00%.

❗ Current head 79084cd differs from pull request most recent head 4dcb262. Consider uploading reports for the commit 4dcb262 to get more accurate results

@@            Coverage Diff             @@
##             main    #2977      +/-   ##
==========================================
+ Coverage   44.00%   44.04%   +0.03%     
==========================================
  Files         416      416              
  Lines       41852    41850       -2     
==========================================
+ Hits        18417    18432      +15     
+ Misses      21714    21702      -12     
+ Partials     1721     1716       -5     
Impacted Files Coverage Δ
pkg/v1/config/defaults.go 42.30% <0.00%> (-0.83%) ⬇️
addons/controllers/addon_controller.go 63.30% <0.00%> (-0.31%) ⬇️
addons/controllers/clusterbootstrap_controller.go 64.96% <0.00%> (+1.05%) ⬆️
...ons/controllers/packageinstallstatus_controller.go 82.79% <0.00%> (+2.15%) ⬆️

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 73f5899...4dcb262. Read the comment docs.

@anujc25 anujc25 force-pushed the anujc/support-multiple-default-allowed-registries branch from 79084cd to cfafef7 Compare July 20, 2022 17:12
Signed-off-by: Anuj Chaudhari <anujc@vmware.com>
@anujc25 anujc25 force-pushed the anujc/support-multiple-default-allowed-registries branch from cfafef7 to 4dcb262 Compare July 20, 2022 17:13
Copy link
Contributor

@vuil vuil left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

@vuil vuil added the ok-to-merge PRs should be labelled with this before merging label Jul 20, 2022
@vijaykatam
Copy link
Contributor

codecov check fail is due to codecov/codecov-action#788

@vuil
Copy link
Contributor

vuil commented Jul 20, 2022

@anujc25 good to mention TANZU_PLUGINS_ALLOWED_IMAGE_REPOSITORIES in the release notes section.
codecov error not related to the change. PR is good to merge.

@anujc25 anujc25 merged commit 3c26a23 into main Jul 21, 2022
@anujc25 anujc25 deleted the anujc/support-multiple-default-allowed-registries branch July 21, 2022 02:14
abhijit-dev82 pushed a commit to abhijit-dev82/tanzu-framework that referenced this pull request Jul 27, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
cla-not-required ok-to-merge PRs should be labelled with this before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow multiple default allowed registries for plugin downloads while building tanzu-cli
4 participants