@rancher/shell 0.1.3 → 0.1.21
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/dark/rancher-logo.svg +1 -148
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/brand/suse/rancher-logo.svg +1 -130
- package/assets/images/featured/img1.jpg +0 -0
- package/assets/images/featured.jpg +0 -0
- package/assets/images/generic-plugin.svg +1 -0
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +3 -0
- package/assets/styles/themes/_suse.scss +1 -1
- package/assets/translations/en-us.yaml +219 -47
- package/assets/translations/zh-hans.yaml +21 -24
- package/components/AsyncButton.vue +17 -2
- package/components/ButtonDropdown.vue +4 -0
- package/components/Carousel.vue +291 -0
- package/components/CommunityLinks.vue +64 -22
- package/components/CruResource.vue +11 -3
- package/components/Dialog.vue +102 -0
- package/components/ExplorerMembers.vue +2 -4
- package/components/ExplorerProjectsNamespaces.vue +25 -9
- package/components/IconMessage.vue +9 -1
- package/components/LazyImage.vue +21 -8
- package/components/LocaleSelector.vue +62 -29
- 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 +9 -23
- package/components/ResourceTable.vue +7 -2
- package/components/SimpleBox.vue +6 -4
- package/components/SortableTable/index.vue +18 -25
- package/components/Tabbed/Tab.vue +5 -0
- package/components/Tabbed/index.vue +54 -9
- package/components/TypeDescription.vue +10 -1
- package/components/auth/Principal.vue +1 -0
- package/components/fleet/FleetBundles.vue +8 -3
- package/components/fleet/FleetClusters.vue +6 -0
- package/components/fleet/FleetRepos.vue +7 -1
- package/components/fleet/FleetSummary.vue +6 -0
- package/components/form/Command.vue +5 -0
- package/components/form/EnvVars.vue +5 -0
- package/components/form/KeyValue.vue +80 -58
- package/components/form/NameNsDescription.vue +13 -5
- package/components/form/NodeScheduling.vue +6 -1
- package/components/form/PodAffinity.vue +5 -0
- package/components/form/ResourceTabs/index.vue +5 -1
- package/components/form/ServiceNameSelect.vue +5 -0
- package/components/form/ValueFromResource.vue +7 -1
- package/components/formatter/ClusterLink.vue +3 -7
- package/components/nav/NamespaceFilter.vue +3 -3
- package/components/nav/TopLevelMenu.vue +12 -29
- package/config/home-links.js +155 -0
- package/config/labels-annotations.js +2 -1
- package/config/private-label.js +1 -1
- package/config/product/explorer.js +5 -4
- package/config/product/legacy.js +0 -47
- package/config/product/manager.js +0 -2
- package/config/product/multi-cluster-apps.js +0 -12
- package/config/product/settings.js +12 -1
- package/config/product/uiplugins.js +17 -0
- package/config/settings.js +23 -2
- package/config/types.js +5 -1
- package/config/uiplugins.js +117 -0
- package/config/version.js +17 -0
- package/content/docs/en-us/getting-started.md +1 -26
- package/core/plugin.ts +12 -0
- package/core/plugins.js +38 -2
- 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 +6 -0
- 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/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 +3 -3
- package/detail/workload/index.vue +3 -2
- package/dialog/DiagnosticTimingsDialog.vue +116 -0
- package/dialog/RotateCertificatesDialog.vue +9 -3
- package/edit/auth/azuread.vue +28 -9
- package/edit/networking.k8s.io.ingress/index.vue +2 -2
- package/edit/persistentvolume/index.vue +51 -13
- package/edit/persistentvolumeclaim.vue +31 -13
- package/edit/pod.vue +27 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +103 -24
- package/edit/service.vue +7 -5
- package/edit/workload/__tests__/Upgrading.test.ts +1 -0
- package/edit/workload/index.vue +32 -10
- package/edit/workload/mixins/workload.js +121 -126
- package/edit/workload/storage/ContainerMountPaths.vue +240 -0
- package/edit/workload/storage/Mount.vue +1 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +20 -1
- package/edit/workload/storage/azureDisk.vue +22 -2
- package/edit/workload/storage/azureFile.vue +20 -2
- package/edit/workload/storage/csi/index.vue +23 -1
- package/edit/workload/storage/gcePersistentDisk.vue +20 -2
- package/edit/workload/storage/index.vue +33 -65
- package/edit/workload/storage/persistentVolumeClaim/index.vue +5 -0
- package/edit/workload/storage/secret.vue +6 -1
- package/edit/workload/storage/vsphereVolume.vue +11 -1
- package/layouts/default.vue +14 -8
- package/layouts/home.vue +9 -4
- package/layouts/plain.vue +10 -5
- 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.setting.vue +3 -3
- 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 +35 -9
- package/list/service.vue +24 -12
- package/list/ui.cattle.io.navlink.vue +6 -0
- package/list/workload.vue +2 -2
- package/machine-config/harvester.vue +5 -3
- 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 +38 -0
- package/models/cluster/node.js +25 -2
- package/models/fleet.cattle.io.bundle.js +1 -1
- package/models/harvesterhci.io.management.cluster.js +11 -5
- package/models/pod.js +15 -5
- package/models/provisioning.cattle.io.cluster.js +16 -6
- package/models/workload.js +5 -3
- package/models/workload.service.js +10 -0
- package/nuxt.config.js +70 -25
- package/package.json +108 -109
- package/pages/auth/login.vue +11 -1
- package/pages/auth/verify.vue +9 -0
- package/pages/c/_cluster/apps/charts/index.vue +46 -1
- package/pages/c/_cluster/apps/charts/install.vue +10 -9
- package/pages/c/_cluster/explorer/index.vue +72 -9
- package/pages/c/_cluster/explorer/tools/index.vue +12 -5
- package/pages/c/_cluster/mcapps/index.vue +1 -1
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +108 -0
- package/pages/c/_cluster/settings/brand.vue +0 -40
- package/pages/c/_cluster/settings/links.vue +152 -0
- package/pages/c/_cluster/settings/performance.vue +90 -7
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +232 -0
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +293 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +300 -0
- package/pages/c/_cluster/uiplugins/RemoveUIPlugins.vue +125 -0
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +261 -0
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +122 -0
- package/pages/c/_cluster/uiplugins/index.vue +808 -0
- package/pages/diagnostic.vue +185 -101
- package/pages/docs/_doc.vue +3 -1
- package/pages/home.vue +21 -56
- package/pages/prefs.vue +108 -88
- package/pages/safeMode.vue +17 -0
- package/pages/support/index.vue +34 -137
- package/pkg/dynamic-importer.lib.js +4 -0
- 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/dashboard-store/resource-class.js +2 -2
- package/plugins/formatters.js +15 -0
- package/plugins/plugin.js +61 -6
- package/plugins/steve/getters.js +12 -0
- package/plugins/steve/mutations.js +1 -1
- package/plugins/steve/subscribe.js +94 -72
- package/plugins/steve/web-worker.steve-sub-worker.js +24 -15
- package/plugins/version.js +21 -0
- package/promptRemove/management.cattle.io.globalrole.vue +47 -0
- package/promptRemove/management.cattle.io.roletemplate.vue +47 -0
- package/promptRemove/mixin/roleDeletionCheck.js +97 -0
- 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 +40 -7
- package/scripts/record-deps.js +37 -0
- package/scripts/sync-shell-deps +37 -0
- package/scripts/test-plugins-build.sh +8 -5
- package/scripts/typegen.sh +84 -0
- package/store/auth.js +3 -0
- package/store/catalog.js +9 -8
- package/store/i18n.js +10 -1
- package/store/index.js +12 -3
- package/store/prefs.js +16 -0
- package/store/type-map.js +32 -5
- package/store/uiplugins.ts +15 -61
- package/types/shell/index.d.ts +3046 -0
- package/utils/__tests__/object.test.ts +0 -24
- package/utils/__tests__/selector.test.ts +1 -1
- package/utils/dynamic-importer.js +4 -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/utils/grafana.js +2 -6
- package/utils/socket.js +41 -20
- package/utils/string.js +1 -7
- package/utils/validators/formRules/__tests__/index.test.ts +108 -0
- package/utils/validators/formRules/index.ts +9 -1
- package/config/footer.js +0 -19
- package/creators/pkg/nuxt.config.js +0 -6
- package/pages/plugins.vue +0 -387
- package/server/verdaccio-middleware.js +0 -56
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
NORMAN,
|
|
15
15
|
SCHEMA,
|
|
16
16
|
DEFAULT_WORKSPACE,
|
|
17
|
-
SECRET
|
|
17
|
+
SECRET,
|
|
18
|
+
HCI,
|
|
18
19
|
} from '@shell/config/types';
|
|
19
20
|
import { _CREATE, _EDIT, _VIEW } from '@shell/config/query-params';
|
|
20
21
|
|
|
@@ -311,7 +312,8 @@ export default {
|
|
|
311
312
|
clusterIsAlreadyCreated: !!this.value.id,
|
|
312
313
|
fvFormRuleSets: [{
|
|
313
314
|
path: 'metadata.name', rules: ['subDomain'], translationKey: 'nameNsDescription.name.label'
|
|
314
|
-
}]
|
|
315
|
+
}],
|
|
316
|
+
harvesterVersionRange: {},
|
|
315
317
|
};
|
|
316
318
|
},
|
|
317
319
|
|
|
@@ -499,7 +501,7 @@ export default {
|
|
|
499
501
|
const isExternal = opt === 'external';
|
|
500
502
|
let disabled = false;
|
|
501
503
|
|
|
502
|
-
if (this.isHarvesterExternalCredential && isPreferred) {
|
|
504
|
+
if ((this.isHarvesterExternalCredential || this.isHarvesterIncompatible) && isPreferred) {
|
|
503
505
|
disabled = true;
|
|
504
506
|
}
|
|
505
507
|
|
|
@@ -850,6 +852,33 @@ export default {
|
|
|
850
852
|
isHarvesterExternalCredential() {
|
|
851
853
|
return this.credential?.harvestercredentialConfig?.clusterType === 'external';
|
|
852
854
|
},
|
|
855
|
+
|
|
856
|
+
isHarvesterIncompatible() {
|
|
857
|
+
let ccmRke2Version = (this.chartVersions['harvester-cloud-provider'] || {})['version'];
|
|
858
|
+
let csiRke2Version = (this.chartVersions['harvester-csi-driver'] || {})['version'];
|
|
859
|
+
|
|
860
|
+
const ccmVersion = this.harvesterVersionRange?.['harvester-cloud-provider'];
|
|
861
|
+
const csiVersion = this.harvesterVersionRange?.['harvester-csi-provider'];
|
|
862
|
+
|
|
863
|
+
if ((ccmRke2Version || '').endsWith('00')) {
|
|
864
|
+
ccmRke2Version = ccmRke2Version.slice(0, -2);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
if ((csiRke2Version || '').endsWith('00')) {
|
|
868
|
+
csiRke2Version = csiRke2Version.slice(0, -2);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
if (ccmVersion && csiVersion) {
|
|
872
|
+
if (semver.satisfies(ccmRke2Version, ccmVersion) &&
|
|
873
|
+
semver.satisfies(csiRke2Version, csiVersion)) {
|
|
874
|
+
return false;
|
|
875
|
+
} else {
|
|
876
|
+
return true;
|
|
877
|
+
}
|
|
878
|
+
} else {
|
|
879
|
+
return false;
|
|
880
|
+
}
|
|
881
|
+
},
|
|
853
882
|
},
|
|
854
883
|
|
|
855
884
|
watch: {
|
|
@@ -867,7 +896,10 @@ export default {
|
|
|
867
896
|
credentialId(val) {
|
|
868
897
|
if ( val ) {
|
|
869
898
|
this.credential = this.$store.getters['rancher/byId'](NORMAN.CLOUD_CREDENTIAL, this.credentialId);
|
|
870
|
-
|
|
899
|
+
|
|
900
|
+
if (this.isHarvesterDriver) {
|
|
901
|
+
this.setHarvesterVersionRange();
|
|
902
|
+
}
|
|
871
903
|
} else {
|
|
872
904
|
this.credential = null;
|
|
873
905
|
}
|
|
@@ -1190,32 +1222,40 @@ export default {
|
|
|
1190
1222
|
return;
|
|
1191
1223
|
}
|
|
1192
1224
|
|
|
1193
|
-
|
|
1225
|
+
try {
|
|
1226
|
+
const clusterId = get(this.credential, 'decodedData.clusterId') || '';
|
|
1194
1227
|
|
|
1195
|
-
|
|
1228
|
+
this.applyChartValues(this.value.spec.rkeConfig);
|
|
1196
1229
|
|
|
1197
|
-
|
|
1230
|
+
const isUpgrade = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
|
|
1198
1231
|
|
|
1199
|
-
|
|
1200
|
-
|
|
1232
|
+
if (this.agentConfig['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
|
|
1233
|
+
const namespace = this.machinePools?.[0]?.config?.vmNamespace;
|
|
1201
1234
|
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1235
|
+
const res = await this.$store.dispatch('management/request', {
|
|
1236
|
+
url: `/k8s/clusters/${ clusterId }/v1/harvester/kubeconfig`,
|
|
1237
|
+
method: 'POST',
|
|
1238
|
+
data: {
|
|
1239
|
+
clusterRoleName: 'harvesterhci.io:cloudprovider',
|
|
1240
|
+
namespace,
|
|
1241
|
+
serviceAccountName: this.value.metadata.name,
|
|
1242
|
+
},
|
|
1243
|
+
});
|
|
1211
1244
|
|
|
1212
|
-
|
|
1245
|
+
const kubeconfig = res.data;
|
|
1213
1246
|
|
|
1214
|
-
|
|
1247
|
+
const harvesterKubeconfigSecret = await this.createKubeconfigSecret(kubeconfig);
|
|
1248
|
+
|
|
1249
|
+
set(this.agentConfig, 'cloud-provider-config', `secret://fleet-default:${ harvesterKubeconfigSecret?.metadata?.name }`);
|
|
1250
|
+
set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.clusterName`, this.value.metadata.name);
|
|
1251
|
+
set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.cloudConfigPath`, '/var/lib/rancher/rke2/etc/config-files/cloud-provider-config');
|
|
1252
|
+
}
|
|
1253
|
+
} catch (err) {
|
|
1254
|
+
this.errors.push(err);
|
|
1215
1255
|
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1256
|
+
btnCb(false);
|
|
1257
|
+
|
|
1258
|
+
return;
|
|
1219
1259
|
}
|
|
1220
1260
|
|
|
1221
1261
|
await this.save(btnCb);
|
|
@@ -1562,12 +1602,36 @@ export default {
|
|
|
1562
1602
|
get,
|
|
1563
1603
|
|
|
1564
1604
|
setHarvesterDefaultCloudProvider() {
|
|
1565
|
-
if (this.isHarvesterDriver &&
|
|
1605
|
+
if (this.isHarvesterDriver &&
|
|
1606
|
+
this.mode === _CREATE &&
|
|
1607
|
+
!this.agentConfig['cloud-provider-name'] &&
|
|
1608
|
+
!this.isHarvesterExternalCredential &&
|
|
1609
|
+
!this.isHarvesterIncompatible
|
|
1610
|
+
) {
|
|
1566
1611
|
this.agentConfig['cloud-provider-name'] = HARVESTER;
|
|
1567
1612
|
} else {
|
|
1568
1613
|
this.agentConfig['cloud-provider-name'] = '';
|
|
1569
1614
|
}
|
|
1570
1615
|
},
|
|
1616
|
+
|
|
1617
|
+
async setHarvesterVersionRange() {
|
|
1618
|
+
const clusterId = this.credential?.decodedData?.clusterId;
|
|
1619
|
+
const clusterType = this.credential?.decodedData?.clusterType;
|
|
1620
|
+
|
|
1621
|
+
if (clusterId && clusterType === 'imported') {
|
|
1622
|
+
const url = `/k8s/clusters/${ clusterId }/v1`;
|
|
1623
|
+
const res = await this.$store.dispatch('cluster/request', { url: `${ url }/${ HCI.SETTING }s` });
|
|
1624
|
+
|
|
1625
|
+
const version = (res?.data || []).find(s => s.id === 'harvester-csi-ccm-versions');
|
|
1626
|
+
|
|
1627
|
+
if (version) {
|
|
1628
|
+
this.harvesterVersionRange = JSON.parse(version.value || version.default || '{}');
|
|
1629
|
+
} else {
|
|
1630
|
+
this.harvesterVersionRange = {};
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
this.setHarvesterDefaultCloudProvider();
|
|
1634
|
+
},
|
|
1571
1635
|
},
|
|
1572
1636
|
};
|
|
1573
1637
|
</script>
|
|
@@ -1686,6 +1750,14 @@ export default {
|
|
|
1686
1750
|
<Tab name="basic" label-key="cluster.tabs.basic" :weight="11" @active="refreshYamls">
|
|
1687
1751
|
<Banner v-if="!haveArgInfo" color="warning" label="Configuration information is not available for the selected Kubernetes version. The options available in this screen will be limited, you may want to use the YAML editor." />
|
|
1688
1752
|
<Banner v-if="showk8s21LegacyWarning" color="warning" :label="t('cluster.legacyWarning')" />
|
|
1753
|
+
<Banner
|
|
1754
|
+
v-if="isHarvesterDriver && isHarvesterIncompatible && showCloudProvider"
|
|
1755
|
+
color="warning"
|
|
1756
|
+
>
|
|
1757
|
+
<span
|
|
1758
|
+
v-html="t('cluster.harvester.warning.cloudProvider.incompatible', null, true)"
|
|
1759
|
+
/>
|
|
1760
|
+
</Banner>
|
|
1689
1761
|
<div class="row mb-10">
|
|
1690
1762
|
<div class="col span-6">
|
|
1691
1763
|
<LabeledSelect
|
|
@@ -1788,6 +1860,12 @@ export default {
|
|
|
1788
1860
|
</div>
|
|
1789
1861
|
</div>
|
|
1790
1862
|
|
|
1863
|
+
<div v-if="serverConfig.cni === 'cilium' && value.spec.enableNetworkPolicy" class="row">
|
|
1864
|
+
<div class="col span-12">
|
|
1865
|
+
<Banner color="info" :label="t('cluster.rke2.enableNetworkPolicy.warning')" />
|
|
1866
|
+
</div>
|
|
1867
|
+
</div>
|
|
1868
|
+
|
|
1791
1869
|
<div class="spacer" />
|
|
1792
1870
|
|
|
1793
1871
|
<div v-if="serverArgs.disable" class="row">
|
|
@@ -2089,6 +2167,7 @@ export default {
|
|
|
2089
2167
|
</Tab>
|
|
2090
2168
|
|
|
2091
2169
|
<Tab
|
|
2170
|
+
v-if="haveArgInfo || agentArgs['protect-kernel-defaults']"
|
|
2092
2171
|
name="advanced"
|
|
2093
2172
|
label-key="cluster.tabs.advanced"
|
|
2094
2173
|
:weight="-1"
|
package/edit/service.vue
CHANGED
|
@@ -198,7 +198,8 @@ export default {
|
|
|
198
198
|
},
|
|
199
199
|
|
|
200
200
|
watch: {
|
|
201
|
-
'value.
|
|
201
|
+
'value.metadata.namespace': 'updateMatchingPods',
|
|
202
|
+
'value.spec.selector': 'updateMatchingPods',
|
|
202
203
|
'value.spec.sessionAffinity'(val) {
|
|
203
204
|
if (val === 'ClientIP') {
|
|
204
205
|
this.value.spec.sessionAffinityConfig = { clientIP: { timeoutSeconds: null } };
|
|
@@ -240,21 +241,22 @@ export default {
|
|
|
240
241
|
|
|
241
242
|
methods: {
|
|
242
243
|
updateMatchingPods: throttle(function() {
|
|
243
|
-
const {
|
|
244
|
+
const { value: { spec: { selector = { } } } } = this;
|
|
245
|
+
const allInNamespace = this.allPods.filter(pod => pod.metadata.namespace === this.value?.metadata?.namespace);
|
|
244
246
|
|
|
245
247
|
if (isEmpty(selector)) {
|
|
246
248
|
this.matchingPods = {
|
|
247
249
|
matched: 0,
|
|
248
|
-
total:
|
|
250
|
+
total: allInNamespace.length,
|
|
249
251
|
none: true,
|
|
250
252
|
sample: null,
|
|
251
253
|
};
|
|
252
254
|
} else {
|
|
253
|
-
const match = matching(
|
|
255
|
+
const match = matching(allInNamespace, selector);
|
|
254
256
|
|
|
255
257
|
this.matchingPods = {
|
|
256
258
|
matched: match.length,
|
|
257
|
-
total:
|
|
259
|
+
total: allInNamespace.length,
|
|
258
260
|
none: match.length === 0,
|
|
259
261
|
sample: match[0] ? match[0].nameDisplay : null,
|
|
260
262
|
};
|
|
@@ -26,6 +26,7 @@ describe('component: Upgrading', () => {
|
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
// TODO: #6179: Integrate test with component fix, as the scope is not to check the value of the input
|
|
29
|
+
// eslint-disable-next-line jest/no-disabled-tests
|
|
29
30
|
it.skip.each([
|
|
30
31
|
['surge', 'maxSurge', '%'],
|
|
31
32
|
['unavailable', 'maxUnavailable', '%'],
|
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" />
|
|
@@ -197,6 +205,19 @@ export default {
|
|
|
197
205
|
<Tab :label="t('workload.container.titles.securityContext')" name="securityContext" :weight="tabWeightMap['securityContext']">
|
|
198
206
|
<Security v-model="allContainers[i].securityContext" :mode="mode" />
|
|
199
207
|
</Tab>
|
|
208
|
+
<Tab :label="t('workload.storage.title')" name="storage" :weight="tabWeightMap['storage']">
|
|
209
|
+
<ContainerMountPaths
|
|
210
|
+
v-model="podTemplateSpec"
|
|
211
|
+
:namespace="value.metadata.namespace"
|
|
212
|
+
:register-before-hook="registerBeforeHook"
|
|
213
|
+
:mode="mode"
|
|
214
|
+
:secrets="namespacedSecrets"
|
|
215
|
+
:config-maps="namespacedConfigMaps"
|
|
216
|
+
:container="allContainers[i]"
|
|
217
|
+
:save-pvc-hook-name="savePvcHookName"
|
|
218
|
+
@removePvcForm="clearPvcFormState"
|
|
219
|
+
/>
|
|
220
|
+
</Tab>
|
|
200
221
|
</Tabbed>
|
|
201
222
|
</Tab>
|
|
202
223
|
<Tab v-if="!isPod" :label="nameDisplayFor(type)" :name="nameDisplayFor(type)" :weight="99">
|
|
@@ -220,8 +241,9 @@ export default {
|
|
|
220
241
|
:mode="mode"
|
|
221
242
|
:secrets="namespacedSecrets"
|
|
222
243
|
:config-maps="namespacedConfigMaps"
|
|
223
|
-
:container="container"
|
|
224
244
|
:save-pvc-hook-name="savePvcHookName"
|
|
245
|
+
:loading="isLoadingSecondaryResources"
|
|
246
|
+
:namespaced-pvcs="pvcs"
|
|
225
247
|
@removePvcForm="clearPvcFormState"
|
|
226
248
|
/>
|
|
227
249
|
</Tab>
|
|
@@ -253,10 +275,10 @@ export default {
|
|
|
253
275
|
</template>
|
|
254
276
|
</Tab>
|
|
255
277
|
<Tab :label="t('workload.container.titles.podScheduling')" name="podScheduling" :weight="tabWeightMap['podScheduling']">
|
|
256
|
-
<PodAffinity :mode="mode" :value="podTemplateSpec" :nodes="allNodeObjects" />
|
|
278
|
+
<PodAffinity :mode="mode" :value="podTemplateSpec" :nodes="allNodeObjects" :loading="isLoadingSecondaryResources" />
|
|
257
279
|
</Tab>
|
|
258
280
|
<Tab :label="t('workload.container.titles.nodeScheduling')" name="nodeScheduling" :weight="tabWeightMap['nodeScheduling']">
|
|
259
|
-
<NodeScheduling :mode="mode" :value="podTemplateSpec" :nodes="allNodes" />
|
|
281
|
+
<NodeScheduling :mode="mode" :value="podTemplateSpec" :nodes="allNodes" :loading="isLoadingSecondaryResources" />
|
|
260
282
|
</Tab>
|
|
261
283
|
<Tab :label="t('workload.container.titles.upgrading')" name="upgrading" :weight="tabWeightMap['upgrading']">
|
|
262
284
|
<Job v-if="isJob || isCronJob" v-model="spec" :mode="mode" :type="type" />
|