@rancher/shell 0.5.2 → 1.2.0

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 (338) hide show
  1. package/.DS_Store +0 -0
  2. package/assets/images/providers/aks-black.svg +28 -0
  3. package/assets/images/providers/aks.svg +31 -0
  4. package/assets/styles/global/_labeled-input.scss +1 -0
  5. package/assets/styles/global/_layout.scss +0 -99
  6. package/assets/translations/en-us.yaml +77 -71
  7. package/assets/translations/zh-hans.yaml +25 -23
  8. package/babel.config.js +1 -7
  9. package/chart/gatekeeper.vue +11 -2
  10. package/chart/istio.vue +10 -1
  11. package/chart/logging/index.vue +11 -2
  12. package/chart/monitoring/alerting/index.vue +21 -7
  13. package/chart/monitoring/grafana/index.vue +2 -57
  14. package/chart/monitoring/index.vue +26 -52
  15. package/chart/monitoring/prometheus/index.vue +43 -37
  16. package/chart/rancher-backup/index.vue +10 -3
  17. package/cloud-credential/azure.vue +17 -4
  18. package/components/AsyncButton.vue +0 -9
  19. package/components/Carousel.vue +0 -1
  20. package/components/ChartPsp.vue +76 -0
  21. package/components/CodeMirror.vue +21 -19
  22. package/components/CopyCode.vue +2 -6
  23. package/components/CopyToClipboard.vue +1 -2
  24. package/components/CopyToClipboardText.vue +9 -14
  25. package/components/CruResource.vue +0 -1
  26. package/components/EtcdInfoBanner.vue +5 -5
  27. package/components/ExplorerProjectsNamespaces.vue +1 -25
  28. package/components/IconOrSvg.vue +1 -1
  29. package/components/Markdown.vue +12 -16
  30. package/components/Questions/index.vue +1 -1
  31. package/components/ResourceDetail/Masthead.vue +9 -25
  32. package/components/ResourceList/Masthead.vue +18 -1
  33. package/components/ResourceTable.vue +2 -14
  34. package/components/ResourceYaml.vue +0 -5
  35. package/components/SideNav.vue +1 -1
  36. package/components/SortableTable/THead.vue +9 -7
  37. package/components/SortableTable/index.vue +3 -2
  38. package/components/StatusTable.vue +1 -5
  39. package/components/TabTitle.vue +84 -0
  40. package/components/Tabbed/index.vue +0 -12
  41. package/components/__tests__/ChartPsp.test.ts +75 -0
  42. package/components/__tests__/CopyCode.test.ts +4 -5
  43. package/components/fleet/FleetBundles.vue +11 -5
  44. package/components/fleet/FleetRepos.vue +27 -62
  45. package/components/fleet/FleetResources.vue +1 -6
  46. package/components/fleet/FleetStatus.vue +3 -3
  47. package/components/fleet/FleetSummary.vue +30 -35
  48. package/components/form/ArrayList.vue +8 -1
  49. package/components/form/ArrayListSelect.vue +9 -9
  50. package/components/form/KeyValue.vue +0 -1
  51. package/components/form/LabeledSelect.vue +0 -4
  52. package/components/form/Password.vue +1 -3
  53. package/components/form/Select.vue +1 -1
  54. package/components/form/SelectOrCreateAuthSecret.vue +4 -4
  55. package/components/form/__tests__/KeyValue.test.ts +1 -1
  56. package/components/formatter/Checked.vue +3 -11
  57. package/components/formatter/ClusterProvider.vue +18 -1
  58. package/components/formatter/FleetSummaryGraph.vue +11 -23
  59. package/components/formatter/LiveDate.vue +16 -0
  60. package/components/formatter/LiveDuration.vue +1 -1
  61. package/components/formatter/PercentageBar.vue +1 -1
  62. package/components/formatter/__tests__/ClusterProvider.test.ts +28 -0
  63. package/components/nav/Group.vue +2 -2
  64. package/components/nav/Header.vue +2 -1
  65. package/components/nav/TopLevelMenu.vue +3 -29
  66. package/components/nav/Type.vue +3 -1
  67. package/components/nav/WindowManager/ContainerLogs.vue +19 -120
  68. package/components/nav/WindowManager/ContainerShell.vue +1 -6
  69. package/components/nav/WindowManager/index.vue +10 -11
  70. package/components/nav/__tests__/TopLevelMenu.test.ts +0 -33
  71. package/components/nav/__tests__/Type.test.ts +1 -1
  72. package/components/nuxt/nuxt-child.js +78 -14
  73. package/components/nuxt/nuxt.js +1 -1
  74. package/components/user.retention/user-retention-header.vue +34 -0
  75. package/composables/useI18n.ts +26 -0
  76. package/composables/useStore.ts +16 -0
  77. package/config/harvester-manager-types.js +0 -2
  78. package/config/home-links.js +32 -2
  79. package/config/private-label.js +0 -22
  80. package/config/product/explorer.js +4 -4
  81. package/config/product/fleet.js +1 -6
  82. package/config/product/legacy.js +1 -84
  83. package/config/product/manager.js +15 -8
  84. package/config/query-params.js +0 -1
  85. package/config/router.js +368 -385
  86. package/config/settings.ts +9 -2
  87. package/config/store.js +1 -1
  88. package/config/system-namespaces.js +0 -3
  89. package/config/table-headers.js +27 -47
  90. package/config/types.js +5 -0
  91. package/config/uiplugins.js +1 -1
  92. package/core/plugin-helpers.js +5 -3
  93. package/core/plugin-routes.ts +114 -56
  94. package/core/plugin.ts +10 -16
  95. package/core/plugins-loader.js +9 -7
  96. package/core/plugins.js +3 -0
  97. package/core/types-provisioning.ts +0 -7
  98. package/creators/app/init +0 -19
  99. package/detail/fleet.cattle.io.cluster.vue +1 -11
  100. package/detail/node.vue +0 -42
  101. package/detail/pod.vue +1 -68
  102. package/detail/provisioning.cattle.io.cluster.vue +4 -6
  103. package/detail/workload/index.vue +1 -15
  104. package/dialog/ScaleMachineDownDialog.vue +17 -34
  105. package/edit/auth/googleoauth.vue +5 -1
  106. package/edit/catalog.cattle.io.clusterrepo.vue +7 -20
  107. package/edit/cloudcredential.vue +0 -2
  108. package/edit/fleet.cattle.io.gitrepo.vue +4 -3
  109. package/edit/management.cattle.io.project.vue +52 -1
  110. package/edit/management.cattle.io.setting.vue +2 -31
  111. package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +3 -12
  112. package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +1 -2
  113. package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.spec.ts +1 -1
  114. package/edit/provisioning.cattle.io.cluster/{tabs/Basics.vue → Basics.vue} +126 -109
  115. package/edit/provisioning.cattle.io.cluster/{tabs/MachinePool.vue → MachinePool.vue} +7 -1
  116. package/edit/provisioning.cattle.io.cluster/{tabs/registries/RegistryConfigs.vue → RegistryConfigs.vue} +3 -1
  117. package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +7 -15
  118. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts +237 -0
  119. package/edit/provisioning.cattle.io.cluster/__tests__/{CustomCommand.test.ts → CustomCommand.tests.ts} +0 -6
  120. package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +1 -1
  121. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +1 -7
  122. package/edit/provisioning.cattle.io.cluster/import.vue +2 -2
  123. package/edit/provisioning.cattle.io.cluster/index.vue +37 -99
  124. package/edit/provisioning.cattle.io.cluster/rke2.vue +690 -181
  125. package/edit/service.vue +0 -12
  126. package/edit/workload/Upgrading.vue +2 -3
  127. package/edit/workload/index.vue +1 -2
  128. package/edit/workload/mixins/workload.js +1 -1
  129. package/initialize/App.js +71 -25
  130. package/initialize/client.js +162 -21
  131. package/initialize/index.js +124 -47
  132. package/initialize/layouts.ts +26 -0
  133. package/{components/templates → layouts}/blank.vue +1 -1
  134. package/{components/templates → layouts}/default.vue +98 -8
  135. package/{components/templates → layouts}/error.vue +19 -10
  136. package/{components/templates → layouts}/home.vue +1 -4
  137. package/{components/templates → layouts}/plain.vue +1 -4
  138. package/{components/templates → layouts}/standalone.vue +1 -1
  139. package/{components/templates → layouts}/unauthenticated.vue +1 -1
  140. package/list/management.cattle.io.feature.vue +7 -1
  141. package/list/management.cattle.io.user.vue +25 -1
  142. package/list/node.vue +0 -1
  143. package/machine-config/__tests__/vmwarevsphere.test.ts +161 -56
  144. package/machine-config/amazonec2.vue +1 -0
  145. package/machine-config/azure.vue +37 -21
  146. package/machine-config/vmwarevsphere.vue +47 -42
  147. package/middleware/authenticated.js +19 -14
  148. package/mixins/auth-config.js +7 -2
  149. package/mixins/brand.js +41 -29
  150. package/mixins/fetch.server.js +73 -0
  151. package/mixins/labeled-form-element.ts +1 -6
  152. package/models/__tests__/management.cattle.io.node.ts +0 -85
  153. package/models/__tests__/namespace.test.ts +9 -49
  154. package/models/cluster/node.js +4 -4
  155. package/models/cluster.x-k8s.io.machine.js +1 -1
  156. package/models/cluster.x-k8s.io.machinedeployment.js +0 -14
  157. package/models/fleet.cattle.io.cluster.js +0 -4
  158. package/models/fleet.cattle.io.gitrepo.js +13 -56
  159. package/models/management.cattle.io.cluster.js +3 -11
  160. package/models/management.cattle.io.kontainerdriver.js +0 -1
  161. package/models/management.cattle.io.node.js +14 -18
  162. package/models/management.cattle.io.nodepool.js +0 -17
  163. package/models/management.cattle.io.project.js +36 -0
  164. package/models/management.cattle.io.setting.js +7 -11
  165. package/models/management.cattle.io.user.js +65 -0
  166. package/models/namespace.js +1 -1
  167. package/models/pod.js +0 -20
  168. package/models/provisioning.cattle.io.cluster.js +8 -55
  169. package/models/secret.js +18 -117
  170. package/models/workload.js +0 -16
  171. package/models/workload.service.js +0 -18
  172. package/package.json +10 -12
  173. package/pages/about.vue +1 -0
  174. package/pages/account/create-key.vue +1 -0
  175. package/pages/account/index.vue +1 -0
  176. package/pages/auth/login.vue +1 -0
  177. package/pages/auth/logout.vue +2 -0
  178. package/pages/auth/setup.vue +4 -37
  179. package/pages/auth/verify.vue +8 -14
  180. package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +17 -2
  181. package/pages/c/_cluster/apps/charts/index.vue +58 -64
  182. package/pages/c/_cluster/apps/charts/install.helpers.js +13 -2
  183. package/pages/c/_cluster/apps/charts/install.vue +5 -5
  184. package/pages/c/_cluster/apps/index.vue +2 -0
  185. package/pages/c/_cluster/auth/index.vue +2 -0
  186. package/pages/c/_cluster/auth/user.retention/index.vue +384 -0
  187. package/pages/c/_cluster/ecm/index.vue +2 -0
  188. package/pages/c/_cluster/explorer/index.vue +53 -56
  189. package/pages/c/_cluster/explorer/tools/index.vue +3 -171
  190. package/pages/c/_cluster/fleet/index.vue +1 -1
  191. package/pages/c/_cluster/index.vue +2 -0
  192. package/pages/c/_cluster/manager/pages/_page.vue +5 -4
  193. package/pages/c/_cluster/monitoring/index.vue +1 -17
  194. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +1 -0
  195. package/pages/c/_cluster/settings/banners.vue +2 -0
  196. package/pages/c/_cluster/settings/brand.vue +2 -0
  197. package/pages/c/_cluster/settings/index.vue +2 -0
  198. package/pages/c/_cluster/settings/links.vue +3 -2
  199. package/pages/c/_cluster/settings/performance.vue +1 -0
  200. package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +4 -4
  201. package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +1 -2
  202. package/pages/c/_cluster/uiplugins/CatalogList/index.vue +46 -10
  203. package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +5 -2
  204. package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +96 -0
  205. package/pages/c/_cluster/uiplugins/__tests__/SetupUIPlugins.test.ts +128 -0
  206. package/pages/c/_cluster/uiplugins/index.vue +2 -0
  207. package/pages/c/index.vue +9 -0
  208. package/pages/diagnostic.vue +2 -1
  209. package/pages/fail-whale.vue +1 -0
  210. package/pages/prefs.vue +1 -0
  211. package/pages/rio/mesh.vue +508 -0
  212. package/pages/support/index.vue +8 -2
  213. package/pkg/auto-import.js +1 -1
  214. package/plugins/axios.js +36 -0
  215. package/plugins/back-button.js +5 -3
  216. package/plugins/clean-html-directive.js +19 -1
  217. package/plugins/clean-tooltip-directive.js +1 -1
  218. package/plugins/codemirror-loader.js +1 -1
  219. package/plugins/codemirror.js +0 -41
  220. package/plugins/dashboard-store/__tests__/actions.spec.ts +250 -0
  221. package/plugins/dashboard-store/__tests__/{mutations.test.ts → mutations.spec.ts} +1 -1
  222. package/plugins/dashboard-store/actions.js +21 -22
  223. package/plugins/dashboard-store/classify.js +18 -1
  224. package/plugins/dashboard-store/getters.js +5 -10
  225. package/plugins/dashboard-store/index.js +12 -0
  226. package/plugins/dashboard-store/mutations.js +4 -0
  227. package/plugins/dashboard-store/resource-class.js +18 -59
  228. package/plugins/i18n.js +1 -1
  229. package/plugins/steve/__tests__/getters.spec.ts +56 -24
  230. package/plugins/steve/__tests__/subscribe.spec.ts +106 -0
  231. package/plugins/steve/getters.js +30 -7
  232. package/plugins/steve/mutations.js +5 -2
  233. package/plugins/steve/norman-class.js +0 -19
  234. package/plugins/steve/steve-class.js +0 -22
  235. package/plugins/steve/subscribe.js +34 -13
  236. package/plugins/transitions.js +4 -0
  237. package/plugins/vue-clipboard2.js +4 -0
  238. package/rancher-components/Accordion/Accordion.vue +3 -2
  239. package/rancher-components/BadgeState/BadgeState.vue +3 -3
  240. package/rancher-components/Banner/Banner.test.ts +1 -5
  241. package/rancher-components/Banner/Banner.vue +2 -2
  242. package/rancher-components/Card/Card.vue +4 -4
  243. package/rancher-components/Form/Checkbox/Checkbox.vue +4 -3
  244. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +1 -1
  245. package/rancher-components/Form/LabeledInput/LabeledInput.vue +55 -24
  246. package/rancher-components/Form/Radio/RadioButton.test.ts +1 -3
  247. package/rancher-components/Form/Radio/RadioButton.vue +13 -7
  248. package/rancher-components/Form/Radio/RadioGroup.vue +4 -3
  249. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +7 -5
  250. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +7 -4
  251. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +9 -4
  252. package/rancher-components/StringList/StringList.vue +8 -8
  253. package/rancher-components/components/Accordion/Accordion.vue +3 -2
  254. package/rancher-components/components/BadgeState/BadgeState.test.ts +12 -0
  255. package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +2 -19
  256. package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +14 -11
  257. package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +1 -1
  258. package/rancher-components/components/StringList/StringList.test.ts +0 -270
  259. package/rancher-components/components/StringList/StringList.vue +18 -57
  260. package/scripts/extension/bundle +7 -19
  261. package/scripts/extension/helm/scripts/package +3 -11
  262. package/scripts/extension/parse-tag-name +4 -4
  263. package/scripts/extension/publish +9 -20
  264. package/scripts/publish-shell.sh +1 -11
  265. package/scripts/test-plugins-build.sh +9 -85
  266. package/store/catalog.js +1 -1
  267. package/store/features.js +0 -1
  268. package/store/i18n.js +0 -11
  269. package/store/index.js +11 -8
  270. package/store/prefs.js +38 -33
  271. package/store/type-map.js +8 -13
  272. package/tsconfig.default.json +46 -0
  273. package/tsconfig.json +9 -35
  274. package/types/shell/index.d.ts +404 -463
  275. package/utils/__tests__/create-yaml.test.ts +10 -0
  276. package/utils/axios.js +19 -0
  277. package/utils/create-yaml.js +6 -6
  278. package/utils/custom-validators.js +2 -0
  279. package/utils/error.js +1 -16
  280. package/utils/monitoring.js +2 -37
  281. package/utils/nuxt.js +39 -18
  282. package/utils/object.js +0 -14
  283. package/utils/router.scrollBehavior.js +14 -12
  284. package/utils/socket.js +1 -0
  285. package/utils/time.js +1 -1
  286. package/utils/title.ts +3 -0
  287. package/utils/url.ts +1 -1
  288. package/utils/validators/formRules/__tests__/index.test.ts +4 -49
  289. package/utils/validators/formRules/index.ts +9 -12
  290. package/utils/validators/setting.js +10 -6
  291. package/vue.config.js +3 -24
  292. package/chart/monitoring/steps/uninstall-v1.vue +0 -135
  293. package/components/Certificates.vue +0 -164
  294. package/components/fleet/__tests__/FleetSummary.test.ts +0 -316
  295. package/components/formatter/FleetClusterSummaryGraph.vue +0 -27
  296. package/components/formatter/__tests__/Checked.test.ts +0 -19
  297. package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +0 -186
  298. package/composables/useCompactInput.ts +0 -20
  299. package/composables/useLabeledFormElement.ts +0 -138
  300. package/creators/app/files/.gitlab-ci.yml +0 -14
  301. package/edit/__tests__/service.test.ts +0 -89
  302. package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +0 -112
  303. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +0 -473
  304. package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +0 -73
  305. package/edit/provisioning.cattle.io.cluster/__tests__/utils/cluster.ts +0 -386
  306. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +0 -137
  307. package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +0 -157
  308. package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +0 -135
  309. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +0 -189
  310. package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +0 -144
  311. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +0 -76
  312. package/mixins/v1-workload-metrics.js +0 -43
  313. package/models/__tests__/management.cattle.io.cluster.test.ts +0 -23
  314. package/models/__tests__/management.cattle.io.nodepool.ts +0 -83
  315. package/models/__tests__/provisioning.cattle.io.cluster.test.ts +0 -90
  316. package/models/__tests__/workload.test.ts +0 -91
  317. package/plugins/clean-html.js +0 -53
  318. package/plugins/dashboard-store/__tests__/actions.test.ts +0 -165
  319. package/plugins/dashboard-store/__tests__/resource-class.test.ts +0 -49
  320. package/plugins/dashboard-store/__tests__/utils/store-mocks.ts +0 -7
  321. package/plugins/index.js +0 -11
  322. package/plugins/steve/__tests__/steve-class.spec.ts +0 -59
  323. package/plugins/steve/__tests__/utils/steve-mocks.ts +0 -31
  324. package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +0 -50
  325. package/server/har-file.js +0 -183
  326. package/tsconfig.paths.json +0 -18
  327. package/utils/azure.js +0 -24
  328. package/utils/clipboard.js +0 -5
  329. /package/components/form/__tests__/{NameNsDescription.test.ts → NameNsDescription.ts} +0 -0
  330. /package/edit/networking.k8s.io.networkpolicy/__tests__/utils/{selectors.test.ts → selectors.ts} +0 -0
  331. /package/edit/provisioning.cattle.io.cluster/{tabs/networking/ACE.vue → ACE.vue} +0 -0
  332. /package/edit/provisioning.cattle.io.cluster/{tabs/AgentConfiguration.vue → AgentConfiguration.vue} +0 -0
  333. /package/edit/provisioning.cattle.io.cluster/{tabs/upgrade/DrainOptions.vue → DrainOptions.vue} +0 -0
  334. /package/edit/provisioning.cattle.io.cluster/{tabs/MemberRoles.vue → MemberRoles.vue} +0 -0
  335. /package/edit/provisioning.cattle.io.cluster/{tabs/registries/RegistryMirrors.vue → RegistryMirrors.vue} +0 -0
  336. /package/edit/provisioning.cattle.io.cluster/{tabs/etcd/S3Config.vue → S3Config.vue} +0 -0
  337. /package/plugins/dashboard-store/__tests__/{getters.test.ts → getters.spec.ts} +0 -0
  338. /package/rancher-components/BadgeState/{BadgeState.spec.ts → BadgeState.test.ts} +0 -0
@@ -16,6 +16,7 @@ import {
16
16
  DEFAULT_WORKSPACE,
17
17
  SECRET,
18
18
  HCI,
19
+ PSPS,
19
20
  } from '@shell/config/types';
20
21
  import { _CREATE, _EDIT, _VIEW } from '@shell/config/query-params';
21
22
 
@@ -27,42 +28,56 @@ import {
27
28
  import { allHash } from '@shell/utils/promise';
28
29
  import { sortBy } from '@shell/utils/sort';
29
30
 
31
+ import { camelToTitle } from '@shell/utils/string';
30
32
  import { compare, sortable } from '@shell/utils/version';
31
33
  import { isHarvesterSatisfiesVersion } from '@shell/utils/cluster';
34
+ import * as VERSION from '@shell/utils/version';
32
35
 
36
+ import ArrayList from '@shell/components/form/ArrayList';
37
+ import ArrayListGrouped from '@shell/components/form/ArrayListGrouped';
33
38
  import { BadgeState } from '@components/BadgeState';
34
39
  import { Banner } from '@components/Banner';
40
+ import { Checkbox } from '@components/Form/Checkbox';
35
41
  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';
36
44
  import Loading from '@shell/components/Loading';
45
+ import MatchExpressions from '@shell/components/form/MatchExpressions';
37
46
  import NameNsDescription from '@shell/components/form/NameNsDescription';
47
+ import { RadioGroup } from '@components/Form/Radio';
38
48
  import Tab from '@shell/components/Tabbed/Tab';
39
49
  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';
40
53
 
41
54
  import { canViewClusterMembershipEditor } from '@shell/components/form/Members/ClusterMembershipEditor';
55
+ import SelectOrCreateAuthSecret from '@shell/components/form/SelectOrCreateAuthSecret';
42
56
  import semver from 'semver';
43
57
 
44
58
  import { SETTING } from '@shell/config/settings';
45
59
  import { base64Encode } from '@shell/utils/crypto';
46
60
  import { CAPI as CAPI_ANNOTATIONS } from '@shell/config/labels-annotations';
47
- import AgentEnv from '@shell/edit/provisioning.cattle.io.cluster/AgentEnv';
48
- import Labels from '@shell/edit/provisioning.cattle.io.cluster/Labels';
49
- import MachinePool from '@shell/edit/provisioning.cattle.io.cluster/tabs/MachinePool';
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';
50
69
  import SelectCredential from './SelectCredential';
70
+ import AdvancedSection from '@shell/components/AdvancedSection.vue';
51
71
  import { ELEMENTAL_SCHEMA_IDS, KIND, ELEMENTAL_CLUSTER_PROVIDER } from '../../config/elemental-types';
52
- import AgentConfiguration from '@shell/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration';
72
+ import AgentConfiguration from './AgentConfiguration';
53
73
  import { getApplicableExtensionEnhancements } from '@shell/core/plugin-helpers';
54
74
  import { ExtensionPoint, TabLocation } from '@shell/core/types';
55
- import MemberRoles from '@shell/edit/provisioning.cattle.io.cluster/tabs/MemberRoles';
56
- import Basics from '@shell/edit/provisioning.cattle.io.cluster/tabs/Basics';
57
- import Etcd from '@shell/edit/provisioning.cattle.io.cluster/tabs/etcd';
58
- import Networking from '@shell/edit/provisioning.cattle.io.cluster/tabs/networking';
59
- import Upgrade from '@shell/edit/provisioning.cattle.io.cluster/tabs/upgrade';
60
- import Registries from '@shell/edit/provisioning.cattle.io.cluster/tabs/registries';
61
- import AddOnConfig from '@shell/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig';
62
- import Advanced from '@shell/edit/provisioning.cattle.io.cluster/tabs/Advanced';
75
+ import MemberRoles from '@shell/edit/provisioning.cattle.io.cluster/MemberRoles';
76
+ import Basics from '@shell/edit/provisioning.cattle.io.cluster/Basics';
63
77
 
64
78
  const HARVESTER = 'harvester';
65
79
  const HARVESTER_CLOUD_PROVIDER = 'harvester-cloud-provider';
80
+
66
81
  const NETBIOS_TRUNCATION_LENGTH = 15;
67
82
 
68
83
  /**
@@ -87,26 +102,37 @@ const FLEET_AGENT_CUSTOMIZATION = 'fleetAgentDeploymentCustomization';
87
102
 
88
103
  export default {
89
104
  components: {
105
+ ACE,
106
+ AdvancedSection,
90
107
  AgentEnv,
108
+ ArrayList,
109
+ ArrayListGrouped,
91
110
  BadgeState,
92
111
  Banner,
112
+ Checkbox,
93
113
  AgentConfiguration,
94
114
  CruResource,
115
+ DrainOptions,
116
+ LabeledInput,
117
+ LabeledSelect,
95
118
  Labels,
96
119
  Loading,
97
120
  MachinePool,
121
+ MatchExpressions,
98
122
  NameNsDescription,
123
+ Questions,
124
+ RadioGroup,
125
+ RegistryConfigs,
126
+ RegistryMirrors,
127
+ S3Config,
99
128
  SelectCredential,
129
+ SelectOrCreateAuthSecret,
100
130
  Tab,
101
131
  Tabbed,
132
+ UnitInput,
133
+ YamlEditor,
102
134
  MemberRoles,
103
- Basics,
104
- Etcd,
105
- Networking,
106
- Upgrade,
107
- Registries,
108
- AddOnConfig,
109
- Advanced
135
+ Basics
110
136
  },
111
137
 
112
138
  mixins: [CreateEditView, FormValidation],
@@ -129,6 +155,7 @@ export default {
129
155
  },
130
156
 
131
157
  async fetch() {
158
+ this.psps = await this.getPsps();
132
159
  await this.fetchRke2Versions();
133
160
  await this.initSpecs();
134
161
  await this.initAddons();
@@ -169,11 +196,16 @@ export default {
169
196
  set(this.value.spec, 'rkeConfig.machineSelectorConfig', [{ config: {} }]);
170
197
  }
171
198
 
172
- const truncateLimit = this.value.defaultHostnameLengthLimit || 0;
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;
173
204
 
174
205
  return {
175
206
  loadedOnce: false,
176
207
  lastIdx: 0,
208
+ allPSPs: null,
177
209
  allPSAs: [],
178
210
  credentialId: '',
179
211
  credential: null,
@@ -201,30 +233,46 @@ export default {
201
233
  userChartValues: {},
202
234
  userChartValuesTemp: {},
203
235
  addonsRev: 0,
236
+ clusterIsAlreadyCreated: !!this.value.id,
204
237
  fvFormRuleSets: [{
205
238
  path: 'metadata.name', rules: ['subDomain'], translationKey: 'nameNsDescription.name.label'
206
239
  }],
207
240
  harvesterVersionRange: {},
241
+ lastDefaultPodSecurityPolicyTemplateName, // Used for reset on k8s version changes
242
+ previousKubernetesVersion,
208
243
  cisOverride: false,
244
+ cisPsaChangeBanner: false,
245
+ psps: null, // List of policies if any
246
+ truncateHostnames: truncateLimit === NETBIOS_TRUNCATION_LENGTH,
209
247
  truncateLimit,
210
248
  busy: false,
211
249
  machinePoolValidation: {}, // map of validation states for each machine pool
212
250
  machinePoolErrors: {},
213
251
  allNamespaces: [],
214
- initialCloudProvider: this.value?.agentConfig?.['cloud-provider-name'] || '',
215
252
  extensionTabs: getApplicableExtensionEnhancements(this, ExtensionPoint.TAB, TabLocation.CLUSTER_CREATE_RKE2, this.$route, this),
216
253
  };
217
254
  },
218
255
 
219
256
  computed: {
257
+
220
258
  rkeConfig() {
221
259
  return this.value.spec.rkeConfig;
222
260
  },
223
261
 
262
+ hostnameTruncationManuallySet() {
263
+ return this.truncateLimit && this.truncateLimit !== NETBIOS_TRUNCATION_LENGTH;
264
+ },
265
+
224
266
  isElementalCluster() {
225
267
  return this.provider === ELEMENTAL_CLUSTER_PROVIDER || this.value?.machineProvider?.toLowerCase() === KIND.MACHINE_INV_SELECTOR_TEMPLATES.toLowerCase();
226
268
  },
227
269
 
270
+ advancedTitleAlt() {
271
+ const machineSelectorLength = this.rkeConfig.machineSelectorConfig.length;
272
+
273
+ return this.t('cluster.advanced.argInfo.machineSelector.titleAlt', { count: machineSelectorLength });
274
+ },
275
+
228
276
  chartValues() {
229
277
  return this.value.spec.rkeConfig.chartValues;
230
278
  },
@@ -237,6 +285,20 @@ export default {
237
285
  return this.value.agentConfig;
238
286
  },
239
287
 
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
+
240
302
  unsupportedSelectorConfig() {
241
303
  let global = 0;
242
304
  let kubeletOnly = 0;
@@ -314,6 +376,10 @@ export default {
314
376
  return out;
315
377
  },
316
378
 
379
+ isK3s() {
380
+ return (this.value?.spec?.kubernetesVersion || '').includes('k3s');
381
+ },
382
+
317
383
  /**
318
384
  * Kube Version
319
385
  */
@@ -521,11 +587,11 @@ export default {
521
587
  }
522
588
 
523
589
  if (this.showCloudProvider) { // Shouldn't be removed such that changes to it will re-trigger this watch
524
- if ( this.agentConfig?.['cloud-provider-name'] === 'rancher-vsphere' ) {
590
+ if ( this.agentConfig['cloud-provider-name'] === 'rancher-vsphere' ) {
525
591
  names.push('rancher-vsphere-cpi', 'rancher-vsphere-csi');
526
592
  }
527
593
 
528
- if ( this.agentConfig?.['cloud-provider-name'] === HARVESTER ) {
594
+ if ( this.agentConfig['cloud-provider-name'] === HARVESTER ) {
529
595
  names.push(HARVESTER_CLOUD_PROVIDER);
530
596
  }
531
597
  }
@@ -575,32 +641,10 @@ export default {
575
641
  }
576
642
  }
577
643
 
578
- const cur = this.agentConfig?.['cloud-provider-name'];
579
-
580
- if (cur && !out.find((x) => x.value === cur)) {
581
- // Localization missing
582
- // Look up cur in the localization file
583
- const label = this.$store.getters['i18n/withFallback'](`cluster.cloudProvider."${ cur }".label`, null, cur);
644
+ const cur = this.agentConfig['cloud-provider-name'];
584
645
 
585
- out.unshift({
586
- label: `${ label } (Current)`,
587
- value: cur,
588
- unsupported: true,
589
- disabled: true
590
- });
591
- }
592
-
593
- const initial = this.initialCloudProvider;
594
-
595
- if (cur !== initial && initial && !out.find((x) => x.value === initial)) {
596
- const label = this.$store.getters['i18n/withFallback'](`cluster.cloudProvider."${ initial }".label`, null, initial);
597
-
598
- out.unshift({
599
- label: `${ label } (Current)`,
600
- value: initial,
601
- unsupported: true,
602
- disabled: true
603
- });
646
+ if ( cur && !out.find((x) => x.value === cur) ) {
647
+ out.unshift({ label: `${ cur } (Current)`, value: cur });
604
648
  }
605
649
 
606
650
  return out;
@@ -640,6 +684,13 @@ export default {
640
684
  return out;
641
685
  },
642
686
 
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
+
643
694
  appsOSWarning() {
644
695
  if (this.mode !== _EDIT ) {
645
696
  return null;
@@ -708,17 +759,19 @@ export default {
708
759
 
709
760
  return validRequiredPools && base;
710
761
  },
711
- unsupportedCloudProvider() {
712
- // The current cloud provider
713
- const cur = this.initialCloudProvider;
714
-
715
- const provider = cur && this.cloudProviderOptions.find((x) => x.value === cur);
716
-
717
- return !!provider?.unsupported;
718
- },
719
762
  },
720
763
 
721
764
  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', {});
770
+ }
771
+ } else {
772
+ set(this.rkeConfig.etcd, 's3', null);
773
+ }
774
+ },
722
775
 
723
776
  credentialId(val) {
724
777
  if ( val ) {
@@ -849,6 +902,10 @@ export default {
849
902
  }
850
903
  }
851
904
 
905
+ if ( this.value.spec.defaultPodSecurityPolicyTemplateName === undefined ) {
906
+ set(this.value.spec, 'defaultPodSecurityPolicyTemplateName', '');
907
+ }
908
+
852
909
  if ( this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName === undefined ) {
853
910
  set(this.value.spec, 'defaultPodSecurityAdmissionConfigurationTemplateName', '');
854
911
  }
@@ -864,6 +921,10 @@ export default {
864
921
  k3sVersions: this.$store.dispatch('management/request', { url: '/v1-k3s-release/releases' }),
865
922
  };
866
923
 
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
+
867
928
  if (this.$store.getters['management/canList'](MANAGEMENT.PSA)) {
868
929
  hash.allPSAs = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.PSA });
869
930
  }
@@ -888,6 +949,7 @@ export default {
888
949
 
889
950
  const res = await allHash(hash);
890
951
 
952
+ this.allPSPs = res.allPSPs || [];
891
953
  this.allPSAs = res.allPSAs || [];
892
954
  this.rke2Versions = res.rke2Versions.data || [];
893
955
  this.k3sVersions = res.k3sVersions.data || [];
@@ -969,15 +1031,23 @@ export default {
969
1031
  /**
970
1032
  * set instanceNameLimit to 15 to all pool machine if truncateHostnames checkbox is clicked
971
1033
  */
972
- truncateHostname(neu) {
973
- if (neu) {
1034
+ truncateName() {
1035
+ if (this.truncateHostnames) {
974
1036
  this.value.defaultHostnameLengthLimit = NETBIOS_TRUNCATION_LENGTH;
975
- this.truncateLimit = NETBIOS_TRUNCATION_LENGTH;
976
1037
  } else {
977
- this.truncateLimit = 0;
978
1038
  this.value.removeDefaultHostnameLengthLimit();
979
1039
  }
980
1040
  },
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
+ },
981
1051
 
982
1052
  /**
983
1053
  * Get machine pools from the cluster configuration
@@ -1264,6 +1334,23 @@ export default {
1264
1334
  });
1265
1335
  },
1266
1336
 
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
+
1267
1354
  // Set busy before save and clear after save
1268
1355
  async saveOverride(btnCb) {
1269
1356
  this.$set(this, 'busy', true);
@@ -1297,6 +1384,13 @@ export default {
1297
1384
  this.agentConfigurationCleanup();
1298
1385
 
1299
1386
  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
+ }
1300
1394
 
1301
1395
  if (isEditVersion) {
1302
1396
  const shouldContinue = await this.showAddonConfirmation();
@@ -1323,7 +1417,7 @@ export default {
1323
1417
 
1324
1418
  const isUpgrade = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
1325
1419
 
1326
- if (this.agentConfig?.['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
1420
+ if (this.agentConfig['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
1327
1421
  const namespace = this.machinePools?.[0]?.config?.vmNamespace;
1328
1422
 
1329
1423
  const res = await this.$store.dispatch('management/request', {
@@ -1455,28 +1549,27 @@ export default {
1455
1549
  }
1456
1550
  },
1457
1551
 
1458
- showAddons(key) {
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() {
1459
1559
  this.addonsRev++;
1460
1560
  this.addonNames.forEach((name) => {
1461
1561
  const chartValues = this.versionInfo[name]?.questions ? this.initYamlEditor(name) : {};
1462
1562
 
1463
1563
  set(this.userChartValuesTemp, name, chartValues);
1464
1564
  });
1465
- this.refreshComponentWithYamls(key);
1466
- },
1467
- refreshComponentWithYamls(key) {
1468
- const component = this.$refs[key];
1469
-
1470
- if ( component ) {
1471
- this.refreshYamls(component.$refs);
1472
- }
1565
+ this.refreshYamls();
1473
1566
  },
1474
1567
 
1475
- refreshYamls(refs) {
1476
- const keys = Object.keys(refs).filter((x) => x.startsWith('yaml'));
1568
+ refreshYamls() {
1569
+ const keys = Object.keys(this.$refs).filter((x) => x.startsWith('yaml'));
1477
1570
 
1478
1571
  for ( const k of keys ) {
1479
- const entry = refs[k];
1572
+ const entry = this.$refs[k];
1480
1573
  const list = isArray(entry) ? entry : [entry];
1481
1574
 
1482
1575
  for ( const component of list ) {
@@ -1498,6 +1591,10 @@ export default {
1498
1591
  this.userChartValues[this.chartVersionKey(name)] = different;
1499
1592
  }, 250, { leading: true }),
1500
1593
 
1594
+ updateQuestions(name) {
1595
+ this.syncChartValues(name);
1596
+ },
1597
+
1501
1598
  initYamlEditor(name) {
1502
1599
  const defaultChartValue = this.versionInfo[name];
1503
1600
  const key = this.chartVersionKey(name);
@@ -1515,7 +1612,7 @@ export default {
1515
1612
  }
1516
1613
 
1517
1614
  for ( const k in this.agentArgs ) {
1518
- if ( this.agentConfig?.[k] === undefined ) {
1615
+ if ( this.agentConfig[k] === undefined ) {
1519
1616
  const def = this.agentArgs[k].default;
1520
1617
 
1521
1618
  set(this.agentConfig, k, (def !== undefined ? def : undefined));
@@ -1537,6 +1634,10 @@ export default {
1537
1634
  this.$set(this, 'membershipUpdate', update);
1538
1635
  },
1539
1636
 
1637
+ canRemoveKubeletRow(row, idx) {
1638
+ return idx !== 0;
1639
+ },
1640
+
1540
1641
  async initRegistry() {
1541
1642
  // Check for an existing cluster scoped registry
1542
1643
  const clusterRegistry = this.agentConfig?.['system-default-registry'] || '';
@@ -1568,8 +1669,7 @@ export default {
1568
1669
  set(regs, 'mirrors', {});
1569
1670
  }
1570
1671
 
1571
- const hostname = Object.keys(regs.configs)[0];
1572
- const config = regs.configs[hostname];
1672
+ const config = regs.configs[this.registryHost];
1573
1673
 
1574
1674
  if ( config ) {
1575
1675
  registrySecret = config.authConfigSecretName;
@@ -1780,7 +1880,6 @@ export default {
1780
1880
  setHarvesterDefaultCloudProvider() {
1781
1881
  if (this.isHarvesterDriver &&
1782
1882
  this.mode === _CREATE &&
1783
- this.agentConfig &&
1784
1883
  !this.agentConfig['cloud-provider-name'] &&
1785
1884
  !this.isHarvesterExternalCredential &&
1786
1885
  !this.isHarvesterIncompatible
@@ -1809,8 +1908,7 @@ export default {
1809
1908
  }
1810
1909
  this.setHarvesterDefaultCloudProvider();
1811
1910
  },
1812
- toggleCustomRegistry(neu) {
1813
- this.showCustomRegistryInput = neu;
1911
+ toggleCustomRegistry(e) {
1814
1912
  if (this.registryHost) {
1815
1913
  this.registryHost = null;
1816
1914
  this.registrySecret = null;
@@ -1819,6 +1917,28 @@ export default {
1819
1917
  }
1820
1918
  },
1821
1919
 
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
+
1822
1942
  /**
1823
1943
  * Reset PSA on several input changes for given conditions
1824
1944
  */
@@ -1828,9 +1948,11 @@ export default {
1828
1948
  const cisValue = this.agentConfig?.profile || this.serverConfig?.profile;
1829
1949
 
1830
1950
  if (!this.cisOverride) {
1831
- if (cisValue) {
1951
+ if (this.hasPsaTemplates && cisValue) {
1832
1952
  set(this.value.spec, 'defaultPodSecurityAdmissionConfigurationTemplateName', hardcodedTemplate);
1833
1953
  }
1954
+
1955
+ this.cisPsaChangeBanner = this.hasPsaTemplates;
1834
1956
  }
1835
1957
  },
1836
1958
 
@@ -1851,36 +1973,45 @@ export default {
1851
1973
  set(this.agentConfig, 'protect-kernel-defaults', false);
1852
1974
  }
1853
1975
  },
1854
- updateAdditionalManifest(neu) {
1855
- this.value.spec.rkeConfig.additionalManifest = neu;
1856
- },
1857
1976
 
1858
1977
  /**
1859
- * Handle k8s changes side effects, like PSA resets
1978
+ * Handle k8s changes side effects, like PSP and PSA resets
1860
1979
  */
1861
- handleKubernetesChange(value, old) {
1980
+ handleKubernetesChange(value) {
1862
1981
  if (value) {
1863
1982
  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
+ }
1864
2000
 
1865
2001
  // If Harvester driver, reset cloud provider if not compatible
1866
2002
  if (this.isHarvesterDriver && this.mode === _CREATE && this.isHarvesterIncompatible) {
1867
2003
  this.setHarvesterDefaultCloudProvider();
1868
2004
  }
1869
-
1870
- // Cloud Provider check
1871
- // If the cloud provider is unsupported, switch provider to 'external'
1872
- if (this.unsupportedCloudProvider) {
1873
- set(this.agentConfig, 'cloud-provider-name', 'external');
1874
- } else {
1875
- // Switch the cloud provider back to the initial value
1876
- // Use changed the Kubernetes version back to a version where the initial cloud provider is valid - so switch back to this one
1877
- // to undo the change to external that we may have made
1878
- // Note: Cloud Provider can only be changed on edit when the initial provider is no longer supported
1879
- set(this.agentConfig, 'cloud-provider-name', this.initialCloudProvider);
1880
- }
1881
2005
  }
1882
2006
  },
1883
2007
 
2008
+ /**
2009
+ * Keep last PSP value
2010
+ */
2011
+ handlePspChange(value) {
2012
+ this.lastDefaultPodSecurityPolicyTemplateName = value;
2013
+ },
2014
+
1884
2015
  handleShowDeprecatedPatchVersionsChanged(value) {
1885
2016
  this.showDeprecatedPatchVersions = value;
1886
2017
  },
@@ -1897,20 +2028,27 @@ export default {
1897
2028
  handleEnabledSystemServicesChanged(val) {
1898
2029
  set(this.serverConfig, 'disable', val);
1899
2030
  },
1900
-
1901
- handleCiliumValuesChanged(neu) {
1902
- if (neu === undefined) {
1903
- return;
1904
- }
1905
-
2031
+ handleCiliumIpv6Changed(neu) {
1906
2032
  const name = this.chartVersionKey('rke2-cilium');
2033
+ const values = this.userChartValues[name];
1907
2034
 
1908
2035
  set(this, 'userChartValues', {
1909
2036
  ...this.userChartValues,
1910
- [name]: { ...neu }
2037
+ [name]: {
2038
+ ...values,
2039
+ cilium: {
2040
+ ...values?.cilium,
2041
+ ipv6: {
2042
+ ...values?.cilium?.ipv6,
2043
+ enabled: neu
2044
+ }
2045
+ }
2046
+ }
1911
2047
  });
1912
2048
  },
1913
-
2049
+ handlePspChanged(neu) {
2050
+ this.handlePspChange(neu);
2051
+ },
1914
2052
  handleCisChanged() {
1915
2053
  this.handleCisChange();
1916
2054
  },
@@ -1952,31 +2090,13 @@ export default {
1952
2090
 
1953
2091
  this.errors = errors;
1954
2092
  },
1955
- handleS3BackupChanged(neu) {
1956
- this.s3Backup = neu;
1957
- if ( neu ) {
1958
- // 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.
1959
- if (isEmpty(this.rkeConfig.etcd?.s3)) {
1960
- set(this.rkeConfig.etcd, 's3', {});
1961
- }
1962
- } else {
1963
- set(this.rkeConfig.etcd, 's3', null);
1964
- }
1965
- },
1966
- handleConfigEtcdExposeMetricsChanged(neu) {
1967
- set(this.serverConfig, 'etcd-expose-metrics', neu);
1968
- },
1969
- handleRegistryHostChanged(neu) {
1970
- this.registryHost = neu;
1971
- },
1972
- handleRegistrySecretChanged(neu) {
1973
- this.registrySecret = neu;
1974
- },
2093
+
1975
2094
  validateClusterName() {
1976
- if (!this.value.metadata.name && this.agentConfig?.['cloud-provider-name'] === HARVESTER) {
2095
+ if (!this.value.metadata.name && this.agentConfig['cloud-provider-name'] === HARVESTER) {
1977
2096
  this.errors.push(this.t('validation.required', { key: this.t('cluster.name.label') }, true));
1978
2097
  }
1979
2098
  },
2099
+
1980
2100
  async validateMachinePool() {
1981
2101
  if (this.errors) {
1982
2102
  clear(this.errors);
@@ -2047,7 +2167,6 @@ export default {
2047
2167
  :provider="provider"
2048
2168
  :cancel="cancelCredential"
2049
2169
  :showing-form="showForm"
2050
- :default-on-cancel="true"
2051
2170
  class="mt-20"
2052
2171
  />
2053
2172
 
@@ -2137,6 +2256,7 @@ export default {
2137
2256
  :machine-pools="machinePools"
2138
2257
  :busy="busy"
2139
2258
  :pool-id="obj.id"
2259
+ :pool-create-mode="obj.create"
2140
2260
  @error="handleMachinePoolError"
2141
2261
  @validationChanged="v=>machinePoolValidationChanged(obj.id, v)"
2142
2262
  />
@@ -2159,34 +2279,40 @@ export default {
2159
2279
  name="basic"
2160
2280
  label-key="cluster.tabs.basic"
2161
2281
  :weight="11"
2162
- @active="refreshComponentWithYamls('tab-Basics')"
2282
+ @active="refreshYamls"
2163
2283
  >
2164
2284
  <!-- Basic -->
2165
2285
  <Basics
2166
- ref="tab-Basics"
2167
2286
  v-model="value"
2168
2287
  :live-value="liveValue"
2169
2288
  :mode="mode"
2170
2289
  :provider="provider"
2290
+ :psps="psps"
2171
2291
  :user-chart-values="userChartValues"
2172
2292
  :credential="credential"
2173
2293
  :cis-override="cisOverride"
2294
+ :cis-psa-change-banner="cisPsaChangeBanner"
2295
+ :all-psps="allPSPs"
2174
2296
  :all-psas="allPSAs"
2175
2297
  :addon-versions="addonVersions"
2176
2298
  :show-deprecated-patch-versions="showDeprecatedPatchVersions"
2299
+ :needs-psp="needsPSP"
2177
2300
  :selected-version="selectedVersion"
2178
2301
  :is-harvester-driver="isHarvesterDriver"
2179
2302
  :is-harvester-incompatible="isHarvesterIncompatible"
2180
2303
  :version-options="versionOptions"
2304
+ :cluster-is-already-created="clusterIsAlreadyCreated"
2181
2305
  :is-elemental-cluster="isElementalCluster"
2306
+ :has-psa-templates="hasPsaTemplates"
2307
+ :is-k3s="isK3s"
2182
2308
  :have-arg-info="haveArgInfo"
2183
2309
  :show-cni="showCni"
2184
2310
  :show-cloud-provider="showCloudProvider"
2185
- :unsupported-cloud-provider="unsupportedCloudProvider"
2186
2311
  :cloud-provider-options="cloudProviderOptions"
2187
- @cilium-values-changed="handleCiliumValuesChanged"
2312
+ @cilium-ipv6-changed="handleCiliumIpv6Changed"
2188
2313
  @enabled-system-services-changed="handleEnabledSystemServicesChanged"
2189
2314
  @kubernetes-changed="handleKubernetesChange"
2315
+ @psp-changed="handlePspChanged"
2190
2316
  @cis-changed="handleCisChanged"
2191
2317
  @psa-default-changed="handlePsaDefaultChanged"
2192
2318
  @show-deprecated-patch-versions-changed="handleShowDeprecatedPatchVersionsChanged"
@@ -2211,15 +2337,77 @@ export default {
2211
2337
  name="etcd"
2212
2338
  label-key="cluster.tabs.etcd"
2213
2339
  >
2214
- <Etcd
2215
- v-model="value"
2216
- :mode="mode"
2217
- :s3-backup="s3Backup"
2218
- :register-before-hook="registerBeforeHook"
2219
- :selected-version="selectedVersion"
2220
- @s3-backup-changed="handleS3BackupChanged"
2221
- @config-etcd-expose-metrics-changed="handleConfigEtcdExposeMetricsChanged"
2222
- />
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>
2223
2411
  </Tab>
2224
2412
 
2225
2413
  <!-- Networking -->
@@ -2228,12 +2416,120 @@ export default {
2228
2416
  name="networking"
2229
2417
  label-key="cluster.tabs.networking"
2230
2418
  >
2231
- <Networking
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
2232
2531
  v-model="value"
2233
2532
  :mode="mode"
2234
- :selected-version="selectedVersion"
2235
- :truncate-limit="truncateLimit"
2236
- @truncate-hostname="truncateHostname"
2237
2533
  />
2238
2534
  </Tab>
2239
2535
 
@@ -2242,10 +2538,44 @@ export default {
2242
2538
  name="upgrade"
2243
2539
  label-key="cluster.tabs.upgrade"
2244
2540
  >
2245
- <Upgrade
2246
- v-model="value"
2247
- :mode="mode"
2248
- />
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>
2249
2579
  </Tab>
2250
2580
 
2251
2581
  <!-- Registries -->
@@ -2253,40 +2583,150 @@ export default {
2253
2583
  name="registry"
2254
2584
  label-key="cluster.tabs.registry"
2255
2585
  >
2256
- <Registries
2257
- v-model="value"
2258
- :mode="mode"
2259
- :register-before-hook="registerBeforeHook"
2260
- :show-custom-registry-input="showCustomRegistryInput"
2261
- :registry-host="registryHost"
2262
- :registry-secret="registrySecret"
2263
- :show-custom-registry-advanced-input="showCustomRegistryAdvancedInput"
2264
- @update-configs-changed="updateConfigs"
2265
- @custom-registry-changed="toggleCustomRegistry"
2266
- @registry-host-changed="handleRegistryHostChanged"
2267
- @registry-secret-changed="handleRegistrySecretChanged"
2268
- />
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>
2269
2666
  </Tab>
2270
2667
 
2271
2668
  <!-- Add-on Config -->
2272
2669
  <Tab
2273
2670
  name="addons"
2274
2671
  label-key="cluster.tabs.addons"
2275
- @active="showAddons('tab-addOnConfig')"
2672
+ @active="showAddons"
2276
2673
  >
2277
- <AddOnConfig
2278
- ref="tab-addOnConfig"
2279
- v-model="value"
2280
- :mode="mode"
2281
- :version-info="versionInfo"
2282
- :addon-versions="addonVersions"
2283
- :addons-rev="addonsRev"
2284
- :user-chart-values-temp="userChartValuesTemp"
2285
- :init-yaml-editor="initYamlEditor"
2286
- @update-questions="syncChartValues"
2287
- @update-values="updateValues"
2288
- @additional-manifest-changed="updateAdditionalManifest"
2289
- />
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>
2290
2730
  </Tab>
2291
2731
 
2292
2732
  <!-- Cluster Agent Configuration -->
@@ -2323,13 +2763,82 @@ export default {
2323
2763
  name="advanced"
2324
2764
  label-key="cluster.tabs.advanced"
2325
2765
  :weight="-1"
2766
+ @active="refreshYamls"
2326
2767
  >
2327
- <Advanced
2328
- v-model="value"
2329
- :mode="mode"
2330
- :have-arg-info="haveArgInfo"
2331
- :selected-version="selectedVersion"
2332
- />
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>
2333
2842
  </Tab>
2334
2843
 
2335
2844
  <AgentEnv