@rancher/shell 0.1.3 → 0.1.21

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.
Files changed (245) hide show
  1. package/assets/brand/suse/dark/rancher-logo.svg +1 -148
  2. package/assets/brand/suse/favicon.png +0 -0
  3. package/assets/brand/suse/rancher-logo.svg +1 -130
  4. package/assets/images/featured/img1.jpg +0 -0
  5. package/assets/images/featured.jpg +0 -0
  6. package/assets/images/generic-plugin.svg +1 -0
  7. package/assets/styles/themes/_dark.scss +3 -0
  8. package/assets/styles/themes/_light.scss +3 -0
  9. package/assets/styles/themes/_suse.scss +1 -1
  10. package/assets/translations/en-us.yaml +219 -47
  11. package/assets/translations/zh-hans.yaml +21 -24
  12. package/components/AsyncButton.vue +17 -2
  13. package/components/ButtonDropdown.vue +4 -0
  14. package/components/Carousel.vue +291 -0
  15. package/components/CommunityLinks.vue +64 -22
  16. package/components/CruResource.vue +11 -3
  17. package/components/Dialog.vue +102 -0
  18. package/components/ExplorerMembers.vue +2 -4
  19. package/components/ExplorerProjectsNamespaces.vue +25 -9
  20. package/components/IconMessage.vue +9 -1
  21. package/components/LazyImage.vue +21 -8
  22. package/components/LocaleSelector.vue +62 -29
  23. package/components/PromptRemove.vue +2 -2
  24. package/components/ResourceList/Masthead.vue +21 -1
  25. package/components/ResourceList/ResourceLoadingIndicator.vue +0 -8
  26. package/components/ResourceList/index.vue +9 -23
  27. package/components/ResourceTable.vue +7 -2
  28. package/components/SimpleBox.vue +6 -4
  29. package/components/SortableTable/index.vue +18 -25
  30. package/components/Tabbed/Tab.vue +5 -0
  31. package/components/Tabbed/index.vue +54 -9
  32. package/components/TypeDescription.vue +10 -1
  33. package/components/auth/Principal.vue +1 -0
  34. package/components/fleet/FleetBundles.vue +8 -3
  35. package/components/fleet/FleetClusters.vue +6 -0
  36. package/components/fleet/FleetRepos.vue +7 -1
  37. package/components/fleet/FleetSummary.vue +6 -0
  38. package/components/form/Command.vue +5 -0
  39. package/components/form/EnvVars.vue +5 -0
  40. package/components/form/KeyValue.vue +80 -58
  41. package/components/form/NameNsDescription.vue +13 -5
  42. package/components/form/NodeScheduling.vue +6 -1
  43. package/components/form/PodAffinity.vue +5 -0
  44. package/components/form/ResourceTabs/index.vue +5 -1
  45. package/components/form/ServiceNameSelect.vue +5 -0
  46. package/components/form/ValueFromResource.vue +7 -1
  47. package/components/formatter/ClusterLink.vue +3 -7
  48. package/components/nav/NamespaceFilter.vue +3 -3
  49. package/components/nav/TopLevelMenu.vue +12 -29
  50. package/config/home-links.js +155 -0
  51. package/config/labels-annotations.js +2 -1
  52. package/config/private-label.js +1 -1
  53. package/config/product/explorer.js +5 -4
  54. package/config/product/legacy.js +0 -47
  55. package/config/product/manager.js +0 -2
  56. package/config/product/multi-cluster-apps.js +0 -12
  57. package/config/product/settings.js +12 -1
  58. package/config/product/uiplugins.js +17 -0
  59. package/config/settings.js +23 -2
  60. package/config/types.js +5 -1
  61. package/config/uiplugins.js +117 -0
  62. package/config/version.js +17 -0
  63. package/content/docs/en-us/getting-started.md +1 -26
  64. package/core/plugin.ts +12 -0
  65. package/core/plugins.js +38 -2
  66. package/core/types.ts +6 -0
  67. package/creators/app/{.eslintignore → files/.eslintignore} +0 -0
  68. package/creators/app/{.eslintrc.js → files/.eslintrc.js} +0 -0
  69. package/creators/app/{.vscode → files/.vscode}/settings.json +0 -0
  70. package/creators/app/{babel.config.js → files/babel.config.js} +0 -0
  71. package/creators/app/{nuxt.config.js → files/nuxt.config.js} +0 -0
  72. package/creators/app/{tsconfig.json → files/tsconfig.json} +2 -1
  73. package/creators/app/init +16 -17
  74. package/creators/app/package.json +6 -0
  75. package/creators/pkg/{babel.config.js → files/babel.config.js} +0 -0
  76. package/creators/pkg/{index.ts → files/index.ts} +0 -0
  77. package/creators/pkg/{tsconfig.json → files/tsconfig.json} +13 -12
  78. package/creators/pkg/{vue.config.js → files/vue.config.js} +0 -0
  79. package/creators/pkg/init +1 -1
  80. package/creators/update/init +54 -0
  81. package/creators/update/package.json +20 -0
  82. package/creators/update/upgrade +56 -0
  83. package/creators/update/yarn-error.log +54 -0
  84. package/detail/provisioning.cattle.io.cluster.vue +3 -3
  85. package/detail/workload/index.vue +3 -2
  86. package/dialog/DiagnosticTimingsDialog.vue +116 -0
  87. package/dialog/RotateCertificatesDialog.vue +9 -3
  88. package/edit/auth/azuread.vue +28 -9
  89. package/edit/networking.k8s.io.ingress/index.vue +2 -2
  90. package/edit/persistentvolume/index.vue +51 -13
  91. package/edit/persistentvolumeclaim.vue +31 -13
  92. package/edit/pod.vue +27 -0
  93. package/edit/provisioning.cattle.io.cluster/rke2.vue +103 -24
  94. package/edit/service.vue +7 -5
  95. package/edit/workload/__tests__/Upgrading.test.ts +1 -0
  96. package/edit/workload/index.vue +32 -10
  97. package/edit/workload/mixins/workload.js +121 -126
  98. package/edit/workload/storage/ContainerMountPaths.vue +240 -0
  99. package/edit/workload/storage/Mount.vue +1 -0
  100. package/edit/workload/storage/awsElasticBlockStore.vue +20 -1
  101. package/edit/workload/storage/azureDisk.vue +22 -2
  102. package/edit/workload/storage/azureFile.vue +20 -2
  103. package/edit/workload/storage/csi/index.vue +23 -1
  104. package/edit/workload/storage/gcePersistentDisk.vue +20 -2
  105. package/edit/workload/storage/index.vue +33 -65
  106. package/edit/workload/storage/persistentVolumeClaim/index.vue +5 -0
  107. package/edit/workload/storage/secret.vue +6 -1
  108. package/edit/workload/storage/vsphereVolume.vue +11 -1
  109. package/layouts/default.vue +14 -8
  110. package/layouts/home.vue +9 -4
  111. package/layouts/plain.vue +10 -5
  112. package/list/catalog.cattle.io.app.vue +10 -9
  113. package/list/catalog.cattle.io.clusterrepo.vue +6 -61
  114. package/list/cis.cattle.io.clusterscan.vue +12 -12
  115. package/list/fleet.cattle.io.bundle.vue +33 -28
  116. package/list/fleet.cattle.io.cluster.vue +26 -22
  117. package/list/fleet.cattle.io.clustergroup.vue +6 -0
  118. package/list/fleet.cattle.io.clusterregistrationtoken.vue +28 -24
  119. package/list/fleet.cattle.io.gitrepo.vue +25 -14
  120. package/list/helm.cattle.io.projecthelmchart.vue +52 -33
  121. package/list/logging.banzaicloud.io.clusterflow.vue +7 -12
  122. package/list/logging.banzaicloud.io.flow.vue +7 -14
  123. package/list/management.cattle.io.cluster.vue +26 -15
  124. package/list/management.cattle.io.feature.vue +13 -8
  125. package/list/management.cattle.io.setting.vue +3 -3
  126. package/list/management.cattle.io.user.vue +38 -19
  127. package/list/monitoring.coreos.com.alertmanagerconfig.vue +8 -15
  128. package/list/namespace.vue +14 -1
  129. package/list/node.vue +13 -16
  130. package/list/persistentvolume.vue +16 -9
  131. package/list/persistentvolumeclaim.vue +5 -8
  132. package/list/provisioning.cattle.io.cluster.vue +35 -9
  133. package/list/service.vue +24 -12
  134. package/list/ui.cattle.io.navlink.vue +6 -0
  135. package/list/workload.vue +2 -2
  136. package/machine-config/harvester.vue +5 -3
  137. package/middleware/authenticated.js +6 -0
  138. package/mixins/resource-fetch.js +12 -18
  139. package/mixins/resource-manager.js +126 -0
  140. package/models/catalog.cattle.io.uiplugin.js +38 -0
  141. package/models/cluster/node.js +25 -2
  142. package/models/fleet.cattle.io.bundle.js +1 -1
  143. package/models/harvesterhci.io.management.cluster.js +11 -5
  144. package/models/pod.js +15 -5
  145. package/models/provisioning.cattle.io.cluster.js +16 -6
  146. package/models/workload.js +5 -3
  147. package/models/workload.service.js +10 -0
  148. package/nuxt.config.js +70 -25
  149. package/package.json +108 -109
  150. package/pages/auth/login.vue +11 -1
  151. package/pages/auth/verify.vue +9 -0
  152. package/pages/c/_cluster/apps/charts/index.vue +46 -1
  153. package/pages/c/_cluster/apps/charts/install.vue +10 -9
  154. package/pages/c/_cluster/explorer/index.vue +72 -9
  155. package/pages/c/_cluster/explorer/tools/index.vue +12 -5
  156. package/pages/c/_cluster/mcapps/index.vue +1 -1
  157. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +108 -0
  158. package/pages/c/_cluster/settings/brand.vue +0 -40
  159. package/pages/c/_cluster/settings/links.vue +152 -0
  160. package/pages/c/_cluster/settings/performance.vue +90 -7
  161. package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +232 -0
  162. package/pages/c/_cluster/uiplugins/InstallDialog.vue +293 -0
  163. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +300 -0
  164. package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +125 -0
  165. package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +261 -0
  166. package/pages/c/_cluster/uiplugins/UninstallDialog.vue +122 -0
  167. package/pages/c/_cluster/uiplugins/index.vue +808 -0
  168. package/pages/diagnostic.vue +185 -101
  169. package/pages/docs/_doc.vue +3 -1
  170. package/pages/home.vue +21 -56
  171. package/pages/prefs.vue +108 -88
  172. package/pages/safeMode.vue +17 -0
  173. package/pages/support/index.vue +34 -137
  174. package/pkg/dynamic-importer.lib.js +4 -0
  175. package/plugins/dashboard-store/actions.js +19 -0
  176. package/plugins/dashboard-store/getters.js +20 -3
  177. package/plugins/dashboard-store/mutations.js +13 -7
  178. package/plugins/dashboard-store/resource-class.js +2 -2
  179. package/plugins/formatters.js +15 -0
  180. package/plugins/plugin.js +61 -6
  181. package/plugins/steve/getters.js +12 -0
  182. package/plugins/steve/mutations.js +1 -1
  183. package/plugins/steve/subscribe.js +94 -72
  184. package/plugins/steve/web-worker.steve-sub-worker.js +24 -15
  185. package/plugins/version.js +21 -0
  186. package/promptRemove/management.cattle.io.globalrole.vue +47 -0
  187. package/promptRemove/management.cattle.io.roletemplate.vue +47 -0
  188. package/promptRemove/mixin/roleDeletionCheck.js +97 -0
  189. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +6 -7
  190. package/rancher-components/components/BadgeState/BadgeState.spec.ts +12 -0
  191. package/rancher-components/components/BadgeState/BadgeState.vue +107 -0
  192. package/rancher-components/components/BadgeState/index.ts +1 -0
  193. package/rancher-components/components/Banner/Banner.test.ts +13 -0
  194. package/rancher-components/components/Banner/Banner.vue +163 -0
  195. package/rancher-components/components/Banner/index.ts +1 -0
  196. package/rancher-components/components/Card/Card.vue +150 -0
  197. package/rancher-components/components/Card/index.ts +1 -0
  198. package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +77 -0
  199. package/rancher-components/components/Form/Checkbox/Checkbox.vue +395 -0
  200. package/rancher-components/components/Form/Checkbox/index.ts +1 -0
  201. package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +29 -0
  202. package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +343 -0
  203. package/rancher-components/components/Form/LabeledInput/index.ts +1 -0
  204. package/rancher-components/components/Form/Radio/RadioButton.vue +270 -0
  205. package/rancher-components/components/Form/Radio/RadioGroup.vue +235 -0
  206. package/rancher-components/components/Form/Radio/index.ts +2 -0
  207. package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +168 -0
  208. package/rancher-components/components/Form/TextArea/index.ts +1 -0
  209. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +107 -0
  210. package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +137 -0
  211. package/rancher-components/components/Form/ToggleSwitch/index.ts +1 -0
  212. package/rancher-components/components/Form/index.ts +5 -0
  213. package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +137 -0
  214. package/rancher-components/components/LabeledTooltip/index.ts +1 -0
  215. package/scripts/publish-shell.sh +40 -7
  216. package/scripts/record-deps.js +37 -0
  217. package/scripts/sync-shell-deps +37 -0
  218. package/scripts/test-plugins-build.sh +8 -5
  219. package/scripts/typegen.sh +84 -0
  220. package/store/auth.js +3 -0
  221. package/store/catalog.js +9 -8
  222. package/store/i18n.js +10 -1
  223. package/store/index.js +12 -3
  224. package/store/prefs.js +16 -0
  225. package/store/type-map.js +32 -5
  226. package/store/uiplugins.ts +15 -61
  227. package/types/shell/index.d.ts +3046 -0
  228. package/utils/__tests__/object.test.ts +0 -24
  229. package/utils/__tests__/selector.test.ts +1 -1
  230. package/utils/dynamic-importer.js +4 -0
  231. package/utils/favicon.js +8 -2
  232. package/utils/gc/gc-interval.ts +40 -0
  233. package/utils/gc/gc-root-store.js +76 -0
  234. package/utils/gc/gc-route-changed.ts +44 -0
  235. package/utils/gc/gc-types.ts +21 -0
  236. package/utils/gc/gc.ts +282 -0
  237. package/utils/grafana.js +2 -6
  238. package/utils/socket.js +41 -20
  239. package/utils/string.js +1 -7
  240. package/utils/validators/formRules/__tests__/index.test.ts +108 -0
  241. package/utils/validators/formRules/index.ts +9 -1
  242. package/config/footer.js +0 -19
  243. package/creators/pkg/nuxt.config.js +0 -6
  244. package/pages/plugins.vue +0 -387
  245. package/server/verdaccio-middleware.js +0 -56
@@ -14,7 +14,8 @@ import {
14
14
  NORMAN,
15
15
  SCHEMA,
16
16
  DEFAULT_WORKSPACE,
17
- SECRET
17
+ SECRET,
18
+ HCI,
18
19
  } from '@shell/config/types';
19
20
  import { _CREATE, _EDIT, _VIEW } from '@shell/config/query-params';
20
21
 
@@ -311,7 +312,8 @@ export default {
311
312
  clusterIsAlreadyCreated: !!this.value.id,
312
313
  fvFormRuleSets: [{
313
314
  path: 'metadata.name', rules: ['subDomain'], translationKey: 'nameNsDescription.name.label'
314
- }]
315
+ }],
316
+ harvesterVersionRange: {},
315
317
  };
316
318
  },
317
319
 
@@ -499,7 +501,7 @@ export default {
499
501
  const isExternal = opt === 'external';
500
502
  let disabled = false;
501
503
 
502
- if (this.isHarvesterExternalCredential && isPreferred) {
504
+ if ((this.isHarvesterExternalCredential || this.isHarvesterIncompatible) && isPreferred) {
503
505
  disabled = true;
504
506
  }
505
507
 
@@ -850,6 +852,33 @@ export default {
850
852
  isHarvesterExternalCredential() {
851
853
  return this.credential?.harvestercredentialConfig?.clusterType === 'external';
852
854
  },
855
+
856
+ isHarvesterIncompatible() {
857
+ let ccmRke2Version = (this.chartVersions['harvester-cloud-provider'] || {})['version'];
858
+ let csiRke2Version = (this.chartVersions['harvester-csi-driver'] || {})['version'];
859
+
860
+ const ccmVersion = this.harvesterVersionRange?.['harvester-cloud-provider'];
861
+ const csiVersion = this.harvesterVersionRange?.['harvester-csi-provider'];
862
+
863
+ if ((ccmRke2Version || '').endsWith('00')) {
864
+ ccmRke2Version = ccmRke2Version.slice(0, -2);
865
+ }
866
+
867
+ if ((csiRke2Version || '').endsWith('00')) {
868
+ csiRke2Version = csiRke2Version.slice(0, -2);
869
+ }
870
+
871
+ if (ccmVersion && csiVersion) {
872
+ if (semver.satisfies(ccmRke2Version, ccmVersion) &&
873
+ semver.satisfies(csiRke2Version, csiVersion)) {
874
+ return false;
875
+ } else {
876
+ return true;
877
+ }
878
+ } else {
879
+ return false;
880
+ }
881
+ },
853
882
  },
854
883
 
855
884
  watch: {
@@ -867,7 +896,10 @@ export default {
867
896
  credentialId(val) {
868
897
  if ( val ) {
869
898
  this.credential = this.$store.getters['rancher/byId'](NORMAN.CLOUD_CREDENTIAL, this.credentialId);
870
- this.setHarvesterDefaultCloudProvider();
899
+
900
+ if (this.isHarvesterDriver) {
901
+ this.setHarvesterVersionRange();
902
+ }
871
903
  } else {
872
904
  this.credential = null;
873
905
  }
@@ -1190,32 +1222,40 @@ export default {
1190
1222
  return;
1191
1223
  }
1192
1224
 
1193
- const clusterId = get(this.credential, 'decodedData.clusterId') || '';
1225
+ try {
1226
+ const clusterId = get(this.credential, 'decodedData.clusterId') || '';
1194
1227
 
1195
- this.applyChartValues(this.value.spec.rkeConfig);
1228
+ this.applyChartValues(this.value.spec.rkeConfig);
1196
1229
 
1197
- const isUpgrade = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
1230
+ const isUpgrade = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
1198
1231
 
1199
- if (this.agentConfig['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
1200
- const namespace = this.machinePools?.[0]?.config?.vmNamespace;
1232
+ if (this.agentConfig['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
1233
+ const namespace = this.machinePools?.[0]?.config?.vmNamespace;
1201
1234
 
1202
- const res = await this.$store.dispatch('management/request', {
1203
- url: `/k8s/clusters/${ clusterId }/v1/harvester/kubeconfig`,
1204
- method: 'POST',
1205
- data: {
1206
- clusterRoleName: 'harvesterhci.io:cloudprovider',
1207
- namespace,
1208
- serviceAccountName: this.value.metadata.name,
1209
- },
1210
- });
1235
+ const res = await this.$store.dispatch('management/request', {
1236
+ url: `/k8s/clusters/${ clusterId }/v1/harvester/kubeconfig`,
1237
+ method: 'POST',
1238
+ data: {
1239
+ clusterRoleName: 'harvesterhci.io:cloudprovider',
1240
+ namespace,
1241
+ serviceAccountName: this.value.metadata.name,
1242
+ },
1243
+ });
1211
1244
 
1212
- const kubeconfig = res.data;
1245
+ const kubeconfig = res.data;
1213
1246
 
1214
- const harvesterKubeconfigSecret = await this.createKubeconfigSecret(kubeconfig);
1247
+ const harvesterKubeconfigSecret = await this.createKubeconfigSecret(kubeconfig);
1248
+
1249
+ set(this.agentConfig, 'cloud-provider-config', `secret://fleet-default:${ harvesterKubeconfigSecret?.metadata?.name }`);
1250
+ set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.clusterName`, this.value.metadata.name);
1251
+ set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.cloudConfigPath`, '/var/lib/rancher/rke2/etc/config-files/cloud-provider-config');
1252
+ }
1253
+ } catch (err) {
1254
+ this.errors.push(err);
1215
1255
 
1216
- set(this.agentConfig, 'cloud-provider-config', `secret://fleet-default:${ harvesterKubeconfigSecret?.metadata?.name }`);
1217
- set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.clusterName`, this.value.metadata.name);
1218
- set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.cloudConfigPath`, '/var/lib/rancher/rke2/etc/config-files/cloud-provider-config');
1256
+ btnCb(false);
1257
+
1258
+ return;
1219
1259
  }
1220
1260
 
1221
1261
  await this.save(btnCb);
@@ -1562,12 +1602,36 @@ export default {
1562
1602
  get,
1563
1603
 
1564
1604
  setHarvesterDefaultCloudProvider() {
1565
- if (this.isHarvesterDriver && this.mode === _CREATE && this.agentConfig['cloud-provider-name'] === undefined && !this.isHarvesterExternalCredential) {
1605
+ if (this.isHarvesterDriver &&
1606
+ this.mode === _CREATE &&
1607
+ !this.agentConfig['cloud-provider-name'] &&
1608
+ !this.isHarvesterExternalCredential &&
1609
+ !this.isHarvesterIncompatible
1610
+ ) {
1566
1611
  this.agentConfig['cloud-provider-name'] = HARVESTER;
1567
1612
  } else {
1568
1613
  this.agentConfig['cloud-provider-name'] = '';
1569
1614
  }
1570
1615
  },
1616
+
1617
+ async setHarvesterVersionRange() {
1618
+ const clusterId = this.credential?.decodedData?.clusterId;
1619
+ const clusterType = this.credential?.decodedData?.clusterType;
1620
+
1621
+ if (clusterId && clusterType === 'imported') {
1622
+ const url = `/k8s/clusters/${ clusterId }/v1`;
1623
+ const res = await this.$store.dispatch('cluster/request', { url: `${ url }/${ HCI.SETTING }s` });
1624
+
1625
+ const version = (res?.data || []).find(s => s.id === 'harvester-csi-ccm-versions');
1626
+
1627
+ if (version) {
1628
+ this.harvesterVersionRange = JSON.parse(version.value || version.default || '{}');
1629
+ } else {
1630
+ this.harvesterVersionRange = {};
1631
+ }
1632
+ }
1633
+ this.setHarvesterDefaultCloudProvider();
1634
+ },
1571
1635
  },
1572
1636
  };
1573
1637
  </script>
@@ -1686,6 +1750,14 @@ export default {
1686
1750
  <Tab name="basic" label-key="cluster.tabs.basic" :weight="11" @active="refreshYamls">
1687
1751
  <Banner v-if="!haveArgInfo" color="warning" label="Configuration information is not available for the selected Kubernetes version. The options available in this screen will be limited, you may want to use the YAML editor." />
1688
1752
  <Banner v-if="showk8s21LegacyWarning" color="warning" :label="t('cluster.legacyWarning')" />
1753
+ <Banner
1754
+ v-if="isHarvesterDriver && isHarvesterIncompatible && showCloudProvider"
1755
+ color="warning"
1756
+ >
1757
+ <span
1758
+ v-html="t('cluster.harvester.warning.cloudProvider.incompatible', null, true)"
1759
+ />
1760
+ </Banner>
1689
1761
  <div class="row mb-10">
1690
1762
  <div class="col span-6">
1691
1763
  <LabeledSelect
@@ -1788,6 +1860,12 @@ export default {
1788
1860
  </div>
1789
1861
  </div>
1790
1862
 
1863
+ <div v-if="serverConfig.cni === 'cilium' && value.spec.enableNetworkPolicy" class="row">
1864
+ <div class="col span-12">
1865
+ <Banner color="info" :label="t('cluster.rke2.enableNetworkPolicy.warning')" />
1866
+ </div>
1867
+ </div>
1868
+
1791
1869
  <div class="spacer" />
1792
1870
 
1793
1871
  <div v-if="serverArgs.disable" class="row">
@@ -2089,6 +2167,7 @@ export default {
2089
2167
  </Tab>
2090
2168
 
2091
2169
  <Tab
2170
+ v-if="haveArgInfo || agentArgs['protect-kernel-defaults']"
2092
2171
  name="advanced"
2093
2172
  label-key="cluster.tabs.advanced"
2094
2173
  :weight="-1"
package/edit/service.vue CHANGED
@@ -198,7 +198,8 @@ export default {
198
198
  },
199
199
 
200
200
  watch: {
201
- 'value.spec.selector': 'updateMatchingPods',
201
+ 'value.metadata.namespace': 'updateMatchingPods',
202
+ 'value.spec.selector': 'updateMatchingPods',
202
203
  'value.spec.sessionAffinity'(val) {
203
204
  if (val === 'ClientIP') {
204
205
  this.value.spec.sessionAffinityConfig = { clientIP: { timeoutSeconds: null } };
@@ -240,21 +241,22 @@ export default {
240
241
 
241
242
  methods: {
242
243
  updateMatchingPods: throttle(function() {
243
- const { allPods, value: { spec: { selector = { } } } } = this;
244
+ const { value: { spec: { selector = { } } } } = this;
245
+ const allInNamespace = this.allPods.filter(pod => pod.metadata.namespace === this.value?.metadata?.namespace);
244
246
 
245
247
  if (isEmpty(selector)) {
246
248
  this.matchingPods = {
247
249
  matched: 0,
248
- total: allPods.length,
250
+ total: allInNamespace.length,
249
251
  none: true,
250
252
  sample: null,
251
253
  };
252
254
  } else {
253
- const match = matching(allPods, selector);
255
+ const match = matching(allInNamespace, selector);
254
256
 
255
257
  this.matchingPods = {
256
258
  matched: match.length,
257
- total: allPods.length,
259
+ total: allInNamespace.length,
258
260
  none: match.length === 0,
259
261
  sample: match[0] ? match[0].nameDisplay : null,
260
262
  };
@@ -26,6 +26,7 @@ describe('component: Upgrading', () => {
26
26
  });
27
27
 
28
28
  // TODO: #6179: Integrate test with component fix, as the scope is not to check the value of the input
29
+ // eslint-disable-next-line jest/no-disabled-tests
29
30
  it.skip.each([
30
31
  ['surge', 'maxSurge', '%'],
31
32
  ['unavailable', 'maxUnavailable', '%'],
@@ -4,7 +4,7 @@ import FormValidation from '@shell/mixins/form-validation';
4
4
  import WorkLoadMixin from '@shell/edit/workload/mixins/workload';
5
5
 
6
6
  export default {
7
- name: 'WorkloadDeployments',
7
+ name: 'Workload',
8
8
  mixins: [CreateEditView, FormValidation, WorkLoadMixin], // The order here is important since WorkLoadMixin contains some FormValidation configuration
9
9
  props: {
10
10
  value: {
@@ -56,6 +56,7 @@ export default {
56
56
  :mode="mode"
57
57
  :rules="{name: fvGetAndReportPathRules('metadata.name'), namespace: fvGetAndReportPathRules('metadata.namespace'), description: []}"
58
58
  @change="name=value.metadata.name"
59
+ @isNamespaceNew="isNamespaceNew = $event"
59
60
  />
60
61
  <div v-if="isCronJob || isReplicable || isStatefulSet || containerOptions.length > 1" class="row mb-20">
61
62
  <div v-if="isCronJob" class="col span-3">
@@ -91,10 +92,10 @@ export default {
91
92
  />
92
93
  </div>
93
94
  </div>
94
- <Tabbed class="deployment-tabs" :show-tabs-add-remove="true" :default-tab="defaultTab" @changed="changed">
95
+ <Tabbed class="deployment-tabs" :show-tabs-add-remove="true" :default-tab="defaultTab" :flat="true" @changed="changed">
95
96
  <Tab
96
97
  v-for="(tab, i) in allContainers"
97
- :key="i+tab.name"
98
+ :key="i"
98
99
  :label="tab.name"
99
100
  :name="tab.name"
100
101
  :weight="tab.weight"
@@ -110,7 +111,7 @@ export default {
110
111
  <div>
111
112
  <div :style="{'align-items':'center'}" class="row mb-20">
112
113
  <div class="col span-6">
113
- <LabeledInput v-model="container.name" :mode="mode" :label="t('workload.container.containerName')" />
114
+ <LabeledInput v-model="allContainers[i].name" :mode="mode" :label="t('workload.container.containerName')" />
114
115
  </div>
115
116
  <div class="col span-6">
116
117
  <RadioGroup
@@ -127,7 +128,7 @@ export default {
127
128
  <div class="row mb-20">
128
129
  <div class="col span-6">
129
130
  <LabeledInput
130
- v-model.trim="container.image"
131
+ v-model.trim="allContainers[i].image"
131
132
  :mode="mode"
132
133
  :label="t('workload.container.image')"
133
134
  :placeholder="t('generic.placeholder', {text: 'nginx:latest'}, true)"
@@ -136,7 +137,7 @@ export default {
136
137
  </div>
137
138
  <div class="col span-6">
138
139
  <LabeledSelect
139
- v-model="container.imagePullPolicy"
140
+ v-model="allContainers[i].imagePullPolicy"
140
141
  :label="t('workload.container.imagePullPolicy')"
141
142
  :options="pullPolicyOptions"
142
143
  :mode="mode"
@@ -169,7 +170,13 @@ export default {
169
170
  <div class="spacer" />
170
171
  <div>
171
172
  <h3>{{ t('workload.container.titles.command') }}</h3>
172
- <Command v-model="allContainers[i]" :secrets="namespacedSecrets" :config-maps="namespacedConfigMaps" :mode="mode" />
173
+ <Command
174
+ v-model="allContainers[i]"
175
+ :secrets="namespacedSecrets"
176
+ :config-maps="namespacedConfigMaps"
177
+ :mode="mode"
178
+ :loading="isLoadingSecondaryResources"
179
+ />
173
180
  </div>
174
181
  <ServiceNameSelect
175
182
  :value="podTemplateSpec.serviceAccountName"
@@ -178,6 +185,7 @@ export default {
178
185
  :select-placeholder="t('workload.serviceAccountName.label')"
179
186
  :options="namespacedServiceNames"
180
187
  option-label="metadata.name"
188
+ :loading="isLoadingSecondaryResources"
181
189
  @input="updateServiceAccount"
182
190
  />
183
191
  <div class="spacer" />
@@ -197,6 +205,19 @@ export default {
197
205
  <Tab :label="t('workload.container.titles.securityContext')" name="securityContext" :weight="tabWeightMap['securityContext']">
198
206
  <Security v-model="allContainers[i].securityContext" :mode="mode" />
199
207
  </Tab>
208
+ <Tab :label="t('workload.storage.title')" name="storage" :weight="tabWeightMap['storage']">
209
+ <ContainerMountPaths
210
+ v-model="podTemplateSpec"
211
+ :namespace="value.metadata.namespace"
212
+ :register-before-hook="registerBeforeHook"
213
+ :mode="mode"
214
+ :secrets="namespacedSecrets"
215
+ :config-maps="namespacedConfigMaps"
216
+ :container="allContainers[i]"
217
+ :save-pvc-hook-name="savePvcHookName"
218
+ @removePvcForm="clearPvcFormState"
219
+ />
220
+ </Tab>
200
221
  </Tabbed>
201
222
  </Tab>
202
223
  <Tab v-if="!isPod" :label="nameDisplayFor(type)" :name="nameDisplayFor(type)" :weight="99">
@@ -220,8 +241,9 @@ export default {
220
241
  :mode="mode"
221
242
  :secrets="namespacedSecrets"
222
243
  :config-maps="namespacedConfigMaps"
223
- :container="container"
224
244
  :save-pvc-hook-name="savePvcHookName"
245
+ :loading="isLoadingSecondaryResources"
246
+ :namespaced-pvcs="pvcs"
225
247
  @removePvcForm="clearPvcFormState"
226
248
  />
227
249
  </Tab>
@@ -253,10 +275,10 @@ export default {
253
275
  </template>
254
276
  </Tab>
255
277
  <Tab :label="t('workload.container.titles.podScheduling')" name="podScheduling" :weight="tabWeightMap['podScheduling']">
256
- <PodAffinity :mode="mode" :value="podTemplateSpec" :nodes="allNodeObjects" />
278
+ <PodAffinity :mode="mode" :value="podTemplateSpec" :nodes="allNodeObjects" :loading="isLoadingSecondaryResources" />
257
279
  </Tab>
258
280
  <Tab :label="t('workload.container.titles.nodeScheduling')" name="nodeScheduling" :weight="tabWeightMap['nodeScheduling']">
259
- <NodeScheduling :mode="mode" :value="podTemplateSpec" :nodes="allNodes" />
281
+ <NodeScheduling :mode="mode" :value="podTemplateSpec" :nodes="allNodes" :loading="isLoadingSecondaryResources" />
260
282
  </Tab>
261
283
  <Tab :label="t('workload.container.titles.upgrading')" name="upgrading" :weight="tabWeightMap['upgrading']">
262
284
  <Job v-if="isJob || isCronJob" v-model="spec" :mode="mode" :type="type" />