@rancher/shell 0.4.0 → 0.5.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/assets/images/providers/ovhcloudmks.svg +122 -0
- package/assets/images/providers/ovhcloudpubliccloud.svg +122 -0
- package/assets/styles/global/_layout.scss +99 -0
- package/assets/translations/en-us.yaml +30 -5
- package/assets/translations/zh-hans.yaml +1 -1
- package/babel.config.js +7 -1
- package/chart/monitoring/alerting/index.vue +7 -21
- package/chart/monitoring/grafana/index.vue +55 -0
- package/chart/monitoring/index.vue +51 -17
- package/chart/monitoring/prometheus/index.vue +37 -43
- package/chart/rancher-backup/index.vue +2 -1
- package/cloud-credential/azure.vue +4 -17
- package/components/Certificates.vue +164 -0
- package/components/CodeMirror.vue +19 -21
- package/components/CruResource.vue +1 -0
- package/components/EtcdInfoBanner.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +25 -1
- package/components/IconOrSvg.vue +1 -1
- package/components/LandingPagePreference.vue +1 -4
- package/components/Questions/index.vue +1 -1
- package/components/ResourceDetail/Masthead.vue +16 -3
- package/components/ResourceTable.vue +14 -2
- package/components/ResourceYaml.vue +5 -0
- package/components/SideNav.vue +1 -1
- package/components/SingleClusterInfo.vue +1 -4
- package/components/Tabbed/index.vue +12 -0
- package/components/fleet/FleetRepos.vue +62 -27
- package/components/fleet/FleetResources.vue +6 -1
- package/components/form/ArrayListSelect.vue +10 -0
- package/components/form/KeyValue.vue +4 -0
- package/components/form/LabeledSelect.vue +4 -0
- package/components/formatter/Checked.vue +11 -3
- package/components/formatter/FleetClusterSummaryGraph.vue +27 -0
- package/components/formatter/FleetSummaryGraph.vue +23 -11
- package/components/formatter/LiveDuration.vue +1 -1
- package/components/formatter/PercentageBar.vue +1 -1
- package/components/formatter/__tests__/Checked.test.ts +19 -0
- package/components/nav/Group.vue +2 -2
- package/components/nav/Header.vue +0 -1
- package/components/nav/TopLevelMenu.vue +36 -6
- package/components/nav/Type.vue +1 -3
- package/components/nav/WindowManager/ContainerLogs.vue +101 -3
- package/components/nav/WindowManager/ContainerShell.vue +6 -1
- package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +186 -0
- package/components/nav/WindowManager/index.vue +11 -10
- package/components/nav/__tests__/TopLevelMenu.test.ts +33 -0
- package/components/nav/__tests__/Type.test.ts +1 -1
- package/components/nuxt/nuxt-child.js +14 -78
- package/components/nuxt/nuxt.js +1 -1
- package/{layouts → components/templates}/blank.vue +1 -1
- package/{layouts → components/templates}/default.vue +8 -98
- package/{layouts → components/templates}/error.vue +10 -19
- package/{layouts → components/templates}/home.vue +4 -1
- package/{layouts → components/templates}/plain.vue +4 -1
- package/{layouts → components/templates}/standalone.vue +1 -1
- package/{layouts → components/templates}/unauthenticated.vue +1 -1
- package/composables/useCompactInput.ts +20 -0
- package/composables/useLabeledFormElement.ts +138 -0
- package/config/harvester-manager-types.js +2 -0
- package/config/private-label.js +22 -0
- package/config/product/explorer.js +3 -0
- package/config/product/fleet.js +6 -1
- package/config/product/manager.js +8 -2
- package/config/query-params.js +1 -0
- package/config/router.js +385 -364
- package/config/settings.ts +1 -0
- package/config/store.js +1 -1
- package/config/system-namespaces.js +3 -0
- package/config/table-headers.js +47 -0
- package/core/plugin-routes.ts +56 -114
- package/core/plugin.ts +16 -10
- package/core/plugins-loader.js +7 -9
- package/core/plugins.js +0 -3
- package/creators/app/files/.gitlab-ci.yml +1 -1
- package/detail/fleet.cattle.io.cluster.vue +11 -1
- package/detail/provisioning.cattle.io.cluster.vue +4 -3
- package/dialog/ScaleMachineDownDialog.vue +34 -17
- package/edit/__tests__/service.test.ts +89 -0
- package/edit/auth/googleoauth.vue +1 -5
- package/edit/catalog.cattle.io.clusterrepo.vue +18 -0
- package/edit/cloudcredential.vue +2 -0
- package/edit/configmap.vue +2 -1
- package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.spec.ts +1 -1
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +15 -7
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +112 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +473 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/{CustomCommand.tests.ts → CustomCommand.test.ts} +4 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +1 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +73 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +7 -1
- package/edit/provisioning.cattle.io.cluster/__tests__/utils/cluster.ts +386 -0
- package/edit/provisioning.cattle.io.cluster/import.vue +2 -2
- package/edit/provisioning.cattle.io.cluster/index.vue +92 -36
- package/edit/provisioning.cattle.io.cluster/rke2.vue +171 -583
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +137 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +157 -0
- package/edit/provisioning.cattle.io.cluster/{Basics.vue → tabs/Basics.vue} +94 -19
- package/edit/provisioning.cattle.io.cluster/{MachinePool.vue → tabs/MachinePool.vue} +1 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +135 -0
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +189 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +144 -0
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +76 -0
- package/edit/service.vue +12 -0
- package/edit/workload/mixins/workload.js +1 -1
- package/initialize/App.js +25 -71
- package/initialize/client.js +21 -162
- package/initialize/index.js +27 -123
- package/list/management.cattle.io.feature.vue +1 -7
- package/list/node.vue +1 -0
- package/machine-config/__tests__/vmwarevsphere.test.ts +100 -21
- package/machine-config/vmwarevsphere.vue +73 -51
- package/middleware/authenticated.js +10 -17
- package/mixins/auth-config.js +2 -7
- package/mixins/brand.js +29 -41
- package/mixins/labeled-form-element.ts +6 -1
- package/models/__tests__/management.cattle.io.node.ts +85 -0
- package/models/__tests__/management.cattle.io.nodepool.ts +83 -0
- package/models/__tests__/namespace.test.ts +49 -9
- package/models/__tests__/workload.test.ts +91 -0
- package/models/cluster/node.js +4 -4
- package/models/cluster.x-k8s.io.machinedeployment.js +14 -0
- package/models/fleet.cattle.io.cluster.js +4 -0
- package/models/fleet.cattle.io.gitrepo.js +56 -13
- package/models/management.cattle.io.kontainerdriver.js +1 -1
- package/models/management.cattle.io.node.js +18 -14
- package/models/management.cattle.io.nodepool.js +17 -0
- package/models/namespace.js +1 -1
- package/models/pod.js +20 -0
- package/models/provisioning.cattle.io.cluster.js +20 -3
- package/models/secret.js +117 -18
- package/models/workload.js +16 -0
- package/models/workload.service.js +18 -0
- package/package.json +10 -9
- package/pages/about.vue +0 -1
- package/pages/account/create-key.vue +0 -1
- package/pages/account/index.vue +0 -1
- package/pages/auth/login.vue +0 -1
- package/pages/auth/logout.vue +0 -2
- package/pages/auth/setup.vue +0 -4
- package/pages/auth/verify.vue +14 -8
- package/pages/c/_cluster/apps/charts/install.vue +4 -4
- package/pages/c/_cluster/apps/index.vue +0 -2
- package/pages/c/_cluster/auth/index.vue +0 -2
- package/pages/c/_cluster/ecm/index.vue +0 -2
- package/pages/c/_cluster/explorer/index.vue +28 -2
- package/pages/c/_cluster/fleet/index.vue +1 -1
- package/pages/c/_cluster/index.vue +0 -2
- package/pages/c/_cluster/settings/banners.vue +0 -2
- package/pages/c/_cluster/settings/brand.vue +0 -2
- package/pages/c/_cluster/settings/index.vue +0 -2
- package/pages/c/_cluster/settings/links.vue +0 -1
- package/pages/c/_cluster/settings/performance.vue +0 -1
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +2 -1
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +10 -46
- package/pages/c/_cluster/uiplugins/index.vue +0 -2
- package/pages/diagnostic.vue +1 -2
- package/pages/fail-whale.vue +0 -1
- package/pages/prefs.vue +0 -1
- package/pages/support/index.vue +2 -8
- package/pkg/auto-import.js +1 -1
- package/plugins/axios.js +0 -36
- package/plugins/back-button.js +3 -5
- package/plugins/codemirror-loader.js +1 -1
- package/plugins/codemirror.js +41 -0
- package/plugins/dashboard-store/__tests__/{mutations.spec.ts → mutations.test.ts} +1 -1
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +49 -0
- package/plugins/dashboard-store/__tests__/utils/store-mocks.ts +7 -0
- package/plugins/dashboard-store/actions.js +30 -4
- package/plugins/dashboard-store/classify.js +1 -18
- package/plugins/dashboard-store/getters.js +10 -5
- package/plugins/dashboard-store/index.js +0 -12
- package/plugins/dashboard-store/mutations.js +0 -4
- package/plugins/dashboard-store/resource-class.js +59 -18
- package/plugins/steve/__tests__/steve-class.spec.ts +59 -0
- package/plugins/steve/__tests__/utils/steve-mocks.ts +31 -0
- package/plugins/steve/getters.js +4 -1
- package/plugins/steve/norman-class.js +19 -0
- package/plugins/steve/steve-class.js +22 -0
- package/plugins/steve/subscribe.js +4 -10
- package/rancher-components/Accordion/Accordion.test.ts +45 -0
- package/rancher-components/Accordion/Accordion.vue +85 -0
- package/rancher-components/Accordion/index.ts +1 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +19 -2
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +12 -1
- package/rancher-components/Form/Radio/RadioButton.test.ts +7 -3
- package/rancher-components/Form/Radio/RadioGroup.test.ts +30 -0
- package/rancher-components/Form/Radio/RadioGroup.vue +4 -0
- package/rancher-components/StringList/StringList.test.ts +270 -0
- package/rancher-components/StringList/StringList.vue +57 -18
- package/rancher-components/components/Accordion/Accordion.test.ts +45 -0
- package/rancher-components/components/Accordion/Accordion.vue +85 -0
- package/rancher-components/components/Accordion/index.ts +1 -0
- package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +19 -2
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +4 -1
- package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +50 -0
- package/scripts/extension/parse-tag-name +2 -2
- package/scripts/publish-shell.sh +10 -0
- package/scripts/test-plugins-build.sh +85 -9
- package/server/har-file.js +183 -0
- package/store/catalog.js +1 -1
- package/store/features.js +1 -0
- package/store/i18n.js +11 -0
- package/store/index.js +10 -11
- package/store/prefs.js +33 -35
- package/store/type-map.js +8 -7
- package/tsconfig.json +35 -9
- package/tsconfig.paths.json +18 -0
- package/types/shell/index.d.ts +345 -214
- package/utils/__tests__/create-yaml.test.ts +60 -0
- package/utils/axios.js +0 -19
- package/utils/azure.js +24 -0
- package/utils/create-yaml.js +17 -10
- package/utils/monitoring.js +1 -1
- package/utils/nuxt.js +18 -39
- package/utils/object.js +14 -0
- package/utils/router.scrollBehavior.js +12 -14
- package/utils/time.js +1 -1
- package/utils/url.ts +1 -1
- package/vue.config.js +23 -2
- package/.DS_Store +0 -0
- package/assets/images/providers/aks-black.svg +0 -28
- package/assets/images/providers/aks.svg +0 -31
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts +0 -234
- package/initialize/layouts.ts +0 -26
- package/mixins/fetch.server.js +0 -73
- package/pages/c/index.vue +0 -9
- package/pages/rio/mesh.vue +0 -508
- package/plugins/transitions.js +0 -4
- package/scripts/.DS_Store +0 -0
- package/scripts/verdaccio.log +0 -205
- package/tsconfig.default.json +0 -46
- package/yarn-error.log +0 -200
- /package/components/form/__tests__/{NameNsDescription.ts → NameNsDescription.test.ts} +0 -0
- /package/edit/networking.k8s.io.networkpolicy/__tests__/utils/{selectors.ts → selectors.test.ts} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{AgentConfiguration.vue → tabs/AgentConfiguration.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{MemberRoles.vue → tabs/MemberRoles.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{S3Config.vue → tabs/etcd/S3Config.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{ACE.vue → tabs/networking/ACE.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{RegistryConfigs.vue → tabs/registries/RegistryConfigs.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{RegistryMirrors.vue → tabs/registries/RegistryMirrors.vue} +0 -0
- /package/edit/provisioning.cattle.io.cluster/{DrainOptions.vue → tabs/upgrade/DrainOptions.vue} +0 -0
- /package/plugins/dashboard-store/__tests__/{actions.spec.ts → actions.test.ts} +0 -0
- /package/plugins/dashboard-store/__tests__/{getters.spec.ts → getters.test.ts} +0 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
export const PROV_CLUSTER = {
|
|
2
|
+
id: 'fleet-default/test-args',
|
|
3
|
+
type: 'provisioning.cattle.io.cluster',
|
|
4
|
+
apiVersion: 'provisioning.cattle.io/v1',
|
|
5
|
+
kind: 'Cluster',
|
|
6
|
+
metadata: {
|
|
7
|
+
annotations: { 'field.cattle.io/creatorId': 'user' },
|
|
8
|
+
creationTimestamp: '2024-01-14T10:03:39Z',
|
|
9
|
+
generation: 3,
|
|
10
|
+
name: 'test-args',
|
|
11
|
+
namespace: 'fleet-default',
|
|
12
|
+
state: {
|
|
13
|
+
error: false,
|
|
14
|
+
message: 'Resource is Ready',
|
|
15
|
+
name: 'active',
|
|
16
|
+
transitioning: false
|
|
17
|
+
},
|
|
18
|
+
uid: 'eab4ed52-c339-4d61-8dc2-804d09f36425',
|
|
19
|
+
labels: {}
|
|
20
|
+
},
|
|
21
|
+
spec: {
|
|
22
|
+
kubernetesVersion: 'v1.27.8+rke2r1',
|
|
23
|
+
localClusterAuthEndpoint: {
|
|
24
|
+
enabled: false,
|
|
25
|
+
caCerts: '',
|
|
26
|
+
fqdn: ''
|
|
27
|
+
},
|
|
28
|
+
rkeConfig: {
|
|
29
|
+
chartValues: { 'rke2-calico': {} },
|
|
30
|
+
etcd: {
|
|
31
|
+
snapshotRetention: 5,
|
|
32
|
+
snapshotScheduleCron: '0 */5 * * *',
|
|
33
|
+
disableSnapshots: false
|
|
34
|
+
},
|
|
35
|
+
machineGlobalConfig: {
|
|
36
|
+
cni: 'calico',
|
|
37
|
+
'disable-kube-proxy': false,
|
|
38
|
+
'etcd-expose-metrics': false
|
|
39
|
+
},
|
|
40
|
+
machinePoolDefaults: {},
|
|
41
|
+
machinePools: [
|
|
42
|
+
{
|
|
43
|
+
controlPlaneRole: true,
|
|
44
|
+
drainBeforeDelete: true,
|
|
45
|
+
etcdRole: true,
|
|
46
|
+
machineConfigRef: {
|
|
47
|
+
kind: 'DigitaloceanConfig',
|
|
48
|
+
name: 'nc-test-args-pool1-dfvbh'
|
|
49
|
+
},
|
|
50
|
+
name: 'pool1',
|
|
51
|
+
quantity: 1,
|
|
52
|
+
unhealthyNodeTimeout: '0s',
|
|
53
|
+
workerRole: true
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
machineSelectorConfig: [
|
|
57
|
+
{ config: { 'protect-kernel-defaults': false } }
|
|
58
|
+
],
|
|
59
|
+
registries: {
|
|
60
|
+
configs: {},
|
|
61
|
+
mirrors: {}
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
defaultPodSecurityAdmissionConfigurationTemplateName: '',
|
|
65
|
+
},
|
|
66
|
+
status: {
|
|
67
|
+
agentDeployed: true,
|
|
68
|
+
clientSecretName: 'test-args-kubeconfig',
|
|
69
|
+
clusterName: 'c-m-qk7hvstl',
|
|
70
|
+
fleetWorkspaceName: 'fleet-default',
|
|
71
|
+
observedGeneration: 3,
|
|
72
|
+
ready: true
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const VERSION_CLUSTER = {
|
|
77
|
+
label: 'v1.27.8+rke2r1',
|
|
78
|
+
value: 'v1.27.8+rke2r1',
|
|
79
|
+
sort: '0000000001.0000000027.0000000008.rke0000000002r0000000001',
|
|
80
|
+
serverArgs: {
|
|
81
|
+
'audit-policy-file': {
|
|
82
|
+
type: 'string',
|
|
83
|
+
create: false,
|
|
84
|
+
update: false
|
|
85
|
+
},
|
|
86
|
+
'cluster-cidr': {
|
|
87
|
+
type: 'string',
|
|
88
|
+
create: false,
|
|
89
|
+
update: false
|
|
90
|
+
},
|
|
91
|
+
'cluster-dns': {
|
|
92
|
+
type: 'string',
|
|
93
|
+
create: false,
|
|
94
|
+
update: false
|
|
95
|
+
},
|
|
96
|
+
'cluster-domain': {
|
|
97
|
+
type: 'string',
|
|
98
|
+
create: false,
|
|
99
|
+
update: false
|
|
100
|
+
},
|
|
101
|
+
cni: {
|
|
102
|
+
type: 'array',
|
|
103
|
+
default: 'calico',
|
|
104
|
+
create: false,
|
|
105
|
+
update: false,
|
|
106
|
+
options: [
|
|
107
|
+
'canal',
|
|
108
|
+
'cilium',
|
|
109
|
+
'calico',
|
|
110
|
+
'multus,canal',
|
|
111
|
+
'multus,cilium',
|
|
112
|
+
'multus,calico'
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
'container-runtime-endpoint': {
|
|
116
|
+
type: 'string',
|
|
117
|
+
create: false,
|
|
118
|
+
update: false
|
|
119
|
+
},
|
|
120
|
+
disable: {
|
|
121
|
+
type: 'array',
|
|
122
|
+
create: false,
|
|
123
|
+
update: false,
|
|
124
|
+
options: [
|
|
125
|
+
'rke2-coredns',
|
|
126
|
+
'rke2-ingress-nginx',
|
|
127
|
+
'rke2-metrics-server'
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
'disable-cloud-controller': {
|
|
131
|
+
type: 'bool',
|
|
132
|
+
create: false,
|
|
133
|
+
update: false
|
|
134
|
+
},
|
|
135
|
+
'disable-kube-proxy': {
|
|
136
|
+
type: 'boolean',
|
|
137
|
+
default: false,
|
|
138
|
+
create: false,
|
|
139
|
+
update: false
|
|
140
|
+
},
|
|
141
|
+
'disable-scheduler': {
|
|
142
|
+
type: 'bool',
|
|
143
|
+
create: false,
|
|
144
|
+
update: false
|
|
145
|
+
},
|
|
146
|
+
'egress-selector-mode': {
|
|
147
|
+
type: 'string',
|
|
148
|
+
create: false,
|
|
149
|
+
update: false
|
|
150
|
+
},
|
|
151
|
+
'etcd-arg': {
|
|
152
|
+
type: 'array',
|
|
153
|
+
create: false,
|
|
154
|
+
update: false
|
|
155
|
+
},
|
|
156
|
+
'etcd-expose-metrics': {
|
|
157
|
+
type: 'boolean',
|
|
158
|
+
default: false,
|
|
159
|
+
create: false,
|
|
160
|
+
update: false
|
|
161
|
+
},
|
|
162
|
+
'etcd-image': {
|
|
163
|
+
type: 'string',
|
|
164
|
+
create: false,
|
|
165
|
+
update: false
|
|
166
|
+
},
|
|
167
|
+
'kube-apiserver-arg': {
|
|
168
|
+
type: 'array',
|
|
169
|
+
create: false,
|
|
170
|
+
update: false
|
|
171
|
+
},
|
|
172
|
+
'kube-apiserver-image': {
|
|
173
|
+
type: 'string',
|
|
174
|
+
create: false,
|
|
175
|
+
update: false
|
|
176
|
+
},
|
|
177
|
+
'kube-cloud-controller-manager-arg': {
|
|
178
|
+
type: 'array',
|
|
179
|
+
create: false,
|
|
180
|
+
update: false
|
|
181
|
+
},
|
|
182
|
+
'kube-controller-manager-arg': {
|
|
183
|
+
type: 'array',
|
|
184
|
+
create: false,
|
|
185
|
+
update: false
|
|
186
|
+
},
|
|
187
|
+
'kube-controller-manager-image': {
|
|
188
|
+
type: 'string',
|
|
189
|
+
create: false,
|
|
190
|
+
update: false
|
|
191
|
+
},
|
|
192
|
+
'kube-proxy-arg': {
|
|
193
|
+
type: 'array',
|
|
194
|
+
create: false,
|
|
195
|
+
update: false
|
|
196
|
+
},
|
|
197
|
+
'kube-scheduler-arg': {
|
|
198
|
+
type: 'array',
|
|
199
|
+
create: false,
|
|
200
|
+
update: false
|
|
201
|
+
},
|
|
202
|
+
'kube-scheduler-image': {
|
|
203
|
+
type: 'string',
|
|
204
|
+
create: false,
|
|
205
|
+
update: false
|
|
206
|
+
},
|
|
207
|
+
'kubelet-path': {
|
|
208
|
+
type: 'string',
|
|
209
|
+
create: false,
|
|
210
|
+
update: false
|
|
211
|
+
},
|
|
212
|
+
'pause-image': {
|
|
213
|
+
type: 'string',
|
|
214
|
+
create: false,
|
|
215
|
+
update: false
|
|
216
|
+
},
|
|
217
|
+
'runtime-image': {
|
|
218
|
+
type: 'string',
|
|
219
|
+
create: false,
|
|
220
|
+
update: false
|
|
221
|
+
},
|
|
222
|
+
'service-cidr': {
|
|
223
|
+
type: 'string',
|
|
224
|
+
create: false,
|
|
225
|
+
update: false
|
|
226
|
+
},
|
|
227
|
+
'service-node-port-range': {
|
|
228
|
+
type: 'string',
|
|
229
|
+
create: false,
|
|
230
|
+
update: false
|
|
231
|
+
},
|
|
232
|
+
snapshotter: {
|
|
233
|
+
type: 'string',
|
|
234
|
+
create: false,
|
|
235
|
+
update: false
|
|
236
|
+
},
|
|
237
|
+
'tls-san': {
|
|
238
|
+
type: 'array',
|
|
239
|
+
create: false,
|
|
240
|
+
update: false
|
|
241
|
+
},
|
|
242
|
+
'tls-san-security': {
|
|
243
|
+
type: 'boolean',
|
|
244
|
+
create: false,
|
|
245
|
+
update: false
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
agentArgs: {
|
|
249
|
+
'audit-policy-file': {
|
|
250
|
+
type: 'string',
|
|
251
|
+
create: false,
|
|
252
|
+
update: false
|
|
253
|
+
},
|
|
254
|
+
'cloud-controller-manager-extra-env': {
|
|
255
|
+
type: 'array',
|
|
256
|
+
create: false,
|
|
257
|
+
update: false
|
|
258
|
+
},
|
|
259
|
+
'cloud-controller-manager-extra-mount': {
|
|
260
|
+
type: 'array',
|
|
261
|
+
create: false,
|
|
262
|
+
update: false
|
|
263
|
+
},
|
|
264
|
+
'cloud-provider-config': {
|
|
265
|
+
type: 'string',
|
|
266
|
+
create: false,
|
|
267
|
+
update: false
|
|
268
|
+
},
|
|
269
|
+
'cloud-provider-name': {
|
|
270
|
+
type: 'enum',
|
|
271
|
+
nullable: true,
|
|
272
|
+
create: false,
|
|
273
|
+
update: false,
|
|
274
|
+
options: [
|
|
275
|
+
'aws',
|
|
276
|
+
'azure',
|
|
277
|
+
'gcp',
|
|
278
|
+
'rancher-vsphere',
|
|
279
|
+
'harvester',
|
|
280
|
+
'external'
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
'control-plane-resource-limits': {
|
|
284
|
+
type: 'string',
|
|
285
|
+
create: false,
|
|
286
|
+
update: false
|
|
287
|
+
},
|
|
288
|
+
'control-plane-resource-requests': {
|
|
289
|
+
type: 'string',
|
|
290
|
+
create: false,
|
|
291
|
+
update: false
|
|
292
|
+
},
|
|
293
|
+
'etcd-extra-env': {
|
|
294
|
+
type: 'array',
|
|
295
|
+
create: false,
|
|
296
|
+
update: false
|
|
297
|
+
},
|
|
298
|
+
'etcd-extra-mount': {
|
|
299
|
+
type: 'array',
|
|
300
|
+
create: false,
|
|
301
|
+
update: false
|
|
302
|
+
},
|
|
303
|
+
'kube-apiserver-extra-env': {
|
|
304
|
+
type: 'array',
|
|
305
|
+
create: false,
|
|
306
|
+
update: false
|
|
307
|
+
},
|
|
308
|
+
'kube-apiserver-extra-mount': {
|
|
309
|
+
type: 'array',
|
|
310
|
+
create: false,
|
|
311
|
+
update: false
|
|
312
|
+
},
|
|
313
|
+
'kube-controller-manager-extra-env': {
|
|
314
|
+
type: 'array',
|
|
315
|
+
create: false,
|
|
316
|
+
update: false
|
|
317
|
+
},
|
|
318
|
+
'kube-controller-manager-extra-mount': {
|
|
319
|
+
type: 'array',
|
|
320
|
+
create: false,
|
|
321
|
+
update: false
|
|
322
|
+
},
|
|
323
|
+
'kube-proxy-arg': {
|
|
324
|
+
type: 'array',
|
|
325
|
+
create: false,
|
|
326
|
+
update: false
|
|
327
|
+
},
|
|
328
|
+
'kube-proxy-extra-env': {
|
|
329
|
+
type: 'array',
|
|
330
|
+
create: false,
|
|
331
|
+
update: false
|
|
332
|
+
},
|
|
333
|
+
'kube-proxy-extra-mount': {
|
|
334
|
+
type: 'array',
|
|
335
|
+
create: false,
|
|
336
|
+
update: false
|
|
337
|
+
},
|
|
338
|
+
'kube-scheduler-extra-env': {
|
|
339
|
+
type: 'array',
|
|
340
|
+
create: false,
|
|
341
|
+
update: false
|
|
342
|
+
},
|
|
343
|
+
'kube-scheduler-extra-mount': {
|
|
344
|
+
type: 'array',
|
|
345
|
+
create: false,
|
|
346
|
+
update: false
|
|
347
|
+
},
|
|
348
|
+
'kubelet-arg': {
|
|
349
|
+
type: 'array',
|
|
350
|
+
create: false,
|
|
351
|
+
update: false
|
|
352
|
+
},
|
|
353
|
+
profile: {
|
|
354
|
+
type: 'enum',
|
|
355
|
+
nullable: true,
|
|
356
|
+
create: false,
|
|
357
|
+
update: false,
|
|
358
|
+
options: [
|
|
359
|
+
'cis',
|
|
360
|
+
'cis-1.23'
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
'protect-kernel-defaults': {
|
|
364
|
+
type: 'boolean',
|
|
365
|
+
default: false,
|
|
366
|
+
create: false,
|
|
367
|
+
update: false
|
|
368
|
+
},
|
|
369
|
+
'resolv-conf': {
|
|
370
|
+
type: 'string',
|
|
371
|
+
create: false,
|
|
372
|
+
update: false
|
|
373
|
+
},
|
|
374
|
+
selinux: {
|
|
375
|
+
type: 'bool',
|
|
376
|
+
create: false,
|
|
377
|
+
update: false
|
|
378
|
+
},
|
|
379
|
+
'system-default-registry': {
|
|
380
|
+
type: 'string',
|
|
381
|
+
create: false,
|
|
382
|
+
update: false
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
disabled: false
|
|
386
|
+
};
|
|
@@ -14,8 +14,8 @@ import { NAME as HARVESTER_MANAGER } from '@shell/config/harvester-manager-types
|
|
|
14
14
|
import { HARVESTER as HARVESTER_FEATURE, mapFeature } from '@shell/store/features';
|
|
15
15
|
import { addObject } from '@shell/utils/array';
|
|
16
16
|
import { HIDE_DESC, mapPref } from '@shell/store/prefs';
|
|
17
|
-
import Labels from '
|
|
18
|
-
import AgentEnv from '
|
|
17
|
+
import Labels from '@shell/edit/provisioning.cattle.io.cluster/Labels';
|
|
18
|
+
import AgentEnv from '@shell/edit/provisioning.cattle.io.cluster/AgentEnv';
|
|
19
19
|
|
|
20
20
|
const HARVESTER_HIDE_KEY = 'cm-harvester-import';
|
|
21
21
|
|
|
@@ -6,16 +6,16 @@ import SelectIconGrid from '@shell/components/SelectIconGrid';
|
|
|
6
6
|
import EmberPage from '@shell/components/EmberPage';
|
|
7
7
|
import { ToggleSwitch } from '@components/Form/ToggleSwitch';
|
|
8
8
|
import {
|
|
9
|
-
CHART, FROM_CLUSTER, SUB_TYPE, _EDIT, _IMPORT, _CONFIG, _VIEW
|
|
9
|
+
CHART, FROM_CLUSTER, SUB_TYPE, RKE_TYPE, _EDIT, _IMPORT, _CONFIG, _VIEW
|
|
10
10
|
} from '@shell/config/query-params';
|
|
11
11
|
import { mapGetters } from 'vuex';
|
|
12
12
|
import { sortBy } from '@shell/utils/sort';
|
|
13
13
|
import { set } from '@shell/utils/object';
|
|
14
|
-
import {
|
|
14
|
+
import { PROVISIONER, _RKE1, _RKE2 } from '@shell/store/prefs';
|
|
15
15
|
import { filterAndArrangeCharts } from '@shell/store/catalog';
|
|
16
16
|
import { CATALOG } from '@shell/config/labels-annotations';
|
|
17
17
|
import { CAPI, MANAGEMENT, DEFAULT_WORKSPACE } from '@shell/config/types';
|
|
18
|
-
import { mapFeature, RKE2 as RKE2_FEATURE } from '@shell/store/features';
|
|
18
|
+
import { mapFeature, RKE2 as RKE2_FEATURE, RKE1_UI } from '@shell/store/features';
|
|
19
19
|
import { allHash } from '@shell/utils/promise';
|
|
20
20
|
import { BLANK_CLUSTER } from '@shell/store/store-types.js';
|
|
21
21
|
import { ELEMENTAL_PRODUCT_NAME, ELEMENTAL_CLUSTER_PROVIDER } from '../../config/elemental-types';
|
|
@@ -163,6 +163,7 @@ export default {
|
|
|
163
163
|
|
|
164
164
|
data() {
|
|
165
165
|
const subType = this.$route.query[SUB_TYPE] || null;
|
|
166
|
+
const rkeType = this.$route.query[RKE_TYPE] || null;
|
|
166
167
|
const chart = this.$route.query[CHART] || null;
|
|
167
168
|
const isImport = this.realMode === _IMPORT;
|
|
168
169
|
|
|
@@ -171,6 +172,7 @@ export default {
|
|
|
171
172
|
kontainerDrivers: [],
|
|
172
173
|
extensions: [],
|
|
173
174
|
subType,
|
|
175
|
+
rkeType,
|
|
174
176
|
chart,
|
|
175
177
|
isImport,
|
|
176
178
|
providerCluster: null,
|
|
@@ -181,12 +183,32 @@ export default {
|
|
|
181
183
|
computed: {
|
|
182
184
|
...mapGetters({ allCharts: 'catalog/charts' }),
|
|
183
185
|
...mapGetters('type-map', ['activeProducts']),
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
186
|
+
// needed to recreate logic on mapPref in order to incorporate the logic around the rkeType query param
|
|
187
|
+
// https://github.com/rancher/dashboard/issues/6299
|
|
188
|
+
preferredProvisioner: {
|
|
189
|
+
get() {
|
|
190
|
+
if (this.rkeType) {
|
|
191
|
+
return this.rkeType;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
return this.$store.getters['prefs/get'](PROVISIONER);
|
|
195
|
+
},
|
|
196
|
+
set(value) {
|
|
197
|
+
this.$store.dispatch('prefs/set', { key: PROVISIONER, value });
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
_RKE1: () => _RKE1,
|
|
201
|
+
_RKE2: () => _RKE2,
|
|
187
202
|
|
|
188
203
|
emberLink() {
|
|
189
204
|
if (this.value) {
|
|
205
|
+
if (this.value.provisioner) {
|
|
206
|
+
const matchingSubtype = this.subTypes.find((st) => st.id.toLowerCase() === this.value.provisioner.toLowerCase());
|
|
207
|
+
|
|
208
|
+
if (matchingSubtype) {
|
|
209
|
+
this.selectType(matchingSubtype.id, false);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
190
212
|
// For custom RKE2 clusters, don't load an Ember page.
|
|
191
213
|
// It should be the dashboard.
|
|
192
214
|
if ( this.value.isRke2 && ((this.value.isCustom && this.mode === _EDIT) || (this.value.isCustom && this.as === _CONFIG && this.mode === _VIEW) || (this.subType || '').toLowerCase() === 'custom')) {
|
|
@@ -205,12 +227,14 @@ export default {
|
|
|
205
227
|
return '';
|
|
206
228
|
}
|
|
207
229
|
if ( this.subType ) {
|
|
230
|
+
// if driver type has a custom form component, don't load an ember page
|
|
231
|
+
if (this.selectedSubType.component) {
|
|
232
|
+
return '';
|
|
233
|
+
}
|
|
208
234
|
// For RKE1 and hosted Kubernetes Clusters, set the ember link
|
|
209
235
|
// so that we load the page rather than using RKE2 create
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
if (selected?.link) {
|
|
213
|
-
return selected.link;
|
|
236
|
+
if (this.selectedSubType?.emberLink) {
|
|
237
|
+
return this.selectedSubType.emberLink;
|
|
214
238
|
}
|
|
215
239
|
|
|
216
240
|
this.selectType(this.subType, false);
|
|
@@ -227,7 +251,13 @@ export default {
|
|
|
227
251
|
return '';
|
|
228
252
|
},
|
|
229
253
|
|
|
230
|
-
rke2Enabled:
|
|
254
|
+
rke2Enabled: mapFeature(RKE2_FEATURE),
|
|
255
|
+
rke1UiEnabled: mapFeature(RKE1_UI),
|
|
256
|
+
|
|
257
|
+
// todo nb is this info stored anywhere else..?
|
|
258
|
+
selectedSubType() {
|
|
259
|
+
return this.subType ? this.subTypes.find((s) => s.id === this.subType) : null;
|
|
260
|
+
},
|
|
231
261
|
|
|
232
262
|
provisioner: {
|
|
233
263
|
get() {
|
|
@@ -237,6 +267,10 @@ export default {
|
|
|
237
267
|
return _RKE1;
|
|
238
268
|
}
|
|
239
269
|
|
|
270
|
+
if ( !this.rke1UiEnabled ) {
|
|
271
|
+
return _RKE2;
|
|
272
|
+
}
|
|
273
|
+
|
|
240
274
|
return this.preferredProvisioner;
|
|
241
275
|
},
|
|
242
276
|
|
|
@@ -250,7 +284,7 @@ export default {
|
|
|
250
284
|
},
|
|
251
285
|
|
|
252
286
|
isRke2() {
|
|
253
|
-
return this.value.isRke2;
|
|
287
|
+
return this.value.isRke2 || !this.isRke1;
|
|
254
288
|
},
|
|
255
289
|
|
|
256
290
|
templateOptions() {
|
|
@@ -267,7 +301,6 @@ export default {
|
|
|
267
301
|
const getters = this.$store.getters;
|
|
268
302
|
const isImport = this.isImport;
|
|
269
303
|
const isElementalActive = !!this.activeProducts.find((item) => item.name === ELEMENTAL_PRODUCT_NAME);
|
|
270
|
-
|
|
271
304
|
const out = [];
|
|
272
305
|
|
|
273
306
|
const templates = this.templateOptions;
|
|
@@ -298,18 +331,13 @@ export default {
|
|
|
298
331
|
|
|
299
332
|
if (this.isRke1 ) {
|
|
300
333
|
machineTypes.forEach((id) => {
|
|
301
|
-
addType(id,
|
|
334
|
+
addType(id, _RKE1, false, `/g/clusters/add/launch/${ id }`, this.iconClasses[id]);
|
|
302
335
|
});
|
|
303
336
|
|
|
304
337
|
addType('custom', 'custom1', false, '/g/clusters/add/launch/custom');
|
|
305
338
|
} else {
|
|
306
339
|
machineTypes.forEach((id) => {
|
|
307
|
-
addType(id,
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
// Add from extensions
|
|
311
|
-
this.extensions.forEach((ext) => {
|
|
312
|
-
addExtensionType(ext, getters);
|
|
340
|
+
addType(id, _RKE2, false);
|
|
313
341
|
});
|
|
314
342
|
|
|
315
343
|
addType('custom', 'custom2', false);
|
|
@@ -318,6 +346,16 @@ export default {
|
|
|
318
346
|
addType(ELEMENTAL_CLUSTER_PROVIDER, 'custom2', false);
|
|
319
347
|
}
|
|
320
348
|
}
|
|
349
|
+
|
|
350
|
+
// Add from extensions
|
|
351
|
+
// if th rke toggle is set to rke1, don't add extensions that specify rke2 group
|
|
352
|
+
// default group is rke2
|
|
353
|
+
this.extensions.forEach((ext) => {
|
|
354
|
+
if (!this.isRke2 && (ext.group === _RKE2 || !ext.group)) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
addExtensionType(ext, getters);
|
|
358
|
+
});
|
|
321
359
|
}
|
|
322
360
|
|
|
323
361
|
return out;
|
|
@@ -338,16 +376,17 @@ export default {
|
|
|
338
376
|
description: ext.description,
|
|
339
377
|
icon,
|
|
340
378
|
iconClass,
|
|
341
|
-
group: ext.group ||
|
|
379
|
+
group: ext.group || _RKE2,
|
|
342
380
|
disabled: ext.disabled || false,
|
|
343
381
|
link: ext.link,
|
|
344
|
-
tag: ext.tag
|
|
382
|
+
tag: ext.tag,
|
|
383
|
+
component: ext.component
|
|
345
384
|
};
|
|
346
385
|
|
|
347
386
|
out.push(subtype);
|
|
348
387
|
}
|
|
349
388
|
|
|
350
|
-
function addType(id, group, disabled = false,
|
|
389
|
+
function addType(id, group, disabled = false, emberLink = null, iconClass = undefined) {
|
|
351
390
|
const label = getters['i18n/withFallback'](`cluster.provider."${ id }"`, null, id);
|
|
352
391
|
const description = getters['i18n/withFallback'](`cluster.providerDescription."${ id }"`, null, '');
|
|
353
392
|
const tag = '';
|
|
@@ -372,7 +411,7 @@ export default {
|
|
|
372
411
|
iconClass,
|
|
373
412
|
group,
|
|
374
413
|
disabled,
|
|
375
|
-
|
|
414
|
+
emberLink,
|
|
376
415
|
tag
|
|
377
416
|
};
|
|
378
417
|
|
|
@@ -485,8 +524,13 @@ export default {
|
|
|
485
524
|
|
|
486
525
|
return;
|
|
487
526
|
}
|
|
527
|
+
if (obj.link) {
|
|
528
|
+
this.$router.push(obj.link);
|
|
529
|
+
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
488
532
|
|
|
489
|
-
this.$router.applyQuery({ [SUB_TYPE]: id });
|
|
533
|
+
this.$router.applyQuery({ [SUB_TYPE]: id, [RKE_TYPE]: this.preferredProvisioner });
|
|
490
534
|
this.selectType(id);
|
|
491
535
|
},
|
|
492
536
|
|
|
@@ -545,16 +589,16 @@ export default {
|
|
|
545
589
|
>
|
|
546
590
|
<h4>
|
|
547
591
|
<div
|
|
548
|
-
v-if="showRkeToggle(i)"
|
|
592
|
+
v-if="showRkeToggle(i) && rke1UiEnabled"
|
|
549
593
|
class="grouped-type"
|
|
550
594
|
>
|
|
551
595
|
<ToggleSwitch
|
|
552
596
|
v-model="provisioner"
|
|
553
597
|
data-testid="cluster-manager-create-rke-switch"
|
|
554
598
|
class="rke-switch"
|
|
555
|
-
off-value="
|
|
599
|
+
:off-value="_RKE1"
|
|
556
600
|
:off-label="t('cluster.toggle.v1')"
|
|
557
|
-
on-value="
|
|
601
|
+
:on-value="_RKE2"
|
|
558
602
|
:on-label="t('cluster.toggle.v2')"
|
|
559
603
|
/>
|
|
560
604
|
</div>
|
|
@@ -578,14 +622,26 @@ export default {
|
|
|
578
622
|
:mode="mode"
|
|
579
623
|
:provider="subType"
|
|
580
624
|
/>
|
|
581
|
-
<
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
625
|
+
<template v-else-if="subType">
|
|
626
|
+
<!-- allow extensions to provide their own cluster provisioning form -->
|
|
627
|
+
<component
|
|
628
|
+
:is="selectedSubType.component"
|
|
629
|
+
v-if="selectedSubType && selectedSubType.component"
|
|
630
|
+
v-model="value"
|
|
631
|
+
:initial-value="initialValue"
|
|
632
|
+
:live-value="liveValue"
|
|
633
|
+
:mode="mode"
|
|
634
|
+
:provider="subType"
|
|
635
|
+
/>
|
|
636
|
+
<Rke2Config
|
|
637
|
+
v-else
|
|
638
|
+
v-model="value"
|
|
639
|
+
:initial-value="initialValue"
|
|
640
|
+
:live-value="liveValue"
|
|
641
|
+
:mode="mode"
|
|
642
|
+
:provider="subType"
|
|
643
|
+
/>
|
|
644
|
+
</template>
|
|
589
645
|
|
|
590
646
|
<template
|
|
591
647
|
v-if="subType"
|