@rancher/shell 0.5.3 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +407 -468
- 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
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
3
|
-
|
|
4
|
-
import { RadioGroup } from '@components/Form/Radio';
|
|
5
|
-
|
|
6
|
-
import S3Config from '@shell/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config';
|
|
7
|
-
import UnitInput from '@shell/components/form/UnitInput';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
components: {
|
|
11
|
-
LabeledInput,
|
|
12
|
-
RadioGroup,
|
|
13
|
-
S3Config,
|
|
14
|
-
UnitInput
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
props: {
|
|
18
|
-
mode: {
|
|
19
|
-
type: String,
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
value: {
|
|
24
|
-
type: Object,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
selectedVersion: {
|
|
28
|
-
type: Object,
|
|
29
|
-
required: true,
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
s3Backup: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
required: false,
|
|
35
|
-
default: false
|
|
36
|
-
},
|
|
37
|
-
registerBeforeHook: {
|
|
38
|
-
type: Function,
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
computed: {
|
|
45
|
-
etcd() {
|
|
46
|
-
return this.value.spec.rkeConfig.etcd;
|
|
47
|
-
},
|
|
48
|
-
argsEtcdExposeMetrics() {
|
|
49
|
-
return !!this.selectedVersion?.serverArgs['etcd-expose-metrics'];
|
|
50
|
-
},
|
|
51
|
-
configEtcdExposeMetrics() {
|
|
52
|
-
return !!this.value.spec.rkeConfig.machineGlobalConfig['etcd-expose-metrics'];
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<template>
|
|
60
|
-
<div>
|
|
61
|
-
<div class="row">
|
|
62
|
-
<div class="col span-6">
|
|
63
|
-
<RadioGroup
|
|
64
|
-
v-model="etcd.disableSnapshots"
|
|
65
|
-
name="etcd-disable-snapshots"
|
|
66
|
-
:options="[true, false]"
|
|
67
|
-
:label="t('cluster.rke2.etcd.disableSnapshots.label')"
|
|
68
|
-
:labels="[t('generic.disable'), t('generic.enable')]"
|
|
69
|
-
:mode="mode"
|
|
70
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
<div
|
|
74
|
-
v-if="etcd.disableSnapshots !== true"
|
|
75
|
-
class="row"
|
|
76
|
-
>
|
|
77
|
-
<div class="col span-6">
|
|
78
|
-
<LabeledInput
|
|
79
|
-
v-model="etcd.snapshotScheduleCron"
|
|
80
|
-
type="cron"
|
|
81
|
-
placeholder="0 * * * *"
|
|
82
|
-
:mode="mode"
|
|
83
|
-
:label="t('cluster.rke2.etcd.snapshotScheduleCron.label')"
|
|
84
|
-
/>
|
|
85
|
-
</div>
|
|
86
|
-
<div class="col span-6">
|
|
87
|
-
<UnitInput
|
|
88
|
-
v-model="etcd.snapshotRetention"
|
|
89
|
-
:mode="mode"
|
|
90
|
-
:label="t('cluster.rke2.etcd.snapshotRetention.label')"
|
|
91
|
-
:suffix="t('cluster.rke2.snapshots.suffix')"
|
|
92
|
-
/>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
|
|
96
|
-
<template v-if="etcd.disableSnapshots !== true">
|
|
97
|
-
<div class="spacer" />
|
|
98
|
-
|
|
99
|
-
<RadioGroup
|
|
100
|
-
:value="s3Backup"
|
|
101
|
-
name="etcd-s3"
|
|
102
|
-
:options="[false, true]"
|
|
103
|
-
label="Backup Snapshots to S3"
|
|
104
|
-
:labels="['Disable','Enable']"
|
|
105
|
-
:mode="mode"
|
|
106
|
-
@input="$emit('s3-backup-changed', $event)"
|
|
107
|
-
/>
|
|
108
|
-
|
|
109
|
-
<S3Config
|
|
110
|
-
v-if="s3Backup"
|
|
111
|
-
v-model="etcd.s3"
|
|
112
|
-
:namespace="value.metadata.namespace"
|
|
113
|
-
:register-before-hook="registerBeforeHook"
|
|
114
|
-
:mode="mode"
|
|
115
|
-
/>
|
|
116
|
-
</template>
|
|
117
|
-
|
|
118
|
-
<div class="spacer" />
|
|
119
|
-
|
|
120
|
-
<div class="row">
|
|
121
|
-
<div class="col span-6">
|
|
122
|
-
<RadioGroup
|
|
123
|
-
v-if="argsEtcdExposeMetrics"
|
|
124
|
-
:value="configEtcdExposeMetrics"
|
|
125
|
-
name="etcd-expose-metrics"
|
|
126
|
-
:options="[false, true]"
|
|
127
|
-
:label="t('cluster.rke2.etcd.exportMetric.label')"
|
|
128
|
-
:labels="[t('cluster.rke2.etcd.exportMetric.false'), t('cluster.rke2.etcd.exportMetric.true')]"
|
|
129
|
-
:mode="mode"
|
|
130
|
-
@input="$emit('config-etcd-expose-metrics-changed', $event)"
|
|
131
|
-
/>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
</template>
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
3
|
-
import { Banner } from '@components/Banner';
|
|
4
|
-
import { Checkbox } from '@components/Form/Checkbox';
|
|
5
|
-
import { _EDIT, _VIEW } from '@shell/config/query-params';
|
|
6
|
-
import ArrayList from '@shell/components/form/ArrayList';
|
|
7
|
-
import ACE from '@shell/edit/provisioning.cattle.io.cluster/tabs/networking/ACE';
|
|
8
|
-
|
|
9
|
-
const NETBIOS_TRUNCATION_LENGTH = 15;
|
|
10
|
-
|
|
11
|
-
export default {
|
|
12
|
-
components: {
|
|
13
|
-
LabeledInput,
|
|
14
|
-
Banner,
|
|
15
|
-
Checkbox,
|
|
16
|
-
ArrayList,
|
|
17
|
-
ACE
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
props: {
|
|
21
|
-
mode: {
|
|
22
|
-
type: String,
|
|
23
|
-
required: true,
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
value: {
|
|
27
|
-
type: Object,
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
selectedVersion: {
|
|
31
|
-
type: Object,
|
|
32
|
-
required: true,
|
|
33
|
-
},
|
|
34
|
-
truncateLimit: {
|
|
35
|
-
type: Number,
|
|
36
|
-
required: false,
|
|
37
|
-
default: 0
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
computed: {
|
|
42
|
-
truncateHostnames() {
|
|
43
|
-
return this.truncateLimit === NETBIOS_TRUNCATION_LENGTH;
|
|
44
|
-
},
|
|
45
|
-
serverConfig() {
|
|
46
|
-
return this.value.spec.rkeConfig.machineGlobalConfig;
|
|
47
|
-
},
|
|
48
|
-
serverArgs() {
|
|
49
|
-
return this.selectedVersion?.serverArgs || {};
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
showIpv6Warning() {
|
|
53
|
-
const clusterCIDR = this.serverConfig['cluster-cidr'] || '';
|
|
54
|
-
const serviceCIDR = this.serverConfig['service-cidr'] || '';
|
|
55
|
-
|
|
56
|
-
return clusterCIDR.includes(':') || serviceCIDR.includes(':');
|
|
57
|
-
},
|
|
58
|
-
hostnameTruncationManuallySet() {
|
|
59
|
-
return !!this.truncateLimit && this.truncateLimit !== NETBIOS_TRUNCATION_LENGTH;
|
|
60
|
-
},
|
|
61
|
-
isEdit() {
|
|
62
|
-
return this.mode === _EDIT;
|
|
63
|
-
},
|
|
64
|
-
isView() {
|
|
65
|
-
return this.mode === _VIEW;
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<template>
|
|
72
|
-
<div>
|
|
73
|
-
<h3>
|
|
74
|
-
{{ t('cluster.rke2.address.header') }}
|
|
75
|
-
<i
|
|
76
|
-
v-clean-tooltip="t('cluster.rke2.address.tooltip')"
|
|
77
|
-
class="icon icon-info"
|
|
78
|
-
/>
|
|
79
|
-
</h3>
|
|
80
|
-
<Banner
|
|
81
|
-
v-if="showIpv6Warning"
|
|
82
|
-
color="warning"
|
|
83
|
-
>
|
|
84
|
-
{{ t('cluster.rke2.address.ipv6.warning') }}
|
|
85
|
-
</Banner>
|
|
86
|
-
<div class="row mb-20">
|
|
87
|
-
<div
|
|
88
|
-
v-if="serverArgs['cluster-cidr']"
|
|
89
|
-
class="col span-6"
|
|
90
|
-
>
|
|
91
|
-
<LabeledInput
|
|
92
|
-
v-model="serverConfig['cluster-cidr']"
|
|
93
|
-
:mode="mode"
|
|
94
|
-
:disabled="isEdit"
|
|
95
|
-
:label="t('cluster.rke2.address.clusterCidr.label')"
|
|
96
|
-
/>
|
|
97
|
-
</div>
|
|
98
|
-
<div
|
|
99
|
-
v-if="serverArgs['service-cidr']"
|
|
100
|
-
class="col span-6"
|
|
101
|
-
>
|
|
102
|
-
<LabeledInput
|
|
103
|
-
v-model="serverConfig['service-cidr']"
|
|
104
|
-
:mode="mode"
|
|
105
|
-
:disabled="isEdit"
|
|
106
|
-
:label="t('cluster.rke2.address.serviceCidr.label')"
|
|
107
|
-
/>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
|
|
111
|
-
<div class="row mb-20">
|
|
112
|
-
<div
|
|
113
|
-
v-if="serverArgs['cluster-dns']"
|
|
114
|
-
class="col span-6"
|
|
115
|
-
>
|
|
116
|
-
<LabeledInput
|
|
117
|
-
v-model="serverConfig['cluster-dns']"
|
|
118
|
-
:mode="mode"
|
|
119
|
-
:disabled="isEdit"
|
|
120
|
-
:label="t('cluster.rke2.address.dns.label')"
|
|
121
|
-
/>
|
|
122
|
-
</div>
|
|
123
|
-
<div
|
|
124
|
-
v-if="serverArgs['cluster-domain']"
|
|
125
|
-
class="col span-6"
|
|
126
|
-
>
|
|
127
|
-
<LabeledInput
|
|
128
|
-
v-model="serverConfig['cluster-domain']"
|
|
129
|
-
:mode="mode"
|
|
130
|
-
:disabled="isEdit"
|
|
131
|
-
:label="t('cluster.rke2.address.domain.label')"
|
|
132
|
-
/>
|
|
133
|
-
</div>
|
|
134
|
-
</div>
|
|
135
|
-
|
|
136
|
-
<div
|
|
137
|
-
v-if="serverArgs['service-node-port-range']"
|
|
138
|
-
class="row mb-20"
|
|
139
|
-
>
|
|
140
|
-
<div class="col span-6">
|
|
141
|
-
<LabeledInput
|
|
142
|
-
v-model="serverConfig['service-node-port-range']"
|
|
143
|
-
:mode="mode"
|
|
144
|
-
:label="t('cluster.rke2.address.nodePortRange.label')"
|
|
145
|
-
/>
|
|
146
|
-
</div>
|
|
147
|
-
<div
|
|
148
|
-
class="col span-6"
|
|
149
|
-
>
|
|
150
|
-
<Checkbox
|
|
151
|
-
v-if="!isView || isView && !hostnameTruncationManuallySet"
|
|
152
|
-
:value="truncateHostnames"
|
|
153
|
-
class="mt-20"
|
|
154
|
-
:disabled="isEdit || isView || hostnameTruncationManuallySet"
|
|
155
|
-
:mode="mode"
|
|
156
|
-
:label="t('cluster.rke2.truncateHostnames')"
|
|
157
|
-
@input="$emit('truncate-hostname', $event)"
|
|
158
|
-
/>
|
|
159
|
-
<Banner
|
|
160
|
-
v-if="hostnameTruncationManuallySet"
|
|
161
|
-
color="info"
|
|
162
|
-
>
|
|
163
|
-
<div class="text">
|
|
164
|
-
{{ t('cluster.machinePool.truncationCluster', { limit: truncateLimit }) }}
|
|
165
|
-
</div>
|
|
166
|
-
</Banner>
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
|
|
170
|
-
<div
|
|
171
|
-
v-if="serverArgs['tls-san']"
|
|
172
|
-
class="row mb-20"
|
|
173
|
-
>
|
|
174
|
-
<div class="col span-6">
|
|
175
|
-
<ArrayList
|
|
176
|
-
v-model="serverConfig['tls-san']"
|
|
177
|
-
:protip="false"
|
|
178
|
-
:mode="mode"
|
|
179
|
-
:title="t('cluster.rke2.address.tlsSan.label')"
|
|
180
|
-
/>
|
|
181
|
-
</div>
|
|
182
|
-
</div>
|
|
183
|
-
|
|
184
|
-
<ACE
|
|
185
|
-
v-model="value"
|
|
186
|
-
:mode="mode"
|
|
187
|
-
/>
|
|
188
|
-
</div>
|
|
189
|
-
</template>
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
3
|
-
import { Banner } from '@components/Banner';
|
|
4
|
-
import { Checkbox } from '@components/Form/Checkbox';
|
|
5
|
-
import SelectOrCreateAuthSecret from '@shell/components/form/SelectOrCreateAuthSecret';
|
|
6
|
-
import AdvancedSection from '@shell/components/AdvancedSection.vue';
|
|
7
|
-
import RegistryConfigs from '@shell/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs';
|
|
8
|
-
import RegistryMirrors from '@shell/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryMirrors';
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
components: {
|
|
12
|
-
LabeledInput,
|
|
13
|
-
Banner,
|
|
14
|
-
Checkbox,
|
|
15
|
-
SelectOrCreateAuthSecret,
|
|
16
|
-
AdvancedSection,
|
|
17
|
-
RegistryConfigs,
|
|
18
|
-
RegistryMirrors
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
props: {
|
|
22
|
-
registerBeforeHook: {
|
|
23
|
-
type: Function,
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
mode: {
|
|
28
|
-
type: String,
|
|
29
|
-
required: true,
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
value: {
|
|
33
|
-
type: Object,
|
|
34
|
-
required: true,
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
showCustomRegistryInput: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
registryHost: {
|
|
43
|
-
type: String,
|
|
44
|
-
required: false,
|
|
45
|
-
default: null
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
registrySecret: {
|
|
49
|
-
type: String,
|
|
50
|
-
required: false,
|
|
51
|
-
default: null
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
showCustomRegistryAdvancedInput: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
required: true,
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<template>
|
|
63
|
-
<div>
|
|
64
|
-
<div class="row">
|
|
65
|
-
<h3>{{ t('cluster.privateRegistry.label') }}</h3>
|
|
66
|
-
</div>
|
|
67
|
-
<div class="row">
|
|
68
|
-
<div class="col span-12">
|
|
69
|
-
<Banner
|
|
70
|
-
:closable="false"
|
|
71
|
-
class="cluster-tools-tip"
|
|
72
|
-
color="info"
|
|
73
|
-
label-key="cluster.privateRegistry.description"
|
|
74
|
-
/>
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
<div class="row">
|
|
78
|
-
<Checkbox
|
|
79
|
-
:value="showCustomRegistryInput"
|
|
80
|
-
class="mb-20"
|
|
81
|
-
:label="t('cluster.privateRegistry.label')"
|
|
82
|
-
data-testid="registries-enable-checkbox"
|
|
83
|
-
@input="$emit('custom-registry-changed', $event)"
|
|
84
|
-
/>
|
|
85
|
-
</div>
|
|
86
|
-
<div
|
|
87
|
-
v-if="showCustomRegistryInput"
|
|
88
|
-
class="row"
|
|
89
|
-
>
|
|
90
|
-
<div class="col span-6">
|
|
91
|
-
<LabeledInput
|
|
92
|
-
:value="registryHost"
|
|
93
|
-
label-key="catalog.chart.registry.custom.inputLabel"
|
|
94
|
-
placeholder-key="catalog.chart.registry.custom.placeholder"
|
|
95
|
-
:min-height="30"
|
|
96
|
-
data-testid="registry-host-input"
|
|
97
|
-
@input="$emit('registry-host-changed', $event)"
|
|
98
|
-
/>
|
|
99
|
-
<SelectOrCreateAuthSecret
|
|
100
|
-
v-model="registrySecret"
|
|
101
|
-
:register-before-hook="registerBeforeHook"
|
|
102
|
-
:hook-priority="1"
|
|
103
|
-
:mode="mode"
|
|
104
|
-
in-store="management"
|
|
105
|
-
:allow-ssh="false"
|
|
106
|
-
:allow-rke="true"
|
|
107
|
-
:vertical="true"
|
|
108
|
-
:namespace="value.metadata.namespace"
|
|
109
|
-
generate-name="registryconfig-auth-"
|
|
110
|
-
@input="$emit('registry-secret-changed', $event)"
|
|
111
|
-
/>
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
<template>
|
|
115
|
-
<div
|
|
116
|
-
v-if="showCustomRegistryInput"
|
|
117
|
-
class="row"
|
|
118
|
-
>
|
|
119
|
-
<AdvancedSection
|
|
120
|
-
class="col span-12 advanced"
|
|
121
|
-
:is-open-by-default="showCustomRegistryAdvancedInput"
|
|
122
|
-
:mode="mode"
|
|
123
|
-
data-testid="registries-advanced-section"
|
|
124
|
-
>
|
|
125
|
-
<Banner
|
|
126
|
-
:closable="false"
|
|
127
|
-
class="cluster-tools-tip"
|
|
128
|
-
color="info"
|
|
129
|
-
:label-key="value.isK3s ? 'cluster.privateRegistry.docsLinkK3s' : 'cluster.privateRegistry.docsLinkRke2'"
|
|
130
|
-
/>
|
|
131
|
-
<RegistryMirrors
|
|
132
|
-
v-model="value"
|
|
133
|
-
class="mt-20"
|
|
134
|
-
:mode="mode"
|
|
135
|
-
/>
|
|
136
|
-
<RegistryConfigs
|
|
137
|
-
v-model="value"
|
|
138
|
-
class="mt-20"
|
|
139
|
-
:mode="mode"
|
|
140
|
-
:cluster-register-before-hook="registerBeforeHook"
|
|
141
|
-
@updateConfigs="$emit('update-configs-changed', $event)"
|
|
142
|
-
/>
|
|
143
|
-
</AdvancedSection>
|
|
144
|
-
</div>
|
|
145
|
-
</template>
|
|
146
|
-
</div>
|
|
147
|
-
</template>
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import { get } from '@shell/utils/object';
|
|
3
|
-
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
4
|
-
import { Banner } from '@components/Banner';
|
|
5
|
-
import DrainOptions from '@shell/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions';
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
components: {
|
|
9
|
-
LabeledInput,
|
|
10
|
-
Banner,
|
|
11
|
-
DrainOptions
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
props: {
|
|
15
|
-
mode: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
value: {
|
|
21
|
-
type: Object,
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
computed: {
|
|
27
|
-
rkeConfig() {
|
|
28
|
-
return this.value.spec.rkeConfig;
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
methods: { get }
|
|
32
|
-
};
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<template>
|
|
36
|
-
<div>
|
|
37
|
-
<Banner
|
|
38
|
-
v-if="get(rkeConfig, 'upgradeStrategy.controlPlaneDrainOptions.deleteEmptyDirData')"
|
|
39
|
-
color="warning"
|
|
40
|
-
>
|
|
41
|
-
{{ t('cluster.rke2.drain.deleteEmptyDir.warning', {}, true) }}
|
|
42
|
-
</Banner>
|
|
43
|
-
<div class="row">
|
|
44
|
-
<div class="col span-6">
|
|
45
|
-
<h3>{{ t('cluster.rke2.controlPlaneConcurrency.header') }}</h3>
|
|
46
|
-
<LabeledInput
|
|
47
|
-
v-model="rkeConfig.upgradeStrategy.controlPlaneConcurrency"
|
|
48
|
-
:mode="mode"
|
|
49
|
-
:label="t('cluster.rke2.controlPlaneConcurrency.label')"
|
|
50
|
-
:tooltip="t('cluster.rke2.controlPlaneConcurrency.toolTip')"
|
|
51
|
-
/>
|
|
52
|
-
<div class="spacer" />
|
|
53
|
-
<DrainOptions
|
|
54
|
-
v-model="rkeConfig.upgradeStrategy.controlPlaneDrainOptions"
|
|
55
|
-
:mode="mode"
|
|
56
|
-
/>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="col span-6">
|
|
59
|
-
<h3>
|
|
60
|
-
{{ t('cluster.rke2.workNode.label') }}
|
|
61
|
-
</h3>
|
|
62
|
-
<LabeledInput
|
|
63
|
-
v-model="rkeConfig.upgradeStrategy.workerConcurrency"
|
|
64
|
-
:mode="mode"
|
|
65
|
-
:label="t('cluster.rke2.workerConcurrency.label')"
|
|
66
|
-
:tooltip="t('cluster.rke2.workerConcurrency.toolTip')"
|
|
67
|
-
/>
|
|
68
|
-
<div class="spacer" />
|
|
69
|
-
<DrainOptions
|
|
70
|
-
v-model="rkeConfig.upgradeStrategy.workerDrainOptions"
|
|
71
|
-
:mode="mode"
|
|
72
|
-
/>
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
</div>
|
|
76
|
-
</template>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import EmberPage from '@shell/components/EmberPage';
|
|
2
|
-
import { MANAGEMENT } from '@shell/config/types';
|
|
3
|
-
import { haveV1Monitoring } from '@shell/utils/monitoring';
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
components: { EmberPage },
|
|
7
|
-
|
|
8
|
-
data() {
|
|
9
|
-
const { namespace, resource, id } = this.$route.params;
|
|
10
|
-
const projects = this.$store.getters['management/all'](MANAGEMENT.PROJECT);
|
|
11
|
-
const p = projects.find((p) => {
|
|
12
|
-
return !!p.namespaces.find((ns) => {
|
|
13
|
-
return ns.metadata.name === namespace;
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
let v1MonitoringUrl = null;
|
|
18
|
-
let v1MonitoringContainerBaseUrl = null;
|
|
19
|
-
|
|
20
|
-
if (p && haveV1Monitoring(this.$store.getters)) {
|
|
21
|
-
const prjID = p.id.replace('/', ':');
|
|
22
|
-
let prefix;
|
|
23
|
-
|
|
24
|
-
if (resource !== 'pod') {
|
|
25
|
-
const r = resource.split('.');
|
|
26
|
-
const res = r.length === 2 ? r[1] : r[0];
|
|
27
|
-
|
|
28
|
-
prefix = `workload-metrics/${ res }:`;
|
|
29
|
-
} else {
|
|
30
|
-
prefix = `workloads/pod-metrics/`;
|
|
31
|
-
v1MonitoringContainerBaseUrl = `/p/${ prjID }/workloads/${ namespace }:${ id }/container-metrics/`;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
v1MonitoringUrl = `/p/${ prjID }/${ prefix }${ namespace }:${ id }`;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return {
|
|
38
|
-
project: p ? p.id : null,
|
|
39
|
-
v1MonitoringUrl,
|
|
40
|
-
v1MonitoringContainerBaseUrl,
|
|
41
|
-
};
|
|
42
|
-
},
|
|
43
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import MgmtCluster from '@shell/models/management.cattle.io.cluster';
|
|
2
|
-
|
|
3
|
-
jest.mock('@shell/utils/clipboard', () => {
|
|
4
|
-
return { copyTextToClipboard: jest.fn(() => Promise.resolve({})) };
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
describe('class MgmtCluster', () => {
|
|
8
|
-
describe('provisioner', () => {
|
|
9
|
-
const testCases = [
|
|
10
|
-
[{ provider: 'rke', driver: 'imported' }, 'rke'],
|
|
11
|
-
[{ provider: 'k3s', driver: 'K3S' }, 'k3s'],
|
|
12
|
-
[{ provider: 'aks', driver: 'AKS' }, 'aks'],
|
|
13
|
-
[{}, 'imported'],
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
it.each(testCases)('should return provisioner value properly based on the props data', (clusterData: Object, expected: String) => {
|
|
17
|
-
const cluster = new MgmtCluster({ status: clusterData });
|
|
18
|
-
|
|
19
|
-
expect(cluster.provisioner).toBe(expected);
|
|
20
|
-
}
|
|
21
|
-
);
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import MgmtNodePool from '@shell/models/management.cattle.io.nodepool';
|
|
2
|
-
|
|
3
|
-
describe('class MgmtNodePool', () => {
|
|
4
|
-
describe('canScaleDownPool', () => {
|
|
5
|
-
const mgmtClusterId = 'test';
|
|
6
|
-
const nodeId = 'test/id';
|
|
7
|
-
const specs = {
|
|
8
|
-
worker: {
|
|
9
|
-
worker: true, etcd: false, controlPlane: false
|
|
10
|
-
},
|
|
11
|
-
etcd: {
|
|
12
|
-
worker: false, etcd: true, controlPlane: false
|
|
13
|
-
},
|
|
14
|
-
controlPlane: {
|
|
15
|
-
worker: false, etcd: false, controlPlane: true
|
|
16
|
-
},
|
|
17
|
-
etcdAndControlPlane: {
|
|
18
|
-
worker: false, etcd: true, controlPlane: true
|
|
19
|
-
},
|
|
20
|
-
all: {
|
|
21
|
-
worker: true, etcd: true, controlPlane: true
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const workerNode = {
|
|
26
|
-
id: '01',
|
|
27
|
-
isWorker: true,
|
|
28
|
-
isControlPlane: false,
|
|
29
|
-
isEtcd: false
|
|
30
|
-
};
|
|
31
|
-
const etcdNode = {
|
|
32
|
-
id: '02',
|
|
33
|
-
isWorker: false,
|
|
34
|
-
isControlPlane: false,
|
|
35
|
-
isEtcd: true
|
|
36
|
-
};
|
|
37
|
-
const controlPlaneNode = {
|
|
38
|
-
id: '03',
|
|
39
|
-
isWorker: false,
|
|
40
|
-
isControlPlane: true,
|
|
41
|
-
isEtcd: false
|
|
42
|
-
};
|
|
43
|
-
const etcdAndControlPlaneNode = {
|
|
44
|
-
id: '03',
|
|
45
|
-
isWorker: false,
|
|
46
|
-
isControlPlane: true,
|
|
47
|
-
isEtcd: true
|
|
48
|
-
};
|
|
49
|
-
const allNode = {
|
|
50
|
-
id: '04',
|
|
51
|
-
isWorker: true,
|
|
52
|
-
isControlPlane: true,
|
|
53
|
-
isEtcd: true
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const baseCtx = { rootGetters: { 'rancher/byId': () => ({ actions: { scaledown: 'scaledown' } }) } };
|
|
57
|
-
|
|
58
|
-
it.each([
|
|
59
|
-
[{ spec: specs.worker, nodes: [workerNode] }, true],
|
|
60
|
-
[{ spec: specs.etcd, nodes: [etcdNode, etcdNode, controlPlaneNode] }, true],
|
|
61
|
-
[{ spec: specs.etcdAndControlPlane, nodes: [etcdAndControlPlaneNode, etcdAndControlPlaneNode] }, true],
|
|
62
|
-
[{ spec: specs.etcdAndControlPlane, nodes: [etcdAndControlPlaneNode] }, false],
|
|
63
|
-
[{ spec: specs.all, nodes: [allNode] }, false],
|
|
64
|
-
[{ spec: specs.all, nodes: [allNode, allNode] }, true],
|
|
65
|
-
])('should return canScaleDownPool properly', (data, expected) => {
|
|
66
|
-
const { spec, nodes } = data;
|
|
67
|
-
const mgmtNode = new MgmtNodePool({
|
|
68
|
-
spec,
|
|
69
|
-
id: nodeId
|
|
70
|
-
}, {
|
|
71
|
-
...baseCtx,
|
|
72
|
-
getters: {
|
|
73
|
-
all: () => [{
|
|
74
|
-
mgmtClusterId,
|
|
75
|
-
nodes
|
|
76
|
-
}]
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
expect(mgmtNode.canScaleDownPool()).toStrictEqual(expected);
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
});
|