@rancher/shell 0.3.27 → 0.3.28
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/assets/translations/en-us.yaml +4 -20
- package/assets/translations/zh-hans.yaml +0 -23
- package/chart/gatekeeper.vue +2 -11
- package/chart/istio.vue +1 -10
- package/chart/logging/index.vue +2 -11
- package/chart/monitoring/index.vue +1 -9
- package/chart/rancher-backup/index.vue +1 -9
- package/components/Carousel.vue +2 -1
- package/components/formatter/ClusterProvider.vue +1 -18
- package/components/nav/WindowManager/ContainerLogs.vue +22 -19
- package/config/product/manager.js +0 -13
- package/config/types.js +0 -4
- package/edit/management.cattle.io.project.vue +1 -52
- package/edit/management.cattle.io.setting.vue +31 -2
- package/edit/provisioning.cattle.io.cluster/Basics.vue +6 -107
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts +0 -3
- package/edit/provisioning.cattle.io.cluster/rke2.vue +3 -128
- package/middleware/authenticated.js +4 -2
- package/models/__tests__/management.cattle.io.cluster.test.ts +19 -0
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +90 -0
- package/models/cluster.x-k8s.io.machine.js +1 -1
- package/models/management.cattle.io.cluster.js +4 -0
- package/models/management.cattle.io.project.js +0 -36
- package/models/management.cattle.io.setting.js +11 -7
- package/models/provisioning.cattle.io.cluster.js +16 -4
- package/package.json +1 -1
- package/pages/auth/setup.vue +38 -1
- package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +2 -17
- package/pages/c/_cluster/apps/charts/index.vue +0 -15
- package/pages/c/_cluster/apps/charts/install.helpers.js +2 -13
- package/pages/c/_cluster/apps/charts/install.vue +1 -1
- package/pages/c/_cluster/explorer/index.vue +0 -47
- package/pages/c/_cluster/manager/pages/_page.vue +4 -5
- package/rancher-components/BadgeState/BadgeState.vue +1 -5
- package/rancher-components/Banner/Banner.test.ts +1 -51
- package/rancher-components/Banner/Banner.vue +53 -134
- package/rancher-components/Card/Card.vue +7 -24
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +29 -20
- package/rancher-components/Form/Checkbox/Checkbox.vue +20 -45
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +8 -2
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +10 -22
- package/rancher-components/Form/Radio/RadioButton.vue +13 -30
- package/rancher-components/Form/Radio/RadioGroup.vue +7 -26
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +6 -7
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +38 -25
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +11 -23
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +5 -19
- package/rancher-components/StringList/StringList.test.ts +49 -453
- package/rancher-components/StringList/StringList.vue +58 -92
- package/rancher-components/components/StringList/StringList.test.ts +270 -0
- package/rancher-components/components/StringList/StringList.vue +57 -18
- package/store/prefs.js +0 -3
- package/types/shell/index.d.ts +22 -16
- package/utils/custom-validators.js +0 -2
- package/utils/error.js +16 -1
- package/utils/validators/formRules/__tests__/index.test.ts +49 -4
- package/utils/validators/formRules/index.ts +12 -9
- package/utils/validators/setting.js +6 -10
- package/.DS_Store +0 -0
- package/components/ChartPsp.vue +0 -76
- package/components/__tests__/ChartPsp.test.ts +0 -75
- package/components/formatter/__tests__/ClusterProvider.test.ts +0 -28
- package/rancher-components/Card/Card.test.ts +0 -37
- package/rancher-components/Form/Radio/RadioButton.test.ts +0 -31
- package/yarn-error.log +0 -200
|
@@ -851,9 +851,6 @@ catalog:
|
|
|
851
851
|
keywords: Keywords
|
|
852
852
|
errors:
|
|
853
853
|
clusterToolExists: This chart has a fixed namespace and name. A matching <a href="{url}">application</a> has been found and any changes will be made to it.
|
|
854
|
-
banner:
|
|
855
|
-
legacy: 'PSP Removal: Before upgrading a cluster to Kubernetes 1.25+, please ensure you review your Helm applications for Pod Security Policies and update them accordingly'
|
|
856
|
-
enablePSP: Enable Pod Security Policies
|
|
857
854
|
global: Global
|
|
858
855
|
charts:
|
|
859
856
|
all: All
|
|
@@ -1673,10 +1670,7 @@ cluster:
|
|
|
1673
1670
|
os: 'You are attempting to add a {newOS} worker node to a cluster with one or more {existingOS} worker nodes: some installed apps may need to be upgraded or removed.'
|
|
1674
1671
|
rke2-k3-reprovisioning: 'Making changes to cluster configuration may result in nodes reprovisioning. For more information see the <a target="blank" href="{docsBase}/cluster-provisioning/rke-clusters/behavior-differences-between-rke1-and-rke2/" target="_blank" rel="noopener nofollow">documentation</a>.'
|
|
1675
1672
|
desiredNodeGroupWarning: There are 0 nodes available to run the cluster agent. The cluster will not become active until at least one node is available.
|
|
1676
|
-
invalidPsps: You have one or more PodSecurityPolicy resource(s) in this cluster. Pod Security Policies are not available in Kubernetes v1.25 and will be automatically removed.
|
|
1677
1673
|
haveArgInfo: Configuration information is not available for the selected Kubernetes version. The options available on this screen will be limited; you may want to use the YAML editor.
|
|
1678
|
-
deprecatedPsp: Pod Security Policies are deprecated as of Kubernetes v1.21, and have been removed in Kubernetes v1.25.
|
|
1679
|
-
removedPsp: Pod Security Policies have been removed in Kubernetes v1.25. Use Pod Security Admission instead.
|
|
1680
1674
|
cloudProviderAddConfig: 'On Kubernetes 1.27 or greater, the Amazon Cloud Provider requires additional configuration. See <a href="https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/kubernetes-clusters-in-rancher-setup/set-up-cloud-providers/amazon" target="_blank" rel="noopener noreferrer nofollow">the documentation</a> for more information.'
|
|
1681
1675
|
machinePoolError: |-
|
|
1682
1676
|
{count, plural,
|
|
@@ -1843,9 +1837,6 @@ cluster:
|
|
|
1843
1837
|
cisOverride: Changing this setting may affect cluster security as it overrides default CIS settings
|
|
1844
1838
|
cisUnsupported: The selected Kubernetes Version no longer supports CIS Profile "{cisProfile}". Please select a supported profile. We recommend reviewing the <a href="https://docs.rke2.io/security/hardening_guide" target="_blank" rel="noopener noreferrer nofollow">documentation</a> to evaluate the impact of changing the CIS Profile.
|
|
1845
1839
|
modal:
|
|
1846
|
-
pspChange:
|
|
1847
|
-
title: Pod Security Policy deprecation
|
|
1848
|
-
body: <p>Kubernetes has removed support for Pod Security Policies (PSPs) starting with version 1.25. If your cluster has PodSecurityPolicy admission controller enabled via "kube-apiserver-arg.enable-admission-plugins" in Cluster YAML, it has to be <i>manually</i> removed before proceeding with the upgrade. Additionally, any PSPs that may be present in the cluster will no longer be available/enforced. Do you want to proceed?</p>
|
|
1849
1840
|
editYamlMachinePool:
|
|
1850
1841
|
title: Save Machine Configurations
|
|
1851
1842
|
body: Machine Configurations define how machines in Pools are deployed.<br><br> They will be saved upfront to ensure valid Cluster YAML can be saved.
|
|
@@ -2767,8 +2758,6 @@ landing:
|
|
|
2767
2758
|
whatsNewLink: "What's new in 2.8"
|
|
2768
2759
|
learnMore: Learn More
|
|
2769
2760
|
support: Support
|
|
2770
|
-
psps: PSPs
|
|
2771
|
-
deprecatedPsp: Pod Security Policies are deprecated as of Kubernetes v1.21, and have been removed in Kubernetes v1.25. You have one or more PodSecurityPolicy resource(s) in this cluster.
|
|
2772
2761
|
community:
|
|
2773
2762
|
title: Community Support
|
|
2774
2763
|
docs: Docs
|
|
@@ -4342,10 +4331,6 @@ project:
|
|
|
4342
4331
|
vmDefaultResourceLimit: VM Default Resource Limit
|
|
4343
4332
|
resourceQuotas: Resource Quotas
|
|
4344
4333
|
haveOneOwner: There must be at least one member with the Owner role.
|
|
4345
|
-
psp:
|
|
4346
|
-
default: Cluster Default
|
|
4347
|
-
label: Pod Security Policy
|
|
4348
|
-
current: "{value} (Current)"
|
|
4349
4334
|
|
|
4350
4335
|
|
|
4351
4336
|
projectMembers:
|
|
@@ -4651,9 +4636,6 @@ rbac:
|
|
|
4651
4636
|
nodetemplates-manage:
|
|
4652
4637
|
label: Manage Node Templates
|
|
4653
4638
|
description: Allows the user to define, edit, and remove Node Templates.
|
|
4654
|
-
podsecuritypolicytemplates-manage:
|
|
4655
|
-
label: Manage Pod Security Policies (PSPs)
|
|
4656
|
-
description: Allows the user to define, edit, and remove PSPs.
|
|
4657
4639
|
roles-manage:
|
|
4658
4640
|
label: Manage Roles
|
|
4659
4641
|
description: Allows the user to define, edit, and remove Role definitions.
|
|
@@ -5755,7 +5737,10 @@ validation:
|
|
|
5755
5737
|
required: 'Port Rule [{position}] - Target Port is required'
|
|
5756
5738
|
setting:
|
|
5757
5739
|
serverUrl:
|
|
5758
|
-
https:
|
|
5740
|
+
https: Server URL must be https.
|
|
5741
|
+
localhost: If the Server URL is internal to the Rancher server (e.g. localhost) the downstream clusters may not be able to communicate with Rancher.
|
|
5742
|
+
trailingForwardSlash: Server URL should not have a trailing forward slash.
|
|
5743
|
+
url: Server URL must be an URL.
|
|
5759
5744
|
stringLength:
|
|
5760
5745
|
between: '"{key}" should be between {min} and {max} {max, plural, =1 {character} other {characters}}'
|
|
5761
5746
|
exactly: '"{key}" should be {count, plural, =1 {# character} other {# characters}}'
|
|
@@ -7398,7 +7383,6 @@ legacy:
|
|
|
7398
7383
|
globalDnsProviders: Global DNS Providers
|
|
7399
7384
|
notifiers: Notifiers
|
|
7400
7385
|
monitoring: Monitoring
|
|
7401
|
-
psps: Pod Security Policy Templates
|
|
7402
7386
|
secrets: Secrets
|
|
7403
7387
|
|
|
7404
7388
|
project:
|
|
@@ -845,9 +845,6 @@ 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 安全策略
|
|
851
848
|
global: 全局
|
|
852
849
|
charts:
|
|
853
850
|
all: 全部
|
|
@@ -1673,10 +1670,7 @@ cluster:
|
|
|
1673
1670
|
os: '你正在将 {newOS} worker 节点添加到具有一个或多个 {existingOS} worker 节点的集群。你可能需要升级或删除某些已安装的应用。'
|
|
1674
1671
|
rke2-k3-reprovisioning: '更改集群配置可能导致节点重新配置。详情请参见 <a target="blank" href="{docsBase}/cluster-provisioning/rke-clusters/behavior-differences-between-rke1-and-rke2/" target="_blank" rel="noopener nofollow">文档</a>。'
|
|
1675
1672
|
desiredNodeGroupWarning: 没有可用于运行 Cluster Agent 的节点。要让集群变为 Active 状态,至少需要有 1 个可用的节点。
|
|
1676
|
-
invalidPsps: 你在此集群中有一个或多个 PSP 资源。Pod 安全策略在 Kubernetes v1.25 中不可用并将自动删除。
|
|
1677
1673
|
haveArgInfo: 所选 Kubernetes 版本的配置信息不可用。此屏幕中可用的选项将受到限制,你可能需要使用 YAML 编辑器。
|
|
1678
|
-
deprecatedPsp: Pod 安全策略自 Kubernetes v1.21 起已弃用,并已在 Kubernetes v1.25 中删除。
|
|
1679
|
-
removedPsp: Pod 安全策略已在 Kubernetes v1.25 中删除,请改用 Pod Security Admission。
|
|
1680
1674
|
rkeTemplateUpgrade: 模板修订版 {name} 可用于升级
|
|
1681
1675
|
|
|
1682
1676
|
availabilityWarnings:
|
|
@@ -1835,10 +1829,6 @@ cluster:
|
|
|
1835
1829
|
psaChange: PSACT 现在自动设置为 Rancher 默认值
|
|
1836
1830
|
cisOverride: 更改此设置可能会影响集群安全,因为它会覆盖默认的 CIS 设置
|
|
1837
1831
|
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>
|
|
1842
1832
|
snapshots:
|
|
1843
1833
|
suffix: 每个节点的快照
|
|
1844
1834
|
systemService:
|
|
@@ -2738,8 +2728,6 @@ landing:
|
|
|
2738
2728
|
whatsNewLink: "2.8 的新功能"
|
|
2739
2729
|
learnMore: 了解更多
|
|
2740
2730
|
support: 支持
|
|
2741
|
-
psps: PSP
|
|
2742
|
-
deprecatedPsp: Pod 安全策略自 Kubernetes v1.21 起已弃用,并已在 Kubernetes v1.25 中删除。你在此集群中有一个或多个 PSP 资源。
|
|
2743
2731
|
community:
|
|
2744
2732
|
title: 社区支持
|
|
2745
2733
|
docs: Rancher 官方文档
|
|
@@ -4314,10 +4302,6 @@ project:
|
|
|
4314
4302
|
vmDefaultResourceLimit: 虚拟机默认资源限制
|
|
4315
4303
|
resourceQuotas: 资源配额
|
|
4316
4304
|
haveOneOwner: 至少有一名成员需要具有所有者角色。
|
|
4317
|
-
psp:
|
|
4318
|
-
default: 集群默认
|
|
4319
|
-
label: Pod 安全策略
|
|
4320
|
-
current: "{value} (Current)"
|
|
4321
4305
|
|
|
4322
4306
|
|
|
4323
4307
|
projectMembers:
|
|
@@ -4622,9 +4606,6 @@ rbac:
|
|
|
4622
4606
|
nodetemplates-manage:
|
|
4623
4607
|
label: 管理节点模板
|
|
4624
4608
|
description: 允许用户定义、编辑和移除节点模板。
|
|
4625
|
-
podsecuritypolicytemplates-manage:
|
|
4626
|
-
label: 管理 Pod 安全策略(PSP)
|
|
4627
|
-
description: 允许用户定义、编辑和移除 Pod 安全策略。
|
|
4628
4609
|
roles-manage:
|
|
4629
4610
|
label: 管理角色
|
|
4630
4611
|
description: 允许用户定义、编辑和移除角色定义。
|
|
@@ -7379,7 +7360,6 @@ legacy:
|
|
|
7379
7360
|
globalDnsProviders: 全局 DNS 提供商
|
|
7380
7361
|
notifiers: Notifiers
|
|
7381
7362
|
monitoring: 监控
|
|
7382
|
-
psps: Pod 安全策略模板
|
|
7383
7363
|
secrets: 密文
|
|
7384
7364
|
|
|
7385
7365
|
project:
|
|
@@ -7460,9 +7440,6 @@ charts:
|
|
|
7460
7440
|
service.ui.type:
|
|
7461
7441
|
label: Longhorn UI 服务
|
|
7462
7442
|
description: 定义 Longhorn UI 服务类型
|
|
7463
|
-
enablePSP:
|
|
7464
|
-
label: Pod 安全策略
|
|
7465
|
-
description: 为 Longhorn 工作负载设置 Pod 安全策略
|
|
7466
7443
|
csi.kubeletRootDir:
|
|
7467
7444
|
label: Kubelet 根目录
|
|
7468
7445
|
description: 指定 kubelet root-dir。如留空,则自动检测。
|
package/chart/gatekeeper.vue
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import UnitInput from '@shell/components/form/UnitInput';
|
|
3
|
-
import ChartPsp from '@shell/components/ChartPsp';
|
|
4
3
|
import { Checkbox } from '@components/Form/Checkbox';
|
|
5
4
|
import { mapGetters } from 'vuex';
|
|
6
5
|
|
|
7
6
|
export default {
|
|
8
|
-
components: {
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
props: {
|
|
7
|
+
components: { UnitInput, Checkbox },
|
|
8
|
+
props: {
|
|
12
9
|
value: {
|
|
13
10
|
type: Object,
|
|
14
11
|
default: () => {
|
|
@@ -60,12 +57,6 @@ export default {
|
|
|
60
57
|
</div>
|
|
61
58
|
</div>
|
|
62
59
|
|
|
63
|
-
<!-- Conditionally display PSP checkbox -->
|
|
64
|
-
<ChartPsp
|
|
65
|
-
:value="value"
|
|
66
|
-
:cluster="currentCluster"
|
|
67
|
-
/>
|
|
68
|
-
|
|
69
60
|
<template v-if="crdValues">
|
|
70
61
|
<!-- gatekeeper versions <1.0.2 do not have this option -->
|
|
71
62
|
<Checkbox
|
package/chart/istio.vue
CHANGED
|
@@ -6,7 +6,6 @@ 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';
|
|
10
9
|
|
|
11
10
|
const defaultOverlayFile = `#apiVersion: install.istio.io/v1alpha1
|
|
12
11
|
#kind: IstioOperator
|
|
@@ -54,8 +53,7 @@ export default {
|
|
|
54
53
|
Checkbox,
|
|
55
54
|
FileSelector,
|
|
56
55
|
YamlEditor,
|
|
57
|
-
Banner
|
|
58
|
-
ChartPsp
|
|
56
|
+
Banner
|
|
59
57
|
},
|
|
60
58
|
|
|
61
59
|
props: {
|
|
@@ -140,13 +138,6 @@ export default {
|
|
|
140
138
|
|
|
141
139
|
<template>
|
|
142
140
|
<div>
|
|
143
|
-
<!-- Conditionally display PSP checkbox -->
|
|
144
|
-
<ChartPsp
|
|
145
|
-
:value="value"
|
|
146
|
-
:title="t('catalog.chart.global')"
|
|
147
|
-
:cluster="currentCluster"
|
|
148
|
-
/>
|
|
149
|
-
|
|
150
141
|
<h3>
|
|
151
142
|
{{ t('istio.titles.components') }}
|
|
152
143
|
</h3>
|
package/chart/logging/index.vue
CHANGED
|
@@ -2,13 +2,10 @@
|
|
|
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';
|
|
6
5
|
|
|
7
6
|
export default {
|
|
8
|
-
components: {
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
props: {
|
|
7
|
+
components: { Checkbox, LabeledInput },
|
|
8
|
+
props: {
|
|
12
9
|
value: {
|
|
13
10
|
type: Object,
|
|
14
11
|
default: () => {
|
|
@@ -83,11 +80,5 @@ export default {
|
|
|
83
80
|
/>
|
|
84
81
|
</div>
|
|
85
82
|
</div>
|
|
86
|
-
|
|
87
|
-
<!-- Conditionally display PSP checkbox -->
|
|
88
|
-
<ChartPsp
|
|
89
|
-
:value="value"
|
|
90
|
-
:cluster="currentCluster"
|
|
91
|
-
/>
|
|
92
83
|
</div>
|
|
93
84
|
</template>
|
|
@@ -12,7 +12,6 @@ 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';
|
|
16
15
|
|
|
17
16
|
import { allHash } from '@shell/utils/promise';
|
|
18
17
|
import { STORAGE_CLASS, PVC, SECRET, WORKLOAD_TYPES } from '@shell/config/types';
|
|
@@ -26,8 +25,7 @@ export default {
|
|
|
26
25
|
LabeledInput,
|
|
27
26
|
Loading,
|
|
28
27
|
Prometheus,
|
|
29
|
-
Tab
|
|
30
|
-
ChartPsp
|
|
28
|
+
Tab
|
|
31
29
|
},
|
|
32
30
|
|
|
33
31
|
hasTabs: true,
|
|
@@ -265,12 +263,6 @@ export default {
|
|
|
265
263
|
/>
|
|
266
264
|
</div>
|
|
267
265
|
</div>
|
|
268
|
-
|
|
269
|
-
<!-- Conditionally display PSP checkbox -->
|
|
270
|
-
<ChartPsp
|
|
271
|
-
:value="value"
|
|
272
|
-
:cluster="currentCluster"
|
|
273
|
-
/>
|
|
274
266
|
</div>
|
|
275
267
|
</Tab>
|
|
276
268
|
<Tab
|
|
@@ -10,7 +10,6 @@ import { allHash } from '@shell/utils/promise';
|
|
|
10
10
|
import { STORAGE_CLASS, SECRET, PV } from '@shell/config/types';
|
|
11
11
|
import { mapGetters } from 'vuex';
|
|
12
12
|
import { STORAGE } from '@shell/config/labels-annotations';
|
|
13
|
-
import ChartPsp from '@shell/components/ChartPsp';
|
|
14
13
|
|
|
15
14
|
export default {
|
|
16
15
|
components: {
|
|
@@ -19,8 +18,7 @@ export default {
|
|
|
19
18
|
S3,
|
|
20
19
|
LabeledInput,
|
|
21
20
|
LabeledSelect,
|
|
22
|
-
Banner
|
|
23
|
-
ChartPsp
|
|
21
|
+
Banner
|
|
24
22
|
},
|
|
25
23
|
|
|
26
24
|
hasTabs: true,
|
|
@@ -169,12 +167,6 @@ export default {
|
|
|
169
167
|
label="Chart Options"
|
|
170
168
|
name="chartOptions"
|
|
171
169
|
>
|
|
172
|
-
<!-- Conditionally display PSP checkbox -->
|
|
173
|
-
<ChartPsp
|
|
174
|
-
:value="value"
|
|
175
|
-
:cluster="currentCluster"
|
|
176
|
-
/>
|
|
177
|
-
|
|
178
170
|
<Banner
|
|
179
171
|
color="info"
|
|
180
172
|
:label="t('backupRestoreOperator.deployment.storage.tip')"
|
package/components/Carousel.vue
CHANGED
|
@@ -181,7 +181,7 @@ export default {
|
|
|
181
181
|
:label="slide.repoName"
|
|
182
182
|
color="slider-badge mb-20"
|
|
183
183
|
/>
|
|
184
|
-
<h1>{{ slide.chartNameDisplay }}
|
|
184
|
+
<h1>{{ slide.chartNameDisplay }}</h1>
|
|
185
185
|
<p>{{ slide.chartDescription }}</p>
|
|
186
186
|
</div>
|
|
187
187
|
</div>
|
|
@@ -282,6 +282,7 @@ export default {
|
|
|
282
282
|
.slide-content {
|
|
283
283
|
display: flex;
|
|
284
284
|
padding: 30px;
|
|
285
|
+
height: 100%;
|
|
285
286
|
|
|
286
287
|
.slide-img {
|
|
287
288
|
width: 150px;
|
|
@@ -6,23 +6,6 @@ export default {
|
|
|
6
6
|
required: true
|
|
7
7
|
},
|
|
8
8
|
},
|
|
9
|
-
data(props) {
|
|
10
|
-
const mgmt = props.row?.mgmt;
|
|
11
|
-
|
|
12
|
-
return {
|
|
13
|
-
// The isImported getter on the provisioning cluster
|
|
14
|
-
// model doesn't work for imported K3s clusters, in
|
|
15
|
-
// which case it returns 'k3s' instead of 'imported.'
|
|
16
|
-
// This is the workaround.
|
|
17
|
-
isImported: mgmt?.providerForEmberParam === 'import' ||
|
|
18
|
-
// when imported cluster is GKE
|
|
19
|
-
!!mgmt?.spec?.gkeConfig?.imported ||
|
|
20
|
-
// or AKS
|
|
21
|
-
!!mgmt?.spec?.aksConfig?.imported ||
|
|
22
|
-
// or EKS
|
|
23
|
-
!!mgmt?.spec?.eksConfig?.imported
|
|
24
|
-
};
|
|
25
|
-
},
|
|
26
9
|
};
|
|
27
10
|
</script>
|
|
28
11
|
|
|
@@ -45,7 +28,7 @@ export default {
|
|
|
45
28
|
<template v-else-if="row.isCustom">
|
|
46
29
|
{{ t('cluster.provider.custom') }}
|
|
47
30
|
</template>
|
|
48
|
-
<template v-else-if="isImported">
|
|
31
|
+
<template v-else-if="row.isImported">
|
|
49
32
|
{{ t('cluster.provider.imported') }}
|
|
50
33
|
</template>
|
|
51
34
|
<div class="text-muted">
|
|
@@ -274,33 +274,36 @@ export default {
|
|
|
274
274
|
});
|
|
275
275
|
|
|
276
276
|
this.socket.addEventListener(EVENT_MESSAGE, (e) => {
|
|
277
|
-
const
|
|
277
|
+
const data = base64Decode(e.detail.data);
|
|
278
278
|
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
// Websocket message may contain multiple lines - loop through each line, one by one
|
|
280
|
+
data.split('\n').forEach((line) => {
|
|
281
|
+
let msg = line;
|
|
282
|
+
let time = null;
|
|
281
283
|
|
|
282
|
-
|
|
284
|
+
const idx = line.indexOf(' ');
|
|
283
285
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
if ( idx > 0 ) {
|
|
287
|
+
const timeStr = line.substr(0, idx);
|
|
288
|
+
const date = new Date(timeStr);
|
|
287
289
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
290
|
+
if ( !isNaN(date.getSeconds()) ) {
|
|
291
|
+
time = date.toISOString();
|
|
292
|
+
msg = line.substr(idx + 1);
|
|
293
|
+
}
|
|
291
294
|
}
|
|
292
|
-
}
|
|
293
295
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
const parsedLine = {
|
|
297
|
+
id: lastId++,
|
|
298
|
+
msg: ansiup.ansi_to_html(msg),
|
|
299
|
+
rawMsg: msg,
|
|
300
|
+
time,
|
|
301
|
+
};
|
|
300
302
|
|
|
301
|
-
|
|
303
|
+
Object.freeze(parsedLine);
|
|
302
304
|
|
|
303
|
-
|
|
305
|
+
this.backlog.push(parsedLine);
|
|
306
|
+
});
|
|
304
307
|
});
|
|
305
308
|
|
|
306
309
|
this.socket.connect();
|
|
@@ -54,22 +54,10 @@ export function init(store) {
|
|
|
54
54
|
route: { name: 'c-cluster-manager-cloudCredential' },
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
-
virtualType({
|
|
58
|
-
labelKey: 'legacy.psps',
|
|
59
|
-
name: 'pod-security-policies',
|
|
60
|
-
group: 'Root',
|
|
61
|
-
namespaced: false,
|
|
62
|
-
weight: 5,
|
|
63
|
-
icon: 'folder',
|
|
64
|
-
route: { name: 'c-cluster-manager-pages-page', params: { cluster: 'local', page: 'pod-security-policies' } },
|
|
65
|
-
exact: true
|
|
66
|
-
});
|
|
67
|
-
|
|
68
57
|
basicType([
|
|
69
58
|
CAPI.RANCHER_CLUSTER,
|
|
70
59
|
'cloud-credentials',
|
|
71
60
|
'drivers',
|
|
72
|
-
'pod-security-policies',
|
|
73
61
|
]);
|
|
74
62
|
|
|
75
63
|
configureType(CAPI.RANCHER_CLUSTER, {
|
|
@@ -131,7 +119,6 @@ export function init(store) {
|
|
|
131
119
|
CAPI.MACHINE_SET,
|
|
132
120
|
CAPI.MACHINE,
|
|
133
121
|
CATALOG.CLUSTER_REPO,
|
|
134
|
-
'pod-security-policies',
|
|
135
122
|
MANAGEMENT.PSA
|
|
136
123
|
], 'advanced');
|
|
137
124
|
|
package/config/types.js
CHANGED
|
@@ -53,8 +53,6 @@ export const NODE = 'node';
|
|
|
53
53
|
export const NETWORK_POLICY = 'networking.k8s.io.networkpolicy';
|
|
54
54
|
export const POD = 'pod';
|
|
55
55
|
export const POD_DISRUPTION_BUDGET = 'policy.poddisruptionbudget';
|
|
56
|
-
export const PSP = 'policy.podsecuritypolicy';
|
|
57
|
-
export const PSPS = 'policy.podsecuritypolicies';
|
|
58
56
|
export const PV = 'persistentvolume';
|
|
59
57
|
export const PVC = 'persistentvolumeclaim';
|
|
60
58
|
export const RESOURCE_QUOTA = 'resourcequota';
|
|
@@ -183,8 +181,6 @@ export const MANAGEMENT = {
|
|
|
183
181
|
TOKEN: 'management.cattle.io.token',
|
|
184
182
|
GLOBAL_ROLE: 'management.cattle.io.globalrole',
|
|
185
183
|
GLOBAL_ROLE_BINDING: 'management.cattle.io.globalrolebinding',
|
|
186
|
-
POD_SECURITY_POLICY_TEMPLATE: 'management.cattle.io.podsecuritypolicytemplate',
|
|
187
|
-
PSP_TEMPLATE_BINDING: 'management.cattle.io.podsecuritypolicytemplateprojectbinding',
|
|
188
184
|
PSA: 'management.cattle.io.podsecurityadmissionconfigurationtemplate',
|
|
189
185
|
MANAGED_CHART: 'management.cattle.io.managedchart',
|
|
190
186
|
USER_NOTIFICATION: 'management.cattle.io.rancherusernotification',
|
|
@@ -5,7 +5,6 @@ import CreateEditView from '@shell/mixins/create-edit-view';
|
|
|
5
5
|
import FormValidation from '@shell/mixins/form-validation';
|
|
6
6
|
import CruResource from '@shell/components/CruResource';
|
|
7
7
|
import Labels from '@shell/components/form/Labels';
|
|
8
|
-
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
9
8
|
import ResourceQuota from '@shell/components/form/ResourceQuota/Project';
|
|
10
9
|
import { HARVESTER_TYPES, RANCHER_TYPES } from '@shell/components/form/ResourceQuota/shared';
|
|
11
10
|
import Tab from '@shell/components/Tabbed/Tab';
|
|
@@ -21,26 +20,15 @@ import { Banner } from '@components/Banner';
|
|
|
21
20
|
|
|
22
21
|
export default {
|
|
23
22
|
components: {
|
|
24
|
-
ContainerResourceLimit, CruResource, Labels,
|
|
23
|
+
ContainerResourceLimit, CruResource, Labels, NameNsDescription, ProjectMembershipEditor, ResourceQuota, Tabbed, Tab, Banner
|
|
25
24
|
},
|
|
26
25
|
|
|
27
26
|
mixins: [CreateEditView, FormValidation],
|
|
28
|
-
async fetch() {
|
|
29
|
-
if ( this.$store.getters['management/canList'](MANAGEMENT.POD_SECURITY_POLICY_TEMPLATE) ) {
|
|
30
|
-
this.allPSPs = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.POD_SECURITY_POLICY_TEMPLATE });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// User can only change the PSP if the user has permissions to see the binding schema for PSP Templates
|
|
34
|
-
const pspBindingSchema = this.$store.getters['management/schemaFor'](MANAGEMENT.PSP_TEMPLATE_BINDING);
|
|
35
|
-
|
|
36
|
-
this.canEditPSPBindings = !!pspBindingSchema;
|
|
37
|
-
},
|
|
38
27
|
data() {
|
|
39
28
|
this.$set(this.value, 'spec', this.value.spec || {});
|
|
40
29
|
this.$set(this.value.spec, 'podSecurityPolicyTemplateId', this.value.status?.podSecurityPolicyTemplateId || '');
|
|
41
30
|
|
|
42
31
|
return {
|
|
43
|
-
allPSPs: [],
|
|
44
32
|
projectRoleTemplateBindingSchema: this.$store.getters[`management/schemaFor`](MANAGEMENT.PROJECT_ROLE_TEMPLATE_BINDING),
|
|
45
33
|
createLocation: {
|
|
46
34
|
name: 'c-cluster-product-resource-create',
|
|
@@ -57,7 +45,6 @@ export default {
|
|
|
57
45
|
HARVESTER_TYPES,
|
|
58
46
|
RANCHER_TYPES,
|
|
59
47
|
fvFormRuleSets: [{ path: 'spec.displayName', rules: ['required'] }],
|
|
60
|
-
canEditPSPBindings: true,
|
|
61
48
|
};
|
|
62
49
|
},
|
|
63
50
|
computed: {
|
|
@@ -91,31 +78,6 @@ export default {
|
|
|
91
78
|
return (this.currentCluster?.spec?.kubernetesVersion || '').includes('k3s');
|
|
92
79
|
},
|
|
93
80
|
|
|
94
|
-
pspOptions() {
|
|
95
|
-
if ( this.isK3s || !this.currentCluster.spec.defaultPodSecurityPolicyTemplateName ) {
|
|
96
|
-
return null;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const out = [{ label: this.t('project.psp.default'), value: '' }];
|
|
100
|
-
|
|
101
|
-
if ( this.allPSPs ) {
|
|
102
|
-
for ( const pspt of this.allPSPs ) {
|
|
103
|
-
out.push({
|
|
104
|
-
label: pspt.nameDisplay,
|
|
105
|
-
value: pspt.id,
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
const cur = this.value.status?.podSecurityPolicyTemplateId;
|
|
111
|
-
|
|
112
|
-
if ( cur && !out.find((x) => x.value === cur) ) {
|
|
113
|
-
out.unshift({ label: this.t('project.psp.current', { value: cur }), value: cur });
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return out;
|
|
117
|
-
},
|
|
118
|
-
|
|
119
81
|
isHarvester() {
|
|
120
82
|
return this.$store.getters['currentProduct'].inStore === HARVESTER;
|
|
121
83
|
},
|
|
@@ -223,19 +185,6 @@ export default {
|
|
|
223
185
|
:normalize-name="false"
|
|
224
186
|
:rules="{ name: fvGetAndReportPathRules('spec.displayName'), namespace: [], description: [] }"
|
|
225
187
|
/>
|
|
226
|
-
<div class="row mb-20">
|
|
227
|
-
<div class="col span-3">
|
|
228
|
-
<LabeledSelect
|
|
229
|
-
v-if="pspOptions"
|
|
230
|
-
v-model="value.spec.podSecurityPolicyTemplateId"
|
|
231
|
-
class="psp"
|
|
232
|
-
:mode="mode"
|
|
233
|
-
:options="pspOptions"
|
|
234
|
-
:disabled="!canEditPSPBindings"
|
|
235
|
-
:label="t('project.psp.label')"
|
|
236
|
-
/>
|
|
237
|
-
</div>
|
|
238
|
-
</div>
|
|
239
188
|
<Tabbed :side-tabs="true">
|
|
240
189
|
<Tab
|
|
241
190
|
v-if="canViewMembers"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import CruResource from '@shell/components/CruResource';
|
|
3
3
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
4
4
|
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
5
|
+
import { Banner } from '@components/Banner';
|
|
5
6
|
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
6
7
|
import { TextAreaAutoGrow } from '@components/Form/TextArea';
|
|
7
8
|
import formRulesGenerator from '@shell/utils/validators/formRules/index';
|
|
@@ -11,6 +12,7 @@ import { RadioGroup } from '@components/Form/Radio';
|
|
|
11
12
|
import FormValidation from '@shell/mixins/form-validation';
|
|
12
13
|
import { setBrand } from '@shell/config/private-label';
|
|
13
14
|
import { keyBy, mapValues } from 'lodash';
|
|
15
|
+
import { isLocalhost, isServerUrl } from '@shell/utils/validators/setting';
|
|
14
16
|
|
|
15
17
|
export default {
|
|
16
18
|
components: {
|
|
@@ -18,7 +20,8 @@ export default {
|
|
|
18
20
|
LabeledInput,
|
|
19
21
|
LabeledSelect,
|
|
20
22
|
RadioGroup,
|
|
21
|
-
TextAreaAutoGrow
|
|
23
|
+
TextAreaAutoGrow,
|
|
24
|
+
Banner
|
|
22
25
|
},
|
|
23
26
|
|
|
24
27
|
mixins: [CreateEditView, FormValidation],
|
|
@@ -63,6 +66,14 @@ export default {
|
|
|
63
66
|
|
|
64
67
|
return factoryArg ? rule(factoryArg) : rule;
|
|
65
68
|
}) : {};
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
showLocalhostWarning() {
|
|
72
|
+
return isServerUrl(this.value.id) && isLocalhost(this.value.value);
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
validationPassed() {
|
|
76
|
+
return this.fvFormIsValid && this.fvGetPathErrors(['value']).length === 0;
|
|
66
77
|
}
|
|
67
78
|
},
|
|
68
79
|
|
|
@@ -98,6 +109,11 @@ export default {
|
|
|
98
109
|
if (ev && ev.srcElement) {
|
|
99
110
|
ev.srcElement.blur();
|
|
100
111
|
}
|
|
112
|
+
|
|
113
|
+
if (isServerUrl(this.value.id) && !this.value.default) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
101
117
|
this.value.value = this.value.default;
|
|
102
118
|
}
|
|
103
119
|
}
|
|
@@ -113,7 +129,7 @@ export default {
|
|
|
113
129
|
:resource="value"
|
|
114
130
|
:subtypes="[]"
|
|
115
131
|
:can-yaml="false"
|
|
116
|
-
:validation-passed="
|
|
132
|
+
:validation-passed="validationPassed"
|
|
117
133
|
@error="e=>errors = e"
|
|
118
134
|
@finish="saveSettings"
|
|
119
135
|
@cancel="done"
|
|
@@ -138,6 +154,19 @@ export default {
|
|
|
138
154
|
</button>
|
|
139
155
|
</div>
|
|
140
156
|
|
|
157
|
+
<Banner
|
|
158
|
+
v-if="showLocalhostWarning"
|
|
159
|
+
color="warning"
|
|
160
|
+
:label="t('validation.setting.serverUrl.localhost')"
|
|
161
|
+
/>
|
|
162
|
+
|
|
163
|
+
<Banner
|
|
164
|
+
v-for="(err, i) in fvGetPathErrors(['value'])"
|
|
165
|
+
:key="i"
|
|
166
|
+
color="error"
|
|
167
|
+
:label="err"
|
|
168
|
+
/>
|
|
169
|
+
|
|
141
170
|
<div class="mt-20">
|
|
142
171
|
<div v-if="setting.kind === 'enum'">
|
|
143
172
|
<LabeledSelect
|