tanzu-framework icon indicating copy to clipboard operation
tanzu-framework copied to clipboard

Add logic to put cluster labels and package labels on resources for custom cluster bootstrap scenario

Open shivaani0505 opened this issue 2 years ago • 7 comments

What this PR does / why we need it

  1. Add logic to put cluster labels and package labels(tkg.tanzu.vmware.com/package-name) on resources for custom cluster bootstrap scenario

  2. Simplify the logic of reconciliation of existing cluster bootstrap in HandleExistingClusterBootstrap and CloneReferencedObjectsFromCBPackages by making cloneSecretRef and cloneProviderRef functions idempotent

  3. Add check for package name labels on config resources for Calico test and load balancer and ingress (AKO) test

Which issue(s) this PR fixes

Fixes #4568

Describe testing done for PR

  1. All unit tests pass on local
  2. Also fixes CAPA pipeline integration tests

Release note

Add logic to put cluster labels and package labels(tkg.tanzu.vmware.com/package-name) on resources for custom cluster bootstrap scenario

Additional information

Special notes for your reviewer

shivaani0505 avatar Apr 03 '23 22:04 shivaani0505

CVE Scan results for this PR can be viewed from https://github.com/vmware-tanzu/tanzu-framework/security/code-scanning?query=pr%3A4544

github-actions[bot] avatar Apr 03 '23 22:04 github-actions[bot]

You have successfully added a new Trivy configuration .github/workflows/cve_scan.yaml:trivy_scan. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

Codecov Report

Merging #4544 (c8c35d7) into main (bb07e03) will decrease coverage by 0.87%. The diff coverage is 65.62%.

:exclamation: Current head c8c35d7 differs from pull request most recent head c45cc8c. Consider uploading reports for the commit c45cc8c to get more accurate results

@@            Coverage Diff             @@
##             main    #4544      +/-   ##
==========================================
- Coverage   49.77%   48.91%   -0.87%     
==========================================
  Files         453      483      +30     
  Lines       45424    47505    +2081     
==========================================
+ Hits        22612    23238     +626     
- Misses      20652    22059    +1407     
- Partials     2160     2208      +48     
Impacted Files Coverage Δ
...til/clusterbootstrapclone/clusterbootstrapclone.go 67.58% <65.62%> (+1.45%) :arrow_up:

... and 35 files with indirect coverage changes

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

codecov[bot] avatar Apr 03 '23 23:04 codecov[bot]

/test install-vc7

shivaani0505 avatar Apr 04 '23 17:04 shivaani0505

/test install-vc7,upgrade-vc7

shivaani0505 avatar Apr 04 '23 19:04 shivaani0505

@shivaani0505: /test install-vc7 Commit: 21177ba

Tests failed! Build no: 4695

alfredthenarwhal avatar Apr 04 '23 21:04 alfredthenarwhal

Cluster Generation A/B Results: https://storage.googleapis.com/tkg-clustergen/4544/20230410215116/clustergen.diff.txt Author/reviewers: Please review to verify that the effects on the generated cluster configurations are exactly what the PR intended, and give a thumbs-up if so.

github-actions[bot] avatar Apr 10 '23 21:04 github-actions[bot]