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

[release-0.25] Display correct error message when passing Cluster based resource without ClusterClass as part of cluster create #3076

Conversation

anujc25
Copy link
Contributor

@anujc25 anujc25 commented Aug 4, 2022

What this PR does / why we need it

  • Display correct error message when passing Cluster based resource without ClusterClass as part of cluster create

Currently, when user passes Cluster resource as part of tanzu cluster create --file <input.yaml> and the cluster resource doesn't include ClusterClass as part of .spec.topology.cluster thrown proper error message.

Which issue(s) this PR fixes

Fixes #3054

Describe testing done for PR

  • Added unit tests
  • Manually verified by passing --dry-run output to tanzu cluster create --file <manifest.yaml> and verified the error message

Release note

Display correct error message when passing Cluster resource without ClusterClass as part of cluster create

Additional information

Special notes for your reviewer

@anujc25 anujc25 requested review from a team as code owners August 4, 2022 15:55
@anujc25 anujc25 changed the title Display correct error message when passing Cluster based resource without ClusterClass as part of cluster create [release-0.25] Display correct error message when passing Cluster based resource without ClusterClass as part of cluster create Aug 4, 2022
@github-actions
Copy link

github-actions bot commented Aug 4, 2022

Cluster Generation A/B Results:
https://storage.googleapis.com/tkg-clustergen/3076/20220804160633/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 Aug 4, 2022

Codecov Report

❗ No coverage uploaded for pull request base (release-0.25@42f1939). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 5ff2310 differs from pull request most recent head f1f9cf9. Consider uploading reports for the commit f1f9cf9 to get more accurate results

@@               Coverage Diff               @@
##             release-0.25    #3076   +/-   ##
===============================================
  Coverage                ?   44.21%           
===============================================
  Files                   ?      417           
  Lines                   ?    42246           
  Branches                ?        0           
===============================================
  Hits                    ?    18680           
  Misses                  ?    21853           
  Partials                ?     1713           

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

pkg/v1/tkg/tkgctl/helpers.go Outdated Show resolved Hide resolved
@anujc25 anujc25 force-pushed the anujc/fix-dry-run-apply-release-0.25 branch from 7993935 to d1e7efa Compare August 5, 2022 16:31
@github-actions
Copy link

github-actions bot commented Aug 5, 2022

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

@anujc25 anujc25 force-pushed the anujc/fix-dry-run-apply-release-0.25 branch from d1e7efa to 4ca5bd9 Compare August 5, 2022 17:02
@github-actions
Copy link

github-actions bot commented Aug 5, 2022

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

@anujc25 anujc25 force-pushed the anujc/fix-dry-run-apply-release-0.25 branch from 4ca5bd9 to 9dc2e71 Compare August 5, 2022 17:48
@github-actions
Copy link

github-actions bot commented Aug 5, 2022

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

@chandrareddyp
Copy link
Contributor

LGTM!

pkg/v1/tkg/constants/clusterclass_mapping.go Outdated Show resolved Hide resolved
pkg/v1/tkg/constants/clusterclass_mapping.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Aug 5, 2022

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

@anujc25 anujc25 added area/cli ok-to-merge PRs should be labelled with this before merging labels Aug 5, 2022
anujc25 added 2 commits August 5, 2022 15:40
Signed-off-by: Anuj Chaudhari <anujc@vmware.com>
@anujc25 anujc25 force-pushed the anujc/fix-dry-run-apply-release-0.25 branch from 5ff2310 to f1f9cf9 Compare August 5, 2022 22:40
@anujc25 anujc25 merged commit a0ff565 into vmware-tanzu:release-0.25 Aug 5, 2022
@github-actions
Copy link

github-actions bot commented Aug 5, 2022

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

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
area/cli 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.

5 participants