@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
|
@@ -845,6 +845,9 @@ catalog:
|
|
|
845
845
|
keywords: 关键词
|
|
846
846
|
errors:
|
|
847
847
|
clusterToolExists: 此 Chart 含有固定的命名空间和名称。找到一个匹配的 <a href="{url}">应用</a>,任何修改都将应用于此应用。
|
|
848
|
+
banner:
|
|
849
|
+
legacy: 'PSP 删除:在将集群升级到 Kubernetes 1.25+ 之前,请确保你针对 PSP 检查了 Helm 应用程序并相应进行更新'
|
|
850
|
+
enablePSP: 启用 Pod 安全策略
|
|
848
851
|
global: 全局
|
|
849
852
|
charts:
|
|
850
853
|
all: 全部
|
|
@@ -884,7 +887,7 @@ catalog:
|
|
|
884
887
|
requiresFound: '在安装这个 Chart 前,你需要安装<a href="{url}">{name}</a>。'
|
|
885
888
|
requiresMissing: '这个 Chart 另一个提供 {name} 的 Chart,但我们找不到这个Chart。'
|
|
886
889
|
insufficientCpu: '这个 Chart 需要 {need, number} 个 CPU 核,但集群只有 {have, number} 个可用。'
|
|
887
|
-
insufficientMemory: '这个
|
|
890
|
+
insufficientMemory: '这个 Cchart 需要 {need} 内存,但集群只有 {have} 可用。'
|
|
888
891
|
legacy:
|
|
889
892
|
label: 这是个 {legacyType} 应用,无法在这里修改。
|
|
890
893
|
enableLegacy:
|
|
@@ -1670,7 +1673,10 @@ cluster:
|
|
|
1670
1673
|
os: '你正在将 {newOS} worker 节点添加到具有一个或多个 {existingOS} worker 节点的集群。你可能需要升级或删除某些已安装的应用。'
|
|
1671
1674
|
rke2-k3-reprovisioning: '更改集群配置可能导致节点重新配置。详情请参见 <a target="blank" href="{docsBase}/cluster-provisioning/rke-clusters/behavior-differences-between-rke1-and-rke2/" target="_blank" rel="noopener nofollow">文档</a>。'
|
|
1672
1675
|
desiredNodeGroupWarning: 没有可用于运行 Cluster Agent 的节点。要让集群变为 Active 状态,至少需要有 1 个可用的节点。
|
|
1676
|
+
invalidPsps: 你在此集群中有一个或多个 PSP 资源。Pod 安全策略在 Kubernetes v1.25 中不可用并将自动删除。
|
|
1673
1677
|
haveArgInfo: 所选 Kubernetes 版本的配置信息不可用。此屏幕中可用的选项将受到限制,你可能需要使用 YAML 编辑器。
|
|
1678
|
+
deprecatedPsp: Pod 安全策略自 Kubernetes v1.21 起已弃用,并已在 Kubernetes v1.25 中删除。
|
|
1679
|
+
removedPsp: Pod 安全策略已在 Kubernetes v1.25 中删除,请改用 Pod Security Admission。
|
|
1674
1680
|
rkeTemplateUpgrade: 模板修订版 {name} 可用于升级
|
|
1675
1681
|
|
|
1676
1682
|
availabilityWarnings:
|
|
@@ -1829,6 +1835,10 @@ cluster:
|
|
|
1829
1835
|
psaChange: PSACT 现在自动设置为 Rancher 默认值
|
|
1830
1836
|
cisOverride: 更改此设置可能会影响集群安全,因为它会覆盖默认的 CIS 设置
|
|
1831
1837
|
cisUnsupported: 所选 Kubernetes 版本不再支持 CIS 配置文件 “{cisProfile}”,请选择支持的配置文件。建议你查看<a href="https://docs.rke2.io/security/hardening_guide" target="_blank" rel="noopener noreferrer nofollow">文档</a>评估更改 CIS 配置文件的影响。
|
|
1838
|
+
modal:
|
|
1839
|
+
pspChange:
|
|
1840
|
+
title: 弃用 Pod 安全策略
|
|
1841
|
+
body: <p>从 v1.25 版开始,Kubernetes 已经取消了对 Pod 安全策略 (PSP) 的支持。如果你的集群通过集群 YAML 中的 “kube-apiserver-arg.enable-admission-plugins” 启用了 PodSecurityPolicy 准入控制器,你必须在继续升级之前<i>手动</i>删除它。此外,集群中存在的任何 PSP 将不再可用或强制执行。是否继续操作?</p>
|
|
1832
1842
|
snapshots:
|
|
1833
1843
|
suffix: 每个节点的快照
|
|
1834
1844
|
systemService:
|
|
@@ -2080,7 +2090,7 @@ drainNode:
|
|
|
2080
2090
|
etcdInfoBanner:
|
|
2081
2091
|
hasLeader: "ETCD 有一个 Leader:"
|
|
2082
2092
|
leaderChanges: "Leader 变化的次数:"
|
|
2083
|
-
failedProposals: "失败的 proposal
|
|
2093
|
+
failedProposals: "失败的 proposal 数量"
|
|
2084
2094
|
|
|
2085
2095
|
fleet:
|
|
2086
2096
|
dashboard:
|
|
@@ -2313,7 +2323,6 @@ glance:
|
|
|
2313
2323
|
version: Kubernetes 版本
|
|
2314
2324
|
monitoringDashboard: 监控仪表板
|
|
2315
2325
|
installMonitoring: 安装 Monitoring
|
|
2316
|
-
v1MonitoringInstalled: 已安装 Monitoring V1
|
|
2317
2326
|
clusterInfo: 集群信息
|
|
2318
2327
|
eventsTable: 完整事件列表
|
|
2319
2328
|
|
|
@@ -2728,6 +2737,8 @@ landing:
|
|
|
2728
2737
|
whatsNewLink: "2.8 的新功能"
|
|
2729
2738
|
learnMore: 了解更多
|
|
2730
2739
|
support: 支持
|
|
2740
|
+
psps: PSP
|
|
2741
|
+
deprecatedPsp: Pod 安全策略自 Kubernetes v1.21 起已弃用,并已在 Kubernetes v1.25 中删除。你在此集群中有一个或多个 PSP 资源。
|
|
2731
2742
|
community:
|
|
2732
2743
|
title: 社区支持
|
|
2733
2744
|
docs: Rancher 官方文档
|
|
@@ -3290,15 +3301,6 @@ monitoring:
|
|
|
3290
3301
|
bearerTokenSecret: 持有者令牌密文
|
|
3291
3302
|
basicAuthUsername: 具有基本认证用户名的密文
|
|
3292
3303
|
basicAuthPassword: 具有基本认证密码的密文
|
|
3293
|
-
installSteps:
|
|
3294
|
-
uninstallV1:
|
|
3295
|
-
stepTitle: 卸载 V1
|
|
3296
|
-
stepSubtext: 卸载旧版 Monitoring
|
|
3297
|
-
warning1: 已部署 Monitoring V1。你需要先卸载 Monitoring V1 才能安装 Monitoring V2。
|
|
3298
|
-
warning2: <a target="blank" href="{docsBase}/monitoring-alerting/guides/migrating/" target='_blank' rel='noopener nofollow'>了解迁移到 Monitoring V2 的步骤</a>。
|
|
3299
|
-
promptDescription: <div class="mt-20 mb-20">你正在尝试卸载 Monitoring V1。请确保你已阅读迁移步骤。</div>
|
|
3300
|
-
success1: Monitoring V1 已成功卸载。
|
|
3301
|
-
success2: 点击下一步继续
|
|
3302
3304
|
tabs:
|
|
3303
3305
|
alerting: 告警
|
|
3304
3306
|
general: 通用
|
|
@@ -4302,6 +4304,10 @@ project:
|
|
|
4302
4304
|
vmDefaultResourceLimit: 虚拟机默认资源限制
|
|
4303
4305
|
resourceQuotas: 资源配额
|
|
4304
4306
|
haveOneOwner: 至少有一名成员需要具有所有者角色。
|
|
4307
|
+
psp:
|
|
4308
|
+
default: 集群默认
|
|
4309
|
+
label: Pod 安全策略
|
|
4310
|
+
current: "{value} (Current)"
|
|
4305
4311
|
|
|
4306
4312
|
|
|
4307
4313
|
projectMembers:
|
|
@@ -4606,6 +4612,9 @@ rbac:
|
|
|
4606
4612
|
nodetemplates-manage:
|
|
4607
4613
|
label: 管理节点模板
|
|
4608
4614
|
description: 允许用户定义、编辑和移除节点模板。
|
|
4615
|
+
podsecuritypolicytemplates-manage:
|
|
4616
|
+
label: 管理 Pod 安全策略(PSP)
|
|
4617
|
+
description: 允许用户定义、编辑和移除 Pod 安全策略。
|
|
4609
4618
|
roles-manage:
|
|
4610
4619
|
label: 管理角色
|
|
4611
4620
|
description: 允许用户定义、编辑和移除角色定义。
|
|
@@ -7339,17 +7348,6 @@ embedding:
|
|
|
7339
7348
|
retry: 重试
|
|
7340
7349
|
unavailable: Cluster Manager UI 不可用
|
|
7341
7350
|
|
|
7342
|
-
v1ClusterTools:
|
|
7343
|
-
monitoring:
|
|
7344
|
-
label: Monitoring(旧版)
|
|
7345
|
-
description: '旧版 Monitoring V1。自 Rancher 2.5.0 起,我们已弃用 Monitoring V1。了解<a target="blank" href="{docsBase}/monitoring-alerting/guides/migrating/">迁移到 Monitoring V2 的步骤</a>。'
|
|
7346
|
-
logging:
|
|
7347
|
-
label: Logging(旧版)
|
|
7348
|
-
description: '旧版 Logging V1。自 Rancher 2.5.0 起,我们已弃用 Logging V1。了解<a target="blank" href="{docsBase}/logging/migrating/">迁移到 Logging V2 的步骤</a>。'
|
|
7349
|
-
istio:
|
|
7350
|
-
label: Istio(旧版)
|
|
7351
|
-
description: '旧版 Istio V1。自 Rancher 2.5.0 起,我们已弃用 Istio V1.5。了解<a target="blank" href="{docsBase}/istio/#migrate-from-previous-istio-version">迁移到最新版本</a> 的更多信息。'
|
|
7352
|
-
|
|
7353
7351
|
legacy:
|
|
7354
7352
|
alerts: 告警
|
|
7355
7353
|
apps: 应用
|
|
@@ -7360,6 +7358,7 @@ legacy:
|
|
|
7360
7358
|
globalDnsProviders: 全局 DNS 提供商
|
|
7361
7359
|
notifiers: Notifiers
|
|
7362
7360
|
monitoring: 监控
|
|
7361
|
+
psps: Pod 安全策略模板
|
|
7363
7362
|
secrets: 密文
|
|
7364
7363
|
|
|
7365
7364
|
project:
|
|
@@ -7440,6 +7439,9 @@ charts:
|
|
|
7440
7439
|
service.ui.type:
|
|
7441
7440
|
label: Longhorn UI 服务
|
|
7442
7441
|
description: 定义 Longhorn UI 服务类型
|
|
7442
|
+
enablePSP:
|
|
7443
|
+
label: Pod 安全策略
|
|
7444
|
+
description: 为 Longhorn 工作负载设置 Pod 安全策略
|
|
7443
7445
|
csi.kubeletRootDir:
|
|
7444
7446
|
label: Kubelet 根目录
|
|
7445
7447
|
description: 指定 kubelet root-dir。如留空,则自动检测。
|
package/babel.config.js
CHANGED
|
@@ -10,13 +10,7 @@ module.exports = function(api) {
|
|
|
10
10
|
{ targets: { node: 'current' } }
|
|
11
11
|
]
|
|
12
12
|
];
|
|
13
|
-
const env = {
|
|
14
|
-
test: {
|
|
15
|
-
presets: [[
|
|
16
|
-
'@babel/env', { targets: { node: 'current' } }
|
|
17
|
-
]]
|
|
18
|
-
}
|
|
19
|
-
};
|
|
13
|
+
const env = { test: { presets: [['@babel/env', { targets: { node: 'current' } }]] } };
|
|
20
14
|
|
|
21
15
|
const plugins = [];
|
|
22
16
|
|
package/chart/gatekeeper.vue
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import UnitInput from '@shell/components/form/UnitInput';
|
|
3
|
+
import ChartPsp from '@shell/components/ChartPsp';
|
|
3
4
|
import { Checkbox } from '@components/Form/Checkbox';
|
|
4
5
|
import { mapGetters } from 'vuex';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
components: {
|
|
8
|
-
|
|
8
|
+
components: {
|
|
9
|
+
UnitInput, ChartPsp, Checkbox
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
9
12
|
value: {
|
|
10
13
|
type: Object,
|
|
11
14
|
default: () => {
|
|
@@ -57,6 +60,12 @@ export default {
|
|
|
57
60
|
</div>
|
|
58
61
|
</div>
|
|
59
62
|
|
|
63
|
+
<!-- Conditionally display PSP checkbox -->
|
|
64
|
+
<ChartPsp
|
|
65
|
+
:value="value"
|
|
66
|
+
:cluster="currentCluster"
|
|
67
|
+
/>
|
|
68
|
+
|
|
60
69
|
<template v-if="crdValues">
|
|
61
70
|
<!-- gatekeeper versions <1.0.2 do not have this option -->
|
|
62
71
|
<Checkbox
|
package/chart/istio.vue
CHANGED
|
@@ -6,6 +6,7 @@ import YamlEditor from '@shell/components/YamlEditor';
|
|
|
6
6
|
import { mapGetters } from 'vuex';
|
|
7
7
|
import FileSelector from '@shell/components/form/FileSelector';
|
|
8
8
|
import { Banner } from '@components/Banner';
|
|
9
|
+
import ChartPsp from '@shell/components/ChartPsp';
|
|
9
10
|
|
|
10
11
|
const defaultOverlayFile = `#apiVersion: install.istio.io/v1alpha1
|
|
11
12
|
#kind: IstioOperator
|
|
@@ -53,7 +54,8 @@ export default {
|
|
|
53
54
|
Checkbox,
|
|
54
55
|
FileSelector,
|
|
55
56
|
YamlEditor,
|
|
56
|
-
Banner
|
|
57
|
+
Banner,
|
|
58
|
+
ChartPsp
|
|
57
59
|
},
|
|
58
60
|
|
|
59
61
|
props: {
|
|
@@ -138,6 +140,13 @@ export default {
|
|
|
138
140
|
|
|
139
141
|
<template>
|
|
140
142
|
<div>
|
|
143
|
+
<!-- Conditionally display PSP checkbox -->
|
|
144
|
+
<ChartPsp
|
|
145
|
+
:value="value"
|
|
146
|
+
:title="t('catalog.chart.global')"
|
|
147
|
+
:cluster="currentCluster"
|
|
148
|
+
/>
|
|
149
|
+
|
|
141
150
|
<h3>
|
|
142
151
|
{{ t('istio.titles.components') }}
|
|
143
152
|
</h3>
|
package/chart/logging/index.vue
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
import { mapGetters } from 'vuex';
|
|
3
3
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
4
4
|
import { Checkbox } from '@components/Form/Checkbox';
|
|
5
|
+
import ChartPsp from '@shell/components/ChartPsp';
|
|
5
6
|
|
|
6
7
|
export default {
|
|
7
|
-
components: {
|
|
8
|
-
|
|
8
|
+
components: {
|
|
9
|
+
Checkbox, LabeledInput, ChartPsp
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
9
12
|
value: {
|
|
10
13
|
type: Object,
|
|
11
14
|
default: () => {
|
|
@@ -80,5 +83,11 @@ export default {
|
|
|
80
83
|
/>
|
|
81
84
|
</div>
|
|
82
85
|
</div>
|
|
86
|
+
|
|
87
|
+
<!-- Conditionally display PSP checkbox -->
|
|
88
|
+
<ChartPsp
|
|
89
|
+
:value="value"
|
|
90
|
+
:cluster="currentCluster"
|
|
91
|
+
/>
|
|
83
92
|
</div>
|
|
84
93
|
</template>
|
|
@@ -5,6 +5,8 @@ import { Checkbox } from '@components/Form/Checkbox';
|
|
|
5
5
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
6
6
|
import { RadioGroup } from '@components/Form/Radio';
|
|
7
7
|
|
|
8
|
+
const DEFAULT_MONITORING_NAMESPACE = 'cattle-monitoring-system';
|
|
9
|
+
|
|
8
10
|
export default {
|
|
9
11
|
components: {
|
|
10
12
|
Checkbox,
|
|
@@ -18,7 +20,7 @@ export default {
|
|
|
18
20
|
default: 'create',
|
|
19
21
|
},
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
secrets: {
|
|
22
24
|
type: Array,
|
|
23
25
|
default: () => [],
|
|
24
26
|
},
|
|
@@ -41,7 +43,12 @@ export default {
|
|
|
41
43
|
|
|
42
44
|
computed: {
|
|
43
45
|
allSecrets() {
|
|
44
|
-
|
|
46
|
+
const { secrets } = this;
|
|
47
|
+
|
|
48
|
+
return secrets
|
|
49
|
+
.filter(
|
|
50
|
+
(sec) => sec.metadata.namespace === DEFAULT_MONITORING_NAMESPACE
|
|
51
|
+
)
|
|
45
52
|
.map((sec) => ({ label: sec.metadata.name, value: sec.metadata.name }));
|
|
46
53
|
},
|
|
47
54
|
|
|
@@ -55,15 +62,22 @@ export default {
|
|
|
55
62
|
},
|
|
56
63
|
|
|
57
64
|
existingSecret() {
|
|
58
|
-
return this.
|
|
59
|
-
|
|
65
|
+
return this.secrets.find(
|
|
66
|
+
(sec) => sec?.metadata?.name ===
|
|
67
|
+
'alertmanager-rancher-monitoring-alertmanager' &&
|
|
68
|
+
sec?.metadata?.namespace === DEFAULT_MONITORING_NAMESPACE
|
|
69
|
+
);
|
|
60
70
|
},
|
|
61
71
|
|
|
62
72
|
filteredSecrets() {
|
|
73
|
+
const { secrets } = this;
|
|
63
74
|
const filtered = [];
|
|
64
75
|
|
|
65
|
-
|
|
66
|
-
if (
|
|
76
|
+
secrets.forEach((secret) => {
|
|
77
|
+
if (
|
|
78
|
+
secret.metadata.name &&
|
|
79
|
+
secret.metadata.namespace === DEFAULT_MONITORING_NAMESPACE
|
|
80
|
+
) {
|
|
67
81
|
filtered.push(secret.metadata.name);
|
|
68
82
|
}
|
|
69
83
|
});
|
|
@@ -79,7 +93,7 @@ export default {
|
|
|
79
93
|
},
|
|
80
94
|
|
|
81
95
|
watch: {
|
|
82
|
-
filteredSecrets(newValue) {
|
|
96
|
+
filteredSecrets(newValue, oldValue) {
|
|
83
97
|
if (isEmpty(newValue)) {
|
|
84
98
|
this.$set(
|
|
85
99
|
this.value.alertmanager.alertmanagerSpec,
|
|
@@ -87,9 +87,6 @@ export default {
|
|
|
87
87
|
|
|
88
88
|
return (storageClasses || []).length >= 1;
|
|
89
89
|
},
|
|
90
|
-
showGrafanaResourceConfig() {
|
|
91
|
-
return this.value?.grafana?.resources?.requests && this.value?.grafana?.resources?.limits;
|
|
92
|
-
}
|
|
93
90
|
},
|
|
94
91
|
watch: {
|
|
95
92
|
persistentStorageType(newType, oldType) {
|
|
@@ -139,7 +136,7 @@ export default {
|
|
|
139
136
|
newValsOut = {
|
|
140
137
|
accessModes: null,
|
|
141
138
|
storageClassName: null,
|
|
142
|
-
size:
|
|
139
|
+
size: null,
|
|
143
140
|
subPath: null,
|
|
144
141
|
type: 'pvc',
|
|
145
142
|
annotations: null,
|
|
@@ -151,7 +148,7 @@ export default {
|
|
|
151
148
|
newValsOut = {
|
|
152
149
|
accessModes: null,
|
|
153
150
|
storageClassName: null,
|
|
154
|
-
size:
|
|
151
|
+
size: null,
|
|
155
152
|
subPath: null,
|
|
156
153
|
type: 'statefulset',
|
|
157
154
|
enabled: true,
|
|
@@ -175,58 +172,6 @@ export default {
|
|
|
175
172
|
<h3>{{ t('monitoring.grafana.title') }}</h3>
|
|
176
173
|
</div>
|
|
177
174
|
<div class="grafana-config">
|
|
178
|
-
<!-- Request and Limits -->
|
|
179
|
-
<!-- Note, we use the same labels for resource config as Prometheus since they are generic -->
|
|
180
|
-
<div
|
|
181
|
-
v-if="showGrafanaResourceConfig"
|
|
182
|
-
class="row"
|
|
183
|
-
>
|
|
184
|
-
<div class="col span-12 mt-5">
|
|
185
|
-
<h4 class="mb-0">
|
|
186
|
-
{{ t('monitoring.prometheus.config.resourceLimits') }}
|
|
187
|
-
</h4>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
<div
|
|
191
|
-
v-if="showGrafanaResourceConfig"
|
|
192
|
-
class="row"
|
|
193
|
-
>
|
|
194
|
-
<div class="col span-6">
|
|
195
|
-
<LabeledInput
|
|
196
|
-
v-model="value.grafana.resources.requests.cpu"
|
|
197
|
-
data-testid="input-grafana-requests-cpu"
|
|
198
|
-
:label="t('monitoring.prometheus.config.requests.cpu')"
|
|
199
|
-
:mode="mode"
|
|
200
|
-
/>
|
|
201
|
-
</div>
|
|
202
|
-
<div class="col span-6">
|
|
203
|
-
<LabeledInput
|
|
204
|
-
v-model="value.grafana.resources.requests.memory"
|
|
205
|
-
data-testid="input-grafana-requests-memory"
|
|
206
|
-
:label="t('monitoring.prometheus.config.requests.memory')"
|
|
207
|
-
:mode="mode"
|
|
208
|
-
/>
|
|
209
|
-
</div>
|
|
210
|
-
</div>
|
|
211
|
-
<div class="row">
|
|
212
|
-
<div class="col span-6">
|
|
213
|
-
<LabeledInput
|
|
214
|
-
v-model="value.grafana.resources.limits.cpu"
|
|
215
|
-
data-testid="input-grafana-limits-cpu"
|
|
216
|
-
:label="t('monitoring.prometheus.config.limits.cpu')"
|
|
217
|
-
:mode="mode"
|
|
218
|
-
/>
|
|
219
|
-
</div>
|
|
220
|
-
<div class="col span-6">
|
|
221
|
-
<LabeledInput
|
|
222
|
-
v-model="value.grafana.resources.limits.memory"
|
|
223
|
-
data-testid="input-grafana-limits-memory"
|
|
224
|
-
:label="t('monitoring.prometheus.config.limits.memory')"
|
|
225
|
-
:mode="mode"
|
|
226
|
-
/>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
|
-
|
|
230
175
|
<div class="row pt-10 pb-10">
|
|
231
176
|
<div class="col span-12 persistent-storage-config">
|
|
232
177
|
<RadioGroup
|
|
@@ -12,10 +12,10 @@ import { LabeledInput } from '@components/Form/LabeledInput';
|
|
|
12
12
|
import Loading from '@shell/components/Loading';
|
|
13
13
|
import Prometheus from '@shell/chart/monitoring/prometheus';
|
|
14
14
|
import Tab from '@shell/components/Tabbed/Tab';
|
|
15
|
+
import ChartPsp from '@shell/components/ChartPsp';
|
|
15
16
|
|
|
16
17
|
import { allHash } from '@shell/utils/promise';
|
|
17
18
|
import { STORAGE_CLASS, PVC, SECRET, WORKLOAD_TYPES } from '@shell/config/types';
|
|
18
|
-
import { CATTLE_MONITORING_NAMESPACE } from '@shell/utils/monitoring';
|
|
19
19
|
|
|
20
20
|
export default {
|
|
21
21
|
components: {
|
|
@@ -26,7 +26,8 @@ export default {
|
|
|
26
26
|
LabeledInput,
|
|
27
27
|
Loading,
|
|
28
28
|
Prometheus,
|
|
29
|
-
Tab
|
|
29
|
+
Tab,
|
|
30
|
+
ChartPsp
|
|
30
31
|
},
|
|
31
32
|
|
|
32
33
|
hasTabs: true,
|
|
@@ -53,40 +54,17 @@ export default {
|
|
|
53
54
|
async fetch() {
|
|
54
55
|
const { $store } = this;
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// Used in Alerting tab
|
|
61
|
-
monitoringSecrets: $store.dispatch('cluster/findAll', {
|
|
62
|
-
type: SECRET,
|
|
63
|
-
opt: { namespaced: CATTLE_MONITORING_NAMESPACE }
|
|
64
|
-
}),
|
|
57
|
+
const hash = await allHash({
|
|
58
|
+
namespaces: $store.getters['namespaces'](),
|
|
59
|
+
pvcs: $store.dispatch('cluster/findAll', { type: PVC }),
|
|
60
|
+
secrets: $store.dispatch('cluster/findAll', { type: SECRET }),
|
|
65
61
|
storageClasses: $store.dispatch('cluster/findAll', { type: STORAGE_CLASS }),
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
// Are we editing an existing chart?
|
|
69
|
-
// (ported from shell/chart/monitoring/prometheus/index.vue)
|
|
70
|
-
const { existing = false } = this.$attrs;
|
|
71
|
-
|
|
72
|
-
// If needed, fetch all the workloads that have prometheus operator like containers
|
|
73
|
-
this.workloadTypes = !existing ? Object.values(WORKLOAD_TYPES) : [];
|
|
74
|
-
|
|
75
|
-
this.workloadTypes.forEach((type) => {
|
|
76
|
-
// We'll use a filter to fetch the results. Atm there's no neat way to differentiate between ALL results and JUST filtered
|
|
77
|
-
// So to avoid calls to all getting these filtered (and vice-versa) forget type before and after
|
|
78
|
-
$store.dispatch('cluster/forgetType', type);
|
|
79
|
-
hashPromises[type] = $store.dispatch('cluster/findAll', {
|
|
80
|
-
type,
|
|
81
|
-
opt: {
|
|
82
|
-
watch: false,
|
|
83
|
-
// We're only interested in images with operator like names (note: these will match partial strings)
|
|
84
|
-
filter: { 'spec.template.spec.containers.image': ['quay.io/coreos/prometheus-operator', 'rancher/coreos-prometheus-operator'] }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
62
|
});
|
|
88
63
|
|
|
89
|
-
|
|
64
|
+
await Promise.all(
|
|
65
|
+
Object.values(WORKLOAD_TYPES).map((type) => this.$store.dispatch('cluster/findAll', { type })
|
|
66
|
+
)
|
|
67
|
+
);
|
|
90
68
|
|
|
91
69
|
this.targetNamespace = hash.namespaces[this.chart.targetNamespace] || false;
|
|
92
70
|
|
|
@@ -98,21 +76,9 @@ export default {
|
|
|
98
76
|
this.pvcs = hash.pvcs;
|
|
99
77
|
}
|
|
100
78
|
|
|
101
|
-
if (!isEmpty(hash.
|
|
102
|
-
this.
|
|
79
|
+
if (!isEmpty(hash.secrets)) {
|
|
80
|
+
this.secrets = hash.secrets;
|
|
103
81
|
}
|
|
104
|
-
|
|
105
|
-
this.workloadTypes.forEach((type) => {
|
|
106
|
-
if (hash[type]) {
|
|
107
|
-
this.filteredWorkloads.push(...hash[type]);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
beforeDestroy() {
|
|
113
|
-
this.workloadTypes.forEach((type) => {
|
|
114
|
-
this.$store.dispatch('cluster/forgetType', type);
|
|
115
|
-
});
|
|
116
82
|
},
|
|
117
83
|
|
|
118
84
|
data() {
|
|
@@ -135,11 +101,9 @@ export default {
|
|
|
135
101
|
disableAggregateRoles: false,
|
|
136
102
|
prometheusResources: [],
|
|
137
103
|
pvcs: [],
|
|
138
|
-
|
|
104
|
+
secrets: [],
|
|
139
105
|
storageClasses: [],
|
|
140
106
|
targetNamespace: null,
|
|
141
|
-
filteredWorkloads: [],
|
|
142
|
-
workloadTypes: []
|
|
143
107
|
};
|
|
144
108
|
},
|
|
145
109
|
|
|
@@ -148,6 +112,10 @@ export default {
|
|
|
148
112
|
provider() {
|
|
149
113
|
return this.currentCluster.status.provider.toLowerCase();
|
|
150
114
|
},
|
|
115
|
+
workloads() {
|
|
116
|
+
return Object.values(WORKLOAD_TYPES).flatMap((type) => this.$store.getters['cluster/all'](type)
|
|
117
|
+
);
|
|
118
|
+
},
|
|
151
119
|
},
|
|
152
120
|
|
|
153
121
|
watch: {
|
|
@@ -297,6 +265,12 @@ export default {
|
|
|
297
265
|
/>
|
|
298
266
|
</div>
|
|
299
267
|
</div>
|
|
268
|
+
|
|
269
|
+
<!-- Conditionally display PSP checkbox -->
|
|
270
|
+
<ChartPsp
|
|
271
|
+
:value="value"
|
|
272
|
+
:cluster="currentCluster"
|
|
273
|
+
/>
|
|
300
274
|
</div>
|
|
301
275
|
</Tab>
|
|
302
276
|
<Tab
|
|
@@ -312,7 +286,7 @@ export default {
|
|
|
312
286
|
:mode="mode"
|
|
313
287
|
:storage-classes="storageClasses"
|
|
314
288
|
:prometheus-pods="prometheusResources"
|
|
315
|
-
:
|
|
289
|
+
:workloads="workloads"
|
|
316
290
|
/>
|
|
317
291
|
</div>
|
|
318
292
|
</Tab>
|
|
@@ -325,7 +299,7 @@ export default {
|
|
|
325
299
|
<Alerting
|
|
326
300
|
v-model="value"
|
|
327
301
|
:mode="mode"
|
|
328
|
-
:
|
|
302
|
+
:secrets="secrets"
|
|
329
303
|
/>
|
|
330
304
|
</div>
|
|
331
305
|
</Tab>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import isEmpty from 'lodash/isEmpty';
|
|
2
3
|
import { mapGetters } from 'vuex';
|
|
3
4
|
|
|
4
5
|
import { Banner } from '@components/Banner';
|
|
@@ -50,19 +51,21 @@ export default {
|
|
|
50
51
|
default: () => ({}),
|
|
51
52
|
},
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
workloads: {
|
|
54
55
|
type: Array,
|
|
55
56
|
default: () => ([]),
|
|
56
57
|
},
|
|
57
58
|
},
|
|
58
59
|
|
|
59
60
|
data() {
|
|
60
|
-
return {
|
|
61
|
+
return {
|
|
62
|
+
enablePersistentStorage: !!this.value?.prometheus?.prometheusSpec?.storageSpec?.volumeClaimTemplate?.spec,
|
|
63
|
+
warnUser: false,
|
|
64
|
+
};
|
|
61
65
|
},
|
|
62
66
|
|
|
63
67
|
computed: {
|
|
64
68
|
...mapGetters(['currentCluster']),
|
|
65
|
-
|
|
66
69
|
matchExpressions: {
|
|
67
70
|
get() {
|
|
68
71
|
const selector = this.value?.prometheus?.prometheusSpec?.storageSpec?.volumeClaimTemplate?.spec?.selector;
|
|
@@ -77,21 +80,42 @@ export default {
|
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
82
|
},
|
|
83
|
+
filteredWorkloads() {
|
|
84
|
+
let { workloads } = this;
|
|
85
|
+
const { existing = false } = this.$attrs;
|
|
80
86
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
if (!existing) {
|
|
88
|
+
workloads = workloads.filter((workload) => {
|
|
89
|
+
if (
|
|
90
|
+
!isEmpty(workload?.spec?.template?.spec?.containers) &&
|
|
91
|
+
(workload.spec.template.spec.containers.find((c) => c.image.includes('quay.io/coreos/prometheus-operator') ||
|
|
92
|
+
c.image.includes('rancher/coreos-prometheus-operator'))
|
|
93
|
+
)
|
|
94
|
+
) {
|
|
95
|
+
if (!this.warnUser) {
|
|
96
|
+
this.warnUser = true;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return workload;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return workloads.map((wl) => {
|
|
105
|
+
return {
|
|
106
|
+
label: wl.id,
|
|
107
|
+
link: {
|
|
108
|
+
name: 'c-cluster-product-resource-namespace-id',
|
|
109
|
+
params: {
|
|
110
|
+
cluster: this.currentCluster.id,
|
|
111
|
+
product: 'explorer',
|
|
112
|
+
resource: wl.type,
|
|
113
|
+
namespace: wl.metadata.namespace,
|
|
114
|
+
id: wl.metadata.name
|
|
115
|
+
},
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
});
|
|
95
119
|
},
|
|
96
120
|
|
|
97
121
|
podsAndNamespaces() {
|
|
@@ -155,23 +179,6 @@ export default {
|
|
|
155
179
|
|
|
156
180
|
this.$set(storageSpec.selector, 'matchLabels', matchLabels);
|
|
157
181
|
this.$set(storageSpec.selector, 'matchExpressions', matchExpressions);
|
|
158
|
-
|
|
159
|
-
// Remove an empty selector object if present
|
|
160
|
-
// User can add a selector and then remove the selector - this will leave an empty structure as above
|
|
161
|
-
// We want to ensure we remove .selector.matchExpressions, .selector.matchLabels, and .selector if empty
|
|
162
|
-
// See: https://github.com/rancher/dashboard/issues/10016
|
|
163
|
-
|
|
164
|
-
if (storageSpec.selector.matchExpressions?.length === 0) {
|
|
165
|
-
delete storageSpec.selector.matchExpressions;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
if (storageSpec.selector.matchLabels && Object.keys(storageSpec.selector.matchLabels).length === 0) {
|
|
169
|
-
delete storageSpec.selector.matchLabels;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
if (Object.keys(storageSpec.selector).length === 0) {
|
|
173
|
-
delete storageSpec.selector;
|
|
174
|
-
}
|
|
175
182
|
},
|
|
176
183
|
},
|
|
177
184
|
};
|
|
@@ -182,9 +189,8 @@ export default {
|
|
|
182
189
|
<div class="title">
|
|
183
190
|
<h3>{{ t('monitoring.prometheus.title') }}</h3>
|
|
184
191
|
</div>
|
|
185
|
-
<!-- https://github.com/rancher/dashboard/issues/1167 -->
|
|
186
192
|
<Banner
|
|
187
|
-
v-if="
|
|
193
|
+
v-if="filteredWorkloads && warnUser"
|
|
188
194
|
color="warning"
|
|
189
195
|
>
|
|
190
196
|
<template #default>
|
|
@@ -193,7 +199,7 @@ export default {
|
|
|
193
199
|
:raw="true"
|
|
194
200
|
/>
|
|
195
201
|
<div
|
|
196
|
-
v-for="wl in
|
|
202
|
+
v-for="wl in filteredWorkloads"
|
|
197
203
|
:key="wl.id"
|
|
198
204
|
class="mt-10"
|
|
199
205
|
>
|