@rancher/shell 1.2.3 → 2.0.1

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 (699) hide show
  1. package/assets/data/aws-regions.json +9 -0
  2. package/assets/images/vendor/openid.svg +18 -0
  3. package/assets/styles/app.scss +1 -2
  4. package/assets/styles/fonts/_icons.scss +3 -3
  5. package/assets/styles/global/_columns.scss +1 -1
  6. package/assets/styles/global/_labeled-input.scss +1 -0
  7. package/assets/styles/global/_layout.scss +99 -0
  8. package/assets/styles/themes/_csp.scss +2 -2
  9. package/assets/styles/themes/_dark.scss +8 -2
  10. package/assets/styles/themes/_light.scss +2 -1
  11. package/assets/styles/themes/_suse.scss +1 -1
  12. package/assets/styles/vendor/vue-select.scss +5 -0
  13. package/assets/translations/en-us.yaml +315 -64
  14. package/assets/translations/zh-hans.yaml +7 -31
  15. package/babel.config.js +8 -2
  16. package/chart/__tests__/S3.test.ts +9 -2
  17. package/chart/gatekeeper.vue +2 -11
  18. package/chart/istio.vue +1 -10
  19. package/chart/logging/index.vue +2 -11
  20. package/chart/monitoring/alerting/index.vue +7 -21
  21. package/chart/monitoring/grafana/index.vue +61 -2
  22. package/chart/monitoring/index.vue +52 -26
  23. package/chart/monitoring/prometheus/index.vue +39 -45
  24. package/chart/rancher-backup/S3.vue +11 -9
  25. package/chart/rancher-backup/index.vue +18 -15
  26. package/cloud-credential/__tests__/harvester.test.ts +18 -0
  27. package/cloud-credential/azure.vue +4 -17
  28. package/cloud-credential/generic.vue +18 -9
  29. package/cloud-credential/harvester.vue +11 -3
  30. package/components/AlertTable.vue +17 -7
  31. package/components/AppModal.vue +167 -0
  32. package/components/AssignTo.vue +7 -4
  33. package/components/AsyncButton.vue +27 -5
  34. package/components/BackLink.vue +4 -4
  35. package/components/BannerGraphic.vue +1 -0
  36. package/components/BrandImage.vue +47 -1
  37. package/components/Carousel.vue +15 -8
  38. package/components/Certificates.vue +161 -0
  39. package/components/ClusterBadge.vue +12 -3
  40. package/components/ClusterIconMenu.vue +55 -12
  41. package/components/ClusterProviderIcon.vue +14 -3
  42. package/components/CodeMirror.vue +111 -17
  43. package/components/CommunityLinks.vue +12 -8
  44. package/components/CopyCode.vue +6 -2
  45. package/components/CopyToClipboard.vue +2 -1
  46. package/components/CopyToClipboardText.vue +14 -9
  47. package/components/CreateDriver.vue +81 -0
  48. package/components/CruResource.vue +52 -27
  49. package/components/DetailTop.vue +2 -2
  50. package/components/Dialog.vue +6 -5
  51. package/components/DisableAuthProviderModal.vue +14 -8
  52. package/components/DraggableZone.vue +2 -2
  53. package/components/EtcdInfoBanner.vue +5 -5
  54. package/components/ExplorerMembers.vue +3 -3
  55. package/components/ExplorerProjectsNamespaces.vue +31 -7
  56. package/components/FixedBanner.vue +48 -36
  57. package/components/GlobalRoleBindings.vue +26 -0
  58. package/components/GrafanaDashboard.vue +6 -4
  59. package/components/IconOrSvg.vue +1 -1
  60. package/components/Import.vue +10 -6
  61. package/components/Inactivity.vue +1 -5
  62. package/components/KeyValueView.vue +14 -10
  63. package/components/Markdown.vue +16 -12
  64. package/components/MessageLink.vue +2 -2
  65. package/components/ModalWithCard.vue +5 -8
  66. package/components/MoveModal.vue +35 -33
  67. package/components/PodSecurityAdmission.vue +3 -3
  68. package/components/PromptChangePassword.vue +33 -33
  69. package/components/PromptModal.vue +11 -21
  70. package/components/PromptRemove.vue +12 -17
  71. package/components/PromptRestore.vue +18 -16
  72. package/components/Questions/__tests__/Boolean.test.ts +9 -19
  73. package/components/Questions/__tests__/Float.test.ts +9 -19
  74. package/components/Questions/__tests__/Int.test.ts +9 -19
  75. package/components/Questions/__tests__/String.test.ts +9 -19
  76. package/components/Questions/__tests__/Yaml.test.ts +9 -20
  77. package/components/Questions/__tests__/utils/questions-defaults.ts +20 -0
  78. package/components/Questions/index.vue +19 -3
  79. package/components/ResourceCancelModal.vue +34 -29
  80. package/components/ResourceDetail/Masthead.vue +48 -16
  81. package/components/ResourceDetail/index.vue +6 -4
  82. package/components/ResourceList/Masthead.vue +10 -9
  83. package/components/ResourceList/index.vue +65 -14
  84. package/components/ResourceTable.vue +87 -21
  85. package/components/ResourceYaml.vue +35 -5
  86. package/components/SelectIconGrid.vue +3 -3
  87. package/components/SideNav.vue +50 -94
  88. package/components/SingleClusterInfo.vue +4 -4
  89. package/components/SortableTable/THead.vue +33 -21
  90. package/components/SortableTable/filtering.js +9 -1
  91. package/components/SortableTable/grouping.js +8 -1
  92. package/components/SortableTable/index.vue +143 -44
  93. package/components/SortableTable/paging.js +36 -7
  94. package/components/SortableTable/selection.js +2 -1
  95. package/components/SortableTable/sorting.js +24 -7
  96. package/components/StatusTable.vue +5 -1
  97. package/components/Tabbed/index.vue +18 -1
  98. package/components/TableDataUserIcon.vue +47 -0
  99. package/components/TypeDescription.vue +1 -0
  100. package/components/Wizard.vue +1 -0
  101. package/components/YamlEditor.vue +1 -0
  102. package/components/__tests__/AppModal.test.ts +98 -0
  103. package/components/__tests__/AsyncButton.test.ts +1 -3
  104. package/components/__tests__/BackLink.test.ts +1 -1
  105. package/components/__tests__/ButtonGroup.test.ts +3 -6
  106. package/components/__tests__/Carousel.test.ts +43 -0
  107. package/components/__tests__/Certificates.test.ts +29 -0
  108. package/components/__tests__/CodeMirror.test.ts +87 -0
  109. package/components/__tests__/CopyCode.test.ts +5 -4
  110. package/components/__tests__/CruResource.test.ts +10 -9
  111. package/components/__tests__/EtcdInfoBanner.test.ts +37 -0
  112. package/components/__tests__/FixedBanner.test.ts +5 -20
  113. package/components/__tests__/NamespaceFilter.test.ts +9 -18
  114. package/components/__tests__/TabTitle.test.ts +129 -0
  115. package/components/auth/AzureWarning.vue +2 -2
  116. package/components/auth/RoleDetailEdit.vue +10 -0
  117. package/components/auth/__tests__/RoleDetailEdit.test.ts +3 -2
  118. package/components/auth/login/oidc.vue +7 -1
  119. package/components/fleet/FleetBundles.vue +5 -11
  120. package/components/fleet/FleetClusters.vue +9 -9
  121. package/components/fleet/FleetIntro.vue +11 -17
  122. package/components/fleet/FleetNoWorkspaces.vue +2 -2
  123. package/components/fleet/FleetRepos.vue +63 -27
  124. package/components/fleet/FleetResources.vue +6 -1
  125. package/components/fleet/FleetStatus.vue +3 -3
  126. package/components/fleet/FleetSummary.vue +35 -30
  127. package/components/fleet/ForceDirectedTreeChart/index.vue +9 -3
  128. package/components/fleet/__tests__/FleetSummary.test.ts +316 -0
  129. package/components/form/ArrayList.vue +22 -18
  130. package/components/form/ArrayListSelect.vue +5 -0
  131. package/components/form/BannerSettings.vue +3 -0
  132. package/components/form/ClusterAppearance.vue +132 -0
  133. package/components/form/ColorInput.vue +1 -0
  134. package/components/form/Error.vue +3 -3
  135. package/components/form/FileSelector.vue +1 -0
  136. package/components/form/Footer.vue +2 -2
  137. package/components/form/GitPicker.vue +83 -38
  138. package/components/form/KeyValue.vue +70 -48
  139. package/components/form/LabeledSelect.vue +145 -41
  140. package/components/form/Labels.vue +3 -1
  141. package/components/form/NameNsDescription.vue +26 -9
  142. package/components/form/Password.vue +3 -1
  143. package/components/form/ResourceLabeledSelect.vue +187 -0
  144. package/components/form/ResourceTabs/index.vue +31 -15
  145. package/components/form/SecretSelector.vue +93 -18
  146. package/components/form/SelectOrCreateAuthSecret.vue +132 -59
  147. package/components/form/SimpleSecretSelector.vue +88 -28
  148. package/components/form/Taints.vue +13 -7
  149. package/components/form/__tests__/BannerSettings.test.ts +53 -0
  150. package/components/form/__tests__/KeyValue.test.ts +120 -11
  151. package/components/form/__tests__/LabeledSelect.test.ts +0 -18
  152. package/components/form/__tests__/{NameNsDescription.ts → NameNsDescription.test.ts} +25 -15
  153. package/components/form/__tests__/Taints.test.ts +70 -0
  154. package/components/form/labeled-select-utils/labeled-select-pagination.ts +151 -0
  155. package/components/form/labeled-select-utils/labeled-select.utils.ts +122 -0
  156. package/components/formatter/AppSummaryGraph.vue +2 -2
  157. package/components/formatter/Checked.vue +11 -3
  158. package/components/formatter/CloudCredPublicData.vue +30 -0
  159. package/components/formatter/ClusterLink.vue +2 -2
  160. package/components/formatter/ClusterProvider.vue +1 -18
  161. package/components/formatter/FleetClusterSummaryGraph.vue +27 -0
  162. package/components/formatter/FleetSummaryGraph.vue +25 -12
  163. package/components/formatter/ImagePercentageBar.vue +0 -4
  164. package/components/formatter/IngressTarget.vue +18 -7
  165. package/components/formatter/Link.vue +2 -2
  166. package/components/formatter/LinkDetail.vue +2 -2
  167. package/components/formatter/LinkDetailImage.vue +2 -2
  168. package/components/formatter/LinkName.vue +2 -2
  169. package/components/formatter/LiveDuration.vue +1 -1
  170. package/components/formatter/PercentageBar.vue +1 -1
  171. package/components/formatter/PrincipalGroupBindings.vue +2 -2
  172. package/components/formatter/SecretType.vue +2 -2
  173. package/components/formatter/VirtualServiceGateways.vue +2 -2
  174. package/components/formatter/WorkloadDetailEndpoints.vue +12 -22
  175. package/components/formatter/__tests__/Checked.test.ts +19 -0
  176. package/components/formatter/__tests__/LinkDetail.test.ts +5 -5
  177. package/components/formatter/__tests__/WorkloadDetailEndpoints.test.ts +81 -0
  178. package/components/nav/Group.vue +9 -7
  179. package/components/nav/Header.vue +85 -46
  180. package/components/nav/Jump.vue +19 -9
  181. package/components/nav/NamespaceFilter.vue +8 -1
  182. package/components/nav/TopLevelMenu.vue +392 -136
  183. package/components/nav/Type.vue +71 -106
  184. package/components/nav/WindowManager/ContainerLogs.vue +120 -19
  185. package/components/nav/WindowManager/ContainerShell.vue +6 -1
  186. package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +186 -0
  187. package/components/nav/WindowManager/index.vue +11 -10
  188. package/components/nav/__tests__/TopLevelMenu.test.ts +400 -6
  189. package/components/nav/__tests__/Type.test.ts +322 -97
  190. package/components/nuxt/nuxt-child.js +9 -78
  191. package/components/nuxt/nuxt-error.vue +1 -1
  192. package/components/nuxt/nuxt-link.client.js +13 -95
  193. package/{layouts → components/templates}/blank.vue +1 -1
  194. package/{layouts → components/templates}/default.vue +11 -101
  195. package/{layouts → components/templates}/error.vue +13 -26
  196. package/{layouts → components/templates}/home.vue +4 -1
  197. package/{layouts → components/templates}/plain.vue +4 -1
  198. package/{layouts → components/templates}/standalone.vue +1 -5
  199. package/{layouts → components/templates}/unauthenticated.vue +2 -3
  200. package/composables/useCompactInput.test.ts +36 -0
  201. package/composables/useCompactInput.ts +20 -0
  202. package/composables/useLabeledFormElement.test.ts +135 -0
  203. package/composables/useLabeledFormElement.ts +138 -0
  204. package/config/harvester-manager-types.js +2 -0
  205. package/config/home-links.js +2 -1
  206. package/config/labels-annotations.js +2 -1
  207. package/config/middleware.js +0 -6
  208. package/config/pagination-table-headers.js +57 -0
  209. package/config/pod-security-admission.ts +1 -1
  210. package/config/private-label.js +21 -1
  211. package/config/product/auth.js +1 -0
  212. package/config/product/explorer.js +166 -45
  213. package/config/product/fleet.js +6 -1
  214. package/config/product/legacy.js +2 -11
  215. package/config/product/manager.js +51 -25
  216. package/config/query-params.js +2 -0
  217. package/config/roles.ts +23 -0
  218. package/config/router/index.js +23 -0
  219. package/config/router/navigation-guards/attempt-first-login.js +73 -0
  220. package/config/router/navigation-guards/authentication.js +63 -0
  221. package/config/router/navigation-guards/i18n.js +13 -0
  222. package/config/router/navigation-guards/index.js +16 -0
  223. package/config/router/navigation-guards/load-initial-settings.js +15 -0
  224. package/config/router/routes.js +487 -0
  225. package/config/settings.ts +31 -2
  226. package/config/store.js +8 -4
  227. package/config/system-namespaces.js +3 -0
  228. package/config/table-headers.js +66 -1
  229. package/config/types.js +35 -20
  230. package/config/uiplugins.js +10 -5
  231. package/core/plugin-helpers.js +4 -6
  232. package/core/plugin-routes.ts +56 -114
  233. package/core/plugin.ts +18 -11
  234. package/core/plugins-loader.js +7 -9
  235. package/core/plugins.js +289 -285
  236. package/core/types-provisioning.ts +7 -0
  237. package/creators/app/app.package.json +2 -1
  238. package/creators/app/files/.eslintignore +0 -2
  239. package/creators/app/files/.gitlab-ci.yml +14 -0
  240. package/creators/app/files/.vscode/settings.json +0 -1
  241. package/creators/app/init +19 -0
  242. package/creators/pkg/files/.github/workflows/build-extension-catalog.yml +2 -6
  243. package/creators/pkg/files/.github/workflows/build-extension-charts.yml +2 -6
  244. package/creators/pkg/init +32 -0
  245. package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +119 -0
  246. package/detail/__tests__/service.test.ts +62 -0
  247. package/detail/catalog.cattle.io.app.vue +1 -1
  248. package/detail/cis.cattle.io.clusterscan.vue +14 -3
  249. package/detail/fleet.cattle.io.bundle.vue +1 -1
  250. package/detail/fleet.cattle.io.cluster.vue +11 -1
  251. package/detail/fleet.cattle.io.gitrepo.vue +15 -9
  252. package/detail/namespace.vue +2 -2
  253. package/detail/networking.k8s.io.ingress.vue +52 -19
  254. package/detail/node.vue +22 -3
  255. package/detail/provisioning.cattle.io.cluster.vue +31 -13
  256. package/detail/service.vue +1 -1
  257. package/detail/workload/index.vue +1 -0
  258. package/dialog/AddCustomBadgeDialog.vue +318 -161
  259. package/dialog/DeactivateDriverDialog.vue +137 -0
  260. package/dialog/RollbackWorkloadDialog.vue +2 -2
  261. package/dialog/RotateCertificatesDialog.vue +0 -21
  262. package/dialog/ScaleMachineDownDialog.vue +34 -17
  263. package/directives/clean-html.js +15 -0
  264. package/directives/clean-tooltip.js +32 -0
  265. package/directives/focus.js +41 -0
  266. package/directives/int-number.js +21 -0
  267. package/directives/positive-int-number.js +19 -0
  268. package/directives/trim-whitespace.js +19 -0
  269. package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +3 -2
  270. package/edit/__tests__/kontainerDriver.test.ts +107 -0
  271. package/edit/__tests__/management.cattle.io.clusterroletemplatebinding.test.ts +12 -1
  272. package/edit/__tests__/management.cattle.io.setting.test.ts +2 -1
  273. package/edit/__tests__/monitoring.coreos.com.prometheusrule.test.ts +2 -3
  274. package/edit/__tests__/nodeDriver.test.ts +107 -0
  275. package/edit/__tests__/service.test.ts +85 -0
  276. package/edit/__tests__/ui.cattle.io.navlink.test.ts +3 -1
  277. package/edit/auth/AuthProviderWarningBanners.vue +34 -0
  278. package/edit/auth/__tests__/AuthProviderWarningBanners.test.ts +19 -0
  279. package/edit/auth/__tests__/azuread.test.ts +241 -0
  280. package/edit/auth/__tests__/oidc.test.ts +137 -0
  281. package/edit/auth/azuread.vue +133 -31
  282. package/edit/auth/github.vue +5 -17
  283. package/edit/auth/googleoauth.vue +6 -23
  284. package/edit/auth/ldap/index.vue +5 -17
  285. package/edit/auth/oidc.vue +143 -42
  286. package/edit/auth/saml.vue +5 -14
  287. package/edit/catalog.cattle.io.clusterrepo.vue +177 -9
  288. package/edit/cis.cattle.io.clusterscan.vue +5 -2
  289. package/edit/cis.cattle.io.clusterscanbenchmark.vue +41 -9
  290. package/edit/cloudcredential.vue +28 -4
  291. package/edit/configmap.vue +10 -4
  292. package/edit/fleet.cattle.io.gitrepo.vue +3 -1
  293. package/edit/helm.cattle.io.projecthelmchart.vue +29 -19
  294. package/edit/kontainerDriver.vue +65 -0
  295. package/edit/logging-flow/Match.vue +10 -9
  296. package/edit/logging-flow/index.vue +4 -19
  297. package/edit/logging.banzaicloud.io.output/__tests__/logging.banzaicloud.io.output.test.ts +232 -2
  298. package/edit/logging.banzaicloud.io.output/index.vue +43 -26
  299. package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +3 -3
  300. package/edit/management.cattle.io.project.vue +3 -53
  301. package/edit/management.cattle.io.setting.vue +52 -2
  302. package/edit/management.cattle.io.user.vue +2 -1
  303. package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +10 -7
  304. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +21 -16
  305. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +1 -1
  306. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +2 -2
  307. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +1 -1
  308. package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +15 -3
  309. package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +4 -1
  310. package/edit/monitoring.coreos.com.prometheusrule/RecordingRule.vue +2 -0
  311. package/edit/monitoring.coreos.com.prometheusrule/index.vue +2 -0
  312. package/edit/networking.k8s.io.ingress/Rules.vue +8 -3
  313. package/edit/networking.k8s.io.ingress/index.vue +64 -8
  314. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +1 -0
  315. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +6 -2
  316. package/edit/networking.k8s.io.networkpolicy/__tests__/{PolicyRuleTarget.spec.ts → PolicyRuleTarget.test.ts} +46 -7
  317. package/edit/networking.k8s.io.networkpolicy/__tests__/utils/{selectors.ts → selectors.test.ts} +1 -1
  318. package/edit/networking.k8s.io.networkpolicy/index.vue +2 -0
  319. package/edit/nodeDriver.vue +65 -0
  320. package/edit/persistentvolume/index.vue +2 -2
  321. package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +33 -16
  322. package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +276 -0
  323. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +473 -0
  324. package/edit/provisioning.cattle.io.cluster/__tests__/{CustomCommand.tests.ts → CustomCommand.test.ts} +3 -0
  325. package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +228 -0
  326. package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +1 -1
  327. package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +73 -0
  328. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +77 -13
  329. package/edit/provisioning.cattle.io.cluster/__tests__/utils/cluster.ts +391 -0
  330. package/edit/provisioning.cattle.io.cluster/import.vue +4 -4
  331. package/edit/provisioning.cattle.io.cluster/index.vue +126 -51
  332. package/edit/provisioning.cattle.io.cluster/rke2.vue +325 -791
  333. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +137 -0
  334. package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +217 -0
  335. package/edit/provisioning.cattle.io.cluster/{Basics.vue → tabs/Basics.vue} +123 -129
  336. package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +132 -0
  337. package/edit/provisioning.cattle.io.cluster/{MachinePool.vue → tabs/MachinePool.vue} +1 -0
  338. package/edit/provisioning.cattle.io.cluster/{S3Config.vue → tabs/etcd/S3Config.vue} +1 -0
  339. package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +135 -0
  340. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +190 -0
  341. package/edit/provisioning.cattle.io.cluster/{RegistryConfigs.vue → tabs/registries/RegistryConfigs.vue} +3 -0
  342. package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +148 -0
  343. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +76 -0
  344. package/edit/resources.cattle.io.backup.vue +139 -124
  345. package/edit/resources.cattle.io.restore.vue +146 -126
  346. package/edit/service.vue +13 -0
  347. package/edit/serviceaccount.vue +46 -4
  348. package/edit/token.vue +3 -1
  349. package/edit/workload/Upgrading.vue +3 -2
  350. package/edit/workload/__tests__/Job.test.ts +1 -3
  351. package/edit/workload/__tests__/Upgrading.test.ts +2 -2
  352. package/edit/workload/index.vue +2 -1
  353. package/edit/workload/mixins/workload.js +35 -2
  354. package/edit/workload/storage/emptyDir.vue +2 -2
  355. package/initialize/App.vue +75 -0
  356. package/initialize/app-extended.js +128 -0
  357. package/initialize/entry-helpers.js +546 -0
  358. package/initialize/entry.js +32 -0
  359. package/initialize/install-components.js +23 -0
  360. package/initialize/install-directives.js +59 -0
  361. package/initialize/install-plugins.js +123 -0
  362. package/list/__tests__/workload.test.ts +1 -1
  363. package/list/catalog.cattle.io.app.vue +1 -0
  364. package/list/cis.cattle.io.clusterscan.vue +16 -10
  365. package/list/group.principal.vue +2 -2
  366. package/list/management.cattle.io.feature.vue +16 -16
  367. package/list/management.cattle.io.setting.vue +1 -0
  368. package/list/management.cattle.io.user.vue +13 -4
  369. package/list/networking.k8s.io.ingress.vue +36 -0
  370. package/list/node.vue +212 -73
  371. package/list/provisioning.cattle.io.cluster.vue +17 -4
  372. package/list/ui.cattle.io.navlink.vue +2 -2
  373. package/list/workload.vue +22 -0
  374. package/machine-config/__tests__/vmwarevsphere-pool-config-merge.test.ts +30 -0
  375. package/machine-config/__tests__/vmwarevsphere.test.ts +1 -3
  376. package/machine-config/amazonec2.vue +1 -1
  377. package/machine-config/azure.vue +2 -1
  378. package/machine-config/generic.vue +11 -15
  379. package/machine-config/vmwarevsphere-pool-config-merge.ts +25 -0
  380. package/machine-config/vmwarevsphere.vue +31 -27
  381. package/middleware/authenticated.js +23 -399
  382. package/mixins/__tests__/chart.test.ts +48 -6
  383. package/mixins/__tests__/create-edit-view.test.ts +2 -3
  384. package/mixins/auth-config.js +5 -9
  385. package/mixins/brand.js +102 -96
  386. package/mixins/chart.js +27 -13
  387. package/mixins/create-edit-view/index.js +2 -2
  388. package/mixins/fetch.client.js +42 -48
  389. package/mixins/labeled-form-element.ts +27 -2
  390. package/mixins/page-actions.js +7 -5
  391. package/mixins/resource-fetch-api-pagination.js +304 -0
  392. package/mixins/resource-fetch-namespaced.js +1 -1
  393. package/mixins/resource-fetch.js +46 -5
  394. package/models/__tests__/cluster.test.ts +44 -0
  395. package/models/__tests__/fleet.cattle.io.cluster.test.ts +36 -0
  396. package/models/__tests__/management.cattle.io.cluster.test.ts +23 -0
  397. package/models/__tests__/management.cattle.io.node.ts +85 -0
  398. package/models/__tests__/management.cattle.io.nodepool.ts +83 -0
  399. package/models/__tests__/namespace.test.ts +49 -9
  400. package/models/__tests__/provisioning.cattle.io.cluster.test.ts +241 -0
  401. package/models/__tests__/schema.tests.ts +24 -0
  402. package/models/__tests__/secret.test.ts +37 -0
  403. package/models/__tests__/steve-schema.test.ts +73 -0
  404. package/models/__tests__/storage.k8s.io.storageclass.test.ts +22 -0
  405. package/models/__tests__/workload.test.ts +91 -0
  406. package/models/catalog.cattle.io.app.js +8 -0
  407. package/models/catalog.cattle.io.clusterrepo.js +9 -1
  408. package/models/catalog.cattle.io.uiplugin.js +7 -8
  409. package/models/cis.cattle.io.clusterscan.js +29 -8
  410. package/models/cloudcredential.js +9 -1
  411. package/models/cluster/node.js +8 -4
  412. package/models/cluster/schema.js +6 -0
  413. package/models/cluster.js +33 -0
  414. package/models/cluster.x-k8s.io.machine.js +1 -1
  415. package/models/cluster.x-k8s.io.machinedeployment.js +14 -0
  416. package/models/driver.js +63 -0
  417. package/models/fleet.cattle.io.cluster.js +27 -11
  418. package/models/fleet.cattle.io.gitrepo.js +66 -13
  419. package/models/helm.cattle.io.projecthelmchart.js +1 -1
  420. package/models/kontainerdriver.js +85 -0
  421. package/models/management/schema.js +6 -0
  422. package/models/management.cattle.io.authconfig.js +3 -2
  423. package/models/management.cattle.io.cluster.js +16 -7
  424. package/models/management.cattle.io.globalrole.js +2 -0
  425. package/models/management.cattle.io.kontainerdriver.js +1 -0
  426. package/models/management.cattle.io.node.js +18 -14
  427. package/models/management.cattle.io.nodepool.js +17 -0
  428. package/models/management.cattle.io.project.js +0 -36
  429. package/models/management.cattle.io.setting.js +11 -7
  430. package/models/management.cattle.io.user.js +2 -2
  431. package/models/monitoring.coreos.com.receiver.js +3 -1
  432. package/models/monitoring.coreos.com.route.js +1 -1
  433. package/models/namespace.js +1 -1
  434. package/models/networking.k8s.io.ingress.js +2 -1
  435. package/models/nodedriver.js +85 -0
  436. package/models/pod.js +20 -0
  437. package/models/provisioning.cattle.io.cluster.js +125 -10
  438. package/models/schema.js +28 -7
  439. package/models/secret.js +126 -18
  440. package/models/service.js +2 -0
  441. package/models/steve-schema.ts +254 -0
  442. package/models/storage.k8s.io.storageclass.js +1 -1
  443. package/models/workload.js +17 -0
  444. package/models/workload.service.js +18 -0
  445. package/package.json +18 -14
  446. package/pages/about.vue +12 -6
  447. package/pages/account/create-key.vue +0 -1
  448. package/pages/account/index.vue +7 -3
  449. package/pages/auth/login.vue +106 -103
  450. package/pages/auth/logout.vue +2 -4
  451. package/pages/auth/setup.vue +92 -66
  452. package/pages/auth/verify.vue +30 -24
  453. package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +2 -17
  454. package/pages/c/_cluster/apps/charts/chart.vue +54 -9
  455. package/pages/c/_cluster/apps/charts/index.vue +99 -69
  456. package/pages/c/_cluster/apps/charts/install.helpers.js +2 -13
  457. package/pages/c/_cluster/apps/charts/install.vue +12 -11
  458. package/pages/c/_cluster/auth/config/_id.vue +0 -6
  459. package/pages/c/_cluster/auth/config/index.vue +15 -9
  460. package/pages/c/_cluster/auth/roles/index.vue +8 -10
  461. package/pages/c/_cluster/ecm/index.vue +0 -2
  462. package/pages/c/_cluster/explorer/ConfigBadge.vue +13 -8
  463. package/pages/c/_cluster/explorer/EventsTable.vue +18 -0
  464. package/pages/c/_cluster/explorer/__tests__/index.test.ts +181 -0
  465. package/pages/c/_cluster/explorer/index.vue +253 -91
  466. package/pages/c/_cluster/explorer/tools/__tests__/index.test.ts +69 -0
  467. package/pages/c/_cluster/explorer/tools/index.vue +10 -6
  468. package/pages/c/_cluster/fleet/index.vue +89 -94
  469. package/pages/c/_cluster/longhorn/__tests__/longhorn.index.test.ts +89 -0
  470. package/pages/c/_cluster/longhorn/index.vue +52 -17
  471. package/pages/c/_cluster/manager/cloudCredential/index.vue +18 -25
  472. package/pages/c/_cluster/manager/drivers/kontainerDriver/_id.vue +12 -0
  473. package/pages/c/_cluster/manager/drivers/kontainerDriver/create.vue +15 -0
  474. package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +91 -0
  475. package/pages/c/_cluster/manager/drivers/nodeDriver/_id.vue +12 -0
  476. package/pages/c/_cluster/manager/drivers/nodeDriver/create.vue +15 -0
  477. package/pages/c/_cluster/manager/drivers/nodeDriver/index.vue +60 -0
  478. package/pages/c/_cluster/manager/jwt.authentication/index.vue +235 -0
  479. package/pages/c/_cluster/manager/pages/_page.vue +4 -5
  480. package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +4 -0
  481. package/pages/c/_cluster/monitoring/route-receiver/index.vue +2 -2
  482. package/pages/c/_cluster/neuvector/index.vue +1 -0
  483. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +1 -0
  484. package/pages/c/_cluster/settings/banners.vue +86 -10
  485. package/pages/c/_cluster/settings/brand.vue +261 -38
  486. package/pages/c/_cluster/settings/index.vue +4 -6
  487. package/pages/c/_cluster/settings/links.vue +3 -2
  488. package/pages/c/_cluster/settings/performance.vue +71 -3
  489. package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +5 -2
  490. package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +12 -8
  491. package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +9 -6
  492. package/pages/c/_cluster/uiplugins/CatalogList/index.vue +10 -46
  493. package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +11 -5
  494. package/pages/c/_cluster/uiplugins/InstallDialog.vue +55 -19
  495. package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +36 -301
  496. package/pages/c/_cluster/uiplugins/UninstallDialog.vue +14 -6
  497. package/pages/c/_cluster/uiplugins/__tests__/SetupUIPlugins.test.ts +52 -106
  498. package/pages/c/_cluster/uiplugins/index.vue +38 -54
  499. package/pages/diagnostic.vue +2 -2
  500. package/pages/fail-whale.vue +103 -42
  501. package/pages/home.vue +81 -24
  502. package/pages/prefs.vue +8 -4
  503. package/pages/support/index.vue +14 -10
  504. package/pkg/auto-import.js +1 -1
  505. package/plugins/axios.js +0 -36
  506. package/plugins/back-button.js +3 -5
  507. package/plugins/clean-html-directive.js +5 -30
  508. package/plugins/clean-html.js +53 -0
  509. package/plugins/clean-tooltip-directive.js +6 -31
  510. package/plugins/codemirror-loader.js +1 -1
  511. package/plugins/codemirror.js +41 -9
  512. package/plugins/dashboard-store/__tests__/mutations.test.ts +389 -0
  513. package/plugins/dashboard-store/__tests__/resource-class.test.ts +49 -0
  514. package/plugins/dashboard-store/__tests__/utils/store-mocks.ts +7 -0
  515. package/plugins/dashboard-store/actions.js +132 -25
  516. package/plugins/dashboard-store/classify.js +1 -18
  517. package/plugins/dashboard-store/getters.js +154 -44
  518. package/plugins/dashboard-store/index.js +0 -111
  519. package/plugins/dashboard-store/mutations.js +150 -52
  520. package/plugins/dashboard-store/resource-class.js +77 -127
  521. package/plugins/directives.js +6 -39
  522. package/plugins/ember-cookie.js +13 -0
  523. package/plugins/global-formatters.js +26 -5
  524. package/plugins/i18n.js +89 -55
  525. package/plugins/int-number.js +6 -20
  526. package/plugins/plugin.js +3 -3
  527. package/plugins/positive-int-number.js +6 -17
  528. package/plugins/steve/__tests__/{getters.spec.ts → getters.test.ts} +81 -10
  529. package/plugins/steve/__tests__/mutations.test.ts +49 -0
  530. package/plugins/steve/__tests__/resource-utils.test.ts +159 -0
  531. package/plugins/steve/__tests__/steve-class.test.ts +59 -0
  532. package/plugins/steve/__tests__/subscribe.spec.ts +4 -1
  533. package/plugins/steve/__tests__/utils/mutation.test.helpers.ts +105 -0
  534. package/plugins/steve/__tests__/utils/steve-mocks.ts +31 -0
  535. package/plugins/steve/accept-or-reject-socket-message.ts +103 -0
  536. package/plugins/steve/actions.js +3 -38
  537. package/plugins/steve/getters.js +164 -61
  538. package/plugins/steve/hybrid-class.js +5 -1
  539. package/plugins/steve/mutations.js +24 -3
  540. package/plugins/steve/norman-class.js +142 -2
  541. package/{utils → plugins/steve}/projectAndNamespaceFiltering.utils.ts +28 -10
  542. package/plugins/steve/resource-utils.ts +38 -0
  543. package/plugins/steve/schema.d.ts +22 -0
  544. package/plugins/steve/steve-class.js +22 -0
  545. package/plugins/steve/steve-pagination-utils.ts +368 -0
  546. package/plugins/steve/subscribe.js +17 -76
  547. package/plugins/trim-whitespace.js +6 -34
  548. package/plugins/vue-js-modal.js +1 -1
  549. package/promptRemove/pod.vue +15 -7
  550. package/public/index.html +1 -0
  551. package/rancher-components/Accordion/Accordion.test.ts +45 -0
  552. package/rancher-components/Accordion/Accordion.vue +86 -0
  553. package/rancher-components/Accordion/index.ts +1 -0
  554. package/rancher-components/BadgeState/BadgeState.vue +3 -3
  555. package/rancher-components/Banner/Banner.test.ts +1 -5
  556. package/rancher-components/Banner/Banner.vue +2 -2
  557. package/rancher-components/Card/Card.vue +4 -4
  558. package/rancher-components/Form/Checkbox/Checkbox.vue +4 -3
  559. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +18 -1
  560. package/rancher-components/Form/LabeledInput/LabeledInput.vue +57 -24
  561. package/rancher-components/Form/Radio/RadioButton.test.ts +1 -3
  562. package/rancher-components/Form/Radio/RadioButton.vue +13 -7
  563. package/rancher-components/Form/Radio/RadioGroup.vue +4 -3
  564. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +6 -4
  565. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +7 -4
  566. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +9 -4
  567. package/rancher-components/StringList/StringList.test.ts +270 -0
  568. package/rancher-components/StringList/StringList.vue +65 -26
  569. package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +69 -0
  570. package/scripts/clean +1 -1
  571. package/scripts/extension/bundle +19 -7
  572. package/scripts/extension/helm/charts/ui-plugin-server/templates/_helpers.tpl +11 -0
  573. package/scripts/extension/helm/charts/ui-plugin-server/templates/cr.yaml +2 -0
  574. package/scripts/extension/helm/charts/ui-plugin-server/values.yaml +2 -0
  575. package/scripts/extension/helm/package/Dockerfile +1 -1
  576. package/scripts/extension/helm/scripts/package +11 -3
  577. package/scripts/extension/helm/scripts/patch +27 -0
  578. package/scripts/extension/parse-tag-name +4 -4
  579. package/scripts/extension/publish +25 -14
  580. package/scripts/publish-shell.sh +11 -1
  581. package/scripts/serve-pkgs +0 -2
  582. package/scripts/test-plugins-build.sh +87 -11
  583. package/scripts/vue-migrate.js +683 -0
  584. package/server/har-file.js +183 -0
  585. package/store/__tests__/catalog.test.ts +224 -0
  586. package/store/__tests__/type-map.test.ts +1122 -0
  587. package/store/auth.js +23 -4
  588. package/store/aws.js +53 -6
  589. package/store/catalog.js +22 -6
  590. package/store/cru-resource.ts +26 -0
  591. package/store/customisation.js +35 -0
  592. package/store/features.js +7 -4
  593. package/store/i18n.js +11 -0
  594. package/store/index.js +140 -49
  595. package/store/plugins.js +8 -4
  596. package/store/prefs.js +33 -38
  597. package/store/type-map.js +288 -213
  598. package/store/type-map.utils.ts +226 -0
  599. package/tsconfig.json +34 -9
  600. package/tsconfig.paths.json +21 -0
  601. package/types/components/labeledSelect.ts +50 -0
  602. package/types/resources/settings.d.ts +32 -0
  603. package/types/{userPreferences.d.ts → resources/userPreferences.d.ts} +0 -1
  604. package/types/shell/index.d.ts +1045 -770
  605. package/types/store/dashboard-store.types.ts +42 -0
  606. package/types/store/pagination.types.ts +457 -0
  607. package/types/store/type-map.ts +30 -0
  608. package/types/store/vuex.d.ts +9 -0
  609. package/types/vue-shim.d.ts +51 -0
  610. package/utils/__tests__/cluster.test.ts +20 -18
  611. package/utils/__tests__/create-yaml.test.ts +359 -2
  612. package/utils/__tests__/kontainer.test.ts +180 -0
  613. package/utils/__tests__/pod-security-admission.test.ts +1 -1
  614. package/utils/alertmanagerconfig.js +19 -0
  615. package/utils/array.ts +40 -1
  616. package/utils/async.ts +2 -0
  617. package/utils/auth.js +152 -4
  618. package/utils/axios.js +2 -21
  619. package/utils/azure.js +24 -0
  620. package/utils/banners.js +103 -0
  621. package/utils/clipboard.js +5 -0
  622. package/utils/cluster.js +1 -1
  623. package/utils/config.js +4 -0
  624. package/utils/create-yaml.js +59 -28
  625. package/utils/custom-validators.js +0 -2
  626. package/utils/error.js +41 -1
  627. package/utils/formatter.js +5 -3
  628. package/utils/git.ts +1 -1
  629. package/utils/install-redirect.js +1 -1
  630. package/utils/kontainer.ts +190 -0
  631. package/utils/object.js +24 -0
  632. package/utils/pagination-utils.ts +154 -0
  633. package/utils/pod-security-admission.ts +1 -1
  634. package/utils/router.js +86 -0
  635. package/utils/settings.ts +46 -0
  636. package/utils/time.js +2 -1
  637. package/utils/unit-tests/ChildRenderingRouterLinkStub.ts +36 -0
  638. package/utils/url.ts +1 -1
  639. package/utils/validators/formRules/__tests__/index.test.ts +70 -4
  640. package/utils/validators/formRules/index.ts +15 -9
  641. package/utils/validators/index.js +1 -0
  642. package/utils/validators/setting.js +6 -10
  643. package/utils/version.js +2 -1
  644. package/vue.config.js +377 -401
  645. package/.DS_Store +0 -0
  646. package/assets/images/providers/aks-black.svg +0 -28
  647. package/assets/images/providers/aks.svg +0 -31
  648. package/assets/styles/vendor/vue-js-modal.scss +0 -16
  649. package/components/ChartPsp.vue +0 -76
  650. package/components/EventsTable.vue +0 -67
  651. package/components/TabbedLinks/index.vue +0 -94
  652. package/components/__tests__/ChartPsp.test.ts +0 -75
  653. package/components/formatter/__tests__/ClusterProvider.test.ts +0 -28
  654. package/components/nuxt/nuxt-link.server.js +0 -16
  655. package/components/nuxt/nuxt.js +0 -101
  656. package/config/router.js +0 -408
  657. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts +0 -237
  658. package/initialize/App.js +0 -198
  659. package/initialize/client.js +0 -875
  660. package/initialize/index.js +0 -364
  661. package/initialize/layouts.ts +0 -26
  662. package/middleware/i18n.js +0 -10
  663. package/middleware/unauthenticated.js +0 -22
  664. package/mixins/fetch.server.js +0 -73
  665. package/pages/c/_cluster/apps/index.vue +0 -17
  666. package/pages/c/_cluster/auth/index.vue +0 -19
  667. package/pages/c/_cluster/index.vue +0 -17
  668. package/pages/c/_cluster/legacy/index.vue +0 -22
  669. package/pages/c/_cluster/manager/index.vue +0 -22
  670. package/pages/c/_cluster/mcapps/index.vue +0 -21
  671. package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +0 -232
  672. package/pages/c/index.vue +0 -9
  673. package/pages/rio/mesh.vue +0 -508
  674. package/plugins/dashboard-store/__tests__/mutations.spec.ts +0 -406
  675. package/plugins/dashboard-store/rehydrate-all.js +0 -44
  676. package/plugins/portal-vue.js +0 -4
  677. package/plugins/portal.js +0 -4
  678. package/plugins/resize.js +0 -5
  679. package/plugins/shortkey.js +0 -4
  680. package/plugins/tooltip.js +0 -4
  681. package/plugins/transitions.js +0 -4
  682. package/plugins/v-select.js +0 -4
  683. package/plugins/vue-clipboard2.js +0 -4
  684. package/tsconfig.default.json +0 -46
  685. package/utils/group.js +0 -70
  686. package/utils/nuxt.js +0 -659
  687. package/utils/router.scrollBehavior.js +0 -80
  688. /package/components/__tests__/{Collapse.spec.ts → Collapse.test.ts} +0 -0
  689. /package/edit/provisioning.cattle.io.cluster/{AgentConfiguration.vue → tabs/AgentConfiguration.vue} +0 -0
  690. /package/edit/provisioning.cattle.io.cluster/{MemberRoles.vue → tabs/MemberRoles.vue} +0 -0
  691. /package/edit/provisioning.cattle.io.cluster/{ACE.vue → tabs/networking/ACE.vue} +0 -0
  692. /package/edit/provisioning.cattle.io.cluster/{RegistryMirrors.vue → tabs/registries/RegistryMirrors.vue} +0 -0
  693. /package/edit/provisioning.cattle.io.cluster/{DrainOptions.vue → tabs/upgrade/DrainOptions.vue} +0 -0
  694. /package/models/__tests__/{node.ts → node.test.ts} +0 -0
  695. /package/plugins/dashboard-store/__tests__/{actions.spec.ts → actions.test.ts} +0 -0
  696. /package/plugins/dashboard-store/__tests__/{getters.spec.ts → getters.test.ts} +0 -0
  697. /package/plugins/steve/__tests__/{header-warnings.spec.ts → header-warnings.test.ts} +0 -0
  698. /package/rancher-components/BadgeState/{BadgeState.spec.ts → BadgeState.test.ts} +0 -0
  699. /package/types/{pod-security-admission.ts → resources/pod-security-admission.ts} +0 -0
@@ -16,7 +16,6 @@ import {
16
16
  DEFAULT_WORKSPACE,
17
17
  SECRET,
18
18
  HCI,
19
- PSPS,
20
19
  } from '@shell/config/types';
21
20
  import { _CREATE, _EDIT, _VIEW } from '@shell/config/query-params';
22
21
 
@@ -27,59 +26,49 @@ import {
27
26
  } from '@shell/utils/object';
28
27
  import { allHash } from '@shell/utils/promise';
29
28
  import { sortBy } from '@shell/utils/sort';
29
+ import { vspherePoolConfigMerge } from '@shell/machine-config/vmwarevsphere-pool-config-merge';
30
30
 
31
- import { camelToTitle } from '@shell/utils/string';
32
31
  import { compare, sortable } from '@shell/utils/version';
33
32
  import { isHarvesterSatisfiesVersion } from '@shell/utils/cluster';
34
- import * as VERSION from '@shell/utils/version';
35
33
 
36
- import ArrayList from '@shell/components/form/ArrayList';
37
- import ArrayListGrouped from '@shell/components/form/ArrayListGrouped';
38
34
  import { BadgeState } from '@components/BadgeState';
39
35
  import { Banner } from '@components/Banner';
40
- import { Checkbox } from '@components/Form/Checkbox';
41
36
  import CruResource, { CONTEXT_HOOK_EDIT_YAML } from '@shell/components/CruResource';
42
- import { LabeledInput } from '@components/Form/LabeledInput';
43
- import LabeledSelect from '@shell/components/form/LabeledSelect';
44
37
  import Loading from '@shell/components/Loading';
45
- import MatchExpressions from '@shell/components/form/MatchExpressions';
46
38
  import NameNsDescription from '@shell/components/form/NameNsDescription';
47
- import { RadioGroup } from '@components/Form/Radio';
48
39
  import Tab from '@shell/components/Tabbed/Tab';
49
40
  import Tabbed from '@shell/components/Tabbed';
50
- import UnitInput from '@shell/components/form/UnitInput';
51
- import YamlEditor from '@shell/components/YamlEditor';
52
- import Questions from '@shell/components/Questions';
53
41
 
54
42
  import { canViewClusterMembershipEditor } from '@shell/components/form/Members/ClusterMembershipEditor';
55
- import SelectOrCreateAuthSecret from '@shell/components/form/SelectOrCreateAuthSecret';
56
43
  import semver from 'semver';
57
44
 
58
45
  import { SETTING } from '@shell/config/settings';
59
46
  import { base64Encode } from '@shell/utils/crypto';
60
- import { CAPI as CAPI_ANNOTATIONS } from '@shell/config/labels-annotations';
61
- import ACE from './ACE';
62
- import AgentEnv from './AgentEnv';
63
- import DrainOptions from './DrainOptions';
64
- import Labels from './Labels';
65
- import MachinePool from './MachinePool';
66
- import RegistryConfigs from './RegistryConfigs';
67
- import RegistryMirrors from './RegistryMirrors';
68
- import S3Config from './S3Config';
47
+ import { CAPI as CAPI_ANNOTATIONS, CLUSTER_BADGE } from '@shell/config/labels-annotations';
48
+ import AgentEnv from '@shell/edit/provisioning.cattle.io.cluster/AgentEnv';
49
+ import Labels from '@shell/edit/provisioning.cattle.io.cluster/Labels';
50
+ import MachinePool from '@shell/edit/provisioning.cattle.io.cluster/tabs/MachinePool';
69
51
  import SelectCredential from './SelectCredential';
70
- import AdvancedSection from '@shell/components/AdvancedSection.vue';
71
52
  import { ELEMENTAL_SCHEMA_IDS, KIND, ELEMENTAL_CLUSTER_PROVIDER } from '../../config/elemental-types';
72
- import AgentConfiguration from './AgentConfiguration';
53
+ import AgentConfiguration from '@shell/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration';
73
54
  import { getApplicableExtensionEnhancements } from '@shell/core/plugin-helpers';
74
55
  import { ExtensionPoint, TabLocation } from '@shell/core/types';
75
- import MemberRoles from '@shell/edit/provisioning.cattle.io.cluster/MemberRoles';
76
- import Basics from '@shell/edit/provisioning.cattle.io.cluster/Basics';
56
+ import MemberRoles from '@shell/edit/provisioning.cattle.io.cluster/tabs/MemberRoles';
57
+ import Basics from '@shell/edit/provisioning.cattle.io.cluster/tabs/Basics';
58
+ import Etcd from '@shell/edit/provisioning.cattle.io.cluster/tabs/etcd';
59
+ import Networking from '@shell/edit/provisioning.cattle.io.cluster/tabs/networking';
60
+ import Upgrade from '@shell/edit/provisioning.cattle.io.cluster/tabs/upgrade';
61
+ import Registries from '@shell/edit/provisioning.cattle.io.cluster/tabs/registries';
62
+ import AddOnConfig from '@shell/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig';
63
+ import Advanced from '@shell/edit/provisioning.cattle.io.cluster/tabs/Advanced';
64
+ import ClusterAppearance from '@shell/components/form/ClusterAppearance';
77
65
 
78
66
  const HARVESTER = 'harvester';
79
67
  const HARVESTER_CLOUD_PROVIDER = 'harvester-cloud-provider';
80
-
81
68
  const NETBIOS_TRUNCATION_LENGTH = 15;
82
69
 
70
+ const VMWARE_VSPHERE = 'vmwarevsphere';
71
+
83
72
  /**
84
73
  * Classes to be adopted by the node badges in Machine pools
85
74
  */
@@ -102,37 +91,27 @@ const FLEET_AGENT_CUSTOMIZATION = 'fleetAgentDeploymentCustomization';
102
91
 
103
92
  export default {
104
93
  components: {
105
- ACE,
106
- AdvancedSection,
107
94
  AgentEnv,
108
- ArrayList,
109
- ArrayListGrouped,
110
95
  BadgeState,
111
96
  Banner,
112
- Checkbox,
113
97
  AgentConfiguration,
114
98
  CruResource,
115
- DrainOptions,
116
- LabeledInput,
117
- LabeledSelect,
118
99
  Labels,
119
100
  Loading,
120
101
  MachinePool,
121
- MatchExpressions,
122
102
  NameNsDescription,
123
- Questions,
124
- RadioGroup,
125
- RegistryConfigs,
126
- RegistryMirrors,
127
- S3Config,
128
103
  SelectCredential,
129
- SelectOrCreateAuthSecret,
130
104
  Tab,
131
105
  Tabbed,
132
- UnitInput,
133
- YamlEditor,
134
106
  MemberRoles,
135
- Basics
107
+ Basics,
108
+ Etcd,
109
+ Networking,
110
+ Upgrade,
111
+ Registries,
112
+ AddOnConfig,
113
+ Advanced,
114
+ ClusterAppearance
136
115
  },
137
116
 
138
117
  mixins: [CreateEditView, FormValidation],
@@ -152,10 +131,14 @@ export default {
152
131
  type: String,
153
132
  required: true,
154
133
  },
134
+
135
+ providerConfig: {
136
+ type: Object,
137
+ default: () => null
138
+ }
155
139
  },
156
140
 
157
141
  async fetch() {
158
- this.psps = await this.getPsps();
159
142
  await this.fetchRke2Versions();
160
143
  await this.initSpecs();
161
144
  await this.initAddons();
@@ -171,15 +154,15 @@ export default {
171
154
  },
172
155
 
173
156
  data() {
174
- if ( !this.value.spec.rkeConfig ) {
157
+ if (!this.value.spec.rkeConfig) {
175
158
  set(this.value.spec, 'rkeConfig', {});
176
159
  }
177
160
 
178
- if ( !this.value.spec.rkeConfig.chartValues ) {
161
+ if (!this.value.spec.rkeConfig.chartValues) {
179
162
  set(this.value.spec.rkeConfig, 'chartValues', {});
180
163
  }
181
164
 
182
- if ( !this.value.spec.rkeConfig.upgradeStrategy ) {
165
+ if (!this.value.spec.rkeConfig.upgradeStrategy) {
183
166
  set(this.value.spec.rkeConfig, 'upgradeStrategy', {
184
167
  controlPlaneConcurrency: '1',
185
168
  controlPlaneDrainOptions: {},
@@ -188,24 +171,27 @@ export default {
188
171
  });
189
172
  }
190
173
 
191
- if ( !this.value.spec.rkeConfig.machineGlobalConfig ) {
174
+ if (!this.value.spec.rkeConfig.dataDirectories) {
175
+ set(this.value.spec.rkeConfig, 'dataDirectories', {
176
+ systemAgent: '',
177
+ provisioning: '',
178
+ k8sDistro: '',
179
+ });
180
+ }
181
+
182
+ if (!this.value.spec.rkeConfig.machineGlobalConfig) {
192
183
  set(this.value.spec, 'rkeConfig.machineGlobalConfig', {});
193
184
  }
194
185
 
195
- if ( !this.value.spec.rkeConfig.machineSelectorConfig?.length ) {
186
+ if (!this.value.spec.rkeConfig.machineSelectorConfig?.length) {
196
187
  set(this.value.spec, 'rkeConfig.machineSelectorConfig', [{ config: {} }]);
197
188
  }
198
189
 
199
- // Store the initial PSP template name, so we can set it back if needed
200
- const lastDefaultPodSecurityPolicyTemplateName = this.value.spec.defaultPodSecurityPolicyTemplateName;
201
- const previousKubernetesVersion = this.value.spec.kubernetesVersion;
202
-
203
- const truncateLimit = this.value.defaultHostnameLengthLimit;
190
+ const truncateLimit = this.value.defaultHostnameLengthLimit || 0;
204
191
 
205
192
  return {
206
193
  loadedOnce: false,
207
194
  lastIdx: 0,
208
- allPSPs: null,
209
195
  allPSAs: [],
210
196
  credentialId: '',
211
197
  credential: null,
@@ -233,17 +219,11 @@ export default {
233
219
  userChartValues: {},
234
220
  userChartValuesTemp: {},
235
221
  addonsRev: 0,
236
- clusterIsAlreadyCreated: !!this.value.id,
237
222
  fvFormRuleSets: [{
238
223
  path: 'metadata.name', rules: ['subDomain'], translationKey: 'nameNsDescription.name.label'
239
224
  }],
240
225
  harvesterVersionRange: {},
241
- lastDefaultPodSecurityPolicyTemplateName, // Used for reset on k8s version changes
242
- previousKubernetesVersion,
243
226
  cisOverride: false,
244
- cisPsaChangeBanner: false,
245
- psps: null, // List of policies if any
246
- truncateHostnames: truncateLimit === NETBIOS_TRUNCATION_LENGTH,
247
227
  truncateLimit,
248
228
  busy: false,
249
229
  machinePoolValidation: {}, // map of validation states for each machine pool
@@ -254,25 +234,23 @@ export default {
254
234
  },
255
235
 
256
236
  computed: {
257
-
237
+ clusterName() {
238
+ return this.value.metadata?.name || '';
239
+ },
240
+ showClusterAppearance() {
241
+ return this.mode === _CREATE;
242
+ },
243
+ clusterBadgeAbbreviation() {
244
+ return this.$store.getters['customisation/getPreviewCluster'];
245
+ },
258
246
  rkeConfig() {
259
247
  return this.value.spec.rkeConfig;
260
248
  },
261
249
 
262
- hostnameTruncationManuallySet() {
263
- return this.truncateLimit && this.truncateLimit !== NETBIOS_TRUNCATION_LENGTH;
264
- },
265
-
266
250
  isElementalCluster() {
267
251
  return this.provider === ELEMENTAL_CLUSTER_PROVIDER || this.value?.machineProvider?.toLowerCase() === KIND.MACHINE_INV_SELECTOR_TEMPLATES.toLowerCase();
268
252
  },
269
253
 
270
- advancedTitleAlt() {
271
- const machineSelectorLength = this.rkeConfig.machineSelectorConfig.length;
272
-
273
- return this.t('cluster.advanced.argInfo.machineSelector.titleAlt', { count: machineSelectorLength });
274
- },
275
-
276
254
  chartValues() {
277
255
  return this.value.spec.rkeConfig.chartValues;
278
256
  },
@@ -285,20 +263,6 @@ export default {
285
263
  return this.value.agentConfig;
286
264
  },
287
265
 
288
- /**
289
- * Define PSP deprecation and restrict use of PSP based on min k8s version
290
- */
291
- needsPSP() {
292
- return this.getNeedsPSP();
293
- },
294
-
295
- /**
296
- * Define introduction of Rancher defined PSA templates
297
- */
298
- hasPsaTemplates() {
299
- return !this.needsPSP;
300
- },
301
-
302
266
  unsupportedSelectorConfig() {
303
267
  let global = 0;
304
268
  let kubeletOnly = 0;
@@ -309,11 +273,11 @@ export default {
309
273
  // If there are any other properties set, or multiple configs with no selector
310
274
  // show a warning that you're editing only part of the config in the UI.
311
275
 
312
- for ( const conf of this.value.spec?.rkeConfig?.machineSelectorConfig ) {
313
- if ( conf.machineLabelSelector ) {
276
+ for (const conf of this.value.spec?.rkeConfig?.machineSelectorConfig) {
277
+ if (conf.machineLabelSelector) {
314
278
  const keys = Object.keys(conf.config || {});
315
279
 
316
- if ( keys.length === 0 || (keys.length === 1 && keys[0] === 'kubelet-arg') ) {
280
+ if (keys.length === 0 || (keys.length === 1 && keys[0] === 'kubelet-arg')) {
317
281
  kubeletOnly++;
318
282
  } else {
319
283
  other++;
@@ -326,7 +290,7 @@ export default {
326
290
  // eslint-disable-next-line no-console
327
291
  console.log(`Global: ${ global }, Kubelet Only: ${ kubeletOnly }, Other: ${ other }`);
328
292
 
329
- return ( global > 1 || other > 0 );
293
+ return (global > 1 || other > 0);
330
294
  },
331
295
 
332
296
  versionOptions() {
@@ -349,26 +313,26 @@ export default {
349
313
  const showK3s = allValidK3sVersions.length && !existingRke2;
350
314
  const out = [];
351
315
 
352
- if ( showRke2 ) {
353
- if ( showK3s ) {
316
+ if (showRke2) {
317
+ if (showK3s) {
354
318
  out.push({ kind: 'group', label: this.t('cluster.provider.rke2') });
355
319
  }
356
320
 
357
321
  out.push(...allValidRke2Versions);
358
322
  }
359
323
 
360
- if ( showK3s ) {
361
- if ( showRke2 ) {
324
+ if (showK3s) {
325
+ if (showRke2) {
362
326
  out.push({ kind: 'group', label: this.t('cluster.provider.k3s') });
363
327
  }
364
328
 
365
329
  out.push(...allValidK3sVersions);
366
330
  }
367
331
 
368
- if ( cur ) {
332
+ if (cur) {
369
333
  const existing = out.find((x) => x.value === cur);
370
334
 
371
- if ( existing ) {
335
+ if (existing) {
372
336
  existing.disabled = false;
373
337
  }
374
338
  }
@@ -376,22 +340,26 @@ export default {
376
340
  return out;
377
341
  },
378
342
 
379
- isK3s() {
380
- return (this.value?.spec?.kubernetesVersion || '').includes('k3s');
381
- },
382
-
383
343
  /**
384
344
  * Kube Version
385
345
  */
386
346
  selectedVersion() {
387
347
  const str = this.value.spec.kubernetesVersion;
388
348
 
389
- if ( !str ) {
349
+ if (!str) {
390
350
  return;
391
351
  }
392
352
 
393
353
  const out = findBy(this.versionOptions, 'value', str);
394
354
 
355
+ // Adding the option 'none' to Container Network select (used in Basics component)
356
+ // https://github.com/rancher/dashboard/issues/10338
357
+ // there's an update loop on refresh that might include 'none'
358
+ // multiple times... Prevent that
359
+ if (out.serverArgs?.cni?.options && !out.serverArgs?.cni?.options.includes('none')) {
360
+ out.serverArgs.cni.options.push('none');
361
+ }
362
+
395
363
  return out;
396
364
  },
397
365
 
@@ -417,7 +385,7 @@ export default {
417
385
  },
418
386
 
419
387
  needCredential() {
420
- if ( this.provider === 'custom' || this.provider === 'import' || this.isElementalCluster || this.mode === _VIEW ) {
388
+ if (this.provider === 'custom' || this.provider === 'import' || this.isElementalCluster || this.mode === _VIEW || (this.providerConfig?.spec?.builtin === false && this.providerConfig?.spec?.addCloudCredential === false)) {
421
389
  return false;
422
390
  }
423
391
 
@@ -436,7 +404,7 @@ export default {
436
404
  },
437
405
 
438
406
  hasMachinePools() {
439
- if ( this.provider === 'custom' || this.provider === 'import' ) {
407
+ if (this.provider === 'custom' || this.provider === 'import') {
440
408
  return false;
441
409
  }
442
410
 
@@ -477,7 +445,7 @@ export default {
477
445
  machineConfigSchema() {
478
446
  let schema;
479
447
 
480
- if ( !this.hasMachinePools ) {
448
+ if (!this.hasMachinePools) {
481
449
  return null;
482
450
  } else if (this.isElementalCluster) {
483
451
  schema = ELEMENTAL_SCHEMA_IDS.MACHINE_INV_SELECTOR_TEMPLATES;
@@ -511,53 +479,53 @@ export default {
511
479
  tooltip: {},
512
480
  };
513
481
 
514
- for ( const role of roles ) {
482
+ for (const role of roles) {
515
483
  counts[role] = 0;
516
484
  out.color[role] = NODE_TOTAL.success.color;
517
485
  out.icon[role] = NODE_TOTAL.success.icon;
518
486
  }
519
487
 
520
- for ( const row of this.machinePools || [] ) {
521
- if ( row.remove ) {
488
+ for (const row of this.machinePools || []) {
489
+ if (row.remove) {
522
490
  continue;
523
491
  }
524
492
 
525
493
  const qty = parseInt(row.pool.quantity, 10);
526
494
 
527
- if ( isNaN(qty) ) {
495
+ if (isNaN(qty)) {
528
496
  continue;
529
497
  }
530
498
 
531
- for ( const role of roles ) {
499
+ for (const role of roles) {
532
500
  counts[role] = counts[role] + (row.pool[`${ role }Role`] ? qty : 0);
533
501
  }
534
502
  }
535
503
 
536
- for ( const role of roles ) {
504
+ for (const role of roles) {
537
505
  out.label[role] = this.t(`cluster.machinePool.nodeTotals.label.${ role }`, { count: counts[role] });
538
506
  out.tooltip[role] = this.t(`cluster.machinePool.nodeTotals.tooltip.${ role }`, { count: counts[role] });
539
507
  }
540
508
 
541
- if ( counts.etcd === 0 ) {
509
+ if (counts.etcd === 0) {
542
510
  out.color.etcd = NODE_TOTAL.error.color;
543
511
  out.icon.etcd = NODE_TOTAL.error.icon;
544
- } else if ( counts.etcd === 1 || counts.etcd % 2 === 0 || counts.etcd > 7 ) {
512
+ } else if (counts.etcd === 1 || counts.etcd % 2 === 0 || counts.etcd > 7) {
545
513
  out.color.etcd = NODE_TOTAL.warning.color;
546
514
  out.icon.etcd = NODE_TOTAL.warning.icon;
547
515
  }
548
516
 
549
- if ( counts.controlPlane === 0 ) {
517
+ if (counts.controlPlane === 0) {
550
518
  out.color.controlPlane = NODE_TOTAL.error.color;
551
519
  out.icon.controlPlane = NODE_TOTAL.error.icon;
552
- } else if ( counts.controlPlane === 1 ) {
520
+ } else if (counts.controlPlane === 1) {
553
521
  out.color.controlPlane = NODE_TOTAL.warning.color;
554
522
  out.icon.controlPlane = NODE_TOTAL.warning.icon;
555
523
  }
556
524
 
557
- if ( counts.worker === 0 ) {
525
+ if (counts.worker === 0) {
558
526
  out.color.worker = NODE_TOTAL.error.color;
559
527
  out.icon.worker = NODE_TOTAL.error.icon;
560
- } else if ( counts.worker === 1 ) {
528
+ } else if (counts.worker === 1) {
561
529
  out.color.worker = NODE_TOTAL.warning.color;
562
530
  out.icon.worker = NODE_TOTAL.warning.icon;
563
531
  }
@@ -587,11 +555,11 @@ export default {
587
555
  }
588
556
 
589
557
  if (this.showCloudProvider) { // Shouldn't be removed such that changes to it will re-trigger this watch
590
- if ( this.agentConfig['cloud-provider-name'] === 'rancher-vsphere' ) {
558
+ if (this.agentConfig?.['cloud-provider-name'] === 'rancher-vsphere') {
591
559
  names.push('rancher-vsphere-cpi', 'rancher-vsphere-csi');
592
560
  }
593
561
 
594
- if ( this.agentConfig['cloud-provider-name'] === HARVESTER ) {
562
+ if (this.agentConfig?.['cloud-provider-name'] === HARVESTER) {
595
563
  names.push(HARVESTER_CLOUD_PROVIDER);
596
564
  }
597
565
  }
@@ -616,11 +584,11 @@ export default {
616
584
  value: '',
617
585
  }];
618
586
 
619
- if ( !!this.agentArgs['cloud-provider-name']?.options ) {
587
+ if (!!this.agentArgs['cloud-provider-name']?.options) {
620
588
  const preferred = this.$store.getters['plugins/cloudProviderForDriver'](this.provider);
621
589
 
622
- for ( const opt of this.agentArgs['cloud-provider-name']?.options ) {
623
- // If we don't have a preferred provider... show all options
590
+ for (const opt of this.agentArgs['cloud-provider-name']?.options) {
591
+ // If we don't have a preferred provider... show all options
624
592
  const showAllOptions = preferred === undefined;
625
593
  // If we have a preferred provider... only show default, preferred and external
626
594
  const isPreferred = opt === preferred;
@@ -641,9 +609,9 @@ export default {
641
609
  }
642
610
  }
643
611
 
644
- const cur = this.agentConfig['cloud-provider-name'];
612
+ const cur = this.agentConfig?.['cloud-provider-name'];
645
613
 
646
- if ( cur && !out.find((x) => x.value === cur) ) {
614
+ if (cur && !out.find((x) => x.value === cur)) {
647
615
  out.unshift({ label: `${ cur } (Current)`, value: cur });
648
616
  }
649
617
 
@@ -677,22 +645,15 @@ export default {
677
645
  }
678
646
  }
679
647
 
680
- if ( !out ) {
648
+ if (!out) {
681
649
  out = preferred || first;
682
650
  }
683
651
 
684
652
  return out;
685
653
  },
686
654
 
687
- showIpv6Warning() {
688
- const clusterCIDR = this.serverConfig['cluster-cidr'] || '';
689
- const serviceCIDR = this.serverConfig['service-cidr'] || '';
690
-
691
- return clusterCIDR.includes(':') || serviceCIDR.includes(':');
692
- },
693
-
694
655
  appsOSWarning() {
695
- if (this.mode !== _EDIT ) {
656
+ if (this.mode !== _EDIT) {
696
657
  return null;
697
658
  }
698
659
  const { linuxWorkerCount, windowsWorkerCount } = this.value?.mgmt?.status || {};
@@ -759,22 +720,40 @@ export default {
759
720
 
760
721
  return validRequiredPools && base;
761
722
  },
723
+ currentCluster() {
724
+ if (this.mode === _EDIT) {
725
+ return { ...this.value };
726
+ } else {
727
+ return this.$store.getters['customisation/getPreviewCluster'];
728
+ }
729
+ }
762
730
  },
763
731
 
764
732
  watch: {
765
- s3Backup(neu) {
766
- if ( neu ) {
767
- // We need to make sure that s3 doesn't already have an existing value otherwise when editing a cluster with s3 defined this will clear s3.
768
- if (isEmpty(this.rkeConfig.etcd?.s3)) {
769
- set(this.rkeConfig.etcd, 's3', {});
733
+ clusterBadgeAbbreviation: {
734
+ immediate: true,
735
+ handler(neu) {
736
+ if (!neu) {
737
+ return;
770
738
  }
771
- } else {
772
- set(this.rkeConfig.etcd, 's3', null);
739
+
740
+ if (Object.keys(neu.badge).length <= 0) {
741
+ return { ...this.value };
742
+ }
743
+
744
+ const obj = {
745
+ [CLUSTER_BADGE.ICON_TEXT]: neu.badge.iconText, [CLUSTER_BADGE.COLOR]: neu.badge.color, [CLUSTER_BADGE.TEXT]: neu.badge.text
746
+ };
747
+
748
+ this.value.metadata.annotations = {
749
+ ...this.value.metadata.annotations,
750
+ ...obj
751
+ };
773
752
  }
774
753
  },
775
754
 
776
755
  credentialId(val) {
777
- if ( val ) {
756
+ if (val) {
778
757
  this.credential = this.$store.getters['rancher/byId'](NORMAN.CLOUD_CREDENTIAL, this.credentialId);
779
758
 
780
759
  if (this.isHarvesterDriver) {
@@ -789,7 +768,7 @@ export default {
789
768
 
790
769
  addonNames(neu, old) {
791
770
  // To catch the 'some addons' --> 'no addons' case also check array length (`difference([], [1,2,3]) === []`)
792
- const diff = old.length !== neu.length || difference(neu, old).length ;
771
+ const diff = old.length !== neu.length || difference(neu, old).length;
793
772
 
794
773
  if (diff) {
795
774
  // Allow time for addonNames to update... then fetch any missing addons
@@ -851,32 +830,32 @@ export default {
851
830
  * Initialize all the cluster specs
852
831
  */
853
832
  async initSpecs() {
854
- if ( !this.value.spec ) {
833
+ if (!this.value.spec) {
855
834
  set(this.value, 'spec', {});
856
835
  }
857
836
 
858
- if ( !this.value.spec.machineSelectorConfig ) {
837
+ if (!this.value.spec.machineSelectorConfig) {
859
838
  set(this.value.spec, 'machineSelectorConfig', []);
860
839
  }
861
840
 
862
- if ( !this.value.spec.machineSelectorConfig.find((x) => !x.machineLabelSelector) ) {
841
+ if (!this.value.spec.machineSelectorConfig.find((x) => !x.machineLabelSelector)) {
863
842
  this.value.spec.machineSelectorConfig.unshift({ config: {} });
864
843
  }
865
844
 
866
- if ( this.value.spec.cloudCredentialSecretName ) {
845
+ if (this.value.spec.cloudCredentialSecretName) {
867
846
  await this.$store.dispatch('rancher/findAll', { type: NORMAN.CLOUD_CREDENTIAL });
868
847
  this.credentialId = `${ this.value.spec.cloudCredentialSecretName }`;
869
848
  }
870
849
 
871
- if ( !this.value.spec.kubernetesVersion ) {
850
+ if (!this.value.spec.kubernetesVersion) {
872
851
  set(this.value.spec, 'kubernetesVersion', this.defaultVersion);
873
852
  }
874
853
 
875
- if ( this.rkeConfig.etcd?.s3?.bucket ) {
854
+ if (this.rkeConfig.etcd?.s3?.bucket) {
876
855
  this.s3Backup = true;
877
856
  }
878
857
 
879
- if ( !this.rkeConfig.etcd ) {
858
+ if (!this.rkeConfig.etcd) {
880
859
  set(this.rkeConfig, 'etcd', {
881
860
  disableSnapshots: false,
882
861
  s3: null,
@@ -895,18 +874,14 @@ export default {
895
874
  this.allNamespaces = await this.$store.dispatch('management/findAll', { type: NAMESPACE });
896
875
  }
897
876
 
898
- if ( !this.machinePools ) {
877
+ if (!this.machinePools) {
899
878
  await this.initMachinePools(this.value.spec.rkeConfig.machinePools);
900
- if ( this.mode === _CREATE && !this.machinePools.length ) {
879
+ if (this.mode === _CREATE && !this.machinePools.length) {
901
880
  await this.addMachinePool();
902
881
  }
903
882
  }
904
883
 
905
- if ( this.value.spec.defaultPodSecurityPolicyTemplateName === undefined ) {
906
- set(this.value.spec, 'defaultPodSecurityPolicyTemplateName', '');
907
- }
908
-
909
- if ( this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName === undefined ) {
884
+ if (this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName === undefined) {
910
885
  set(this.value.spec, 'defaultPodSecurityAdmissionConfigurationTemplateName', '');
911
886
  }
912
887
  },
@@ -915,16 +890,12 @@ export default {
915
890
  * Fetch RKE versions and their configurations to be mapped to the form
916
891
  */
917
892
  async fetchRke2Versions() {
918
- if ( !this.rke2Versions ) {
893
+ if (!this.rke2Versions) {
919
894
  const hash = {
920
895
  rke2Versions: this.$store.dispatch('management/request', { url: '/v1-rke2-release/releases' }),
921
896
  k3sVersions: this.$store.dispatch('management/request', { url: '/v1-k3s-release/releases' }),
922
897
  };
923
898
 
924
- if ( this.$store.getters['management/canList'](MANAGEMENT.POD_SECURITY_POLICY_TEMPLATE) ) {
925
- hash.allPSPs = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.POD_SECURITY_POLICY_TEMPLATE });
926
- }
927
-
928
899
  if (this.$store.getters['management/canList'](MANAGEMENT.PSA)) {
929
900
  hash.allPSAs = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.PSA });
930
901
  }
@@ -949,7 +920,6 @@ export default {
949
920
 
950
921
  const res = await allHash(hash);
951
922
 
952
- this.allPSPs = res.allPSPs || [];
953
923
  this.allPSAs = res.allPSAs || [];
954
924
  this.rke2Versions = res.rke2Versions.data || [];
955
925
  this.k3sVersions = res.k3sVersions.data || [];
@@ -966,7 +936,7 @@ export default {
966
936
  defaultK3s = k3sChannels.find((x) => x.id === 'default')?.latest;
967
937
  }
968
938
 
969
- if ( !this.rke2Versions.length && !this.k3sVersions.length ) {
939
+ if (!this.rke2Versions.length && !this.k3sVersions.length) {
970
940
  throw new Error('No version info found in KDM');
971
941
  }
972
942
 
@@ -1018,12 +988,12 @@ export default {
1018
988
  */
1019
989
  setAgentConfiguration() {
1020
990
  // Cluster Agent Configuration
1021
- if ( !this.value.spec[CLUSTER_AGENT_CUSTOMIZATION]) {
991
+ if (!this.value.spec[CLUSTER_AGENT_CUSTOMIZATION]) {
1022
992
  set(this.value.spec, CLUSTER_AGENT_CUSTOMIZATION, {});
1023
993
  }
1024
994
 
1025
995
  // Fleet Agent Configuration
1026
- if ( !this.value.spec[FLEET_AGENT_CUSTOMIZATION] ) {
996
+ if (!this.value.spec[FLEET_AGENT_CUSTOMIZATION]) {
1027
997
  set(this.value.spec, FLEET_AGENT_CUSTOMIZATION, {});
1028
998
  }
1029
999
  },
@@ -1031,23 +1001,15 @@ export default {
1031
1001
  /**
1032
1002
  * set instanceNameLimit to 15 to all pool machine if truncateHostnames checkbox is clicked
1033
1003
  */
1034
- truncateName() {
1035
- if (this.truncateHostnames) {
1004
+ truncateHostname(neu) {
1005
+ if (neu) {
1036
1006
  this.value.defaultHostnameLengthLimit = NETBIOS_TRUNCATION_LENGTH;
1007
+ this.truncateLimit = NETBIOS_TRUNCATION_LENGTH;
1037
1008
  } else {
1009
+ this.truncateLimit = 0;
1038
1010
  this.value.removeDefaultHostnameLengthLimit();
1039
1011
  }
1040
1012
  },
1041
- /**
1042
- * Define PSP deprecation and restrict use of PSP based on min k8s version and current/edited mode
1043
- */
1044
- getNeedsPSP(value = this.value) {
1045
- const release = value?.spec?.kubernetesVersion || '';
1046
- const version = release.match(/\d+/g);
1047
- const isRequiredVersion = version?.length ? +version[0] === 1 && +version[1] < 25 : false;
1048
-
1049
- return isRequiredVersion;
1050
- },
1051
1013
 
1052
1014
  /**
1053
1015
  * Get machine pools from the cluster configuration
@@ -1056,8 +1018,8 @@ export default {
1056
1018
  async initMachinePools(existing) {
1057
1019
  const out = [];
1058
1020
 
1059
- if ( existing?.length ) {
1060
- for ( const pool of existing ) {
1021
+ if (existing?.length) {
1022
+ for (const pool of existing) {
1061
1023
  let type;
1062
1024
 
1063
1025
  if (this.isElementalCluster) {
@@ -1069,7 +1031,7 @@ export default {
1069
1031
  let config;
1070
1032
  let configMissing = false;
1071
1033
 
1072
- if ( this.$store.getters['management/canList'](type) ) {
1034
+ if (this.$store.getters['management/canList'](type)) {
1073
1035
  try {
1074
1036
  config = await this.$store.dispatch('management/find', {
1075
1037
  type,
@@ -1106,7 +1068,7 @@ export default {
1106
1068
 
1107
1069
  async addMachinePool(idx) {
1108
1070
  // this.machineConfigSchema is the schema for the Machine Pool's machine configuration for the given provider
1109
- if ( !this.machineConfigSchema ) {
1071
+ if (!this.machineConfigSchema) {
1110
1072
  return;
1111
1073
  }
1112
1074
 
@@ -1153,7 +1115,7 @@ export default {
1153
1115
  },
1154
1116
  };
1155
1117
 
1156
- if (this.provider === 'vmwarevsphere') {
1118
+ if (this.provider === VMWARE_VSPHERE) {
1157
1119
  pool.pool.machineOS = 'linux';
1158
1120
  }
1159
1121
 
@@ -1164,7 +1126,7 @@ export default {
1164
1126
  this.machinePools.push(pool);
1165
1127
 
1166
1128
  this.$nextTick(() => {
1167
- if ( this.$refs.pools?.select ) {
1129
+ if (this.$refs.pools?.select) {
1168
1130
  this.$refs.pools.select(name);
1169
1131
  }
1170
1132
  });
@@ -1173,11 +1135,11 @@ export default {
1173
1135
  removeMachinePool(idx) {
1174
1136
  const entry = this.machinePools[idx];
1175
1137
 
1176
- if ( !entry ) {
1138
+ if (!entry) {
1177
1139
  return;
1178
1140
  }
1179
1141
 
1180
- if ( entry.create ) {
1142
+ if (entry.create) {
1181
1143
  // If this is a new pool that isn't saved yet, it can just be dropped
1182
1144
  removeObject(this.machinePools, entry);
1183
1145
  } else {
@@ -1198,7 +1160,12 @@ export default {
1198
1160
  // We don't allow the user to edit any of the fields in metadata from the UI so it's safe to override it with the
1199
1161
  // metadata defined by the latest backend value. This is primarily used to ensure the resourceVersion is up to date.
1200
1162
  delete clonedCurrentConfig.metadata;
1201
- machinePool.config = merge(clonedLatestConfig, clonedCurrentConfig);
1163
+
1164
+ if (this.provider === VMWARE_VSPHERE) {
1165
+ machinePool.config = vspherePoolConfigMerge(clonedLatestConfig, clonedCurrentConfig);
1166
+ } else {
1167
+ machinePool.config = merge(clonedLatestConfig, clonedCurrentConfig);
1168
+ }
1202
1169
  }
1203
1170
  },
1204
1171
 
@@ -1236,8 +1203,8 @@ export default {
1236
1203
  return await this.extensionProvider.saveMachinePoolConfigs(this.machinePools, this.value);
1237
1204
  }
1238
1205
 
1239
- for ( const entry of this.machinePools ) {
1240
- if ( entry.remove ) {
1206
+ for (const entry of this.machinePools) {
1207
+ if (entry.remove) {
1241
1208
  continue;
1242
1209
  }
1243
1210
 
@@ -1248,8 +1215,8 @@ export default {
1248
1215
 
1249
1216
  const prefix = `${ this.value.metadata.name }-${ entry.pool.name }`.substr(0, 50).toLowerCase();
1250
1217
 
1251
- if ( entry.create ) {
1252
- if ( !entry.config.metadata?.name ) {
1218
+ if (entry.create) {
1219
+ if (!entry.config.metadata?.name) {
1253
1220
  entry.config.metadata.generateName = `nc-${ prefix }-`;
1254
1221
  }
1255
1222
 
@@ -1259,12 +1226,12 @@ export default {
1259
1226
  entry.pool.machineConfigRef.name = neu.metadata.name;
1260
1227
  entry.create = false;
1261
1228
  entry.update = true;
1262
- } else if ( entry.update ) {
1229
+ } else if (entry.update) {
1263
1230
  entry.config = await entry.config.save();
1264
1231
  }
1265
1232
 
1266
1233
  // Ensure Elemental clusters have a hostname prefix
1267
- if (this.isElementalCluster && !entry.pool.hostnamePrefix ) {
1234
+ if (this.isElementalCluster && !entry.pool.hostnamePrefix) {
1268
1235
  entry.pool.hostnamePrefix = `${ prefix }-`;
1269
1236
  }
1270
1237
 
@@ -1275,11 +1242,11 @@ export default {
1275
1242
  },
1276
1243
 
1277
1244
  async cleanupMachinePools() {
1278
- for ( const entry of this.machinePools ) {
1279
- if ( entry.remove && entry.config ) {
1245
+ for (const entry of this.machinePools) {
1246
+ if (entry.remove && entry.config) {
1280
1247
  try {
1281
1248
  await entry.config.remove();
1282
- } catch (e) {}
1249
+ } catch (e) { }
1283
1250
  }
1284
1251
  }
1285
1252
  },
@@ -1300,7 +1267,7 @@ export default {
1300
1267
  },
1301
1268
 
1302
1269
  cancelCredential() {
1303
- if ( this.$refs.cruresource ) {
1270
+ if (this.$refs.cruresource) {
1304
1271
  this.$refs.cruresource.emitOrRoute();
1305
1272
  }
1306
1273
  },
@@ -1308,7 +1275,7 @@ export default {
1308
1275
  done() {
1309
1276
  let routeName = 'c-cluster-product-resource';
1310
1277
 
1311
- if ( this.mode === _CREATE && (this.provider === 'import' || this.provider === 'custom') ) {
1278
+ if (this.mode === _CREATE && (this.provider === 'import' || this.provider === 'custom')) {
1312
1279
  // Go show the registration command
1313
1280
  routeName = 'c-cluster-product-resource-namespace-id';
1314
1281
  }
@@ -1334,23 +1301,6 @@ export default {
1334
1301
  });
1335
1302
  },
1336
1303
 
1337
- /**
1338
- * Inform user to remove PSP for current cluster due deprecation
1339
- */
1340
- showPspConfirmation() {
1341
- return new Promise((resolve, reject) => {
1342
- this.$store.dispatch('cluster/promptModal', {
1343
- component: 'GenericPrompt',
1344
- componentProps: {
1345
- title: this.t('cluster.rke2.modal.pspChange.title'),
1346
- body: this.t('cluster.rke2.modal.pspChange.body'),
1347
- applyMode: 'continue',
1348
- confirm: resolve
1349
- },
1350
- });
1351
- });
1352
- },
1353
-
1354
1304
  // Set busy before save and clear after save
1355
1305
  async saveOverride(btnCb) {
1356
1306
  this.$set(this, 'busy', true);
@@ -1384,13 +1334,6 @@ export default {
1384
1334
  this.agentConfigurationCleanup();
1385
1335
 
1386
1336
  const isEditVersion = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
1387
- const hasPspManuallyAdded = !!this.value.spec.rkeConfig?.machineGlobalConfig?.['kube-apiserver-arg'];
1388
-
1389
- if (isEditVersion && !this.needsPSP && hasPspManuallyAdded) {
1390
- if (!await this.showPspConfirmation()) {
1391
- return btnCb('cancelled');
1392
- }
1393
- }
1394
1337
 
1395
1338
  if (isEditVersion) {
1396
1339
  const shouldContinue = await this.showAddonConfirmation();
@@ -1417,7 +1360,7 @@ export default {
1417
1360
 
1418
1361
  const isUpgrade = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
1419
1362
 
1420
- if (this.agentConfig['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
1363
+ if (this.agentConfig?.['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
1421
1364
  const namespace = this.machinePools?.[0]?.config?.vmNamespace;
1422
1365
 
1423
1366
  const res = await this.$store.dispatch('management/request', {
@@ -1441,7 +1384,9 @@ export default {
1441
1384
  set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.global.cattle.clusterName`, this.value.metadata.name);
1442
1385
  }
1443
1386
 
1444
- set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.cloudConfigPath`, '/var/lib/rancher/rke2/etc/config-files/cloud-provider-config');
1387
+ const distroRoot = this.value?.spec?.rkeConfig?.dataDirectories?.k8sDistro?.length ? this.value?.spec?.rkeConfig?.dataDirectories?.k8sDistro : '/var/lib/rancher/rke2';
1388
+
1389
+ set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.cloudConfigPath`, `${ distroRoot }/etc/config-files/cloud-provider-config`);
1445
1390
  }
1446
1391
  } catch (err) {
1447
1392
  this.errors.push(err);
@@ -1477,7 +1422,7 @@ export default {
1477
1422
  return await this.extensionProvider?.saveCluster(this.value, this.schema);
1478
1423
  }
1479
1424
 
1480
- if ( this.isCreate ) {
1425
+ if (this.isCreate) {
1481
1426
  url = url || this.schema.linkFor('collection');
1482
1427
  const res = await this.value.save({ url });
1483
1428
 
@@ -1522,10 +1467,12 @@ export default {
1522
1467
  * 2) We're ready to cache any values the user provides for each addon
1523
1468
  */
1524
1469
  async initAddons() {
1525
- for ( const chartName of this.addonNames ) {
1470
+ for (const chartName of this.addonNames) {
1526
1471
  const entry = this.chartVersions[chartName];
1527
1472
 
1528
- if ( this.versionInfo[chartName] ) {
1473
+ // prevent fetching of addon config for 'none' CNI option
1474
+ // https://github.com/rancher/dashboard/issues/10338
1475
+ if (this.versionInfo[chartName] || chartName.includes('none')) {
1529
1476
  continue;
1530
1477
  }
1531
1478
 
@@ -1549,30 +1496,31 @@ export default {
1549
1496
  }
1550
1497
  },
1551
1498
 
1552
- labelForAddon(name) {
1553
- const fallback = `${ camelToTitle(name.replace(/^(rke|rke2|rancher)-/, '')) } Configuration`;
1554
-
1555
- return this.$store.getters['i18n/withFallback'](`cluster.addonChart."${ name }"`, null, fallback);
1556
- },
1557
-
1558
- showAddons() {
1499
+ showAddons(key) {
1559
1500
  this.addonsRev++;
1560
1501
  this.addonNames.forEach((name) => {
1561
1502
  const chartValues = this.versionInfo[name]?.questions ? this.initYamlEditor(name) : {};
1562
1503
 
1563
1504
  set(this.userChartValuesTemp, name, chartValues);
1564
1505
  });
1565
- this.refreshYamls();
1506
+ this.refreshComponentWithYamls(key);
1507
+ },
1508
+ refreshComponentWithYamls(key) {
1509
+ const component = this.$refs[key];
1510
+
1511
+ if (component) {
1512
+ this.refreshYamls(component.$refs);
1513
+ }
1566
1514
  },
1567
1515
 
1568
- refreshYamls() {
1569
- const keys = Object.keys(this.$refs).filter((x) => x.startsWith('yaml'));
1516
+ refreshYamls(refs) {
1517
+ const keys = Object.keys(refs).filter((x) => x.startsWith('yaml'));
1570
1518
 
1571
- for ( const k of keys ) {
1572
- const entry = this.$refs[k];
1519
+ for (const k of keys) {
1520
+ const entry = refs[k];
1573
1521
  const list = isArray(entry) ? entry : [entry];
1574
1522
 
1575
- for ( const component of list ) {
1523
+ for (const component of list) {
1576
1524
  component?.refresh(); // `yaml` ref can be undefined on switching from Basic to Addon tab (Azure --> Amazon --> addon)
1577
1525
  }
1578
1526
  }
@@ -1591,10 +1539,6 @@ export default {
1591
1539
  this.userChartValues[this.chartVersionKey(name)] = different;
1592
1540
  }, 250, { leading: true }),
1593
1541
 
1594
- updateQuestions(name) {
1595
- this.syncChartValues(name);
1596
- },
1597
-
1598
1542
  initYamlEditor(name) {
1599
1543
  const defaultChartValue = this.versionInfo[name];
1600
1544
  const key = this.chartVersionKey(name);
@@ -1603,23 +1547,23 @@ export default {
1603
1547
  },
1604
1548
 
1605
1549
  initServerAgentArgs() {
1606
- for ( const k in this.serverArgs ) {
1607
- if ( this.serverConfig[k] === undefined ) {
1550
+ for (const k in this.serverArgs) {
1551
+ if (this.serverConfig[k] === undefined) {
1608
1552
  const def = this.serverArgs[k].default;
1609
1553
 
1610
1554
  set(this.serverConfig, k, (def !== undefined ? def : undefined));
1611
1555
  }
1612
1556
  }
1613
1557
 
1614
- for ( const k in this.agentArgs ) {
1615
- if ( this.agentConfig[k] === undefined ) {
1558
+ for (const k in this.agentArgs) {
1559
+ if (this.agentConfig?.[k] === undefined) {
1616
1560
  const def = this.agentArgs[k].default;
1617
1561
 
1618
1562
  set(this.agentConfig, k, (def !== undefined ? def : undefined));
1619
1563
  }
1620
1564
  }
1621
1565
 
1622
- if ( !this.serverConfig?.profile ) {
1566
+ if (!this.serverConfig?.profile) {
1623
1567
  set(this.serverConfig, 'profile', null);
1624
1568
  }
1625
1569
  },
@@ -1634,10 +1578,6 @@ export default {
1634
1578
  this.$set(this, 'membershipUpdate', update);
1635
1579
  },
1636
1580
 
1637
- canRemoveKubeletRow(row, idx) {
1638
- return idx !== 0;
1639
- },
1640
-
1641
1581
  async initRegistry() {
1642
1582
  // Check for an existing cluster scoped registry
1643
1583
  const clusterRegistry = this.agentConfig?.['system-default-registry'] || '';
@@ -1656,22 +1596,22 @@ export default {
1656
1596
  let registrySecret = null;
1657
1597
  let regs = this.rkeConfig.registries;
1658
1598
 
1659
- if ( !regs ) {
1599
+ if (!regs) {
1660
1600
  regs = {};
1661
1601
  set(this.rkeConfig, 'registries', regs);
1662
1602
  }
1663
1603
 
1664
- if ( !regs.configs ) {
1604
+ if (!regs.configs) {
1665
1605
  set(regs, 'configs', {});
1666
1606
  }
1667
1607
 
1668
- if ( !regs.mirrors ) {
1608
+ if (!regs.mirrors) {
1669
1609
  set(regs, 'mirrors', {});
1670
1610
  }
1671
1611
 
1672
1612
  const config = regs.configs[this.registryHost];
1673
1613
 
1674
- if ( config ) {
1614
+ if (config) {
1675
1615
  registrySecret = config.authConfigSecretName;
1676
1616
  }
1677
1617
 
@@ -1691,21 +1631,21 @@ export default {
1691
1631
  setRegistryConfig() {
1692
1632
  const hostname = (this.registryHost || '').trim();
1693
1633
 
1694
- if ( this.systemRegistry ) {
1634
+ if (this.systemRegistry) {
1695
1635
  // Empty string overrides the system default to nothing
1696
1636
  set(this.agentConfig, 'system-default-registry', '');
1697
1637
  } else {
1698
1638
  // No need to set anything
1699
1639
  set(this.agentConfig, 'system-default-registry', undefined);
1700
1640
  }
1701
- if ( !hostname || hostname === this.systemRegistry ) {
1641
+ if (!hostname || hostname === this.systemRegistry) {
1702
1642
  // Undefined removes the key which uses the global setting without hardcoding it into the config
1703
1643
  set(this.agentConfig, 'system-default-registry', undefined);
1704
1644
  } else {
1705
1645
  set(this.agentConfig, 'system-default-registry', hostname);
1706
1646
  }
1707
1647
 
1708
- if ( hostname && this.registrySecret ) {
1648
+ if (hostname && this.registrySecret) {
1709
1649
  // For a registry with basic auth, but no mirrors,
1710
1650
  // add a single registry config with the basic auth secret.
1711
1651
  const basicAuthConfig = {
@@ -1754,12 +1694,12 @@ export default {
1754
1694
  let isCurrentVersion = false;
1755
1695
  let label = obj.id;
1756
1696
 
1757
- if ( currentVersion ) {
1697
+ if (currentVersion) {
1758
1698
  disabled = compare(obj.id, currentVersion) < 0;
1759
1699
  isCurrentVersion = compare(obj.id, currentVersion) === 0;
1760
1700
  }
1761
1701
 
1762
- if ( defaultVersion ) {
1702
+ if (defaultVersion) {
1763
1703
  experimental = compare(defaultVersion, obj.id) < 0;
1764
1704
  }
1765
1705
 
@@ -1880,6 +1820,7 @@ export default {
1880
1820
  setHarvesterDefaultCloudProvider() {
1881
1821
  if (this.isHarvesterDriver &&
1882
1822
  this.mode === _CREATE &&
1823
+ this.agentConfig &&
1883
1824
  !this.agentConfig['cloud-provider-name'] &&
1884
1825
  !this.isHarvesterExternalCredential &&
1885
1826
  !this.isHarvesterIncompatible
@@ -1908,7 +1849,8 @@ export default {
1908
1849
  }
1909
1850
  this.setHarvesterDefaultCloudProvider();
1910
1851
  },
1911
- toggleCustomRegistry(e) {
1852
+ toggleCustomRegistry(neu) {
1853
+ this.showCustomRegistryInput = neu;
1912
1854
  if (this.registryHost) {
1913
1855
  this.registryHost = null;
1914
1856
  this.registrySecret = null;
@@ -1917,28 +1859,6 @@ export default {
1917
1859
  }
1918
1860
  },
1919
1861
 
1920
- /**
1921
- * Get provisioned RKE2 cluster PSPs in edit mode
1922
- */
1923
- async getPsps() {
1924
- // As server returns 500 we exclude all the possible cases
1925
- if (
1926
- this.mode !== _CREATE &&
1927
- !this.isK3s &&
1928
- this.value.state !== 'reconciling' &&
1929
- this.getNeedsPSP(this.liveValue) // We consider editing only possible PSP cases
1930
- ) {
1931
- const clusterId = this.value.mgmtClusterId;
1932
- const url = `/k8s/clusters/${ clusterId }/v1/${ PSPS }`;
1933
-
1934
- try {
1935
- return await this.$store.dispatch('cluster/request', { url });
1936
- } catch (error) {
1937
- // PSP may not exists for this cluster and an error is returned without need to handle
1938
- }
1939
- }
1940
- },
1941
-
1942
1862
  /**
1943
1863
  * Reset PSA on several input changes for given conditions
1944
1864
  */
@@ -1948,11 +1868,9 @@ export default {
1948
1868
  const cisValue = this.agentConfig?.profile || this.serverConfig?.profile;
1949
1869
 
1950
1870
  if (!this.cisOverride) {
1951
- if (this.hasPsaTemplates && cisValue) {
1871
+ if (cisValue) {
1952
1872
  set(this.value.spec, 'defaultPodSecurityAdmissionConfigurationTemplateName', hardcodedTemplate);
1953
1873
  }
1954
-
1955
- this.cisPsaChangeBanner = this.hasPsaTemplates;
1956
1874
  }
1957
1875
  },
1958
1876
 
@@ -1973,30 +1891,16 @@ export default {
1973
1891
  set(this.agentConfig, 'protect-kernel-defaults', false);
1974
1892
  }
1975
1893
  },
1894
+ updateAdditionalManifest(neu) {
1895
+ this.value.spec.rkeConfig.additionalManifest = neu;
1896
+ },
1976
1897
 
1977
1898
  /**
1978
- * Handle k8s changes side effects, like PSP and PSA resets
1899
+ * Handle k8s changes side effects, like PSA resets
1979
1900
  */
1980
- handleKubernetesChange(value) {
1901
+ handleKubernetesChange(value, old) {
1981
1902
  if (value) {
1982
1903
  this.togglePsaDefault();
1983
- const version = VERSION.parse(value);
1984
- const major = parseInt(version?.[0] || 0);
1985
- const minor = parseInt(version?.[1] || 0);
1986
-
1987
- // Reset PSA if not RKE2
1988
- if (!value.includes('rke2')) {
1989
- set(this.value.spec, 'defaultPodSecurityPolicyTemplateName', '');
1990
- } else {
1991
- // Reset PSP if it's legacy due k8s version 1.25+
1992
- if (major === 1 && minor >= 25) {
1993
- set(this.value.spec, 'defaultPodSecurityPolicyTemplateName', '');
1994
- } else {
1995
- set(this.value.spec, 'defaultPodSecurityPolicyTemplateName', this.lastDefaultPodSecurityPolicyTemplateName);
1996
- }
1997
-
1998
- this.previousKubernetesVersion = value;
1999
- }
2000
1904
 
2001
1905
  // If Harvester driver, reset cloud provider if not compatible
2002
1906
  if (this.isHarvesterDriver && this.mode === _CREATE && this.isHarvesterIncompatible) {
@@ -2005,13 +1909,6 @@ export default {
2005
1909
  }
2006
1910
  },
2007
1911
 
2008
- /**
2009
- * Keep last PSP value
2010
- */
2011
- handlePspChange(value) {
2012
- this.lastDefaultPodSecurityPolicyTemplateName = value;
2013
- },
2014
-
2015
1912
  handleShowDeprecatedPatchVersionsChanged(value) {
2016
1913
  this.showDeprecatedPatchVersions = value;
2017
1914
  },
@@ -2028,27 +1925,20 @@ export default {
2028
1925
  handleEnabledSystemServicesChanged(val) {
2029
1926
  set(this.serverConfig, 'disable', val);
2030
1927
  },
2031
- handleCiliumIpv6Changed(neu) {
1928
+
1929
+ handleCiliumValuesChanged(neu) {
1930
+ if (neu === undefined) {
1931
+ return;
1932
+ }
1933
+
2032
1934
  const name = this.chartVersionKey('rke2-cilium');
2033
- const values = this.userChartValues[name];
2034
1935
 
2035
1936
  set(this, 'userChartValues', {
2036
1937
  ...this.userChartValues,
2037
- [name]: {
2038
- ...values,
2039
- cilium: {
2040
- ...values?.cilium,
2041
- ipv6: {
2042
- ...values?.cilium?.ipv6,
2043
- enabled: neu
2044
- }
2045
- }
2046
- }
1938
+ [name]: { ...neu }
2047
1939
  });
2048
1940
  },
2049
- handlePspChanged(neu) {
2050
- this.handlePspChange(neu);
2051
- },
1941
+
2052
1942
  handleCisChanged() {
2053
1943
  this.handleCisChange();
2054
1944
  },
@@ -2081,7 +1971,7 @@ export default {
2081
1971
  return this.t('cluster.banner.machinePoolError', {
2082
1972
  count: x[1].length, pool_name: x[0], fields: formattedFields
2083
1973
  }, true);
2084
- } )
1974
+ })
2085
1975
  .filter((x) => x);
2086
1976
 
2087
1977
  if (!errors) {
@@ -2090,13 +1980,31 @@ export default {
2090
1980
 
2091
1981
  this.errors = errors;
2092
1982
  },
2093
-
1983
+ handleS3BackupChanged(neu) {
1984
+ this.s3Backup = neu;
1985
+ if (neu) {
1986
+ // We need to make sure that s3 doesn't already have an existing value otherwise when editing a cluster with s3 defined this will clear s3.
1987
+ if (isEmpty(this.rkeConfig.etcd?.s3)) {
1988
+ set(this.rkeConfig.etcd, 's3', {});
1989
+ }
1990
+ } else {
1991
+ set(this.rkeConfig.etcd, 's3', null);
1992
+ }
1993
+ },
1994
+ handleConfigEtcdExposeMetricsChanged(neu) {
1995
+ set(this.serverConfig, 'etcd-expose-metrics', neu);
1996
+ },
1997
+ handleRegistryHostChanged(neu) {
1998
+ this.registryHost = neu;
1999
+ },
2000
+ handleRegistrySecretChanged(neu) {
2001
+ this.registrySecret = neu;
2002
+ },
2094
2003
  validateClusterName() {
2095
- if (!this.value.metadata.name && this.agentConfig['cloud-provider-name'] === HARVESTER) {
2004
+ if (!this.value.metadata.name && this.agentConfig?.['cloud-provider-name'] === HARVESTER) {
2096
2005
  this.errors.push(this.t('validation.required', { key: this.t('cluster.name.label') }, true));
2097
2006
  }
2098
2007
  },
2099
-
2100
2008
  async validateMachinePool() {
2101
2009
  if (this.errors) {
2102
2010
  clear(this.errors);
@@ -2110,7 +2018,7 @@ export default {
2110
2018
  }
2111
2019
 
2112
2020
  for (const [index] of this.machinePools.entries()) { // validator machine config
2113
- if ( typeof this.$refs.pool[index]?.test === 'function' ) {
2021
+ if (typeof this.$refs.pool[index]?.test === 'function') {
2114
2022
  try {
2115
2023
  const res = await this.$refs.pool[index].test();
2116
2024
 
@@ -2150,12 +2058,13 @@ export default {
2150
2058
  @done="done"
2151
2059
  @finish="saveOverride"
2152
2060
  @cancel="cancel"
2153
- @error="e=>errors = e"
2061
+ @error="e => errors = e"
2154
2062
  >
2155
2063
  <div class="header-warnings">
2156
2064
  <Banner
2157
2065
  v-if="isEdit"
2158
2066
  color="warning"
2067
+ data-testid="edit-cluster-reprovisioning-documentation"
2159
2068
  >
2160
2069
  <span v-clean-html="t('cluster.banner.rke2-k3-reprovisioning', {}, true)" />
2161
2070
  </Banner>
@@ -2167,11 +2076,14 @@ export default {
2167
2076
  :provider="provider"
2168
2077
  :cancel="cancelCredential"
2169
2078
  :showing-form="showForm"
2079
+ :default-on-cancel="true"
2080
+ data-testid="select-credential"
2170
2081
  class="mt-20"
2171
2082
  />
2172
2083
 
2173
2084
  <div
2174
2085
  v-if="showForm"
2086
+ data-testid="form"
2175
2087
  class="mt-20"
2176
2088
  >
2177
2089
  <NameNsDescription
@@ -2184,8 +2096,18 @@ export default {
2184
2096
  name-placeholder="cluster.name.placeholder"
2185
2097
  description-label="cluster.description.label"
2186
2098
  description-placeholder="cluster.description.placeholder"
2187
- :rules="{name:fvGetAndReportPathRules('metadata.name')}"
2188
- />
2099
+ :rules="{ name: fvGetAndReportPathRules('metadata.name') }"
2100
+ >
2101
+ <template
2102
+ slot="customize"
2103
+ >
2104
+ <ClusterAppearance
2105
+ :name="clusterName"
2106
+ :currentCluster="currentCluster"
2107
+ :mode="mode"
2108
+ />
2109
+ </template>
2110
+ </NameNsDescription>
2189
2111
 
2190
2112
  <Banner
2191
2113
  v-if="appsOSWarning"
@@ -2258,7 +2180,7 @@ export default {
2258
2180
  :pool-id="obj.id"
2259
2181
  :pool-create-mode="obj.create"
2260
2182
  @error="handleMachinePoolError"
2261
- @validationChanged="v=>machinePoolValidationChanged(obj.id, v)"
2183
+ @validationChanged="v => machinePoolValidationChanged(obj.id, v)"
2262
2184
  />
2263
2185
  </Tab>
2264
2186
  </template>
@@ -2279,40 +2201,33 @@ export default {
2279
2201
  name="basic"
2280
2202
  label-key="cluster.tabs.basic"
2281
2203
  :weight="11"
2282
- @active="refreshYamls"
2204
+ @active="refreshComponentWithYamls('tab-Basics')"
2283
2205
  >
2284
2206
  <!-- Basic -->
2285
2207
  <Basics
2208
+ ref="tab-Basics"
2286
2209
  v-model="value"
2287
2210
  :live-value="liveValue"
2288
2211
  :mode="mode"
2289
2212
  :provider="provider"
2290
- :psps="psps"
2291
2213
  :user-chart-values="userChartValues"
2292
2214
  :credential="credential"
2293
2215
  :cis-override="cisOverride"
2294
- :cis-psa-change-banner="cisPsaChangeBanner"
2295
- :all-psps="allPSPs"
2296
2216
  :all-psas="allPSAs"
2297
2217
  :addon-versions="addonVersions"
2298
2218
  :show-deprecated-patch-versions="showDeprecatedPatchVersions"
2299
- :needs-psp="needsPSP"
2300
2219
  :selected-version="selectedVersion"
2301
2220
  :is-harvester-driver="isHarvesterDriver"
2302
2221
  :is-harvester-incompatible="isHarvesterIncompatible"
2303
2222
  :version-options="versionOptions"
2304
- :cluster-is-already-created="clusterIsAlreadyCreated"
2305
2223
  :is-elemental-cluster="isElementalCluster"
2306
- :has-psa-templates="hasPsaTemplates"
2307
- :is-k3s="isK3s"
2308
2224
  :have-arg-info="haveArgInfo"
2309
2225
  :show-cni="showCni"
2310
2226
  :show-cloud-provider="showCloudProvider"
2311
2227
  :cloud-provider-options="cloudProviderOptions"
2312
- @cilium-ipv6-changed="handleCiliumIpv6Changed"
2228
+ @cilium-values-changed="handleCiliumValuesChanged"
2313
2229
  @enabled-system-services-changed="handleEnabledSystemServicesChanged"
2314
2230
  @kubernetes-changed="handleKubernetesChange"
2315
- @psp-changed="handlePspChanged"
2316
2231
  @cis-changed="handleCisChanged"
2317
2232
  @psa-default-changed="handlePsaDefaultChanged"
2318
2233
  @show-deprecated-patch-versions-changed="handleShowDeprecatedPatchVersionsChanged"
@@ -2337,77 +2252,15 @@ export default {
2337
2252
  name="etcd"
2338
2253
  label-key="cluster.tabs.etcd"
2339
2254
  >
2340
- <div class="row">
2341
- <div class="col span-6">
2342
- <RadioGroup
2343
- v-model="rkeConfig.etcd.disableSnapshots"
2344
- name="etcd-disable-snapshots"
2345
- :options="[true, false]"
2346
- :label="t('cluster.rke2.etcd.disableSnapshots.label')"
2347
- :labels="[t('generic.disable'), t('generic.enable')]"
2348
- :mode="mode"
2349
- />
2350
- </div>
2351
- </div>
2352
- <div
2353
- v-if="rkeConfig.etcd.disableSnapshots !== true"
2354
- class="row"
2355
- >
2356
- <div class="col span-6">
2357
- <LabeledInput
2358
- v-model="rkeConfig.etcd.snapshotScheduleCron"
2359
- type="cron"
2360
- placeholder="0 * * * *"
2361
- :mode="mode"
2362
- :label="t('cluster.rke2.etcd.snapshotScheduleCron.label')"
2363
- />
2364
- </div>
2365
- <div class="col span-6">
2366
- <UnitInput
2367
- v-model="rkeConfig.etcd.snapshotRetention"
2368
- :mode="mode"
2369
- :label="t('cluster.rke2.etcd.snapshotRetention.label')"
2370
- :suffix="t('cluster.rke2.snapshots.suffix')"
2371
- />
2372
- </div>
2373
- </div>
2374
-
2375
- <template v-if="rkeConfig.etcd.disableSnapshots !== true">
2376
- <div class="spacer" />
2377
-
2378
- <RadioGroup
2379
- v-model="s3Backup"
2380
- name="etcd-s3"
2381
- :options="[false, true]"
2382
- label="Backup Snapshots to S3"
2383
- :labels="['Disable','Enable']"
2384
- :mode="mode"
2385
- />
2386
-
2387
- <S3Config
2388
- v-if="s3Backup"
2389
- v-model="rkeConfig.etcd.s3"
2390
- :namespace="value.metadata.namespace"
2391
- :register-before-hook="registerBeforeHook"
2392
- :mode="mode"
2393
- />
2394
- </template>
2395
-
2396
- <div class="spacer" />
2397
-
2398
- <div class="row">
2399
- <div class="col span-6">
2400
- <RadioGroup
2401
- v-if="serverArgs['etcd-expose-metrics']"
2402
- v-model="serverConfig['etcd-expose-metrics']"
2403
- name="etcd-expose-metrics"
2404
- :options="[false, true]"
2405
- :label="t('cluster.rke2.etcd.exportMetric.label')"
2406
- :labels="[t('cluster.rke2.etcd.exportMetric.false'), t('cluster.rke2.etcd.exportMetric.true')]"
2407
- :mode="mode"
2408
- />
2409
- </div>
2410
- </div>
2255
+ <Etcd
2256
+ v-model="value"
2257
+ :mode="mode"
2258
+ :s3-backup="s3Backup"
2259
+ :register-before-hook="registerBeforeHook"
2260
+ :selected-version="selectedVersion"
2261
+ @s3-backup-changed="handleS3BackupChanged"
2262
+ @config-etcd-expose-metrics-changed="handleConfigEtcdExposeMetricsChanged"
2263
+ />
2411
2264
  </Tab>
2412
2265
 
2413
2266
  <!-- Networking -->
@@ -2416,120 +2269,12 @@ export default {
2416
2269
  name="networking"
2417
2270
  label-key="cluster.tabs.networking"
2418
2271
  >
2419
- <h3>
2420
- {{ t('cluster.rke2.address.header') }}
2421
- <i
2422
- v-clean-tooltip="t('cluster.rke2.address.tooltip')"
2423
- class="icon icon-info"
2424
- />
2425
- </h3>
2426
- <Banner
2427
- v-if="showIpv6Warning"
2428
- color="warning"
2429
- >
2430
- {{ t('cluster.rke2.address.ipv6.warning') }}
2431
- </Banner>
2432
- <div class="row mb-20">
2433
- <div
2434
- v-if="serverArgs['cluster-cidr']"
2435
- class="col span-6"
2436
- >
2437
- <LabeledInput
2438
- v-model="serverConfig['cluster-cidr']"
2439
- :mode="mode"
2440
- :disabled="clusterIsAlreadyCreated"
2441
- :label="t('cluster.rke2.address.clusterCidr.label')"
2442
- />
2443
- </div>
2444
- <div
2445
- v-if="serverArgs['service-cidr']"
2446
- class="col span-6"
2447
- >
2448
- <LabeledInput
2449
- v-model="serverConfig['service-cidr']"
2450
- :mode="mode"
2451
- :disabled="clusterIsAlreadyCreated"
2452
- :label="t('cluster.rke2.address.serviceCidr.label')"
2453
- />
2454
- </div>
2455
- </div>
2456
-
2457
- <div class="row mb-20">
2458
- <div
2459
- v-if="serverArgs['cluster-dns']"
2460
- class="col span-6"
2461
- >
2462
- <LabeledInput
2463
- v-model="serverConfig['cluster-dns']"
2464
- :mode="mode"
2465
- :disabled="clusterIsAlreadyCreated"
2466
- :label="t('cluster.rke2.address.dns.label')"
2467
- />
2468
- </div>
2469
- <div
2470
- v-if="serverArgs['cluster-domain']"
2471
- class="col span-6"
2472
- >
2473
- <LabeledInput
2474
- v-model="serverConfig['cluster-domain']"
2475
- :mode="mode"
2476
- :disabled="clusterIsAlreadyCreated"
2477
- :label="t('cluster.rke2.address.domain.label')"
2478
- />
2479
- </div>
2480
- </div>
2481
-
2482
- <div
2483
- v-if="serverArgs['service-node-port-range']"
2484
- class="row mb-20"
2485
- >
2486
- <div class="col span-6">
2487
- <LabeledInput
2488
- v-model="serverConfig['service-node-port-range']"
2489
- :mode="mode"
2490
- :label="t('cluster.rke2.address.nodePortRange.label')"
2491
- />
2492
- </div>
2493
- <div
2494
- class="col span-6"
2495
- >
2496
- <Checkbox
2497
- v-if="!isView || isView && !hostnameTruncationManuallySet"
2498
- v-model="truncateHostnames"
2499
- class="mt-20"
2500
- :disabled="isEdit || isView || hostnameTruncationManuallySet"
2501
- :mode="mode"
2502
- :label="t('cluster.rke2.truncateHostnames')"
2503
- @input="truncateName"
2504
- />
2505
- <Banner
2506
- v-if="hostnameTruncationManuallySet"
2507
- color="info"
2508
- >
2509
- <div class="text">
2510
- {{ t('cluster.machinePool.truncationCluster', { limit: truncateLimit }) }}
2511
- </div>
2512
- </Banner>
2513
- </div>
2514
- </div>
2515
-
2516
- <div
2517
- v-if="serverArgs['tls-san']"
2518
- class="row mb-20"
2519
- >
2520
- <div class="col span-6">
2521
- <ArrayList
2522
- v-model="serverConfig['tls-san']"
2523
- :protip="false"
2524
- :mode="mode"
2525
- :title="t('cluster.rke2.address.tlsSan.label')"
2526
- />
2527
- </div>
2528
- </div>
2529
-
2530
- <ACE
2272
+ <Networking
2531
2273
  v-model="value"
2532
2274
  :mode="mode"
2275
+ :selected-version="selectedVersion"
2276
+ :truncate-limit="truncateLimit"
2277
+ @truncate-hostname="truncateHostname"
2533
2278
  />
2534
2279
  </Tab>
2535
2280
 
@@ -2538,44 +2283,10 @@ export default {
2538
2283
  name="upgrade"
2539
2284
  label-key="cluster.tabs.upgrade"
2540
2285
  >
2541
- <Banner
2542
- v-if="get(rkeConfig, 'upgradeStrategy.controlPlaneDrainOptions.deleteEmptyDirData')"
2543
- color="warning"
2544
- >
2545
- {{ t('cluster.rke2.drain.deleteEmptyDir.warning', {}, true) }}
2546
- </Banner>
2547
- <div class="row">
2548
- <div class="col span-6">
2549
- <h3>{{ t('cluster.rke2.controlPlaneConcurrency.header') }}</h3>
2550
- <LabeledInput
2551
- v-model="rkeConfig.upgradeStrategy.controlPlaneConcurrency"
2552
- :mode="mode"
2553
- :label="t('cluster.rke2.controlPlaneConcurrency.label')"
2554
- :tooltip="t('cluster.rke2.controlPlaneConcurrency.toolTip')"
2555
- />
2556
- <div class="spacer" />
2557
- <DrainOptions
2558
- v-model="rkeConfig.upgradeStrategy.controlPlaneDrainOptions"
2559
- :mode="mode"
2560
- />
2561
- </div>
2562
- <div class="col span-6">
2563
- <h3>
2564
- {{ t('cluster.rke2.workNode.label') }}
2565
- </h3>
2566
- <LabeledInput
2567
- v-model="rkeConfig.upgradeStrategy.workerConcurrency"
2568
- :mode="mode"
2569
- :label="t('cluster.rke2.workerConcurrency.label')"
2570
- :tooltip="t('cluster.rke2.workerConcurrency.toolTip')"
2571
- />
2572
- <div class="spacer" />
2573
- <DrainOptions
2574
- v-model="rkeConfig.upgradeStrategy.workerDrainOptions"
2575
- :mode="mode"
2576
- />
2577
- </div>
2578
- </div>
2286
+ <Upgrade
2287
+ v-model="value"
2288
+ :mode="mode"
2289
+ />
2579
2290
  </Tab>
2580
2291
 
2581
2292
  <!-- Registries -->
@@ -2583,150 +2294,40 @@ export default {
2583
2294
  name="registry"
2584
2295
  label-key="cluster.tabs.registry"
2585
2296
  >
2586
- <div class="row">
2587
- <h3>{{ t('cluster.privateRegistry.label') }}</h3>
2588
- </div>
2589
- <div class="row">
2590
- <div class="col span-12">
2591
- <Banner
2592
- :closable="false"
2593
- class="cluster-tools-tip"
2594
- color="info"
2595
- label-key="cluster.privateRegistry.description"
2596
- />
2597
- </div>
2598
- </div>
2599
- <div class="row">
2600
- <Checkbox
2601
- v-model="showCustomRegistryInput"
2602
- class="mb-20"
2603
- :label="t('cluster.privateRegistry.label')"
2604
- data-testid="registries-enable-checkbox"
2605
- @input="toggleCustomRegistry"
2606
- />
2607
- </div>
2608
- <div
2609
- v-if="showCustomRegistryInput"
2610
- class="row"
2611
- >
2612
- <div class="col span-6">
2613
- <LabeledInput
2614
- v-model="registryHost"
2615
- label-key="catalog.chart.registry.custom.inputLabel"
2616
- placeholder-key="catalog.chart.registry.custom.placeholder"
2617
- data-testid="registry-host-input"
2618
- :min-height="30"
2619
- />
2620
- <SelectOrCreateAuthSecret
2621
- v-model="registrySecret"
2622
- :register-before-hook="registerBeforeHook"
2623
- :hook-priority="1"
2624
- :mode="mode"
2625
- in-store="management"
2626
- :allow-ssh="false"
2627
- :allow-rke="true"
2628
- :vertical="true"
2629
- :namespace="value.metadata.namespace"
2630
- generate-name="registryconfig-auth-"
2631
- />
2632
- </div>
2633
- </div>
2634
- <template>
2635
- <div
2636
- v-if="showCustomRegistryInput"
2637
- class="row"
2638
- >
2639
- <AdvancedSection
2640
- class="col span-12 advanced"
2641
- :is-open-by-default="showCustomRegistryAdvancedInput"
2642
- :mode="mode"
2643
- data-testid="registries-advanced-section"
2644
- >
2645
- <Banner
2646
- :closable="false"
2647
- class="cluster-tools-tip"
2648
- color="info"
2649
- :label-key="isK3s ? 'cluster.privateRegistry.docsLinkK3s' : 'cluster.privateRegistry.docsLinkRke2'"
2650
- />
2651
- <RegistryMirrors
2652
- v-model="value"
2653
- class="mt-20"
2654
- :mode="mode"
2655
- />
2656
- <RegistryConfigs
2657
- v-model="value"
2658
- class="mt-20"
2659
- :mode="mode"
2660
- :cluster-register-before-hook="registerBeforeHook"
2661
- @updateConfigs="updateConfigs"
2662
- />
2663
- </AdvancedSection>
2664
- </div>
2665
- </template>
2297
+ <Registries
2298
+ v-model="value"
2299
+ :mode="mode"
2300
+ :register-before-hook="registerBeforeHook"
2301
+ :show-custom-registry-input="showCustomRegistryInput"
2302
+ :registry-host="registryHost"
2303
+ :registry-secret="registrySecret"
2304
+ :show-custom-registry-advanced-input="showCustomRegistryAdvancedInput"
2305
+ @update-configs-changed="updateConfigs"
2306
+ @custom-registry-changed="toggleCustomRegistry"
2307
+ @registry-host-changed="handleRegistryHostChanged"
2308
+ @registry-secret-changed="handleRegistrySecretChanged"
2309
+ />
2666
2310
  </Tab>
2667
2311
 
2668
2312
  <!-- Add-on Config -->
2669
2313
  <Tab
2670
2314
  name="addons"
2671
2315
  label-key="cluster.tabs.addons"
2672
- @active="showAddons"
2316
+ @active="showAddons('tab-addOnConfig')"
2673
2317
  >
2674
- <Banner
2675
- v-if="isEdit"
2676
- color="warning"
2677
- >
2678
- {{ t('cluster.addOns.dependencyBanner') }}
2679
- </Banner>
2680
- <div
2681
- v-if="versionInfo && addonVersions.length"
2682
- :key="addonsRev"
2683
- >
2684
- <div
2685
- v-for="v in addonVersions"
2686
- :key="v._key"
2687
- >
2688
- <h3>{{ labelForAddon(v.name) }}</h3>
2689
- <Questions
2690
- v-if="versionInfo[v.name] && versionInfo[v.name].questions && v.name && userChartValuesTemp[v.name]"
2691
- v-model="userChartValuesTemp[v.name]"
2692
- :emit="true"
2693
- in-store="management"
2694
- :mode="mode"
2695
- :tabbed="false"
2696
- :source="versionInfo[v.name]"
2697
- :target-namespace="value.metadata.namespace"
2698
- @updated="updateQuestions(v.name)"
2699
- />
2700
- <YamlEditor
2701
- v-else
2702
- ref="yaml-values"
2703
- :value="initYamlEditor(v.name)"
2704
- :scrolling="true"
2705
- :as-object="true"
2706
- :editor-mode="mode === 'view' ? 'VIEW_CODE' : 'EDIT_CODE'"
2707
- :hide-preview-buttons="true"
2708
- @input="data => updateValues(v.name, data)"
2709
- />
2710
- <div class="spacer" />
2711
- </div>
2712
- </div>
2713
-
2714
- <div>
2715
- <h3>
2716
- {{ t('cluster.addOns.additionalManifest.title') }}
2717
- <i
2718
- v-clean-tooltip="t('cluster.addOns.additionalManifest.tooltip')"
2719
- class="icon icon-info"
2720
- />
2721
- </h3>
2722
- <YamlEditor
2723
- ref="yaml-additional"
2724
- v-model="rkeConfig.additionalManifest"
2725
- :editor-mode="mode === 'view' ? 'VIEW_CODE' : 'EDIT_CODE'"
2726
- initial-yaml-values="# Additional Manifest YAML"
2727
- class="yaml-editor"
2728
- />
2729
- </div>
2318
+ <AddOnConfig
2319
+ ref="tab-addOnConfig"
2320
+ v-model="value"
2321
+ :mode="mode"
2322
+ :version-info="versionInfo"
2323
+ :addon-versions="addonVersions"
2324
+ :addons-rev="addonsRev"
2325
+ :user-chart-values-temp="userChartValuesTemp"
2326
+ :init-yaml-editor="initYamlEditor"
2327
+ @update-questions="syncChartValues"
2328
+ @update-values="updateValues"
2329
+ @additional-manifest-changed="updateAdditionalManifest"
2330
+ />
2730
2331
  </Tab>
2731
2332
 
2732
2333
  <!-- Cluster Agent Configuration -->
@@ -2763,82 +2364,13 @@ export default {
2763
2364
  name="advanced"
2764
2365
  label-key="cluster.tabs.advanced"
2765
2366
  :weight="-1"
2766
- @active="refreshYamls"
2767
2367
  >
2768
- <template v-if="haveArgInfo">
2769
- <h3>{{ t('cluster.advanced.argInfo.title') }}</h3>
2770
- <ArrayListGrouped
2771
- v-if="agentArgs['kubelet-arg']"
2772
- v-model="rkeConfig.machineSelectorConfig"
2773
- class="mb-20"
2774
- :add-label="t('cluster.advanced.argInfo.machineSelector.label')"
2775
- :can-remove="canRemoveKubeletRow"
2776
- :default-add-value="{machineLabelSelector: { matchExpressions: [], matchLabels: {} }, config: {'kubelet-arg': []}}"
2777
- >
2778
- <template #default="{row}">
2779
- <template v-if="row.value.machineLabelSelector">
2780
- <h3>{{ t('cluster.advanced.argInfo.machineSelector.title') }}</h3>
2781
- <MatchExpressions
2782
- v-model="row.value.machineLabelSelector"
2783
- class="mb-20"
2784
- :mode="mode"
2785
- :show-remove="false"
2786
- :initial-empty-row="true"
2787
- />
2788
- <h3>{{ t('cluster.advanced.argInfo.machineSelector.subTitle') }}</h3>
2789
- </template>
2790
- <h3 v-else>
2791
- {{ advancedTitleAlt }}
2792
- </h3>
2793
-
2794
- <ArrayList
2795
- v-model="row.value.config['kubelet-arg']"
2796
- :mode="mode"
2797
- :add-label="t('cluster.advanced.argInfo.machineSelector.listLabel')"
2798
- :initial-empty-row="!!row.value.machineLabelSelector"
2799
- />
2800
- </template>
2801
- </ArrayListGrouped>
2802
- <Banner
2803
- v-if="rkeConfig.machineSelectorConfig.length > 1"
2804
- color="info"
2805
- :label="t('cluster.advanced.argInfo.machineSelector.bannerLabel')"
2806
- />
2807
-
2808
- <ArrayList
2809
- v-if="serverArgs['kube-controller-manager-arg']"
2810
- v-model="serverConfig['kube-controller-manager-arg']"
2811
- :mode="mode"
2812
- :title="t('cluster.advanced.argInfo.machineSelector.kubeControllerManagerTitle')"
2813
- class="mb-20"
2814
- />
2815
- <ArrayList
2816
- v-if="serverArgs['kube-apiserver-arg']"
2817
- v-model="serverConfig['kube-apiserver-arg']"
2818
- :mode="mode"
2819
- :title="t('cluster.advanced.argInfo.machineSelector.kubeApiServerTitle')"
2820
- class="mb-20"
2821
- />
2822
- <ArrayList
2823
- v-if="serverArgs['kube-scheduler-arg']"
2824
- v-model="serverConfig['kube-scheduler-arg']"
2825
- :mode="mode"
2826
- :title="t('cluster.advanced.argInfo.machineSelector.kubeSchedulerTitle')"
2827
- />
2828
- </template>
2829
- <template v-if="agentArgs['protect-kernel-defaults']">
2830
- <div class="spacer" />
2831
-
2832
- <div class="row">
2833
- <div class="col span-12">
2834
- <Checkbox
2835
- v-model="agentConfig['protect-kernel-defaults']"
2836
- :mode="mode"
2837
- :label="t('cluster.advanced.agentArgs.label')"
2838
- />
2839
- </div>
2840
- </div>
2841
- </template>
2368
+ <Advanced
2369
+ v-model="value"
2370
+ :mode="mode"
2371
+ :have-arg-info="haveArgInfo"
2372
+ :selected-version="selectedVersion"
2373
+ />
2842
2374
  </Tab>
2843
2375
 
2844
2376
  <AgentEnv
@@ -2888,13 +2420,15 @@ export default {
2888
2420
  </template>
2889
2421
 
2890
2422
  <style lang="scss" scoped>
2891
- .min-height {
2892
- min-height: 40em;
2893
- }
2894
- .patch-version {
2895
- margin-top: 5px;
2896
- }
2897
- .header-warnings .banner {
2898
- margin-bottom: 0;
2899
- }
2423
+ .min-height {
2424
+ min-height: 40em;
2425
+ }
2426
+
2427
+ .patch-version {
2428
+ margin-top: 5px;
2429
+ }
2430
+
2431
+ .header-warnings .banner {
2432
+ margin-bottom: 0;
2433
+ }
2900
2434
  </style>