@rancher/shell 0.1.4 → 0.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/assets/brand/suse/favicon.png +0 -0
- package/assets/images/generic-plugin.svg +1 -7
- package/assets/styles/global/_button.scss +1 -0
- package/assets/translations/en-us.yaml +129 -53
- package/assets/translations/zh-hans.yaml +18 -0
- package/components/CommunityLinks.vue +40 -49
- package/components/ExplorerProjectsNamespaces.vue +20 -3
- package/components/HarvesterServiceAddOnConfig.vue +10 -10
- package/components/LazyImage.vue +21 -8
- package/components/PromptRemove.vue +2 -2
- package/components/ResourceList/Masthead.vue +21 -1
- package/components/ResourceList/ResourceLoadingIndicator.vue +0 -8
- package/components/ResourceList/index.vue +42 -36
- package/components/ResourceTable.vue +19 -0
- package/components/SortableTable/THead.vue +311 -70
- package/components/SortableTable/advanced-filtering.js +272 -0
- package/components/SortableTable/filtering.js +90 -29
- package/components/SortableTable/index.vue +486 -280
- package/components/Tabbed/index.vue +25 -7
- package/components/TypeDescription.vue +10 -1
- package/components/fleet/FleetClusters.vue +6 -0
- package/components/fleet/FleetRepos.vue +7 -1
- package/components/form/Command.vue +5 -0
- package/components/form/EnvVars.vue +5 -0
- package/components/form/NameNsDescription.vue +3 -1
- package/components/form/NodeScheduling.vue +6 -1
- package/components/form/PodAffinity.vue +5 -0
- package/components/form/ServiceNameSelect.vue +5 -0
- package/components/form/ValueFromResource.vue +7 -1
- package/components/form/WorkloadPorts.vue +2 -2
- package/components/nav/TopLevelMenu.vue +2 -1
- package/config/home-links.js +155 -0
- package/config/private-label.js +1 -1
- package/config/product/manager.js +0 -2
- package/config/product/settings.js +1 -0
- package/config/product/uiplugins.js +2 -1
- package/config/settings.js +3 -1
- package/config/uiplugins.js +76 -6
- package/config/version.js +17 -0
- package/core/plugin.ts +12 -0
- package/core/plugins.js +29 -5
- package/core/types.ts +6 -0
- package/creators/app/{.eslintignore → files/.eslintignore} +0 -0
- package/creators/app/{.eslintrc.js → files/.eslintrc.js} +0 -0
- package/creators/app/{.vscode → files/.vscode}/settings.json +0 -0
- package/creators/app/{babel.config.js → files/babel.config.js} +0 -0
- package/creators/app/{nuxt.config.js → files/nuxt.config.js} +0 -0
- package/creators/app/{tsconfig.json → files/tsconfig.json} +2 -1
- package/creators/app/init +16 -17
- package/creators/app/package.json +7 -1
- package/creators/pkg/{babel.config.js → files/babel.config.js} +0 -0
- package/creators/pkg/{index.ts → files/index.ts} +0 -0
- package/creators/pkg/{tsconfig.json → files/tsconfig.json} +13 -12
- package/creators/pkg/{vue.config.js → files/vue.config.js} +0 -0
- package/creators/pkg/init +1 -1
- package/creators/pkg/package.json +1 -1
- package/creators/update/init +54 -0
- package/creators/update/package.json +20 -0
- package/creators/update/upgrade +56 -0
- package/creators/update/yarn-error.log +54 -0
- package/detail/provisioning.cattle.io.cluster.vue +1 -1
- package/detail/workload/index.vue +1 -0
- package/edit/persistentvolume/index.vue +48 -13
- package/edit/persistentvolumeclaim.vue +31 -13
- package/edit/provisioning.cattle.io.cluster/ACE.vue +2 -1
- package/edit/provisioning.cattle.io.cluster/DrainOptions.vue +0 -1
- package/edit/provisioning.cattle.io.cluster/rke2.vue +52 -43
- package/edit/service.vue +1 -1
- package/edit/workload/index.vue +19 -9
- package/edit/workload/mixins/workload.js +109 -114
- package/edit/workload/storage/index.vue +11 -17
- package/edit/workload/storage/persistentVolumeClaim/index.vue +5 -0
- package/edit/workload/storage/secret.vue +6 -1
- package/list/catalog.cattle.io.app.vue +10 -9
- package/list/catalog.cattle.io.clusterrepo.vue +6 -61
- package/list/cis.cattle.io.clusterscan.vue +12 -12
- package/list/fleet.cattle.io.bundle.vue +33 -28
- package/list/fleet.cattle.io.cluster.vue +26 -22
- package/list/fleet.cattle.io.clustergroup.vue +6 -0
- package/list/fleet.cattle.io.clusterregistrationtoken.vue +28 -24
- package/list/fleet.cattle.io.gitrepo.vue +25 -14
- package/list/helm.cattle.io.projecthelmchart.vue +52 -33
- package/list/logging.banzaicloud.io.clusterflow.vue +7 -12
- package/list/logging.banzaicloud.io.flow.vue +7 -14
- package/list/management.cattle.io.cluster.vue +26 -15
- package/list/management.cattle.io.feature.vue +13 -8
- package/list/management.cattle.io.user.vue +38 -19
- package/list/monitoring.coreos.com.alertmanagerconfig.vue +8 -15
- package/list/namespace.vue +14 -1
- package/list/node.vue +13 -16
- package/list/persistentvolume.vue +16 -9
- package/list/persistentvolumeclaim.vue +5 -8
- package/list/provisioning.cattle.io.cluster.vue +34 -8
- package/list/service.vue +24 -12
- package/list/ui.cattle.io.navlink.vue +6 -0
- package/list/workload.vue +2 -2
- package/middleware/authenticated.js +6 -0
- package/mixins/resource-fetch.js +12 -18
- package/mixins/resource-manager.js +126 -0
- package/models/catalog.cattle.io.uiplugin.js +4 -0
- package/models/management.cattle.io.cluster.js +9 -1
- package/models/pod.js +15 -5
- package/models/provisioning.cattle.io.cluster.js +4 -0
- package/models/workload.service.js +10 -0
- package/nuxt.config.js +2 -1
- package/package.json +1 -1
- package/pages/auth/login.vue +10 -0
- package/pages/auth/verify.vue +9 -0
- package/pages/c/_cluster/apps/charts/install.vue +119 -31
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +108 -0
- package/pages/c/_cluster/settings/links.vue +53 -101
- package/pages/c/_cluster/settings/performance.vue +90 -7
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +3 -3
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +72 -21
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +26 -7
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +2 -7
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +23 -15
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +12 -5
- package/pages/c/_cluster/uiplugins/index.vue +223 -72
- package/pages/support/index.vue +31 -142
- package/plugins/dashboard-store/actions.js +19 -0
- package/plugins/dashboard-store/getters.js +20 -3
- package/plugins/dashboard-store/mutations.js +13 -7
- package/plugins/plugin.js +18 -15
- package/plugins/steve/getters.js +12 -0
- package/plugins/version.js +21 -0
- package/promptRemove/mixin/roleDeletionCheck.js +15 -1
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +6 -7
- package/rancher-components/components/BadgeState/BadgeState.spec.ts +12 -0
- package/rancher-components/components/BadgeState/BadgeState.vue +107 -0
- package/rancher-components/components/BadgeState/index.ts +1 -0
- package/rancher-components/components/Banner/Banner.test.ts +13 -0
- package/rancher-components/components/Banner/Banner.vue +163 -0
- package/rancher-components/components/Banner/index.ts +1 -0
- package/rancher-components/components/Card/Card.vue +150 -0
- package/rancher-components/components/Card/index.ts +1 -0
- package/rancher-components/components/Form/Checkbox/Checkbox.test.ts +77 -0
- package/rancher-components/components/Form/Checkbox/Checkbox.vue +395 -0
- package/rancher-components/components/Form/Checkbox/index.ts +1 -0
- package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +29 -0
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +343 -0
- package/rancher-components/components/Form/LabeledInput/index.ts +1 -0
- package/rancher-components/components/Form/Radio/RadioButton.vue +270 -0
- package/rancher-components/components/Form/Radio/RadioGroup.vue +235 -0
- package/rancher-components/components/Form/Radio/index.ts +2 -0
- package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +168 -0
- package/rancher-components/components/Form/TextArea/index.ts +1 -0
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.test.ts +107 -0
- package/rancher-components/components/Form/ToggleSwitch/ToggleSwitch.vue +137 -0
- package/rancher-components/components/Form/ToggleSwitch/index.ts +1 -0
- package/rancher-components/components/Form/index.ts +5 -0
- package/rancher-components/components/LabeledTooltip/LabeledTooltip.vue +137 -0
- package/rancher-components/components/LabeledTooltip/index.ts +1 -0
- package/scripts/publish-shell.sh +39 -6
- package/scripts/record-deps.js +37 -0
- package/scripts/test-plugins-build.sh +8 -5
- package/scripts/typegen.sh +84 -0
- package/store/auth.js +3 -0
- package/store/index.js +12 -3
- package/store/type-map.js +2 -0
- package/types/shell/index.d.ts +3046 -0
- package/utils/favicon.js +8 -2
- package/utils/gc/gc-interval.ts +40 -0
- package/utils/gc/gc-root-store.js +76 -0
- package/utils/gc/gc-route-changed.ts +44 -0
- package/utils/gc/gc-types.ts +21 -0
- package/utils/gc/gc.ts +282 -0
- package/config/footer.js +0 -18
- package/creators/pkg/nuxt.config.js +0 -6
- package/yarn-error.log +0 -195
|
@@ -15,6 +15,7 @@ import StatusTable from '@shell/components/StatusTable';
|
|
|
15
15
|
import ResourceTabs from '@shell/components/form/ResourceTabs';
|
|
16
16
|
import Labels from '@shell/components/form/Labels';
|
|
17
17
|
import { Banner } from '@components/Banner';
|
|
18
|
+
import ResourceManager from '@shell/mixins/resource-manager';
|
|
18
19
|
|
|
19
20
|
const DEFAULT_STORAGE = '10Gi';
|
|
20
21
|
|
|
@@ -36,26 +37,17 @@ export default {
|
|
|
36
37
|
UnitInput,
|
|
37
38
|
},
|
|
38
39
|
|
|
39
|
-
mixins: [CreateEditView],
|
|
40
|
+
mixins: [CreateEditView, ResourceManager],
|
|
40
41
|
async fetch() {
|
|
41
42
|
const storageClasses = await this.$store.dispatch('cluster/findAll', { type: STORAGE_CLASS });
|
|
42
43
|
|
|
43
44
|
if (this.$store.getters['management/canList'](PV)) {
|
|
44
|
-
this.
|
|
45
|
+
this.resourceManagerFetchSecondaryResources(this.secondaryResourceData);
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
this.storageClassOptions = storageClasses.map(s => s.name).sort();
|
|
48
49
|
this.storageClassOptions.unshift(this.t('persistentVolumeClaim.useDefault'));
|
|
49
|
-
this.persistentVolumeOptions = this.persistentVolumes
|
|
50
|
-
.map((s) => {
|
|
51
|
-
const status = s.status.phase === 'Available' ? '' : ` (${ s.status.phase })`;
|
|
52
50
|
|
|
53
|
-
return {
|
|
54
|
-
label: `${ s.name }${ status }`,
|
|
55
|
-
value: s.name
|
|
56
|
-
};
|
|
57
|
-
})
|
|
58
|
-
.sort((l, r) => l.label.localeCompare(r.label));
|
|
59
51
|
this.$set(this.value.spec, 'storageClassName', this.value.spec.storageClassName || this.storageClassOptions[0]);
|
|
60
52
|
},
|
|
61
53
|
data() {
|
|
@@ -85,6 +77,31 @@ export default {
|
|
|
85
77
|
const defaultTab = this.$route.query[FOCUS] || null;
|
|
86
78
|
|
|
87
79
|
return {
|
|
80
|
+
secondaryResourceData: {
|
|
81
|
+
namespace: this.value?.metadata?.namespace || null,
|
|
82
|
+
data: {
|
|
83
|
+
[PV]: {
|
|
84
|
+
applyTo: [
|
|
85
|
+
{ var: 'persistentVolumes' },
|
|
86
|
+
{
|
|
87
|
+
var: 'persistentVolumeOptions',
|
|
88
|
+
parsingFunc: (data) => {
|
|
89
|
+
return data
|
|
90
|
+
.map((s) => {
|
|
91
|
+
const status = s.status.phase === 'Available' ? '' : ` (${ s.status.phase })`;
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
label: `${ s.metadata.name }${ status }`,
|
|
95
|
+
value: s.metadata.name
|
|
96
|
+
};
|
|
97
|
+
})
|
|
98
|
+
.sort((l, r) => l.label.localeCompare(r.label));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
}
|
|
104
|
+
},
|
|
88
105
|
sourceOptions,
|
|
89
106
|
source: this.value.spec.volumeName ? sourceOptions[1].value : sourceOptions[0].value,
|
|
90
107
|
immutableMode: this.realMode === _CREATE ? _CREATE : _VIEW,
|
|
@@ -126,7 +143,7 @@ export default {
|
|
|
126
143
|
return this.value.spec.volumeName;
|
|
127
144
|
},
|
|
128
145
|
set(value) {
|
|
129
|
-
const persistentVolume = this.persistentVolumes.find(pv => pv.name === value);
|
|
146
|
+
const persistentVolume = this.persistentVolumes.find(pv => pv.metadata.name === value);
|
|
130
147
|
|
|
131
148
|
if (persistentVolume) {
|
|
132
149
|
this.$set(this.value.spec.resources.requests, 'storage', persistentVolume.spec.capacity?.storage);
|
|
@@ -170,7 +187,7 @@ export default {
|
|
|
170
187
|
}
|
|
171
188
|
},
|
|
172
189
|
isPersistentVolumeSelectable(option) {
|
|
173
|
-
const persistentVolume = this.persistentVolumes.find(pv => pv.name === option.value);
|
|
190
|
+
const persistentVolume = this.persistentVolumes.find(pv => pv.metadata.name === option.value);
|
|
174
191
|
|
|
175
192
|
return persistentVolume.status.phase === 'Available';
|
|
176
193
|
},
|
|
@@ -248,6 +265,7 @@ export default {
|
|
|
248
265
|
:label="t('persistentVolumeClaim.volumeClaim.persistentVolume')"
|
|
249
266
|
:selectable="isPersistentVolumeSelectable"
|
|
250
267
|
:mode="immutableMode"
|
|
268
|
+
:loading="isLoadingSecondaryResources"
|
|
251
269
|
/>
|
|
252
270
|
<LabeledInput
|
|
253
271
|
v-else
|
|
@@ -4,6 +4,7 @@ import { LabeledInput } from '@components/Form/LabeledInput';
|
|
|
4
4
|
import FileSelector, { createOnSelected } from '@shell/components/form/FileSelector';
|
|
5
5
|
import { set } from '@shell/utils/object';
|
|
6
6
|
import isEmpty from 'lodash/isEmpty';
|
|
7
|
+
import { _CREATE } from '@shell/config/query-params';
|
|
7
8
|
|
|
8
9
|
export default {
|
|
9
10
|
components: {
|
|
@@ -23,7 +24,7 @@ export default {
|
|
|
23
24
|
},
|
|
24
25
|
|
|
25
26
|
data() {
|
|
26
|
-
if ( isEmpty(this.value?.spec?.localClusterAuthEndpoint) ) {
|
|
27
|
+
if ( isEmpty(this.value?.spec?.localClusterAuthEndpoint) && this.mode === _CREATE ) {
|
|
27
28
|
set(this.value, 'spec.localClusterAuthEndpoint', {
|
|
28
29
|
enabled: false,
|
|
29
30
|
caCerts: '',
|
|
@@ -10,7 +10,6 @@ const DEFAULTS = {
|
|
|
10
10
|
force: false, // Show; true = Delete standalone pods, false = fail if there are any
|
|
11
11
|
gracePeriod: -1, // Show; Pod shut down time, negative value uses pod default
|
|
12
12
|
ignoreDaemonSets: true, // Hide; true = work, false = never work because there's always daemonSets
|
|
13
|
-
ignoreErrors: false, // Hide; profit?
|
|
14
13
|
skipWaitForDeleteTimeoutSeconds: 0, // Hide; If the pod deletion time is older than this > 0, don't wait, for some reason
|
|
15
14
|
timeout: 120, // Show; Give up after this many seconds
|
|
16
15
|
};
|
|
@@ -202,26 +202,6 @@ export default {
|
|
|
202
202
|
set(this.value.spec, 'kubernetesVersion', this.defaultVersion);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
for ( const k in this.serverArgs ) {
|
|
206
|
-
if ( this.serverConfig[k] === undefined ) {
|
|
207
|
-
const def = this.serverArgs[k].default;
|
|
208
|
-
|
|
209
|
-
set(this.serverConfig, k, (def !== undefined ? def : undefined));
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
for ( const k in this.agentArgs ) {
|
|
214
|
-
if ( this.agentConfig[k] === undefined ) {
|
|
215
|
-
const def = this.agentArgs[k].default;
|
|
216
|
-
|
|
217
|
-
set(this.agentConfig, k, (def !== undefined ? def : undefined));
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
if ( !this.serverConfig.profile ) {
|
|
222
|
-
set(this.serverConfig, 'profile', null);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
205
|
if ( this.rkeConfig.etcd?.s3?.bucket ) {
|
|
226
206
|
this.s3Backup = true;
|
|
227
207
|
}
|
|
@@ -922,6 +902,9 @@ export default {
|
|
|
922
902
|
|
|
923
903
|
// Allow time for addonNames to update... then fetch any missing addons
|
|
924
904
|
this.$nextTick(() => this.initAddons());
|
|
905
|
+
if (this.mode === _CREATE) {
|
|
906
|
+
this.initServerAgentArgs();
|
|
907
|
+
}
|
|
925
908
|
},
|
|
926
909
|
|
|
927
910
|
showCni(neu) {
|
|
@@ -1113,10 +1096,6 @@ export default {
|
|
|
1113
1096
|
entry.config = await entry.config.save();
|
|
1114
1097
|
}
|
|
1115
1098
|
|
|
1116
|
-
if ( !entry.pool.hostnamePrefix ) {
|
|
1117
|
-
entry.pool.hostnamePrefix = `${ prefix }-`;
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
1099
|
finalPools.push(entry.pool);
|
|
1121
1100
|
}
|
|
1122
1101
|
|
|
@@ -1222,32 +1201,40 @@ export default {
|
|
|
1222
1201
|
return;
|
|
1223
1202
|
}
|
|
1224
1203
|
|
|
1225
|
-
|
|
1204
|
+
try {
|
|
1205
|
+
const clusterId = get(this.credential, 'decodedData.clusterId') || '';
|
|
1226
1206
|
|
|
1227
|
-
|
|
1207
|
+
this.applyChartValues(this.value.spec.rkeConfig);
|
|
1228
1208
|
|
|
1229
|
-
|
|
1209
|
+
const isUpgrade = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
|
|
1230
1210
|
|
|
1231
|
-
|
|
1232
|
-
|
|
1211
|
+
if (this.agentConfig['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
|
|
1212
|
+
const namespace = this.machinePools?.[0]?.config?.vmNamespace;
|
|
1233
1213
|
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1214
|
+
const res = await this.$store.dispatch('management/request', {
|
|
1215
|
+
url: `/k8s/clusters/${ clusterId }/v1/harvester/kubeconfig`,
|
|
1216
|
+
method: 'POST',
|
|
1217
|
+
data: {
|
|
1218
|
+
clusterRoleName: 'harvesterhci.io:cloudprovider',
|
|
1219
|
+
namespace,
|
|
1220
|
+
serviceAccountName: this.value.metadata.name,
|
|
1221
|
+
},
|
|
1222
|
+
});
|
|
1243
1223
|
|
|
1244
|
-
|
|
1224
|
+
const kubeconfig = res.data;
|
|
1245
1225
|
|
|
1246
|
-
|
|
1226
|
+
const harvesterKubeconfigSecret = await this.createKubeconfigSecret(kubeconfig);
|
|
1247
1227
|
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1228
|
+
set(this.agentConfig, 'cloud-provider-config', `secret://fleet-default:${ harvesterKubeconfigSecret?.metadata?.name }`);
|
|
1229
|
+
set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.clusterName`, this.value.metadata.name);
|
|
1230
|
+
set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.cloudConfigPath`, '/var/lib/rancher/rke2/etc/config-files/cloud-provider-config');
|
|
1231
|
+
}
|
|
1232
|
+
} catch (err) {
|
|
1233
|
+
this.errors.push(err);
|
|
1234
|
+
|
|
1235
|
+
btnCb(false);
|
|
1236
|
+
|
|
1237
|
+
return;
|
|
1251
1238
|
}
|
|
1252
1239
|
|
|
1253
1240
|
await this.save(btnCb);
|
|
@@ -1379,6 +1366,28 @@ export default {
|
|
|
1379
1366
|
return merge({}, defaultChartValue?.values || {}, this.userChartValues[key] || {});
|
|
1380
1367
|
},
|
|
1381
1368
|
|
|
1369
|
+
initServerAgentArgs() {
|
|
1370
|
+
for ( const k in this.serverArgs ) {
|
|
1371
|
+
if ( this.serverConfig[k] === undefined ) {
|
|
1372
|
+
const def = this.serverArgs[k].default;
|
|
1373
|
+
|
|
1374
|
+
set(this.serverConfig, k, (def !== undefined ? def : undefined));
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
for ( const k in this.agentArgs ) {
|
|
1379
|
+
if ( this.agentConfig[k] === undefined ) {
|
|
1380
|
+
const def = this.agentArgs[k].default;
|
|
1381
|
+
|
|
1382
|
+
set(this.agentConfig, k, (def !== undefined ? def : undefined));
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
if ( !this.serverConfig.profile ) {
|
|
1387
|
+
set(this.serverConfig, 'profile', null);
|
|
1388
|
+
}
|
|
1389
|
+
},
|
|
1390
|
+
|
|
1382
1391
|
chartVersionKey(name) {
|
|
1383
1392
|
const addonVersion = this.addonVersions.find(av => av.name === name);
|
|
1384
1393
|
|
package/edit/service.vue
CHANGED
package/edit/workload/index.vue
CHANGED
|
@@ -4,7 +4,7 @@ import FormValidation from '@shell/mixins/form-validation';
|
|
|
4
4
|
import WorkLoadMixin from '@shell/edit/workload/mixins/workload';
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
name: '
|
|
7
|
+
name: 'Workload',
|
|
8
8
|
mixins: [CreateEditView, FormValidation, WorkLoadMixin], // The order here is important since WorkLoadMixin contains some FormValidation configuration
|
|
9
9
|
props: {
|
|
10
10
|
value: {
|
|
@@ -56,6 +56,7 @@ export default {
|
|
|
56
56
|
:mode="mode"
|
|
57
57
|
:rules="{name: fvGetAndReportPathRules('metadata.name'), namespace: fvGetAndReportPathRules('metadata.namespace'), description: []}"
|
|
58
58
|
@change="name=value.metadata.name"
|
|
59
|
+
@isNamespaceNew="isNamespaceNew = $event"
|
|
59
60
|
/>
|
|
60
61
|
<div v-if="isCronJob || isReplicable || isStatefulSet || containerOptions.length > 1" class="row mb-20">
|
|
61
62
|
<div v-if="isCronJob" class="col span-3">
|
|
@@ -91,10 +92,10 @@ export default {
|
|
|
91
92
|
/>
|
|
92
93
|
</div>
|
|
93
94
|
</div>
|
|
94
|
-
<Tabbed class="deployment-tabs" :show-tabs-add-remove="true" :default-tab="defaultTab" @changed="changed">
|
|
95
|
+
<Tabbed class="deployment-tabs" :show-tabs-add-remove="true" :default-tab="defaultTab" :flat="true" @changed="changed">
|
|
95
96
|
<Tab
|
|
96
97
|
v-for="(tab, i) in allContainers"
|
|
97
|
-
:key="i
|
|
98
|
+
:key="i"
|
|
98
99
|
:label="tab.name"
|
|
99
100
|
:name="tab.name"
|
|
100
101
|
:weight="tab.weight"
|
|
@@ -110,7 +111,7 @@ export default {
|
|
|
110
111
|
<div>
|
|
111
112
|
<div :style="{'align-items':'center'}" class="row mb-20">
|
|
112
113
|
<div class="col span-6">
|
|
113
|
-
<LabeledInput v-model="
|
|
114
|
+
<LabeledInput v-model="allContainers[i].name" :mode="mode" :label="t('workload.container.containerName')" />
|
|
114
115
|
</div>
|
|
115
116
|
<div class="col span-6">
|
|
116
117
|
<RadioGroup
|
|
@@ -127,7 +128,7 @@ export default {
|
|
|
127
128
|
<div class="row mb-20">
|
|
128
129
|
<div class="col span-6">
|
|
129
130
|
<LabeledInput
|
|
130
|
-
v-model.trim="
|
|
131
|
+
v-model.trim="allContainers[i].image"
|
|
131
132
|
:mode="mode"
|
|
132
133
|
:label="t('workload.container.image')"
|
|
133
134
|
:placeholder="t('generic.placeholder', {text: 'nginx:latest'}, true)"
|
|
@@ -136,7 +137,7 @@ export default {
|
|
|
136
137
|
</div>
|
|
137
138
|
<div class="col span-6">
|
|
138
139
|
<LabeledSelect
|
|
139
|
-
v-model="
|
|
140
|
+
v-model="allContainers[i].imagePullPolicy"
|
|
140
141
|
:label="t('workload.container.imagePullPolicy')"
|
|
141
142
|
:options="pullPolicyOptions"
|
|
142
143
|
:mode="mode"
|
|
@@ -169,7 +170,13 @@ export default {
|
|
|
169
170
|
<div class="spacer" />
|
|
170
171
|
<div>
|
|
171
172
|
<h3>{{ t('workload.container.titles.command') }}</h3>
|
|
172
|
-
<Command
|
|
173
|
+
<Command
|
|
174
|
+
v-model="allContainers[i]"
|
|
175
|
+
:secrets="namespacedSecrets"
|
|
176
|
+
:config-maps="namespacedConfigMaps"
|
|
177
|
+
:mode="mode"
|
|
178
|
+
:loading="isLoadingSecondaryResources"
|
|
179
|
+
/>
|
|
173
180
|
</div>
|
|
174
181
|
<ServiceNameSelect
|
|
175
182
|
:value="podTemplateSpec.serviceAccountName"
|
|
@@ -178,6 +185,7 @@ export default {
|
|
|
178
185
|
:select-placeholder="t('workload.serviceAccountName.label')"
|
|
179
186
|
:options="namespacedServiceNames"
|
|
180
187
|
option-label="metadata.name"
|
|
188
|
+
:loading="isLoadingSecondaryResources"
|
|
181
189
|
@input="updateServiceAccount"
|
|
182
190
|
/>
|
|
183
191
|
<div class="spacer" />
|
|
@@ -234,6 +242,8 @@ export default {
|
|
|
234
242
|
:secrets="namespacedSecrets"
|
|
235
243
|
:config-maps="namespacedConfigMaps"
|
|
236
244
|
:save-pvc-hook-name="savePvcHookName"
|
|
245
|
+
:loading="isLoadingSecondaryResources"
|
|
246
|
+
:namespaced-pvcs="pvcs"
|
|
237
247
|
@removePvcForm="clearPvcFormState"
|
|
238
248
|
/>
|
|
239
249
|
</Tab>
|
|
@@ -265,10 +275,10 @@ export default {
|
|
|
265
275
|
</template>
|
|
266
276
|
</Tab>
|
|
267
277
|
<Tab :label="t('workload.container.titles.podScheduling')" name="podScheduling" :weight="tabWeightMap['podScheduling']">
|
|
268
|
-
<PodAffinity :mode="mode" :value="podTemplateSpec" :nodes="allNodeObjects" />
|
|
278
|
+
<PodAffinity :mode="mode" :value="podTemplateSpec" :nodes="allNodeObjects" :loading="isLoadingSecondaryResources" />
|
|
269
279
|
</Tab>
|
|
270
280
|
<Tab :label="t('workload.container.titles.nodeScheduling')" name="nodeScheduling" :weight="tabWeightMap['nodeScheduling']">
|
|
271
|
-
<NodeScheduling :mode="mode" :value="podTemplateSpec" :nodes="allNodes" />
|
|
281
|
+
<NodeScheduling :mode="mode" :value="podTemplateSpec" :nodes="allNodes" :loading="isLoadingSecondaryResources" />
|
|
272
282
|
</Tab>
|
|
273
283
|
<Tab :label="t('workload.container.titles.upgrading')" name="upgrading" :weight="tabWeightMap['upgrading']">
|
|
274
284
|
<Job v-if="isJob || isCronJob" v-model="spec" :mode="mode" :type="type" />
|