@rancher/shell 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,6 +60,7 @@ export interface IClusterProvisioner {
60
60
 
61
61
  /**
62
62
  * Unique ID of the Cluster Provisioner
63
+ * If this overlaps with the name of an existing provisioner (seen in the type query param while creating a cluster) this provisioner will overwrite the built-in ui
63
64
  */
64
65
  id: string;
65
66
 
@@ -115,6 +116,12 @@ export interface IClusterProvisioner {
115
116
  */
116
117
  tag?: string;
117
118
 
119
+ /**
120
+ * Also show the provider card in the cluster importing flow
121
+ * If not set, the card will only be shown in the cluster creation page
122
+ */
123
+ showImport?: boolean
124
+
118
125
  /* --------------------------------------------------------------------------------------
119
126
  * Custer Details View
120
127
  * --------------------------------------------------------------------------------------- */
@@ -301,7 +301,7 @@ export default {
301
301
  const getters = this.$store.getters;
302
302
  const isImport = this.isImport;
303
303
  const isElementalActive = !!this.activeProducts.find((item) => item.name === ELEMENTAL_PRODUCT_NAME);
304
- const out = [];
304
+ let out = [];
305
305
 
306
306
  const templates = this.templateOptions;
307
307
  const vueKontainerTypes = getters['plugins/clusterDrivers'];
@@ -348,12 +348,18 @@ export default {
348
348
  }
349
349
 
350
350
  // Add from extensions
351
- // if th rke toggle is set to rke1, don't add extensions that specify rke2 group
352
- // default group is rke2
353
351
  this.extensions.forEach((ext) => {
352
+ // if the rke toggle is set to rke1, don't add extensions that specify rke2 group
353
+ // default group is rke2
354
354
  if (!this.isRke2 && (ext.group === _RKE2 || !ext.group)) {
355
355
  return;
356
356
  }
357
+ // Do not show the extension provisioner on the import cluster page unless its explicitly set to do so
358
+ if (isImport && !ext.showImport) {
359
+ return;
360
+ }
361
+ // Allow extensions to overwrite provisioners with the same id
362
+ out = out.filter((type) => type.id !== ext.id);
357
363
  addExtensionType(ext, getters);
358
364
  });
359
365
  }
@@ -1,6 +1,7 @@
1
1
  import HybridModel from '@shell/plugins/steve/hybrid-class';
2
2
 
3
- const HIDDEN = ['rke', 'rancherkubernetesengine', 'azureaks'];
3
+ const HIDDEN = ['rke', 'rancherkubernetesengine'];
4
+
4
5
  const V2 = ['amazoneks', 'googlegke', 'azureaks'];
5
6
  const IMPORTABLE = ['amazoneks', 'googlegke', 'azureaks'];
6
7
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rancher/shell",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",
@@ -4,8 +4,8 @@ GITHUB_RELEASE_TAG=$1
4
4
  GITHUB_RUN_ID=$2
5
5
  GITHUB_WORKFLOW_TYPE=$3
6
6
 
7
- # Check packages for released tag name
8
- if [[ "${GITHUB_WORKFLOW_TYPE}" == "charts" ]]; then
7
+ # Ensure "catalog" workflow release tag name does not match a pkg/<pkg-name>
8
+ if [[ "${GITHUB_WORKFLOW_TYPE}" == "catalog" ]]; then
9
9
  for d in pkg/*/ ; do
10
10
  pkg=$(basename $d)
11
11
 
@@ -19,7 +19,7 @@ if [[ "${GITHUB_WORKFLOW_TYPE}" == "charts" ]]; then
19
19
  fi
20
20
  done
21
21
  else
22
- # Check base extension name for tag name
22
+ # Ensure "charts" workflow release tag name does not match the root <pkg-name>
23
23
  BASE_EXT=$(jq -r .name package.json)
24
24
  EXT_VERSION=$(jq -r .version package.json)
25
25
 
package/store/plugins.js CHANGED
@@ -100,12 +100,13 @@ export const suffixFields = [
100
100
 
101
101
  // Machine driver to cloud provider mapping
102
102
  const driverToCloudProviderMap = {
103
- amazonec2: 'aws',
104
- azure: 'azure',
105
- digitalocean: '', // Show restricted options
106
- harvester: 'harvester',
107
- linode: '', // Show restricted options
108
- vmwarevsphere: 'rancher-vsphere',
103
+ amazonec2: 'aws',
104
+ azure: 'azure',
105
+ digitalocean: '', // Show restricted options
106
+ harvester: 'harvester',
107
+ linode: '', // Show restricted options
108
+ vmwarevsphere: 'rancher-vsphere',
109
+ ovhcloudpubliccloud: '',
109
110
 
110
111
  custom: undefined // Show all options
111
112
  };