vmware-tanzu / tanzu-framework

Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging and plugins to provide users with a much stronger, more integrated experience than the loose coupling and stand-alone commands of the previous generation of tools.
Apache License 2.0
196 stars 193 forks source link

For Cluster Class use case, CLI validation errors and log messages should not contain legacy variable names #2443

Open chandrareddyp opened 2 years ago

chandrareddyp commented 2 years ago

Describe the feature request In Tanzu CLI, due to how the validation of CCluster.yaml is done (see #2432) during cluster creation, error messages on validation failures may reference legacy configuration variables instead of pointing where the error is on the CCluster.yaml itself.

examples: In the below examples, SERVICE_CIDR, TKG_IP_FAMILY and CONTROL_PLANE_NODE_NAMESERVERS are not relevant to clusterclass-based yaml

“invalid SERVICE_CIDR “192.168.2.1/11”, expected netmask to be “20" or greater”
“invalid CONTROL_PLANE_NODE_NAMESERVERS “2001:DB8::1”, expected to be IP addresses that match TKG_IP_FAMILY “ipv4"”

The proposal is to ensure error and log messages are relevant when validating clusterclass-based yaml configuration as well. (Addressing #2432, might render this more straightforward to fix)

Describe alternatives you've considered Skiping validation for Cluster Class use case entirely, but that could lead to degradation in UX

Affected product area (please put an X in all that apply)

Additional context

chandrareddyp commented 1 year ago

cc: @yuyangbj