mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2025-12-13 21:21:44 +00:00
Merge pull request #131 from harvester/mergify/bp/release-harvester-v1.5/pr-128
feat: improve Single-Replica Volume Detection for Upgrade (backport #128)
This commit is contained in:
commit
a6666ef384
@ -5,8 +5,10 @@ import { Checkbox } from '@components/Form/Checkbox';
|
||||
import ModalWithCard from '@shell/components/ModalWithCard';
|
||||
import LabeledSelect from '@shell/components/form/LabeledSelect';
|
||||
import { Banner } from '@components/Banner';
|
||||
import { HCI as HCI_ANNOTATIONS } from '@pkg/harvester/config/labels-annotations';
|
||||
import { HCI } from '../types';
|
||||
import UpgradeInfo from './UpgradeInfo';
|
||||
|
||||
export default {
|
||||
name: 'HarvesterUpgrade',
|
||||
|
||||
@ -28,14 +30,15 @@ export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
upgrade: [],
|
||||
upgradeMessage: [],
|
||||
errors: '',
|
||||
selectMode: true,
|
||||
version: '',
|
||||
enableLogging: true,
|
||||
readyReleaseNote: false,
|
||||
isOpen: false
|
||||
upgrade: [],
|
||||
upgradeMessage: [],
|
||||
errors: '',
|
||||
selectMode: true,
|
||||
version: '',
|
||||
enableLogging: true,
|
||||
skipSingleReplicaDetachedVol: false,
|
||||
readyReleaseNote: false,
|
||||
isOpen: false
|
||||
};
|
||||
},
|
||||
|
||||
@ -68,6 +71,10 @@ export default {
|
||||
return this.$store.getters['harvester/schemaFor'](HCI.UPGRADE_LOG);
|
||||
},
|
||||
|
||||
skipSingleReplicaDetachedVolFeatureEnabled() {
|
||||
return this.$store.getters['harvester-common/getFeatureEnabled']('skipSingleReplicaDetachedVol');
|
||||
},
|
||||
|
||||
releaseLink() {
|
||||
return `https://github.com/harvester/harvester/releases/tag/${ this.version }`;
|
||||
}
|
||||
@ -104,6 +111,11 @@ export default {
|
||||
spec: { version: this.version }
|
||||
};
|
||||
|
||||
if (this.skipSingleReplicaDetachedVolFeatureEnabled && this.skipSingleReplicaDetachedVol) {
|
||||
upgradeValue.metadata.annotations =
|
||||
{ [HCI_ANNOTATIONS.SKIP_SINGLE_REPLICA_DETACHED_VOL]: JSON.stringify(this.skipSingleReplicaDetachedVol) };
|
||||
}
|
||||
|
||||
if (this.canEnableLogging) {
|
||||
upgradeValue.spec.logEnabled = this.enableLogging;
|
||||
}
|
||||
@ -190,6 +202,21 @@ export default {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="skipSingleReplicaDetachedVolFeatureEnabled"
|
||||
class="mb-5"
|
||||
>
|
||||
<Checkbox
|
||||
v-model:value="skipSingleReplicaDetachedVol"
|
||||
class="check"
|
||||
type="checkbox"
|
||||
:label="t('harvester.upgradePage.skipSingleReplicaDetachedVol')"
|
||||
/>
|
||||
</div>
|
||||
<hr
|
||||
v-if="version"
|
||||
class="divider"
|
||||
/>
|
||||
<div v-if="version">
|
||||
<p
|
||||
v-clean-html="t('harvester.upgradePage.releaseTip', {url: releaseLink}, true)"
|
||||
|
||||
@ -49,7 +49,8 @@ const featuresV142 = [
|
||||
const featuresV150 = [
|
||||
...featuresV142,
|
||||
'tpmPersistentState',
|
||||
'untaggedNetworkSetting'
|
||||
'untaggedNetworkSetting',
|
||||
'skipSingleReplicaDetachedVol'
|
||||
];
|
||||
|
||||
export const RELEASE_FEATURES = {
|
||||
|
||||
@ -7,60 +7,61 @@ export const LABELS_TO_IGNORE_REGEX = [
|
||||
];
|
||||
|
||||
export const HCI = {
|
||||
CLOUD_INIT: 'harvesterhci.io/cloud-init-template',
|
||||
CURRENT_IP: 'rke2.io/internal-ip',
|
||||
IMAGE_ID: 'harvesterhci.io/imageId',
|
||||
SSH_NAMES: 'harvesterhci.io/sshNames',
|
||||
NETWORK_IPS: 'network.harvesterhci.io/ips',
|
||||
TEMPLATE_VERSION_CUSTOM_NAME: 'template-version.harvesterhci.io/customName',
|
||||
CREATOR: 'harvesterhci.io/creator',
|
||||
OS: 'harvesterhci.io/os',
|
||||
NETWORK_TYPE: 'network.harvesterhci.io/type',
|
||||
VM_NAME: 'harvesterhci.io/vmName',
|
||||
VM_NAME_PREFIX: 'harvesterhci.io/vmNamePrefix',
|
||||
VM_RESERVED_MEMORY: 'harvesterhci.io/reservedMemory',
|
||||
MAINTENANCE_STATUS: 'harvesterhci.io/maintain-status',
|
||||
HOST_CUSTOM_NAME: 'harvesterhci.io/host-custom-name',
|
||||
HOST_CONSOLE_URL: 'harvesterhci.io/host-console-url',
|
||||
RESTORE_NAME: 'restore.harvesterhci.io/name',
|
||||
NODE_ROLE_MASTER: 'node-role.kubernetes.io/master',
|
||||
NODE_ROLE_CONTROL_PLANE: 'node-role.kubernetes.io/control-plane',
|
||||
NODE_ROLE_ETCD: 'node-role.harvesterhci.io/witness',
|
||||
PROMOTE_STATUS: 'harvesterhci.io/promote-status',
|
||||
MIGRATION_STATE: 'harvesterhci.io/migrationState',
|
||||
VOLUME_CLAIM_TEMPLATE: 'harvesterhci.io/volumeClaimTemplates',
|
||||
IMAGE_NAME: 'harvesterhci.io/image-name',
|
||||
INIT_IP: 'etcd.rke2.cattle.io/node-address',
|
||||
NODE_SCHEDULABLE: 'kubevirt.io/schedulable',
|
||||
NETWORK_ROUTE: 'network.harvesterhci.io/route',
|
||||
MATCHED_NODES: 'network.harvesterhci.io/matched-nodes',
|
||||
OS_UPGRADE_IMAGE: 'harvesterhci.io/os-upgrade-image',
|
||||
LATEST_UPGRADE: 'harvesterhci.io/latestUpgrade',
|
||||
UPGRADE_STATE: 'harvesterhci.io/upgradeState',
|
||||
REAY_MESSAGE: 'harvesterhci.io/read-message',
|
||||
DYNAMIC_SSHKEYS_NAMES: 'harvesterhci.io/dynamic-ssh-key-names',
|
||||
DYNAMIC_SSHKEYS_USERS: 'harvesterhci.io/dynamic-ssh-key-users',
|
||||
IMAGE_SUFFIX: 'harvesterhci.io/image-type',
|
||||
OS_TYPE: 'harvesterhci.io/os-type',
|
||||
STORAGE_PROVISIONER: 'harvesterhci.io/storageProvisioner',
|
||||
HOST_REQUEST: 'management.cattle.io/pod-requests',
|
||||
STORAGE_CLASS: 'harvesterhci.io/storageClassName',
|
||||
STORAGE_NETWORK: 'storage-network.settings.harvesterhci.io',
|
||||
ADDON_EXPERIMENTAL: 'addon.harvesterhci.io/experimental',
|
||||
VOLUME_ERROR: 'longhorn.io/volume-scheduling-error',
|
||||
KVM_AMD_CPU: 'cpu-feature.node.kubevirt.io/svm',
|
||||
KVM_INTEL_CPU: 'cpu-feature.node.kubevirt.io/vmx',
|
||||
NODE_MANUFACTURER: 'manufacturer',
|
||||
NODE_MODEL: 'model',
|
||||
NODE_SERIAL_NUMBER: 'serialNumber',
|
||||
VM_INSUFFICIENT: 'harvesterhci.io/insufficient-resource-quota',
|
||||
NODE_NTP_SYNC_STATUS: 'node.harvesterhci.io/ntp-service',
|
||||
PARENT_SRIOV: 'harvesterhci.io/parent-sriov-network-device',
|
||||
PARENT_SRIOV_GPU: 'harvesterhci.io/parentSRIOVGPUDevice',
|
||||
VM_MAINTENANCE_MODE_STRATEGY: 'harvesterhci.io/maintain-mode-strategy',
|
||||
NODE_CPU_MANAGER_UPDATE_STATUS: 'harvesterhci.io/cpu-manager-update-status',
|
||||
CPU_MANAGER: 'cpumanager',
|
||||
VM_DEVICE_ALLOCATION_DETAILS: 'harvesterhci.io/deviceAllocationDetails',
|
||||
SVM_BACKUP_ID: 'harvesterhci.io/svmbackupId',
|
||||
DISABLE_LONGHORN_V2_ENGINE: 'node.longhorn.io/disable-v2-data-engine',
|
||||
CLOUD_INIT: 'harvesterhci.io/cloud-init-template',
|
||||
CURRENT_IP: 'rke2.io/internal-ip',
|
||||
IMAGE_ID: 'harvesterhci.io/imageId',
|
||||
SSH_NAMES: 'harvesterhci.io/sshNames',
|
||||
NETWORK_IPS: 'network.harvesterhci.io/ips',
|
||||
TEMPLATE_VERSION_CUSTOM_NAME: 'template-version.harvesterhci.io/customName',
|
||||
CREATOR: 'harvesterhci.io/creator',
|
||||
OS: 'harvesterhci.io/os',
|
||||
NETWORK_TYPE: 'network.harvesterhci.io/type',
|
||||
VM_NAME: 'harvesterhci.io/vmName',
|
||||
VM_NAME_PREFIX: 'harvesterhci.io/vmNamePrefix',
|
||||
VM_RESERVED_MEMORY: 'harvesterhci.io/reservedMemory',
|
||||
MAINTENANCE_STATUS: 'harvesterhci.io/maintain-status',
|
||||
HOST_CUSTOM_NAME: 'harvesterhci.io/host-custom-name',
|
||||
HOST_CONSOLE_URL: 'harvesterhci.io/host-console-url',
|
||||
RESTORE_NAME: 'restore.harvesterhci.io/name',
|
||||
NODE_ROLE_MASTER: 'node-role.kubernetes.io/master',
|
||||
NODE_ROLE_CONTROL_PLANE: 'node-role.kubernetes.io/control-plane',
|
||||
NODE_ROLE_ETCD: 'node-role.harvesterhci.io/witness',
|
||||
PROMOTE_STATUS: 'harvesterhci.io/promote-status',
|
||||
MIGRATION_STATE: 'harvesterhci.io/migrationState',
|
||||
VOLUME_CLAIM_TEMPLATE: 'harvesterhci.io/volumeClaimTemplates',
|
||||
IMAGE_NAME: 'harvesterhci.io/image-name',
|
||||
INIT_IP: 'etcd.rke2.cattle.io/node-address',
|
||||
NODE_SCHEDULABLE: 'kubevirt.io/schedulable',
|
||||
NETWORK_ROUTE: 'network.harvesterhci.io/route',
|
||||
MATCHED_NODES: 'network.harvesterhci.io/matched-nodes',
|
||||
OS_UPGRADE_IMAGE: 'harvesterhci.io/os-upgrade-image',
|
||||
LATEST_UPGRADE: 'harvesterhci.io/latestUpgrade',
|
||||
UPGRADE_STATE: 'harvesterhci.io/upgradeState',
|
||||
REAY_MESSAGE: 'harvesterhci.io/read-message',
|
||||
DYNAMIC_SSHKEYS_NAMES: 'harvesterhci.io/dynamic-ssh-key-names',
|
||||
DYNAMIC_SSHKEYS_USERS: 'harvesterhci.io/dynamic-ssh-key-users',
|
||||
IMAGE_SUFFIX: 'harvesterhci.io/image-type',
|
||||
OS_TYPE: 'harvesterhci.io/os-type',
|
||||
STORAGE_PROVISIONER: 'harvesterhci.io/storageProvisioner',
|
||||
SKIP_SINGLE_REPLICA_DETACHED_VOL: 'harvesterhci.io/skipSingleReplicaDetachedVol',
|
||||
HOST_REQUEST: 'management.cattle.io/pod-requests',
|
||||
STORAGE_CLASS: 'harvesterhci.io/storageClassName',
|
||||
STORAGE_NETWORK: 'storage-network.settings.harvesterhci.io',
|
||||
ADDON_EXPERIMENTAL: 'addon.harvesterhci.io/experimental',
|
||||
VOLUME_ERROR: 'longhorn.io/volume-scheduling-error',
|
||||
KVM_AMD_CPU: 'cpu-feature.node.kubevirt.io/svm',
|
||||
KVM_INTEL_CPU: 'cpu-feature.node.kubevirt.io/vmx',
|
||||
NODE_MANUFACTURER: 'manufacturer',
|
||||
NODE_MODEL: 'model',
|
||||
NODE_SERIAL_NUMBER: 'serialNumber',
|
||||
VM_INSUFFICIENT: 'harvesterhci.io/insufficient-resource-quota',
|
||||
NODE_NTP_SYNC_STATUS: 'node.harvesterhci.io/ntp-service',
|
||||
PARENT_SRIOV: 'harvesterhci.io/parent-sriov-network-device',
|
||||
PARENT_SRIOV_GPU: 'harvesterhci.io/parentSRIOVGPUDevice',
|
||||
VM_MAINTENANCE_MODE_STRATEGY: 'harvesterhci.io/maintain-mode-strategy',
|
||||
NODE_CPU_MANAGER_UPDATE_STATUS: 'harvesterhci.io/cpu-manager-update-status',
|
||||
CPU_MANAGER: 'cpumanager',
|
||||
VM_DEVICE_ALLOCATION_DETAILS: 'harvesterhci.io/deviceAllocationDetails',
|
||||
SVM_BACKUP_ID: 'harvesterhci.io/svmbackupId',
|
||||
DISABLE_LONGHORN_V2_ENGINE: 'node.longhorn.io/disable-v2-data-engine',
|
||||
};
|
||||
|
||||
@ -854,6 +854,7 @@ harvester:
|
||||
currentVersion: CURRENT VERSION
|
||||
versionLabel: AVAILABLE COMPATIBLE VERSIONS
|
||||
enableLogging: Enable Logging
|
||||
skipSingleReplicaDetachedVol: Skip checking single-replica detached volumes
|
||||
upgradeNode: Upgrading Node
|
||||
upgradeSysService: Upgrading System Service
|
||||
upgradeImage: Download Upgrade Image
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user