Provide more context around in-tree and out-of-tree cloud providers

- Add helper text to help people find the out-of-tree providers for vsphere
- Label each in-tree provider with (In-tree) label
- Show a deprecated message for each in-tree option

rancher/rancher#31162
This commit is contained in:
Cody Jackson 2021-02-12 15:58:01 -07:00
parent 0001cb4d1d
commit cdf45cad2d
3 changed files with 41 additions and 6 deletions

View File

@ -178,6 +178,20 @@ export default Component.extend({
return out; return out;
}), }),
showVsphereHelperText: computed('selectedCloudProvider', 'driver', function() {
const driver = get(this, 'driver');
const selectedCloudProvider = get(this, 'selectedCloudProvider');
return (driver === 'custom' || driver === 'vmwarevsphere') &&
(selectedCloudProvider === 'external')
}),
isInTree: computed('selectedCloudProvider', function() {
const selectedCloudProvider = get(this, 'selectedCloudProvider');
return selectedCloudProvider !== 'external' && selectedCloudProvider !== 'none';
}),
checkDefaults(record) { checkDefaults(record) {
get(this, 'azureDefaults').forEach((def) => { get(this, 'azureDefaults').forEach((def) => {
if (isEmpty(record[def])) { if (isEmpty(record[def])) {

View File

@ -100,7 +100,7 @@
{{#if (and applyClusterTemplate (eq selectedCloudProvider "generic"))}} {{#if (and applyClusterTemplate (eq selectedCloudProvider "generic"))}}
<div class="radio"> <div class="radio">
<label> <label>
{{t "generic.custom"}} {{t "cloudProvider.custom.label"}}
</label> </label>
</div> </div>
{{else if isCreateClusterOrClusterTemplate}} {{else if isCreateClusterOrClusterTemplate}}
@ -109,7 +109,7 @@
{{radio-button {{radio-button
selection=selectedCloudProvider selection=selectedCloudProvider
value="generic" value="generic"
}} {{t "generic.custom"}} }} {{t "cloudProvider.custom.label"}}
</label> </label>
</div> </div>
{{/if}} {{/if}}
@ -136,6 +136,13 @@
</CheckComputedOverride> </CheckComputedOverride>
{{#if (and (not-eq selectedCloudProvider "none") (eq mode "new"))}} {{#if (and (not-eq selectedCloudProvider "none") (eq mode "new"))}}
<div class="col span-6"> <div class="col span-6">
{{#if isInTree}}
<BannerMessage
@color="bg-warning mt-0"
@icon="icon-alert"
@message={{t "cloudProvider.inTreeDeprecated"}}
/>
{{/if}}
<BannerMessage <BannerMessage
@color="bg-info mt-0 mb-0" @color="bg-info mt-0 mb-0"
@icon="icon-alert" @icon="icon-alert"
@ -200,8 +207,18 @@
<p class="text-info"> <p class="text-info">
{{#if (eq selectedCloudProvider "generic")}} {{#if (eq selectedCloudProvider "generic")}}
{{t "cloudProvider.custom.helpText" htmlSafe=true}} {{t "cloudProvider.custom.helpText" htmlSafe=true}}
{{else if (eq selectedCloudProvider "external")}} {{else if (and (eq selectedCloudProvider "external") (not (eq driver "vmwarevsphere")) )}}
{{t "cloudProvider.external.helpText" htmlSafe=true}} {{t "cloudProvider.external.helpText" htmlSafe=true}}
{{/if}} {{/if}}
</p> </p>
{{#if showVsphereHelperText}}
<p class="text-info">
{{t
"cloudProvider.external.vsphereHelpText"
csi=(href-to 'global-admin.multi-cluster-apps.catalog.launch' 'cattle-global-data:helm3-library-vsphere-csi')
cpi=(href-to 'global-admin.multi-cluster-apps.catalog.launch' 'cattle-global-data:helm3-library-vsphere-cpi')
htmlSafe=true
}}
</p>
{{/if}}
{{/if}} {{/if}}

View File

@ -3152,14 +3152,16 @@ billingInfo:
actions: Actions actions: Actions
cloudProvider: cloudProvider:
title: In-Tree Cloud Provider title: Cloud Provider
amazon: Amazon amazon: Amazon (In-Tree)
azure: Azure azure: Azure (In-Tree)
external: external:
label: External label: External
helpText: 'Please edit the YAML to specify the required addon for cloud controller manager.' helpText: 'Please edit the YAML to specify the required addon for cloud controller manager.'
vsphereHelpText: 'Out-of-tree cloud provider for vsphere is available through the <a href="{csi}" target="_blank" rel="nofollow noopener noreferrer">vsphere-csi</a> and <a href="{cpi}" target="_blank" rel="nofollow noopener noreferrer">vsphere-cpi</a> helm charts.'
name: Cloud Provider Name name: Cloud Provider Name
custom: custom:
label: Custom (In-Tree)
notInList: 'If your cloud provider is not listed, please use the <b>Custom</b> option.' notInList: 'If your cloud provider is not listed, please use the <b>Custom</b> option.'
helpText: 'Please edit the YAML to add in any other <a href="http://rancher.com/docs/rke/v0.1.x/en/config-options/cloud-providers/" target="_blank" rel="nofollow noopener noreferrer">cloud providers</a>' helpText: 'Please edit the YAML to add in any other <a href="http://rancher.com/docs/rke/v0.1.x/en/config-options/cloud-providers/" target="_blank" rel="nofollow noopener noreferrer">cloud providers</a>'
@ -3167,6 +3169,8 @@ cloudProvider:
Read more about the state of the <a href="https://kubernetes.io/blog/2019/04/17/the-future-of-cloud-providers-in-kubernetes/" target="_blank" rel="nofollow noopener noreferrer">Kubernetes in-tree cloud providers</a> Read more about the state of the <a href="https://kubernetes.io/blog/2019/04/17/the-future-of-cloud-providers-in-kubernetes/" target="_blank" rel="nofollow noopener noreferrer">Kubernetes in-tree cloud providers</a>
warning: warning:
Configuring a Cloud Provider in your cluster without configuring the prerequisites will cause your cluster to not provision correctly. Prerequisites needed for supported cloud providers can be found in the documentation. Configuring a Cloud Provider in your cluster without configuring the prerequisites will cause your cluster to not provision correctly. Prerequisites needed for supported cloud providers can be found in the documentation.
inTreeDeprecated:
In-tree cloud providers are deprecated
azureCloudConfig: azureCloudConfig:
cloudProviderBackoff: cloudProviderBackoff:
description: "Enable exponential backoff to manage resource request retries" description: "Enable exponential backoff to manage resource request retries"