@rancher/shell 0.5.3 → 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.
- package/.DS_Store +0 -0
- package/assets/images/providers/aks-black.svg +28 -0
- package/assets/images/providers/aks.svg +31 -0
- package/assets/styles/global/_labeled-input.scss +1 -0
- package/assets/styles/global/_layout.scss +0 -99
- package/assets/translations/en-us.yaml +76 -74
- package/assets/translations/zh-hans.yaml +25 -23
- package/babel.config.js +1 -7
- package/chart/gatekeeper.vue +11 -2
- package/chart/istio.vue +10 -1
- package/chart/logging/index.vue +11 -2
- package/chart/monitoring/alerting/index.vue +21 -7
- package/chart/monitoring/grafana/index.vue +2 -57
- package/chart/monitoring/index.vue +26 -52
- package/chart/monitoring/prometheus/index.vue +43 -37
- package/chart/rancher-backup/index.vue +10 -3
- package/cloud-credential/azure.vue +17 -4
- package/components/AsyncButton.vue +0 -9
- package/components/Carousel.vue +0 -1
- package/components/ChartPsp.vue +76 -0
- package/components/ClusterIconMenu.vue +9 -24
- package/components/CodeMirror.vue +16 -75
- package/components/CopyCode.vue +2 -6
- package/components/CopyToClipboard.vue +1 -2
- package/components/CopyToClipboardText.vue +9 -14
- package/components/CruResource.vue +0 -1
- package/components/EtcdInfoBanner.vue +5 -5
- package/components/ExplorerProjectsNamespaces.vue +1 -25
- package/components/FixedBanner.vue +0 -1
- package/components/IconOrSvg.vue +1 -1
- package/components/Markdown.vue +12 -16
- package/components/Questions/index.vue +1 -1
- package/components/ResourceDetail/Masthead.vue +9 -25
- package/components/ResourceDetail/index.vue +4 -1
- package/components/ResourceList/Masthead.vue +18 -1
- package/components/ResourceTable.vue +2 -14
- package/components/ResourceYaml.vue +5 -34
- package/components/SideNav.vue +65 -43
- package/components/SortableTable/THead.vue +9 -7
- package/components/SortableTable/index.vue +2 -1
- package/components/StatusTable.vue +1 -5
- package/components/TabTitle.vue +84 -0
- package/components/Tabbed/index.vue +0 -12
- package/components/YamlEditor.vue +0 -1
- package/components/__tests__/ChartPsp.test.ts +75 -0
- package/components/__tests__/CopyCode.test.ts +4 -5
- package/components/fleet/FleetBundles.vue +11 -5
- package/components/fleet/FleetRepos.vue +27 -62
- package/components/fleet/FleetResources.vue +1 -6
- package/components/fleet/FleetStatus.vue +3 -3
- package/components/fleet/FleetSummary.vue +30 -35
- package/components/form/ArrayList.vue +8 -1
- package/components/form/ArrayListSelect.vue +9 -9
- package/components/form/BannerSettings.vue +0 -3
- package/components/form/FileSelector.vue +0 -1
- package/components/form/KeyValue.vue +0 -2
- package/components/form/LabeledSelect.vue +0 -4
- package/components/form/Password.vue +1 -3
- package/components/form/Select.vue +1 -1
- package/components/form/SelectOrCreateAuthSecret.vue +4 -4
- package/components/form/__tests__/KeyValue.test.ts +1 -1
- package/components/formatter/Checked.vue +3 -11
- package/components/formatter/ClusterProvider.vue +18 -1
- package/components/formatter/FleetSummaryGraph.vue +11 -23
- package/components/formatter/LiveDate.vue +16 -0
- package/components/formatter/LiveDuration.vue +1 -1
- package/components/formatter/PercentageBar.vue +1 -1
- package/components/formatter/WorkloadDetailEndpoints.vue +22 -12
- package/components/formatter/__tests__/ClusterProvider.test.ts +28 -0
- package/components/nav/Group.vue +2 -2
- package/components/nav/Header.vue +2 -2
- package/components/nav/Jump.vue +9 -19
- package/components/nav/TopLevelMenu.vue +18 -66
- package/components/nav/Type.vue +7 -16
- package/components/nav/WindowManager/ContainerLogs.vue +19 -120
- package/components/nav/WindowManager/ContainerShell.vue +1 -6
- package/components/nav/WindowManager/index.vue +10 -11
- package/components/nav/__tests__/TopLevelMenu.test.ts +1 -34
- package/components/nav/__tests__/Type.test.ts +1 -31
- package/components/nuxt/nuxt-child.js +78 -14
- package/components/nuxt/nuxt.js +1 -1
- package/components/user.retention/user-retention-header.vue +34 -0
- package/composables/useI18n.ts +26 -0
- package/composables/useStore.ts +16 -0
- package/config/harvester-manager-types.js +0 -2
- package/config/home-links.js +32 -2
- package/config/private-label.js +0 -22
- package/config/product/explorer.js +4 -4
- package/config/product/fleet.js +1 -6
- package/config/product/legacy.js +1 -84
- package/config/product/manager.js +15 -8
- package/config/query-params.js +0 -1
- package/config/router.js +368 -385
- package/config/settings.ts +9 -2
- package/config/store.js +1 -1
- package/config/system-namespaces.js +0 -3
- package/config/table-headers.js +27 -47
- package/config/types.js +5 -0
- package/config/uiplugins.js +1 -1
- package/core/plugin-helpers.js +5 -3
- package/core/plugin-routes.ts +114 -56
- package/core/plugin.ts +10 -16
- package/core/plugins-loader.js +9 -7
- package/core/plugins.js +3 -0
- package/core/types-provisioning.ts +0 -7
- package/creators/app/init +0 -19
- package/detail/fleet.cattle.io.bundle.vue +1 -1
- package/detail/fleet.cattle.io.cluster.vue +1 -11
- package/detail/node.vue +0 -42
- package/detail/pod.vue +1 -68
- package/detail/provisioning.cattle.io.cluster.vue +8 -25
- package/detail/workload/index.vue +1 -15
- package/dialog/ScaleMachineDownDialog.vue +17 -34
- package/edit/auth/googleoauth.vue +5 -1
- package/edit/catalog.cattle.io.clusterrepo.vue +7 -20
- package/edit/cloudcredential.vue +0 -2
- package/edit/fleet.cattle.io.gitrepo.vue +4 -3
- package/edit/management.cattle.io.project.vue +52 -1
- package/edit/management.cattle.io.setting.vue +2 -32
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +2 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +1 -1
- package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +3 -12
- package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +1 -2
- package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.spec.ts +1 -1
- package/edit/provisioning.cattle.io.cluster/{tabs/Basics.vue → Basics.vue} +125 -106
- package/edit/provisioning.cattle.io.cluster/{tabs/MachinePool.vue → MachinePool.vue} +7 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +7 -15
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts +237 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/{CustomCommand.test.ts → CustomCommand.tests.ts} +0 -6
- package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +1 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +1 -7
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/index.vue +40 -109
- package/edit/provisioning.cattle.io.cluster/rke2.vue +689 -152
- package/edit/service.vue +0 -12
- package/edit/token.vue +0 -1
- package/edit/workload/Upgrading.vue +2 -3
- package/edit/workload/index.vue +1 -2
- package/edit/workload/mixins/workload.js +1 -1
- package/initialize/App.js +71 -25
- package/initialize/client.js +162 -21
- package/initialize/index.js +124 -47
- package/initialize/layouts.ts +26 -0
- package/{components/templates → layouts}/blank.vue +1 -1
- package/{components/templates → layouts}/default.vue +98 -8
- package/{components/templates → layouts}/error.vue +19 -10
- package/{components/templates → layouts}/home.vue +1 -4
- package/{components/templates → layouts}/plain.vue +1 -4
- package/{components/templates → layouts}/standalone.vue +1 -1
- package/{components/templates → layouts}/unauthenticated.vue +1 -1
- package/list/catalog.cattle.io.app.vue +0 -1
- package/list/management.cattle.io.feature.vue +7 -1
- package/list/management.cattle.io.setting.vue +0 -1
- package/list/management.cattle.io.user.vue +25 -1
- package/list/node.vue +0 -1
- package/machine-config/__tests__/vmwarevsphere.test.ts +161 -56
- package/machine-config/azure.vue +37 -21
- package/machine-config/vmwarevsphere.vue +47 -42
- package/middleware/authenticated.js +19 -14
- package/mixins/auth-config.js +7 -2
- package/mixins/brand.js +41 -29
- package/mixins/fetch.server.js +73 -0
- package/mixins/labeled-form-element.ts +1 -6
- package/models/__tests__/management.cattle.io.node.ts +0 -85
- package/models/__tests__/namespace.test.ts +9 -49
- package/models/cluster/node.js +4 -4
- package/models/cluster.x-k8s.io.machine.js +1 -1
- package/models/cluster.x-k8s.io.machinedeployment.js +0 -14
- package/models/fleet.cattle.io.cluster.js +0 -4
- package/models/fleet.cattle.io.gitrepo.js +13 -56
- package/models/management.cattle.io.cluster.js +3 -11
- package/models/management.cattle.io.kontainerdriver.js +0 -1
- package/models/management.cattle.io.node.js +14 -18
- package/models/management.cattle.io.nodepool.js +0 -17
- package/models/management.cattle.io.project.js +36 -0
- package/models/management.cattle.io.setting.js +7 -11
- package/models/management.cattle.io.user.js +65 -0
- package/models/namespace.js +1 -1
- package/models/pod.js +0 -20
- package/models/provisioning.cattle.io.cluster.js +9 -91
- package/models/secret.js +18 -126
- package/models/storage.k8s.io.storageclass.js +1 -1
- package/models/workload.js +0 -16
- package/models/workload.service.js +0 -18
- package/package.json +10 -12
- package/pages/about.vue +1 -0
- package/pages/account/create-key.vue +1 -0
- package/pages/account/index.vue +1 -0
- package/pages/auth/login.vue +1 -0
- package/pages/auth/logout.vue +2 -0
- package/pages/auth/setup.vue +4 -37
- package/pages/auth/verify.vue +8 -14
- package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +17 -2
- package/pages/c/_cluster/apps/charts/index.vue +58 -64
- package/pages/c/_cluster/apps/charts/install.helpers.js +13 -2
- package/pages/c/_cluster/apps/charts/install.vue +5 -5
- package/pages/c/_cluster/apps/index.vue +2 -0
- package/pages/c/_cluster/auth/index.vue +2 -0
- package/pages/c/_cluster/auth/user.retention/index.vue +384 -0
- package/pages/c/_cluster/ecm/index.vue +2 -0
- package/pages/c/_cluster/explorer/index.vue +53 -56
- package/pages/c/_cluster/explorer/tools/index.vue +3 -171
- package/pages/c/_cluster/fleet/index.vue +1 -1
- package/pages/c/_cluster/index.vue +2 -0
- package/pages/c/_cluster/manager/pages/_page.vue +5 -4
- package/pages/c/_cluster/monitoring/index.vue +1 -17
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +1 -1
- package/pages/c/_cluster/settings/banners.vue +2 -0
- package/pages/c/_cluster/settings/brand.vue +2 -3
- package/pages/c/_cluster/settings/index.vue +2 -0
- package/pages/c/_cluster/settings/links.vue +3 -2
- package/pages/c/_cluster/settings/performance.vue +1 -0
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +1 -2
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +46 -10
- package/pages/c/_cluster/uiplugins/index.vue +2 -0
- package/pages/c/index.vue +9 -0
- package/pages/diagnostic.vue +2 -1
- package/pages/fail-whale.vue +1 -0
- package/pages/prefs.vue +1 -0
- package/pages/rio/mesh.vue +508 -0
- package/pages/support/index.vue +8 -2
- package/pkg/auto-import.js +1 -1
- package/plugins/axios.js +36 -0
- package/plugins/back-button.js +5 -3
- package/plugins/clean-html-directive.js +19 -1
- package/plugins/clean-tooltip-directive.js +1 -1
- package/plugins/codemirror-loader.js +1 -1
- package/plugins/codemirror.js +0 -41
- package/plugins/dashboard-store/__tests__/{mutations.test.ts → mutations.spec.ts} +1 -1
- package/plugins/dashboard-store/actions.js +17 -16
- package/plugins/dashboard-store/classify.js +18 -1
- package/plugins/dashboard-store/getters.js +7 -70
- package/plugins/dashboard-store/index.js +12 -0
- package/plugins/dashboard-store/mutations.js +4 -0
- package/plugins/dashboard-store/resource-class.js +20 -65
- package/plugins/i18n.js +1 -1
- package/plugins/steve/__tests__/getters.spec.ts +48 -26
- package/plugins/steve/__tests__/subscribe.spec.ts +106 -0
- package/plugins/steve/actions.js +37 -3
- package/plugins/steve/getters.js +24 -7
- package/plugins/steve/mutations.js +5 -2
- package/plugins/steve/norman-class.js +0 -19
- package/plugins/steve/steve-class.js +0 -22
- package/plugins/steve/subscribe.js +34 -13
- package/plugins/transitions.js +4 -0
- package/plugins/vue-clipboard2.js +4 -0
- package/rancher-components/Accordion/Accordion.vue +3 -2
- package/rancher-components/BadgeState/BadgeState.vue +3 -3
- package/rancher-components/Banner/Banner.test.ts +1 -5
- package/rancher-components/Banner/Banner.vue +2 -2
- package/rancher-components/Card/Card.vue +4 -4
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -3
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +1 -1
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +55 -24
- package/rancher-components/Form/Radio/RadioButton.test.ts +1 -3
- package/rancher-components/Form/Radio/RadioButton.vue +13 -7
- package/rancher-components/Form/Radio/RadioGroup.vue +4 -3
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +7 -5
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +7 -4
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +9 -4
- package/rancher-components/StringList/StringList.vue +8 -8
- package/rancher-components/components/Accordion/Accordion.vue +3 -2
- package/rancher-components/components/BadgeState/BadgeState.test.ts +12 -0
- package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +2 -19
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +14 -11
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +1 -1
- package/rancher-components/components/StringList/StringList.test.ts +0 -270
- package/rancher-components/components/StringList/StringList.vue +18 -57
- package/scripts/extension/bundle +7 -19
- package/scripts/extension/helm/scripts/package +3 -11
- package/scripts/extension/parse-tag-name +4 -4
- package/scripts/extension/publish +9 -20
- package/scripts/publish-shell.sh +1 -11
- package/scripts/test-plugins-build.sh +9 -85
- package/store/catalog.js +1 -1
- package/store/features.js +0 -1
- package/store/i18n.js +0 -11
- package/store/index.js +13 -11
- package/store/prefs.js +38 -33
- package/store/type-map.js +82 -157
- package/tsconfig.default.json +46 -0
- package/tsconfig.json +9 -35
- package/types/shell/index.d.ts +404 -465
- package/utils/axios.js +19 -0
- package/utils/create-yaml.js +1 -5
- package/utils/custom-validators.js +2 -0
- package/utils/error.js +1 -16
- package/utils/monitoring.js +2 -37
- package/utils/nuxt.js +39 -18
- package/utils/object.js +0 -24
- package/utils/router.scrollBehavior.js +14 -12
- package/utils/socket.js +1 -0
- package/utils/time.js +1 -1
- package/utils/title.ts +3 -0
- package/utils/url.ts +1 -1
- package/utils/validators/formRules/__tests__/index.test.ts +4 -49
- package/utils/validators/formRules/index.ts +9 -12
- package/utils/validators/setting.js +10 -6
- package/vue.config.js +3 -24
- package/chart/monitoring/steps/uninstall-v1.vue +0 -135
- package/components/Certificates.vue +0 -164
- package/components/__tests__/CodeMirror.spec.ts +0 -99
- package/components/fleet/__tests__/FleetSummary.test.ts +0 -316
- package/components/formatter/FleetClusterSummaryGraph.vue +0 -27
- package/components/formatter/__tests__/Checked.test.ts +0 -19
- package/components/formatter/__tests__/WorkloadDetailEndpoints.test.ts +0 -81
- package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +0 -186
- package/composables/useCompactInput.ts +0 -20
- package/composables/useLabeledFormElement.ts +0 -138
- package/creators/app/files/.gitlab-ci.yml +0 -14
- package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +0 -77
- package/edit/__tests__/service.test.ts +0 -89
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +0 -112
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +0 -473
- package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +0 -73
- package/edit/provisioning.cattle.io.cluster/__tests__/utils/cluster.ts +0 -386
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +0 -137
- package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +0 -157
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +0 -135
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +0 -189
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +0 -147
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +0 -76
- package/mixins/v1-workload-metrics.js +0 -43
- package/models/__tests__/management.cattle.io.cluster.test.ts +0 -23
- package/models/__tests__/management.cattle.io.nodepool.ts +0 -83
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +0 -241
- package/models/__tests__/secret.test.ts +0 -37
- package/models/__tests__/storage.k8s.io.storageclass.test.ts +0 -22
- package/models/__tests__/workload.test.ts +0 -91
- package/plugins/clean-html.js +0 -53
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +0 -49
- package/plugins/dashboard-store/__tests__/utils/store-mocks.ts +0 -7
- package/plugins/index.js +0 -11
- package/plugins/steve/__tests__/resource-utils.test.ts +0 -159
- package/plugins/steve/__tests__/steve-class.spec.ts +0 -59
- package/plugins/steve/__tests__/utils/steve-mocks.ts +0 -31
- package/plugins/steve/resource-utils.ts +0 -38
- package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +0 -50
- package/server/har-file.js +0 -183
- package/store/__tests__/type-map.test.ts +0 -1122
- package/tsconfig.paths.json +0 -18
- package/utils/azure.js +0 -24
- package/utils/clipboard.js +0 -5
- /package/components/form/__tests__/{NameNsDescription.test.ts → NameNsDescription.ts} +0 -0
- /package/edit/networking.k8s.io.networkpolicy/__tests__/utils/{selectors.test.ts → selectors.ts} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/networking/ACE.vue → ACE.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/AgentConfiguration.vue → AgentConfiguration.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/upgrade/DrainOptions.vue → DrainOptions.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/MemberRoles.vue → MemberRoles.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/registries/RegistryConfigs.vue → RegistryConfigs.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/registries/RegistryMirrors.vue → RegistryMirrors.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{tabs/etcd/S3Config.vue → S3Config.vue} +0 -0
- /package/plugins/dashboard-store/__tests__/{actions.test.ts → actions.spec.ts} +0 -0
- /package/plugins/dashboard-store/__tests__/{getters.test.ts → getters.spec.ts} +0 -0
- /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
|
|
48
|
-
import
|
|
49
|
-
import
|
|
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 '
|
|
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/
|
|
56
|
-
import Basics from '@shell/edit/provisioning.cattle.io.cluster/
|
|
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],
|
|
@@ -126,14 +152,10 @@ export default {
|
|
|
126
152
|
type: String,
|
|
127
153
|
required: true,
|
|
128
154
|
},
|
|
129
|
-
|
|
130
|
-
providerConfig: {
|
|
131
|
-
type: Object,
|
|
132
|
-
default: () => null
|
|
133
|
-
}
|
|
134
155
|
},
|
|
135
156
|
|
|
136
157
|
async fetch() {
|
|
158
|
+
this.psps = await this.getPsps();
|
|
137
159
|
await this.fetchRke2Versions();
|
|
138
160
|
await this.initSpecs();
|
|
139
161
|
await this.initAddons();
|
|
@@ -174,11 +196,16 @@ export default {
|
|
|
174
196
|
set(this.value.spec, 'rkeConfig.machineSelectorConfig', [{ config: {} }]);
|
|
175
197
|
}
|
|
176
198
|
|
|
177
|
-
|
|
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;
|
|
178
204
|
|
|
179
205
|
return {
|
|
180
206
|
loadedOnce: false,
|
|
181
207
|
lastIdx: 0,
|
|
208
|
+
allPSPs: null,
|
|
182
209
|
allPSAs: [],
|
|
183
210
|
credentialId: '',
|
|
184
211
|
credential: null,
|
|
@@ -206,11 +233,17 @@ export default {
|
|
|
206
233
|
userChartValues: {},
|
|
207
234
|
userChartValuesTemp: {},
|
|
208
235
|
addonsRev: 0,
|
|
236
|
+
clusterIsAlreadyCreated: !!this.value.id,
|
|
209
237
|
fvFormRuleSets: [{
|
|
210
238
|
path: 'metadata.name', rules: ['subDomain'], translationKey: 'nameNsDescription.name.label'
|
|
211
239
|
}],
|
|
212
240
|
harvesterVersionRange: {},
|
|
241
|
+
lastDefaultPodSecurityPolicyTemplateName, // Used for reset on k8s version changes
|
|
242
|
+
previousKubernetesVersion,
|
|
213
243
|
cisOverride: false,
|
|
244
|
+
cisPsaChangeBanner: false,
|
|
245
|
+
psps: null, // List of policies if any
|
|
246
|
+
truncateHostnames: truncateLimit === NETBIOS_TRUNCATION_LENGTH,
|
|
214
247
|
truncateLimit,
|
|
215
248
|
busy: false,
|
|
216
249
|
machinePoolValidation: {}, // map of validation states for each machine pool
|
|
@@ -221,14 +254,25 @@ export default {
|
|
|
221
254
|
},
|
|
222
255
|
|
|
223
256
|
computed: {
|
|
257
|
+
|
|
224
258
|
rkeConfig() {
|
|
225
259
|
return this.value.spec.rkeConfig;
|
|
226
260
|
},
|
|
227
261
|
|
|
262
|
+
hostnameTruncationManuallySet() {
|
|
263
|
+
return this.truncateLimit && this.truncateLimit !== NETBIOS_TRUNCATION_LENGTH;
|
|
264
|
+
},
|
|
265
|
+
|
|
228
266
|
isElementalCluster() {
|
|
229
267
|
return this.provider === ELEMENTAL_CLUSTER_PROVIDER || this.value?.machineProvider?.toLowerCase() === KIND.MACHINE_INV_SELECTOR_TEMPLATES.toLowerCase();
|
|
230
268
|
},
|
|
231
269
|
|
|
270
|
+
advancedTitleAlt() {
|
|
271
|
+
const machineSelectorLength = this.rkeConfig.machineSelectorConfig.length;
|
|
272
|
+
|
|
273
|
+
return this.t('cluster.advanced.argInfo.machineSelector.titleAlt', { count: machineSelectorLength });
|
|
274
|
+
},
|
|
275
|
+
|
|
232
276
|
chartValues() {
|
|
233
277
|
return this.value.spec.rkeConfig.chartValues;
|
|
234
278
|
},
|
|
@@ -241,6 +285,20 @@ export default {
|
|
|
241
285
|
return this.value.agentConfig;
|
|
242
286
|
},
|
|
243
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
|
+
|
|
244
302
|
unsupportedSelectorConfig() {
|
|
245
303
|
let global = 0;
|
|
246
304
|
let kubeletOnly = 0;
|
|
@@ -318,6 +376,10 @@ export default {
|
|
|
318
376
|
return out;
|
|
319
377
|
},
|
|
320
378
|
|
|
379
|
+
isK3s() {
|
|
380
|
+
return (this.value?.spec?.kubernetesVersion || '').includes('k3s');
|
|
381
|
+
},
|
|
382
|
+
|
|
321
383
|
/**
|
|
322
384
|
* Kube Version
|
|
323
385
|
*/
|
|
@@ -330,14 +392,6 @@ export default {
|
|
|
330
392
|
|
|
331
393
|
const out = findBy(this.versionOptions, 'value', str);
|
|
332
394
|
|
|
333
|
-
// Adding the option 'none' to Container Network select (used in Basics component)
|
|
334
|
-
// https://github.com/rancher/dashboard/issues/10338
|
|
335
|
-
// there's an update loop on refresh that might include 'none'
|
|
336
|
-
// multiple times... Prevent that
|
|
337
|
-
if (out.serverArgs?.cni?.options && !out.serverArgs?.cni?.options.includes('none')) {
|
|
338
|
-
out.serverArgs.cni.options.push('none');
|
|
339
|
-
}
|
|
340
|
-
|
|
341
395
|
return out;
|
|
342
396
|
},
|
|
343
397
|
|
|
@@ -363,7 +417,7 @@ export default {
|
|
|
363
417
|
},
|
|
364
418
|
|
|
365
419
|
needCredential() {
|
|
366
|
-
if ( this.provider === 'custom' || this.provider === 'import' || this.isElementalCluster || this.mode === _VIEW
|
|
420
|
+
if ( this.provider === 'custom' || this.provider === 'import' || this.isElementalCluster || this.mode === _VIEW ) {
|
|
367
421
|
return false;
|
|
368
422
|
}
|
|
369
423
|
|
|
@@ -533,11 +587,11 @@ export default {
|
|
|
533
587
|
}
|
|
534
588
|
|
|
535
589
|
if (this.showCloudProvider) { // Shouldn't be removed such that changes to it will re-trigger this watch
|
|
536
|
-
if ( this.agentConfig
|
|
590
|
+
if ( this.agentConfig['cloud-provider-name'] === 'rancher-vsphere' ) {
|
|
537
591
|
names.push('rancher-vsphere-cpi', 'rancher-vsphere-csi');
|
|
538
592
|
}
|
|
539
593
|
|
|
540
|
-
if ( this.agentConfig
|
|
594
|
+
if ( this.agentConfig['cloud-provider-name'] === HARVESTER ) {
|
|
541
595
|
names.push(HARVESTER_CLOUD_PROVIDER);
|
|
542
596
|
}
|
|
543
597
|
}
|
|
@@ -587,7 +641,7 @@ export default {
|
|
|
587
641
|
}
|
|
588
642
|
}
|
|
589
643
|
|
|
590
|
-
const cur = this.agentConfig
|
|
644
|
+
const cur = this.agentConfig['cloud-provider-name'];
|
|
591
645
|
|
|
592
646
|
if ( cur && !out.find((x) => x.value === cur) ) {
|
|
593
647
|
out.unshift({ label: `${ cur } (Current)`, value: cur });
|
|
@@ -630,6 +684,13 @@ export default {
|
|
|
630
684
|
return out;
|
|
631
685
|
},
|
|
632
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
|
+
|
|
633
694
|
appsOSWarning() {
|
|
634
695
|
if (this.mode !== _EDIT ) {
|
|
635
696
|
return null;
|
|
@@ -701,6 +762,16 @@ export default {
|
|
|
701
762
|
},
|
|
702
763
|
|
|
703
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
|
+
},
|
|
704
775
|
|
|
705
776
|
credentialId(val) {
|
|
706
777
|
if ( val ) {
|
|
@@ -831,6 +902,10 @@ export default {
|
|
|
831
902
|
}
|
|
832
903
|
}
|
|
833
904
|
|
|
905
|
+
if ( this.value.spec.defaultPodSecurityPolicyTemplateName === undefined ) {
|
|
906
|
+
set(this.value.spec, 'defaultPodSecurityPolicyTemplateName', '');
|
|
907
|
+
}
|
|
908
|
+
|
|
834
909
|
if ( this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName === undefined ) {
|
|
835
910
|
set(this.value.spec, 'defaultPodSecurityAdmissionConfigurationTemplateName', '');
|
|
836
911
|
}
|
|
@@ -846,6 +921,10 @@ export default {
|
|
|
846
921
|
k3sVersions: this.$store.dispatch('management/request', { url: '/v1-k3s-release/releases' }),
|
|
847
922
|
};
|
|
848
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
|
+
|
|
849
928
|
if (this.$store.getters['management/canList'](MANAGEMENT.PSA)) {
|
|
850
929
|
hash.allPSAs = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.PSA });
|
|
851
930
|
}
|
|
@@ -870,6 +949,7 @@ export default {
|
|
|
870
949
|
|
|
871
950
|
const res = await allHash(hash);
|
|
872
951
|
|
|
952
|
+
this.allPSPs = res.allPSPs || [];
|
|
873
953
|
this.allPSAs = res.allPSAs || [];
|
|
874
954
|
this.rke2Versions = res.rke2Versions.data || [];
|
|
875
955
|
this.k3sVersions = res.k3sVersions.data || [];
|
|
@@ -951,15 +1031,23 @@ export default {
|
|
|
951
1031
|
/**
|
|
952
1032
|
* set instanceNameLimit to 15 to all pool machine if truncateHostnames checkbox is clicked
|
|
953
1033
|
*/
|
|
954
|
-
|
|
955
|
-
if (
|
|
1034
|
+
truncateName() {
|
|
1035
|
+
if (this.truncateHostnames) {
|
|
956
1036
|
this.value.defaultHostnameLengthLimit = NETBIOS_TRUNCATION_LENGTH;
|
|
957
|
-
this.truncateLimit = NETBIOS_TRUNCATION_LENGTH;
|
|
958
1037
|
} else {
|
|
959
|
-
this.truncateLimit = 0;
|
|
960
1038
|
this.value.removeDefaultHostnameLengthLimit();
|
|
961
1039
|
}
|
|
962
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
|
+
},
|
|
963
1051
|
|
|
964
1052
|
/**
|
|
965
1053
|
* Get machine pools from the cluster configuration
|
|
@@ -1246,6 +1334,23 @@ export default {
|
|
|
1246
1334
|
});
|
|
1247
1335
|
},
|
|
1248
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
|
+
|
|
1249
1354
|
// Set busy before save and clear after save
|
|
1250
1355
|
async saveOverride(btnCb) {
|
|
1251
1356
|
this.$set(this, 'busy', true);
|
|
@@ -1279,6 +1384,13 @@ export default {
|
|
|
1279
1384
|
this.agentConfigurationCleanup();
|
|
1280
1385
|
|
|
1281
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
|
+
}
|
|
1282
1394
|
|
|
1283
1395
|
if (isEditVersion) {
|
|
1284
1396
|
const shouldContinue = await this.showAddonConfirmation();
|
|
@@ -1305,7 +1417,7 @@ export default {
|
|
|
1305
1417
|
|
|
1306
1418
|
const isUpgrade = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
|
|
1307
1419
|
|
|
1308
|
-
if (this.agentConfig
|
|
1420
|
+
if (this.agentConfig['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
|
|
1309
1421
|
const namespace = this.machinePools?.[0]?.config?.vmNamespace;
|
|
1310
1422
|
|
|
1311
1423
|
const res = await this.$store.dispatch('management/request', {
|
|
@@ -1413,9 +1525,7 @@ export default {
|
|
|
1413
1525
|
for ( const chartName of this.addonNames ) {
|
|
1414
1526
|
const entry = this.chartVersions[chartName];
|
|
1415
1527
|
|
|
1416
|
-
|
|
1417
|
-
// https://github.com/rancher/dashboard/issues/10338
|
|
1418
|
-
if ( this.versionInfo[chartName] || chartName.includes('none')) {
|
|
1528
|
+
if ( this.versionInfo[chartName] ) {
|
|
1419
1529
|
continue;
|
|
1420
1530
|
}
|
|
1421
1531
|
|
|
@@ -1439,28 +1549,27 @@ export default {
|
|
|
1439
1549
|
}
|
|
1440
1550
|
},
|
|
1441
1551
|
|
|
1442
|
-
|
|
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() {
|
|
1443
1559
|
this.addonsRev++;
|
|
1444
1560
|
this.addonNames.forEach((name) => {
|
|
1445
1561
|
const chartValues = this.versionInfo[name]?.questions ? this.initYamlEditor(name) : {};
|
|
1446
1562
|
|
|
1447
1563
|
set(this.userChartValuesTemp, name, chartValues);
|
|
1448
1564
|
});
|
|
1449
|
-
this.
|
|
1450
|
-
},
|
|
1451
|
-
refreshComponentWithYamls(key) {
|
|
1452
|
-
const component = this.$refs[key];
|
|
1453
|
-
|
|
1454
|
-
if ( component ) {
|
|
1455
|
-
this.refreshYamls(component.$refs);
|
|
1456
|
-
}
|
|
1565
|
+
this.refreshYamls();
|
|
1457
1566
|
},
|
|
1458
1567
|
|
|
1459
|
-
refreshYamls(
|
|
1460
|
-
const keys = Object.keys(refs).filter((x) => x.startsWith('yaml'));
|
|
1568
|
+
refreshYamls() {
|
|
1569
|
+
const keys = Object.keys(this.$refs).filter((x) => x.startsWith('yaml'));
|
|
1461
1570
|
|
|
1462
1571
|
for ( const k of keys ) {
|
|
1463
|
-
const entry = refs[k];
|
|
1572
|
+
const entry = this.$refs[k];
|
|
1464
1573
|
const list = isArray(entry) ? entry : [entry];
|
|
1465
1574
|
|
|
1466
1575
|
for ( const component of list ) {
|
|
@@ -1482,6 +1591,10 @@ export default {
|
|
|
1482
1591
|
this.userChartValues[this.chartVersionKey(name)] = different;
|
|
1483
1592
|
}, 250, { leading: true }),
|
|
1484
1593
|
|
|
1594
|
+
updateQuestions(name) {
|
|
1595
|
+
this.syncChartValues(name);
|
|
1596
|
+
},
|
|
1597
|
+
|
|
1485
1598
|
initYamlEditor(name) {
|
|
1486
1599
|
const defaultChartValue = this.versionInfo[name];
|
|
1487
1600
|
const key = this.chartVersionKey(name);
|
|
@@ -1499,7 +1612,7 @@ export default {
|
|
|
1499
1612
|
}
|
|
1500
1613
|
|
|
1501
1614
|
for ( const k in this.agentArgs ) {
|
|
1502
|
-
if ( this.agentConfig
|
|
1615
|
+
if ( this.agentConfig[k] === undefined ) {
|
|
1503
1616
|
const def = this.agentArgs[k].default;
|
|
1504
1617
|
|
|
1505
1618
|
set(this.agentConfig, k, (def !== undefined ? def : undefined));
|
|
@@ -1521,6 +1634,10 @@ export default {
|
|
|
1521
1634
|
this.$set(this, 'membershipUpdate', update);
|
|
1522
1635
|
},
|
|
1523
1636
|
|
|
1637
|
+
canRemoveKubeletRow(row, idx) {
|
|
1638
|
+
return idx !== 0;
|
|
1639
|
+
},
|
|
1640
|
+
|
|
1524
1641
|
async initRegistry() {
|
|
1525
1642
|
// Check for an existing cluster scoped registry
|
|
1526
1643
|
const clusterRegistry = this.agentConfig?.['system-default-registry'] || '';
|
|
@@ -1763,7 +1880,6 @@ export default {
|
|
|
1763
1880
|
setHarvesterDefaultCloudProvider() {
|
|
1764
1881
|
if (this.isHarvesterDriver &&
|
|
1765
1882
|
this.mode === _CREATE &&
|
|
1766
|
-
this.agentConfig &&
|
|
1767
1883
|
!this.agentConfig['cloud-provider-name'] &&
|
|
1768
1884
|
!this.isHarvesterExternalCredential &&
|
|
1769
1885
|
!this.isHarvesterIncompatible
|
|
@@ -1792,8 +1908,7 @@ export default {
|
|
|
1792
1908
|
}
|
|
1793
1909
|
this.setHarvesterDefaultCloudProvider();
|
|
1794
1910
|
},
|
|
1795
|
-
toggleCustomRegistry(
|
|
1796
|
-
this.showCustomRegistryInput = neu;
|
|
1911
|
+
toggleCustomRegistry(e) {
|
|
1797
1912
|
if (this.registryHost) {
|
|
1798
1913
|
this.registryHost = null;
|
|
1799
1914
|
this.registrySecret = null;
|
|
@@ -1802,6 +1917,28 @@ export default {
|
|
|
1802
1917
|
}
|
|
1803
1918
|
},
|
|
1804
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
|
+
|
|
1805
1942
|
/**
|
|
1806
1943
|
* Reset PSA on several input changes for given conditions
|
|
1807
1944
|
*/
|
|
@@ -1811,9 +1948,11 @@ export default {
|
|
|
1811
1948
|
const cisValue = this.agentConfig?.profile || this.serverConfig?.profile;
|
|
1812
1949
|
|
|
1813
1950
|
if (!this.cisOverride) {
|
|
1814
|
-
if (cisValue) {
|
|
1951
|
+
if (this.hasPsaTemplates && cisValue) {
|
|
1815
1952
|
set(this.value.spec, 'defaultPodSecurityAdmissionConfigurationTemplateName', hardcodedTemplate);
|
|
1816
1953
|
}
|
|
1954
|
+
|
|
1955
|
+
this.cisPsaChangeBanner = this.hasPsaTemplates;
|
|
1817
1956
|
}
|
|
1818
1957
|
},
|
|
1819
1958
|
|
|
@@ -1834,16 +1973,30 @@ export default {
|
|
|
1834
1973
|
set(this.agentConfig, 'protect-kernel-defaults', false);
|
|
1835
1974
|
}
|
|
1836
1975
|
},
|
|
1837
|
-
updateAdditionalManifest(neu) {
|
|
1838
|
-
this.value.spec.rkeConfig.additionalManifest = neu;
|
|
1839
|
-
},
|
|
1840
1976
|
|
|
1841
1977
|
/**
|
|
1842
|
-
* Handle k8s changes side effects, like PSA resets
|
|
1978
|
+
* Handle k8s changes side effects, like PSP and PSA resets
|
|
1843
1979
|
*/
|
|
1844
|
-
handleKubernetesChange(value
|
|
1980
|
+
handleKubernetesChange(value) {
|
|
1845
1981
|
if (value) {
|
|
1846
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
|
+
}
|
|
1847
2000
|
|
|
1848
2001
|
// If Harvester driver, reset cloud provider if not compatible
|
|
1849
2002
|
if (this.isHarvesterDriver && this.mode === _CREATE && this.isHarvesterIncompatible) {
|
|
@@ -1852,6 +2005,13 @@ export default {
|
|
|
1852
2005
|
}
|
|
1853
2006
|
},
|
|
1854
2007
|
|
|
2008
|
+
/**
|
|
2009
|
+
* Keep last PSP value
|
|
2010
|
+
*/
|
|
2011
|
+
handlePspChange(value) {
|
|
2012
|
+
this.lastDefaultPodSecurityPolicyTemplateName = value;
|
|
2013
|
+
},
|
|
2014
|
+
|
|
1855
2015
|
handleShowDeprecatedPatchVersionsChanged(value) {
|
|
1856
2016
|
this.showDeprecatedPatchVersions = value;
|
|
1857
2017
|
},
|
|
@@ -1868,20 +2028,27 @@ export default {
|
|
|
1868
2028
|
handleEnabledSystemServicesChanged(val) {
|
|
1869
2029
|
set(this.serverConfig, 'disable', val);
|
|
1870
2030
|
},
|
|
1871
|
-
|
|
1872
|
-
handleCiliumValuesChanged(neu) {
|
|
1873
|
-
if (neu === undefined) {
|
|
1874
|
-
return;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
2031
|
+
handleCiliumIpv6Changed(neu) {
|
|
1877
2032
|
const name = this.chartVersionKey('rke2-cilium');
|
|
2033
|
+
const values = this.userChartValues[name];
|
|
1878
2034
|
|
|
1879
2035
|
set(this, 'userChartValues', {
|
|
1880
2036
|
...this.userChartValues,
|
|
1881
|
-
[name]: {
|
|
2037
|
+
[name]: {
|
|
2038
|
+
...values,
|
|
2039
|
+
cilium: {
|
|
2040
|
+
...values?.cilium,
|
|
2041
|
+
ipv6: {
|
|
2042
|
+
...values?.cilium?.ipv6,
|
|
2043
|
+
enabled: neu
|
|
2044
|
+
}
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
1882
2047
|
});
|
|
1883
2048
|
},
|
|
1884
|
-
|
|
2049
|
+
handlePspChanged(neu) {
|
|
2050
|
+
this.handlePspChange(neu);
|
|
2051
|
+
},
|
|
1885
2052
|
handleCisChanged() {
|
|
1886
2053
|
this.handleCisChange();
|
|
1887
2054
|
},
|
|
@@ -1923,31 +2090,13 @@ export default {
|
|
|
1923
2090
|
|
|
1924
2091
|
this.errors = errors;
|
|
1925
2092
|
},
|
|
1926
|
-
|
|
1927
|
-
this.s3Backup = neu;
|
|
1928
|
-
if ( neu ) {
|
|
1929
|
-
// 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.
|
|
1930
|
-
if (isEmpty(this.rkeConfig.etcd?.s3)) {
|
|
1931
|
-
set(this.rkeConfig.etcd, 's3', {});
|
|
1932
|
-
}
|
|
1933
|
-
} else {
|
|
1934
|
-
set(this.rkeConfig.etcd, 's3', null);
|
|
1935
|
-
}
|
|
1936
|
-
},
|
|
1937
|
-
handleConfigEtcdExposeMetricsChanged(neu) {
|
|
1938
|
-
set(this.serverConfig, 'etcd-expose-metrics', neu);
|
|
1939
|
-
},
|
|
1940
|
-
handleRegistryHostChanged(neu) {
|
|
1941
|
-
this.registryHost = neu;
|
|
1942
|
-
},
|
|
1943
|
-
handleRegistrySecretChanged(neu) {
|
|
1944
|
-
this.registrySecret = neu;
|
|
1945
|
-
},
|
|
2093
|
+
|
|
1946
2094
|
validateClusterName() {
|
|
1947
|
-
if (!this.value.metadata.name && this.agentConfig
|
|
2095
|
+
if (!this.value.metadata.name && this.agentConfig['cloud-provider-name'] === HARVESTER) {
|
|
1948
2096
|
this.errors.push(this.t('validation.required', { key: this.t('cluster.name.label') }, true));
|
|
1949
2097
|
}
|
|
1950
2098
|
},
|
|
2099
|
+
|
|
1951
2100
|
async validateMachinePool() {
|
|
1952
2101
|
if (this.errors) {
|
|
1953
2102
|
clear(this.errors);
|
|
@@ -2018,14 +2167,11 @@ export default {
|
|
|
2018
2167
|
:provider="provider"
|
|
2019
2168
|
:cancel="cancelCredential"
|
|
2020
2169
|
:showing-form="showForm"
|
|
2021
|
-
:default-on-cancel="true"
|
|
2022
|
-
data-testid="select-credential"
|
|
2023
2170
|
class="mt-20"
|
|
2024
2171
|
/>
|
|
2025
2172
|
|
|
2026
2173
|
<div
|
|
2027
2174
|
v-if="showForm"
|
|
2028
|
-
data-testid="form"
|
|
2029
2175
|
class="mt-20"
|
|
2030
2176
|
>
|
|
2031
2177
|
<NameNsDescription
|
|
@@ -2110,6 +2256,7 @@ export default {
|
|
|
2110
2256
|
:machine-pools="machinePools"
|
|
2111
2257
|
:busy="busy"
|
|
2112
2258
|
:pool-id="obj.id"
|
|
2259
|
+
:pool-create-mode="obj.create"
|
|
2113
2260
|
@error="handleMachinePoolError"
|
|
2114
2261
|
@validationChanged="v=>machinePoolValidationChanged(obj.id, v)"
|
|
2115
2262
|
/>
|
|
@@ -2132,33 +2279,40 @@ export default {
|
|
|
2132
2279
|
name="basic"
|
|
2133
2280
|
label-key="cluster.tabs.basic"
|
|
2134
2281
|
:weight="11"
|
|
2135
|
-
@active="
|
|
2282
|
+
@active="refreshYamls"
|
|
2136
2283
|
>
|
|
2137
2284
|
<!-- Basic -->
|
|
2138
2285
|
<Basics
|
|
2139
|
-
ref="tab-Basics"
|
|
2140
2286
|
v-model="value"
|
|
2141
2287
|
:live-value="liveValue"
|
|
2142
2288
|
:mode="mode"
|
|
2143
2289
|
:provider="provider"
|
|
2290
|
+
:psps="psps"
|
|
2144
2291
|
:user-chart-values="userChartValues"
|
|
2145
2292
|
:credential="credential"
|
|
2146
2293
|
:cis-override="cisOverride"
|
|
2294
|
+
:cis-psa-change-banner="cisPsaChangeBanner"
|
|
2295
|
+
:all-psps="allPSPs"
|
|
2147
2296
|
:all-psas="allPSAs"
|
|
2148
2297
|
:addon-versions="addonVersions"
|
|
2149
2298
|
:show-deprecated-patch-versions="showDeprecatedPatchVersions"
|
|
2299
|
+
:needs-psp="needsPSP"
|
|
2150
2300
|
:selected-version="selectedVersion"
|
|
2151
2301
|
:is-harvester-driver="isHarvesterDriver"
|
|
2152
2302
|
:is-harvester-incompatible="isHarvesterIncompatible"
|
|
2153
2303
|
:version-options="versionOptions"
|
|
2304
|
+
:cluster-is-already-created="clusterIsAlreadyCreated"
|
|
2154
2305
|
:is-elemental-cluster="isElementalCluster"
|
|
2306
|
+
:has-psa-templates="hasPsaTemplates"
|
|
2307
|
+
:is-k3s="isK3s"
|
|
2155
2308
|
:have-arg-info="haveArgInfo"
|
|
2156
2309
|
:show-cni="showCni"
|
|
2157
2310
|
:show-cloud-provider="showCloudProvider"
|
|
2158
2311
|
:cloud-provider-options="cloudProviderOptions"
|
|
2159
|
-
@cilium-
|
|
2312
|
+
@cilium-ipv6-changed="handleCiliumIpv6Changed"
|
|
2160
2313
|
@enabled-system-services-changed="handleEnabledSystemServicesChanged"
|
|
2161
2314
|
@kubernetes-changed="handleKubernetesChange"
|
|
2315
|
+
@psp-changed="handlePspChanged"
|
|
2162
2316
|
@cis-changed="handleCisChanged"
|
|
2163
2317
|
@psa-default-changed="handlePsaDefaultChanged"
|
|
2164
2318
|
@show-deprecated-patch-versions-changed="handleShowDeprecatedPatchVersionsChanged"
|
|
@@ -2183,15 +2337,77 @@ export default {
|
|
|
2183
2337
|
name="etcd"
|
|
2184
2338
|
label-key="cluster.tabs.etcd"
|
|
2185
2339
|
>
|
|
2186
|
-
<
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
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>
|
|
2195
2411
|
</Tab>
|
|
2196
2412
|
|
|
2197
2413
|
<!-- Networking -->
|
|
@@ -2200,12 +2416,120 @@ export default {
|
|
|
2200
2416
|
name="networking"
|
|
2201
2417
|
label-key="cluster.tabs.networking"
|
|
2202
2418
|
>
|
|
2203
|
-
<
|
|
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
|
|
2204
2531
|
v-model="value"
|
|
2205
2532
|
:mode="mode"
|
|
2206
|
-
:selected-version="selectedVersion"
|
|
2207
|
-
:truncate-limit="truncateLimit"
|
|
2208
|
-
@truncate-hostname="truncateHostname"
|
|
2209
2533
|
/>
|
|
2210
2534
|
</Tab>
|
|
2211
2535
|
|
|
@@ -2214,10 +2538,44 @@ export default {
|
|
|
2214
2538
|
name="upgrade"
|
|
2215
2539
|
label-key="cluster.tabs.upgrade"
|
|
2216
2540
|
>
|
|
2217
|
-
<
|
|
2218
|
-
v-
|
|
2219
|
-
|
|
2220
|
-
|
|
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>
|
|
2221
2579
|
</Tab>
|
|
2222
2580
|
|
|
2223
2581
|
<!-- Registries -->
|
|
@@ -2225,40 +2583,150 @@ export default {
|
|
|
2225
2583
|
name="registry"
|
|
2226
2584
|
label-key="cluster.tabs.registry"
|
|
2227
2585
|
>
|
|
2228
|
-
<
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
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>
|
|
2241
2666
|
</Tab>
|
|
2242
2667
|
|
|
2243
2668
|
<!-- Add-on Config -->
|
|
2244
2669
|
<Tab
|
|
2245
2670
|
name="addons"
|
|
2246
2671
|
label-key="cluster.tabs.addons"
|
|
2247
|
-
@active="showAddons
|
|
2672
|
+
@active="showAddons"
|
|
2248
2673
|
>
|
|
2249
|
-
<
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
:
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
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>
|
|
2262
2730
|
</Tab>
|
|
2263
2731
|
|
|
2264
2732
|
<!-- Cluster Agent Configuration -->
|
|
@@ -2295,13 +2763,82 @@ export default {
|
|
|
2295
2763
|
name="advanced"
|
|
2296
2764
|
label-key="cluster.tabs.advanced"
|
|
2297
2765
|
:weight="-1"
|
|
2766
|
+
@active="refreshYamls"
|
|
2298
2767
|
>
|
|
2299
|
-
<
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
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>
|
|
2305
2842
|
</Tab>
|
|
2306
2843
|
|
|
2307
2844
|
<AgentEnv
|