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

Use TKR API commands based on feature-gate on the supervisor-cluster #3041

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

anujc25
Copy link
Contributor

@anujc25 anujc25 commented Jul 29, 2022

What this PR does / why we need it

  • Use TKR v1alpha3 API commands based on feature-gate on the supervisor-cluster
    Signed-off-by: Anuj Chaudhari anujc@vmware.com

Which issue(s) this PR fixes

Fixes #3040

Describe testing done for PR

  1. tanzu login to vSphere8 based supervisor cluster which has TKR v1alpha3 API
  2. Disable the feature-flag tanzu config set features.global.tkr-version-v1alpha3-beta false
  3. Get the TKRs
~ $ tanzu kr get
  NAME                                 VERSION                            COMPATIBLE  ACTIVE
  v1.22.8---vmware.1-tkg.2-zshippable  v1.22.8+vmware.1-tkg.2-zshippable  True        True
  v1.23.5---vmware.1-tkg.1-zshippable  v1.23.5+vmware.1-tkg.1-zshippable  True        True
  1. Deactivate and activate TKRs to verify it is taking effect
~ $ tanzu kr deactivate v1.22.8---vmware.1-tkg.2-zshippable
Applying patch to resource v1.22.8---vmware.1-tkg.2-zshippable of type *v1alpha3.TanzuKubernetesRelease ...
~ $ tanzu kr get
  NAME                                 VERSION                            COMPATIBLE  ACTIVE
  v1.23.5---vmware.1-tkg.1-zshippable  v1.23.5+vmware.1-tkg.1-zshippable  True        True
~ $ tanzu kr activate v1.22.8---vmware.1-tkg.2-zshippable
Applying patch to resource v1.22.8---vmware.1-tkg.2-zshippable of type *v1alpha3.TanzuKubernetesRelease ...
~ $ tanzu kr get
  NAME                                 VERSION                            COMPATIBLE  ACTIVE
  v1.22.8---vmware.1-tkg.2-zshippable  v1.22.8+vmware.1-tkg.2-zshippable  True        True
  v1.23.5---vmware.1-tkg.1-zshippable  v1.23.5+vmware.1-tkg.1-zshippable  True        True

Release note

Use TKR v1alpha3 API commands based on feature-gate on the supervisor-cluster

Additional information

Special notes for your reviewer

@anujc25 anujc25 requested review from a team and prkalle as code owners July 29, 2022 21:17
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3041/20220729212750/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.

Signed-off-by: Anuj Chaudhari <anujc@vmware.com>
@anujc25 anujc25 force-pushed the anujc/update-tkr-v1alpha3-discovery-logic branch from 7dd6263 to 0ff9591 Compare July 29, 2022 21:45
@github-actions
Copy link

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3041/20220729215355/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.

@codecov
Copy link

codecov bot commented Jul 29, 2022

Codecov Report

Merging #3041 (0ff9591) into main (22d9820) will increase coverage by 0.02%.
The diff coverage is 13.33%.

@@            Coverage Diff             @@
##             main    #3041      +/-   ##
==========================================
+ Coverage   44.18%   44.21%   +0.02%     
==========================================
  Files         416      416              
  Lines       42142    42148       +6     
==========================================
+ Hits        18622    18634      +12     
+ Misses      21798    21791       -7     
- Partials     1722     1723       +1     
Impacted Files Coverage Δ
pkg/v1/tkg/tkgctl/featuregate_helper.go 16.66% <7.14%> (-2.69%) ⬇️
pkg/v1/tkg/tkgctl/client.go 52.20% <100.00%> (ø)
...oller-manager/controllers/v1_cascade_controller.go 66.66% <0.00%> (-3.26%) ⬇️
...tanzu-auth-controller-manager/controllers/utils.go 72.58% <0.00%> (-1.62%) ⬇️
addons/controllers/clusterbootstrap_controller.go 63.28% <0.00%> (-0.62%) ⬇️
pkg/v1/tkg/client/cluster.go 14.43% <0.00%> (-0.03%) ⬇️
pkg/v1/tkg/client/upgrade_cluster.go 42.57% <0.00%> (+2.57%) ⬆️

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 22d9820...0ff9591. Read the comment docs.

Copy link
Contributor

@prkalle prkalle 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 for the fix!

Copy link
Contributor

@saji-pivotal saji-pivotal left a comment

Choose a reason for hiding this comment

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

@anujc25 Nice work overall! Are these changes unit-testable?

pkg/v1/tkg/tkgctl/featuregate_helper.go Show resolved Hide resolved
Copy link
Contributor

@tenczar tenczar left a comment

Choose a reason for hiding this comment

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

LGTM

@anujc25 anujc25 added area/cli kind/bug PR/Issue related to a bug ok-to-merge PRs should be labelled with this before merging labels Aug 2, 2022
@anujc25 anujc25 merged commit 47cc91f into main Aug 2, 2022
@anujc25 anujc25 deleted the anujc/update-tkr-v1alpha3-discovery-logic branch August 2, 2022 16:48
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area/cli cla-not-required kind/bug PR/Issue related to a bug ok-to-merge PRs should be labelled with this before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tanzu kubenetes-release commands might show inconsistency with vSphere8 Supervisor because of v1alpha3 TKRs
6 participants