@rancher/shell 0.1.0
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/federal/dark/rancher-logo.svg +104 -0
- package/assets/brand/federal/metadata.json +3 -0
- package/assets/brand/federal/rancher-logo.svg +1 -0
- package/assets/brand/rgs/dark/rancher-logo.svg +1 -0
- package/assets/brand/rgs/metadata.json +3 -0
- package/assets/brand/rgs/rancher-logo.svg +1 -0
- package/assets/brand/suse/dark/rancher-logo.svg +148 -0
- package/assets/brand/suse/metadata.json +3 -0
- package/assets/brand/suse/rancher-logo.svg +130 -0
- package/assets/data/aws-regions.json +29 -0
- package/assets/data/ec2-instance-groups.json +85 -0
- package/assets/fonts/lato/lato-v17-latin-700.woff +0 -0
- package/assets/fonts/lato/lato-v17-latin-700.woff2 +0 -0
- package/assets/fonts/lato/lato-v17-latin-regular.woff +0 -0
- package/assets/fonts/lato/lato-v17-latin-regular.woff2 +0 -0
- package/assets/fonts/poppins/poppins-v15-latin-300.woff +0 -0
- package/assets/fonts/poppins/poppins-v15-latin-300.woff2 +0 -0
- package/assets/fonts/poppins/poppins-v15-latin-500.woff +0 -0
- package/assets/fonts/poppins/poppins-v15-latin-500.woff2 +0 -0
- package/assets/fonts/roboto-mono/roboto-mono-v13-latin-regular.woff +0 -0
- package/assets/fonts/roboto-mono/roboto-mono-v13-latin-regular.woff2 +0 -0
- package/assets/images/field-valid.svg +16 -0
- package/assets/images/generic-catalog.svg +15 -0
- package/assets/images/generic-driver.svg +17 -0
- package/assets/images/pl/README.md +13 -0
- package/assets/images/pl/banner.svg +241 -0
- package/assets/images/pl/dark/banner.svg +242 -0
- package/assets/images/pl/dark/login-landscape.svg +291 -0
- package/assets/images/pl/dark/rancher-logo.svg +51 -0
- package/assets/images/pl/decoration-cloud-big-white.svg +1 -0
- package/assets/images/pl/decoration-ground.svg +1 -0
- package/assets/images/pl/error-desert-landscape.svg +217 -0
- package/assets/images/pl/half-logo.svg +23 -0
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/pl/login-landscape.svg +496 -0
- package/assets/images/pl/rancher-logo.svg +51 -0
- package/assets/images/pl/setup-step-one.svg +612 -0
- package/assets/images/pl/sunglasses.svg +20 -0
- package/assets/images/providers/aks-black.svg +28 -0
- package/assets/images/providers/aks.svg +31 -0
- package/assets/images/providers/aliyun-black.svg +14 -0
- package/assets/images/providers/aliyun.svg +17 -0
- package/assets/images/providers/aliyunecs-black.svg +13 -0
- package/assets/images/providers/aliyunecs.svg +21 -0
- package/assets/images/providers/amazonec2-black.svg +8 -0
- package/assets/images/providers/amazonec2.svg +19 -0
- package/assets/images/providers/amazoneks-black.svg +10 -0
- package/assets/images/providers/amazoneks.svg +14 -0
- package/assets/images/providers/aws.svg +38 -0
- package/assets/images/providers/azure-black.svg +29 -0
- package/assets/images/providers/azure.svg +32 -0
- package/assets/images/providers/azuread-black.svg +22 -0
- package/assets/images/providers/azuread.svg +25 -0
- package/assets/images/providers/azureaks-black.svg +28 -0
- package/assets/images/providers/azureaks.svg +31 -0
- package/assets/images/providers/baidu-black.svg +19 -0
- package/assets/images/providers/baidu.svg +25 -0
- package/assets/images/providers/cloudca-black.svg +45 -0
- package/assets/images/providers/cloudca.svg +49 -0
- package/assets/images/providers/cloudscale-black.svg +24 -0
- package/assets/images/providers/cloudscale.svg +28 -0
- package/assets/images/providers/custom.svg +85 -0
- package/assets/images/providers/digitalocean-black.svg +21 -0
- package/assets/images/providers/digitalocean.svg +24 -0
- package/assets/images/providers/equinix-black.svg +13 -0
- package/assets/images/providers/equinix.svg +13 -0
- package/assets/images/providers/exoscale.svg +1 -0
- package/assets/images/providers/gcp.svg +6 -0
- package/assets/images/providers/gke-black.svg +10 -0
- package/assets/images/providers/gke.svg +28 -0
- package/assets/images/providers/google.svg +29 -0
- package/assets/images/providers/googlegke-black.svg +10 -0
- package/assets/images/providers/googlegke.svg +28 -0
- package/assets/images/providers/harvester.svg +1 -0
- package/assets/images/providers/huaweicce-black.svg +109 -0
- package/assets/images/providers/huaweicce.svg +184 -0
- package/assets/images/providers/import.svg +99 -0
- package/assets/images/providers/k3s-black.svg +10 -0
- package/assets/images/providers/k3s.svg +15 -0
- package/assets/images/providers/kubernetes-black.svg +37 -0
- package/assets/images/providers/kubernetes.svg +99 -0
- package/assets/images/providers/linode.svg +54 -0
- package/assets/images/providers/linodelke-black.svg +40 -0
- package/assets/images/providers/linodelke.svg +54 -0
- package/assets/images/providers/local-cluster.svg +20 -0
- package/assets/images/providers/minikube-black.svg +25 -0
- package/assets/images/providers/minikube.svg +36 -0
- package/assets/images/providers/oci-black.svg +41 -0
- package/assets/images/providers/oci.svg +44 -0
- package/assets/images/providers/openstack-black.svg +16 -0
- package/assets/images/providers/openstack.svg +20 -0
- package/assets/images/providers/oracle.svg +66 -0
- package/assets/images/providers/oracleoke-black.svg +51 -0
- package/assets/images/providers/oracleoke.svg +55 -0
- package/assets/images/providers/otc-black.svg +15 -0
- package/assets/images/providers/otc.svg +33 -0
- package/assets/images/providers/otccce.svg +33 -0
- package/assets/images/providers/packet-black.svg +15 -0
- package/assets/images/providers/packet.svg +16 -0
- package/assets/images/providers/pinganyunecs-black.svg +26 -0
- package/assets/images/providers/pinganyunecs.svg +26 -0
- package/assets/images/providers/pnap-black.svg +43 -0
- package/assets/images/providers/pnap.svg +48 -0
- package/assets/images/providers/rackspace-black.svg +14 -0
- package/assets/images/providers/rackspace.svg +18 -0
- package/assets/images/providers/rke.svg +26 -0
- package/assets/images/providers/rke2.svg +26 -0
- package/assets/images/providers/softlayer.svg +27 -0
- package/assets/images/providers/tencenttke-black.svg +22 -0
- package/assets/images/providers/tencenttke.svg +39 -0
- package/assets/images/providers/vmwarevsphere-black.svg +60 -0
- package/assets/images/providers/vmwarevsphere.svg +51 -0
- package/assets/images/vendor/activedirectory.svg +20 -0
- package/assets/images/vendor/adfs.svg +19 -0
- package/assets/images/vendor/azuread.svg +18 -0
- package/assets/images/vendor/custom.svg +42 -0
- package/assets/images/vendor/email.svg +22 -0
- package/assets/images/vendor/freeipa.svg +26 -0
- package/assets/images/vendor/github.svg +13 -0
- package/assets/images/vendor/googleoauth.svg +9 -0
- package/assets/images/vendor/grafana.svg +48 -0
- package/assets/images/vendor/jaeger.svg +1 -0
- package/assets/images/vendor/keycloak.svg +30 -0
- package/assets/images/vendor/kiali.svg +23 -0
- package/assets/images/vendor/linux.svg +23 -0
- package/assets/images/vendor/longhorn.svg +25 -0
- package/assets/images/vendor/neuvector.svg +1 -0
- package/assets/images/vendor/okta.svg +31 -0
- package/assets/images/vendor/openldap.svg +34 -0
- package/assets/images/vendor/pagerduty.svg +26 -0
- package/assets/images/vendor/ping.svg +58 -0
- package/assets/images/vendor/prometheus.svg +14 -0
- package/assets/images/vendor/shibboleth.svg +481 -0
- package/assets/images/vendor/slack.svg +38 -0
- package/assets/images/vendor/webhook.svg +23 -0
- package/assets/images/vendor/windows.svg +13 -0
- package/assets/images/wechat-qr-code.jpg +0 -0
- package/assets/styles/app.scss +35 -0
- package/assets/styles/base/_basic.scss +112 -0
- package/assets/styles/base/_color.scss +11 -0
- package/assets/styles/base/_functions.scss +134 -0
- package/assets/styles/base/_helpers.scss +263 -0
- package/assets/styles/base/_mixins.scss +165 -0
- package/assets/styles/base/_typography.scss +69 -0
- package/assets/styles/base/_variables.scss +58 -0
- package/assets/styles/fonts/_dots.scss +18 -0
- package/assets/styles/fonts/_fontstack.scss +49 -0
- package/assets/styles/fonts/_icons.scss +101 -0
- package/assets/styles/fonts/_zerowidthspace.scss +8 -0
- package/assets/styles/global/_button.scss +182 -0
- package/assets/styles/global/_cards.scss +94 -0
- package/assets/styles/global/_columns.scss +122 -0
- package/assets/styles/global/_form.scss +145 -0
- package/assets/styles/global/_gauges.scss +55 -0
- package/assets/styles/global/_labeled-input.scss +130 -0
- package/assets/styles/global/_resource.scss +89 -0
- package/assets/styles/global/_select.scss +182 -0
- package/assets/styles/global/_table.scss +106 -0
- package/assets/styles/global/_tooltip.scss +197 -0
- package/assets/styles/themes/_dark.scss +204 -0
- package/assets/styles/themes/_light.scss +533 -0
- package/assets/styles/themes/_suse.scss +26 -0
- package/assets/styles/vendor/_code-mirror.scss +3 -0
- package/assets/styles/vendor/normalize.scss +349 -0
- package/assets/styles/vendor/vue-js-modal.scss +12 -0
- package/assets/styles/vendor/vue-select.scss +386 -0
- package/assets/translations/en-us.yaml +6802 -0
- package/assets/translations/zh-hans.yaml +7062 -0
- package/chart/example.vue +18 -0
- package/chart/istio.vue +209 -0
- package/chart/logging/index.vue +70 -0
- package/chart/monitoring/ClusterSelector.vue +213 -0
- package/chart/monitoring/StorageClassSelector.vue +45 -0
- package/chart/monitoring/alerting/index.vue +215 -0
- package/chart/monitoring/grafana/index.vue +319 -0
- package/chart/monitoring/index.vue +276 -0
- package/chart/monitoring/prometheus/index.vue +379 -0
- package/chart/monitoring/steps/uninstall-v1.vue +131 -0
- package/chart/rancher-alerting-drivers.vue +39 -0
- package/chart/rancher-backup/S3.vue +97 -0
- package/chart/rancher-backup/index.vue +218 -0
- package/chart/rancher-gatekeeper.vue +29 -0
- package/cloud-credential/aws.vue +98 -0
- package/cloud-credential/azure.vue +113 -0
- package/cloud-credential/digitalocean.vue +44 -0
- package/cloud-credential/gcp.vue +64 -0
- package/cloud-credential/generic.vue +84 -0
- package/cloud-credential/harvester.vue +149 -0
- package/cloud-credential/linode.vue +44 -0
- package/cloud-credential/s3.vue +152 -0
- package/cloud-credential/vmwarevsphere.vue +99 -0
- package/components/ActionDropdown.vue +249 -0
- package/components/ActionMenu.vue +312 -0
- package/components/AdvancedSection.vue +28 -0
- package/components/Alert.vue +51 -0
- package/components/AlertTable.vue +111 -0
- package/components/AssignTo.vue +162 -0
- package/components/AsyncButton.vue +249 -0
- package/components/BackLink.vue +27 -0
- package/components/BadgeState.vue +99 -0
- package/components/Banner.vue +148 -0
- package/components/BannerGraphic.vue +103 -0
- package/components/BrandImage.vue +85 -0
- package/components/ButtonDropdown.vue +305 -0
- package/components/ButtonGroup.vue +88 -0
- package/components/Card.vue +104 -0
- package/components/ChartHeading.vue +21 -0
- package/components/ChartReadme.vue +80 -0
- package/components/ClusterBadge.vue +34 -0
- package/components/ClusterProviderIcon.vue +95 -0
- package/components/CodeMirror.vue +126 -0
- package/components/Collapse.vue +55 -0
- package/components/CollapsibleCard.vue +113 -0
- package/components/CommunityLinks.vue +128 -0
- package/components/ConsumptionGauge.vue +133 -0
- package/components/ContainerResourceLimit.vue +216 -0
- package/components/CopyCode.vue +66 -0
- package/components/CopyToClipboard.vue +43 -0
- package/components/CopyToClipboardText.vue +39 -0
- package/components/CountBox.vue +104 -0
- package/components/CountGauge.vue +157 -0
- package/components/CruResource.vue +565 -0
- package/components/CruResourceFooter.vue +108 -0
- package/components/DashboardMetrics.vue +106 -0
- package/components/DashboardOptions.vue +136 -0
- package/components/DetailText.vue +192 -0
- package/components/DetailTop.vue +263 -0
- package/components/EmberPage.vue +609 -0
- package/components/EmberPageView.vue +36 -0
- package/components/EtcdInfoBanner.vue +57 -0
- package/components/EventsTable.vue +67 -0
- package/components/FileDiff.vue +174 -0
- package/components/FixedBanner.vue +228 -0
- package/components/Flag.vue +77 -0
- package/components/Glance.vue +70 -0
- package/components/GlobalRoleBindings.vue +376 -0
- package/components/GradientBox.vue +79 -0
- package/components/GrafanaDashboard.vue +269 -0
- package/components/GrowlManager.vue +160 -0
- package/components/HardwareResourceGauge.vue +154 -0
- package/components/HarvesterServiceAddOnConfig.vue +204 -0
- package/components/HarvesterUpgradeProgressBarList.vue +109 -0
- package/components/IconMessage.vue +87 -0
- package/components/Import.vue +206 -0
- package/components/IndentedPanel.vue +24 -0
- package/components/InfoBox.vue +78 -0
- package/components/InputOrDisplay.vue +67 -0
- package/components/KeyValueView.vue +256 -0
- package/components/LabelValue.vue +42 -0
- package/components/LandingPagePreference.vue +141 -0
- package/components/LazyImage.vue +55 -0
- package/components/Loading.vue +72 -0
- package/components/Markdown.vue +96 -0
- package/components/MessageLink.vue +64 -0
- package/components/ModalWithCard.vue +124 -0
- package/components/MoveModal.vue +135 -0
- package/components/NovncConsole.vue +93 -0
- package/components/NovncConsoleWrapper.vue +150 -0
- package/components/PercentageBar.vue +120 -0
- package/components/ProgressBarMulti.vue +156 -0
- package/components/PromptChangePassword.vue +106 -0
- package/components/PromptModal.vue +98 -0
- package/components/PromptRemove.vue +401 -0
- package/components/PromptRestore.vue +299 -0
- package/components/Questions/Array.vue +34 -0
- package/components/Questions/Boolean.vue +26 -0
- package/components/Questions/CloudCredential.vue +51 -0
- package/components/Questions/Enum.vue +29 -0
- package/components/Questions/Float.vue +31 -0
- package/components/Questions/Int.vue +31 -0
- package/components/Questions/Question.js +73 -0
- package/components/Questions/QuestionMap.vue +39 -0
- package/components/Questions/Reference.vue +128 -0
- package/components/Questions/String.vue +41 -0
- package/components/Questions/index.vue +489 -0
- package/components/Random.vue +92 -0
- package/components/RelatedResources.vue +181 -0
- package/components/RelatedWorkloadsTable.vue +44 -0
- package/components/ResourceCancelModal.vue +108 -0
- package/components/ResourceDetail/Masthead.vue +483 -0
- package/components/ResourceDetail/index.vue +386 -0
- package/components/ResourceList/Masthead.vue +176 -0
- package/components/ResourceList/index.vue +149 -0
- package/components/ResourceSummary.vue +163 -0
- package/components/ResourceTable.vue +401 -0
- package/components/ResourceYaml.vue +412 -0
- package/components/RoleBindings.vue +453 -0
- package/components/SelectIconGrid.vue +364 -0
- package/components/SimpleBox.vue +102 -0
- package/components/SingleClusterInfo.vue +171 -0
- package/components/SortableTable/THead.vue +221 -0
- package/components/SortableTable/actions.js +151 -0
- package/components/SortableTable/filtering.js +214 -0
- package/components/SortableTable/grouping.js +41 -0
- package/components/SortableTable/index.vue +1393 -0
- package/components/SortableTable/paging.js +118 -0
- package/components/SortableTable/selection.js +601 -0
- package/components/SortableTable/sorting.js +102 -0
- package/components/StatusTable.vue +55 -0
- package/components/Tabbed/Tab.vue +94 -0
- package/components/Tabbed/index.vue +419 -0
- package/components/TabbedLinks/index.vue +94 -0
- package/components/TableSparkLine.vue +105 -0
- package/components/Tag.vue +19 -0
- package/components/Tip.vue +40 -0
- package/components/TypeDescription.vue +55 -0
- package/components/VMConsoleBar.vue +87 -0
- package/components/Wizard.vue +559 -0
- package/components/YamlEditor.vue +266 -0
- package/components/__tests__/Banner.test.ts +13 -0
- package/components/__tests__/CopyCode.test.ts +21 -0
- package/components/__tests__/CruResource.test.ts +73 -0
- package/components/auth/AllowedPrincipals.vue +107 -0
- package/components/auth/AuthBanner.vue +71 -0
- package/components/auth/Principal.vue +169 -0
- package/components/auth/RoleDetailEdit.vue +724 -0
- package/components/auth/SelectPrincipal.vue +203 -0
- package/components/auth/login/github.vue +19 -0
- package/components/auth/login/ldap.vue +86 -0
- package/components/auth/login/oauth.vue +21 -0
- package/components/auth/login/oidc.vue +21 -0
- package/components/auth/login/saml.vue +23 -0
- package/components/dialog/AddClusterMemberDialog.vue +72 -0
- package/components/dialog/AddCustomBadgeDialog.vue +272 -0
- package/components/dialog/AddProjectMemberDialog.vue +109 -0
- package/components/dialog/AddonConfigConfirmationDialog.vue +76 -0
- package/components/dialog/DrainNode.vue +218 -0
- package/components/dialog/ForceMachineRemoveDialog.vue +106 -0
- package/components/dialog/GenericPrompt.vue +103 -0
- package/components/dialog/RollbackWorkloadDialog.vue +306 -0
- package/components/dialog/RotateCertificatesDialog.vue +196 -0
- package/components/dialog/RotateEncryptionKeyDialog.vue +158 -0
- package/components/dialog/SaveAsRKETemplateDialog.vue +122 -0
- package/components/dialog/ScaleMachineDownDialog.vue +127 -0
- package/components/dialog/harvester/AddHotplugModal.vue +159 -0
- package/components/dialog/harvester/BackupModal.vue +117 -0
- package/components/dialog/harvester/CloneTemplate.vue +125 -0
- package/components/dialog/harvester/EjectCDROMDialog.vue +157 -0
- package/components/dialog/harvester/ExportImageDialog.vue +152 -0
- package/components/dialog/harvester/MaintenanceDialog.vue +94 -0
- package/components/dialog/harvester/MigrationDialog.vue +154 -0
- package/components/dialog/harvester/RestoreDialog.vue +153 -0
- package/components/dialog/harvester/SupportBundle.vue +217 -0
- package/components/dialog/harvester/UnplugVolume.vue +108 -0
- package/components/fleet/FleetBundleResources.vue +86 -0
- package/components/fleet/FleetBundles.vue +127 -0
- package/components/fleet/FleetClusters.vue +103 -0
- package/components/fleet/FleetIntro.vue +60 -0
- package/components/fleet/FleetRepos.vue +150 -0
- package/components/fleet/FleetResources.vue +139 -0
- package/components/fleet/FleetStatus.vue +289 -0
- package/components/fleet/FleetSummary.vue +190 -0
- package/components/fleet/ResourcesSummary.vue +89 -0
- package/components/form/ArrayList.vue +354 -0
- package/components/form/ArrayListGrouped.vue +113 -0
- package/components/form/ArrayListSelect.vue +77 -0
- package/components/form/BannerSettings.vue +211 -0
- package/components/form/ChangePassword.vue +414 -0
- package/components/form/Checkbox.vue +292 -0
- package/components/form/ColorInput.vue +139 -0
- package/components/form/Command.vue +186 -0
- package/components/form/Conditions.vue +93 -0
- package/components/form/Container.vue +143 -0
- package/components/form/EnvVars.vue +146 -0
- package/components/form/FileImageSelector.vue +129 -0
- package/components/form/FileSelector.vue +151 -0
- package/components/form/Footer.vue +107 -0
- package/components/form/GithubPicker.vue +383 -0
- package/components/form/HealthCheck.vue +84 -0
- package/components/form/HookOption.vue +244 -0
- package/components/form/InputWithSelect.vue +310 -0
- package/components/form/KeyValue.vue +668 -0
- package/components/form/LabeledInput.vue +245 -0
- package/components/form/LabeledSelect.vue +476 -0
- package/components/form/LabeledTooltip.vue +116 -0
- package/components/form/Labels.vue +77 -0
- package/components/form/LifecycleHooks.vue +79 -0
- package/components/form/MatchExpressions.vue +278 -0
- package/components/form/Members/ClusterMembershipEditor.vue +63 -0
- package/components/form/Members/ClusterPermissionsEditor.vue +269 -0
- package/components/form/Members/MembershipEditor.vue +198 -0
- package/components/form/Members/ProjectMembershipEditor.vue +64 -0
- package/components/form/NameNsDescription.vue +391 -0
- package/components/form/Networking.vue +271 -0
- package/components/form/NodeAffinity.vue +158 -0
- package/components/form/NodeScheduling.vue +163 -0
- package/components/form/NotificationSettings.vue +71 -0
- package/components/form/Password.vue +137 -0
- package/components/form/PlusMinus.vue +80 -0
- package/components/form/PodAffinity.vue +288 -0
- package/components/form/PodSecurity.vue +152 -0
- package/components/form/Ports.vue +282 -0
- package/components/form/Probe.vue +313 -0
- package/components/form/ProjectMemberEditor.vue +290 -0
- package/components/form/RadioButton.vue +229 -0
- package/components/form/RadioGroup.vue +187 -0
- package/components/form/ResourceQuota/Namespace.vue +117 -0
- package/components/form/ResourceQuota/NamespaceRow.vue +171 -0
- package/components/form/ResourceQuota/Project.vue +90 -0
- package/components/form/ResourceQuota/ProjectRow.vue +78 -0
- package/components/form/ResourceQuota/shared.js +147 -0
- package/components/form/ResourceTabs/index.vue +174 -0
- package/components/form/RuleSelector.vue +170 -0
- package/components/form/Scheduling.vue +115 -0
- package/components/form/SecretSelector.vue +187 -0
- package/components/form/Security.vue +201 -0
- package/components/form/Select.vue +251 -0
- package/components/form/SelectOrCreateAuthSecret.vue +475 -0
- package/components/form/SerialConsole/index.vue +267 -0
- package/components/form/ServiceNameSelect.vue +158 -0
- package/components/form/ServicePorts.vue +281 -0
- package/components/form/ShellInput.vue +89 -0
- package/components/form/SimpleSecretSelector.vue +196 -0
- package/components/form/Taints.vue +83 -0
- package/components/form/TextAreaAutoGrow.vue +127 -0
- package/components/form/ToggleSwitch.vue +127 -0
- package/components/form/Tolerations.vue +220 -0
- package/components/form/UnitInput.vue +237 -0
- package/components/form/ValueFromResource.vue +373 -0
- package/components/form/WorkloadPorts.vue +476 -0
- package/components/form/__tests__/ArrayListGrouped.test.ts +39 -0
- package/components/form/__tests__/KeyValue.test.ts +18 -0
- package/components/form/__tests__/LabeledInput.test.ts +20 -0
- package/components/form/__tests__/UnitInput.test.ts +183 -0
- package/components/formatter/AppSummaryGraph.vue +136 -0
- package/components/formatter/AttachVMWithName.vue +46 -0
- package/components/formatter/BadgeStateFormatter.vue +60 -0
- package/components/formatter/Capitalize.vue +21 -0
- package/components/formatter/Checked.vue +20 -0
- package/components/formatter/CloudInitType.vue +27 -0
- package/components/formatter/ClusterLink.vue +92 -0
- package/components/formatter/CopyToClipboard.vue +18 -0
- package/components/formatter/Date.vue +74 -0
- package/components/formatter/Endpoints.vue +99 -0
- package/components/formatter/ExternalLink.vue +7 -0
- package/components/formatter/FleetSummaryGraph.vue +95 -0
- package/components/formatter/HarvesterBackupTargetValidation.vue +43 -0
- package/components/formatter/HarvesterCPUUsed.vue +122 -0
- package/components/formatter/HarvesterDiskState.vue +66 -0
- package/components/formatter/HarvesterHostName.vue +66 -0
- package/components/formatter/HarvesterIpAddress.vue +71 -0
- package/components/formatter/HarvesterMemoryUsed.vue +140 -0
- package/components/formatter/HarvesterMigrationState.vue +85 -0
- package/components/formatter/HarvesterNodeName.vue +49 -0
- package/components/formatter/HarvesterStorageUsed.vue +194 -0
- package/components/formatter/HarvesterVmState.vue +123 -0
- package/components/formatter/IconIsDefault.vue +34 -0
- package/components/formatter/IconText.vue +46 -0
- package/components/formatter/ImagePercentageBar.vue +86 -0
- package/components/formatter/IngressFullPath.vue +17 -0
- package/components/formatter/IngressTarget.vue +68 -0
- package/components/formatter/InternalExternalIP.vue +45 -0
- package/components/formatter/KeyValue.vue +74 -0
- package/components/formatter/Link.vue +149 -0
- package/components/formatter/LinkDetail.vue +46 -0
- package/components/formatter/LinkDetailImage.vue +31 -0
- package/components/formatter/LinkName.vue +50 -0
- package/components/formatter/List.vue +22 -0
- package/components/formatter/ListLink.vue +29 -0
- package/components/formatter/ListLinkDetail.vue +25 -0
- package/components/formatter/LiveDate.vue +139 -0
- package/components/formatter/LiveExpiryBadgeState.vue +66 -0
- package/components/formatter/LiveExpiryDate.vue +69 -0
- package/components/formatter/MachineSummaryGraph.vue +43 -0
- package/components/formatter/Number.vue +31 -0
- package/components/formatter/Percentage.vue +25 -0
- package/components/formatter/PercentageBar.vue +41 -0
- package/components/formatter/PodImages.vue +56 -0
- package/components/formatter/PodsUsage.vue +49 -0
- package/components/formatter/Port.vue +24 -0
- package/components/formatter/Principal.vue +19 -0
- package/components/formatter/PrincipalGroupBindings.vue +53 -0
- package/components/formatter/QualityText.vue +21 -0
- package/components/formatter/ReceiverIcons.vue +124 -0
- package/components/formatter/RunBookLink.vue +15 -0
- package/components/formatter/Scale.vue +108 -0
- package/components/formatter/ScanResult.vue +30 -0
- package/components/formatter/SecretData.vue +52 -0
- package/components/formatter/SecretType.vue +38 -0
- package/components/formatter/ServiceTargets.vue +109 -0
- package/components/formatter/ServiceType.vue +44 -0
- package/components/formatter/Shortened.vue +49 -0
- package/components/formatter/Si.vue +42 -0
- package/components/formatter/Translate.vue +32 -0
- package/components/formatter/VerticalScroll.vue +17 -0
- package/components/formatter/VirtualServiceGateways.vue +105 -0
- package/components/formatter/Weight.vue +132 -0
- package/components/formatter/WorkloadDetailEndpoints.vue +110 -0
- package/components/formatter/WorkloadHealthScale.vue +279 -0
- package/components/formatter/__tests__/PodsUsage.test.ts +38 -0
- package/components/graph/AspectPreserver.vue +68 -0
- package/components/graph/Bar.vue +70 -0
- package/components/graph/Circle.vue +135 -0
- package/components/graph/HalfCircle.vue +41 -0
- package/components/graph/LinePlot.vue +193 -0
- package/components/graph/ProgressArc.vue +88 -0
- package/components/nav/Favorite.vue +56 -0
- package/components/nav/GlobalLoading.vue +22 -0
- package/components/nav/Group.vue +371 -0
- package/components/nav/HarvesterUpgrade.vue +222 -0
- package/components/nav/Header.vue +875 -0
- package/components/nav/Jump.vue +106 -0
- package/components/nav/NamespaceFilter.vue +841 -0
- package/components/nav/TopLevelMenu.vue +710 -0
- package/components/nav/Type.vue +192 -0
- package/components/nav/WindowManager/ChartReadme.vue +45 -0
- package/components/nav/WindowManager/ContainerLogs.vue +670 -0
- package/components/nav/WindowManager/ContainerShell.vue +415 -0
- package/components/nav/WindowManager/KubectlShell.vue +42 -0
- package/components/nav/WindowManager/MachineSsh.vue +21 -0
- package/components/nav/WindowManager/Window.vue +97 -0
- package/components/nav/WindowManager/index.vue +310 -0
- package/components/nav/WorkspaceSwitcher.vue +147 -0
- package/config/cookies.js +4 -0
- package/config/features.js +3 -0
- package/config/footer.js +19 -0
- package/config/harvester-map.js +44 -0
- package/config/harvester-table-headers.js +27 -0
- package/config/labels-annotations.js +180 -0
- package/config/local-storage.js +6 -0
- package/config/nuxt-paths.js +7 -0
- package/config/page-actions.js +3 -0
- package/config/private-label.js +70 -0
- package/config/product/apps.js +115 -0
- package/config/product/auth.js +215 -0
- package/config/product/backup.js +61 -0
- package/config/product/cis.js +157 -0
- package/config/product/explorer.js +306 -0
- package/config/product/fleet.js +90 -0
- package/config/product/gatekeeper.js +119 -0
- package/config/product/harvester-manager.js +100 -0
- package/config/product/harvester.js +305 -0
- package/config/product/istio.js +79 -0
- package/config/product/legacy.js +201 -0
- package/config/product/logging.js +377 -0
- package/config/product/longhorn.js +49 -0
- package/config/product/manager.js +176 -0
- package/config/product/monitoring.js +286 -0
- package/config/product/multi-cluster-apps.js +73 -0
- package/config/product/navlinks.js +32 -0
- package/config/product/neuvector.js +30 -0
- package/config/product/settings.js +130 -0
- package/config/query-params.js +72 -0
- package/config/roles.ts +365 -0
- package/config/schema.js +32 -0
- package/config/secret.js +15 -0
- package/config/settings.js +194 -0
- package/config/system-namespaces.js +15 -0
- package/config/table-headers.js +908 -0
- package/config/types.js +292 -0
- package/content/docs/en-us/getting-started.md +249 -0
- package/content/docs/en-us/whats-new.md +108 -0
- package/content/docs/zh-hans/getting-started.md +248 -0
- package/content/docs/zh-hans/whats-new.md +56 -0
- package/core/plugin-routes.ts +138 -0
- package/core/plugin.ts +181 -0
- package/core/plugins-loader.js +31 -0
- package/core/plugins.js +293 -0
- package/core/types.ts +114 -0
- package/creators/app/.eslintignore +18 -0
- package/creators/app/.eslintrc.js +173 -0
- package/creators/app/.vscode/settings.json +23 -0
- package/creators/app/app.package.json +9 -0
- package/creators/app/babel.config.js +18 -0
- package/creators/app/init +95 -0
- package/creators/app/nuxt.config.js +6 -0
- package/creators/app/package.json +19 -0
- package/creators/app/tsconfig.json +37 -0
- package/creators/pkg/babel.config.js +1 -0
- package/creators/pkg/index.ts +14 -0
- package/creators/pkg/init +154 -0
- package/creators/pkg/nuxt.config.js +6 -0
- package/creators/pkg/package.json +19 -0
- package/creators/pkg/pkg.package.json +21 -0
- package/creators/pkg/tsconfig.json +49 -0
- package/creators/pkg/vue-shim.ts +4 -0
- package/creators/pkg/vue.config.js +1 -0
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +193 -0
- package/detail/catalog.cattle.io.app.vue +135 -0
- package/detail/catalog.cattle.io.clusterrepo.vue +25 -0
- package/detail/cis.cattle.io.clusterscan.vue +339 -0
- package/detail/configmap.vue +62 -0
- package/detail/constraints.gatekeeper.sh.constraint.vue +46 -0
- package/detail/fleet.cattle.io.bundle.vue +67 -0
- package/detail/fleet.cattle.io.cluster.vue +76 -0
- package/detail/fleet.cattle.io.clustergroup.vue +60 -0
- package/detail/fleet.cattle.io.gitrepo.vue +115 -0
- package/detail/harvesterhci.io.host/HarvesterHostBasic.vue +343 -0
- package/detail/harvesterhci.io.host/HarvesterHostDisk.vue +200 -0
- package/detail/harvesterhci.io.host/HarvesterHostNetwork.vue +89 -0
- package/detail/harvesterhci.io.host/VirtualMachineInstance.vue +134 -0
- package/detail/harvesterhci.io.host/index.vue +243 -0
- package/detail/harvesterhci.io.management.cluster.vue +97 -0
- package/detail/harvesterhci.io.virtualmachinebackup/index.vue +221 -0
- package/detail/harvesterhci.io.virtualmachineimage.vue +118 -0
- package/detail/helm.cattle.io.projecthelmchart.vue +229 -0
- package/detail/kubevirt.io.virtualmachine/VirtualMachineTabs/VirtualMachineBasics.vue +279 -0
- package/detail/kubevirt.io.virtualmachine/VirtualMachineTabs/VirtualMachineEvents.vue +75 -0
- package/detail/kubevirt.io.virtualmachine/VirtualMachineTabs/VirtualMachineKeypairs.vue +114 -0
- package/detail/kubevirt.io.virtualmachine/VirtualMachineTabs/VirtualMachineMigration.vue +79 -0
- package/detail/kubevirt.io.virtualmachine/index.vue +213 -0
- package/detail/management.cattle.io.fleetworkspace.vue +85 -0
- package/detail/management.cattle.io.globalrole.vue +8 -0
- package/detail/management.cattle.io.roletemplate.vue +8 -0
- package/detail/management.cattle.io.user.vue +288 -0
- package/detail/namespace.vue +270 -0
- package/detail/networking.k8s.io.ingress.vue +57 -0
- package/detail/node.vue +285 -0
- package/detail/pod.vue +235 -0
- package/detail/provisioning.cattle.io.cluster.vue +719 -0
- package/detail/rbac.authorization.k8s.io.clusterrole.vue +8 -0
- package/detail/rbac.authorization.k8s.io.role.vue +8 -0
- package/detail/secret.vue +226 -0
- package/detail/service.vue +199 -0
- package/detail/workload/index.vue +323 -0
- package/edit/auth/azuread.vue +278 -0
- package/edit/auth/github.vue +231 -0
- package/edit/auth/googleoauth.vue +200 -0
- package/edit/auth/ldap/config.vue +238 -0
- package/edit/auth/ldap/index.vue +136 -0
- package/edit/auth/oidc.vue +259 -0
- package/edit/auth/saml.vue +222 -0
- package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +51 -0
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +243 -0
- package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +79 -0
- package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +60 -0
- package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +216 -0
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +187 -0
- package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +61 -0
- package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +51 -0
- package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +60 -0
- package/edit/catalog.cattle.io.clusterrepo.vue +109 -0
- package/edit/cis.cattle.io.clusterscan.vue +301 -0
- package/edit/cis.cattle.io.clusterscanbenchmark.vue +107 -0
- package/edit/cis.cattle.io.clusterscanprofile.vue +142 -0
- package/edit/cloudcredential.vue +279 -0
- package/edit/configmap.vue +125 -0
- package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +70 -0
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +76 -0
- package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +50 -0
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +331 -0
- package/edit/fleet.cattle.io.cluster.vue +93 -0
- package/edit/fleet.cattle.io.clustergroup.vue +161 -0
- package/edit/fleet.cattle.io.gitrepo.vue +515 -0
- package/edit/group.principal.vue +60 -0
- package/edit/harvesterhci.io.cloudtemplate.vue +123 -0
- package/edit/harvesterhci.io.host/HarvesterDisk.vue +263 -0
- package/edit/harvesterhci.io.host/index.vue +524 -0
- package/edit/harvesterhci.io.keypair.vue +112 -0
- package/edit/harvesterhci.io.managedchart/index.vue +25 -0
- package/edit/harvesterhci.io.managedchart/rancher-monitoring.vue +172 -0
- package/edit/harvesterhci.io.management.cluster.vue +136 -0
- package/edit/harvesterhci.io.networkattachmentdefinition.vue +210 -0
- package/edit/harvesterhci.io.setting/additional-ca.vue +36 -0
- package/edit/harvesterhci.io.setting/backup-target.vue +182 -0
- package/edit/harvesterhci.io.setting/http-proxy.vue +79 -0
- package/edit/harvesterhci.io.setting/index.vue +201 -0
- package/edit/harvesterhci.io.setting/overcommit-config.vue +91 -0
- package/edit/harvesterhci.io.setting/ssl-certificates.vue +117 -0
- package/edit/harvesterhci.io.setting/ssl-parameters.vue +161 -0
- package/edit/harvesterhci.io.setting/support-bundle-image.vue +134 -0
- package/edit/harvesterhci.io.setting/support-bundle-namespaces.vue +73 -0
- package/edit/harvesterhci.io.setting/vip-pools.vue +244 -0
- package/edit/harvesterhci.io.setting/vm-force-reset-policy.vue +81 -0
- package/edit/harvesterhci.io.virtualmachinebackup.vue +256 -0
- package/edit/harvesterhci.io.virtualmachineimage.vue +364 -0
- package/edit/harvesterhci.io.virtualmachinetemplateversion.vue +332 -0
- package/edit/harvesterhci.io.volume.vue +195 -0
- package/edit/helm.cattle.io.projecthelmchart.vue +147 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +210 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineAccessCredentials/AccessCredentialsUsers.vue +190 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineAccessCredentials/index.vue +212 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineAccessCredentials/type/basicAuth.vue +94 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineAccessCredentials/type/sshkey.vue +85 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineCloudConfig/DataTemplate.vue +152 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineCloudConfig/index.vue +278 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineCpuMemory.vue +111 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineNetwork/base.vue +238 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineNetwork/index.vue +142 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineSSHKey.vue +256 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/index.vue +392 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/container.vue +86 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/existing.vue +247 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/vmImage.vue +225 -0
- package/edit/kubevirt.io.virtualmachine/VirtualMachineVolume/type/volume.vue +162 -0
- package/edit/kubevirt.io.virtualmachine/index.vue +633 -0
- package/edit/logging-flow/Match.vue +96 -0
- package/edit/logging-flow/index.vue +419 -0
- package/edit/logging.banzaicloud.io.clusterflow.vue +7 -0
- package/edit/logging.banzaicloud.io.clusteroutput.vue +12 -0
- package/edit/logging.banzaicloud.io.flow.vue +7 -0
- package/edit/logging.banzaicloud.io.output/index.vue +317 -0
- package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +72 -0
- package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +79 -0
- package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +92 -0
- package/edit/logging.banzaicloud.io.output/providers/datadog.vue +80 -0
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +206 -0
- package/edit/logging.banzaicloud.io.output/providers/file.vue +42 -0
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +147 -0
- package/edit/logging.banzaicloud.io.output/providers/gcs.vue +82 -0
- package/edit/logging.banzaicloud.io.output/providers/gelf.vue +129 -0
- package/edit/logging.banzaicloud.io.output/providers/kafka.vue +146 -0
- package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +71 -0
- package/edit/logging.banzaicloud.io.output/providers/logdna.vue +56 -0
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +102 -0
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +144 -0
- package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +71 -0
- package/edit/logging.banzaicloud.io.output/providers/s3.vue +102 -0
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +154 -0
- package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +59 -0
- package/edit/logging.banzaicloud.io.output/providers/syslog.vue +189 -0
- package/edit/logging.banzaicloud.io.output/providers/utils.js +27 -0
- package/edit/management.cattle.io.clusterroletemplatebinding.vue +68 -0
- package/edit/management.cattle.io.fleetworkspace.vue +92 -0
- package/edit/management.cattle.io.globalrole.vue +8 -0
- package/edit/management.cattle.io.project.vue +271 -0
- package/edit/management.cattle.io.projectroletemplatebinding.vue +95 -0
- package/edit/management.cattle.io.roletemplate.vue +8 -0
- package/edit/management.cattle.io.setting.vue +157 -0
- package/edit/management.cattle.io.user.vue +251 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +310 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +261 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +367 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +144 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/tls.vue +263 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +126 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +252 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +171 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +133 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +183 -0
- package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +497 -0
- package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +192 -0
- package/edit/monitoring.coreos.com.prometheusrule/RecordingRule.vue +106 -0
- package/edit/monitoring.coreos.com.prometheusrule/duration.js +41 -0
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +192 -0
- package/edit/monitoring.coreos.com.receiver/auth.vue +113 -0
- package/edit/monitoring.coreos.com.receiver/index.vue +282 -0
- package/edit/monitoring.coreos.com.receiver/tls.vue +55 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +78 -0
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +211 -0
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +79 -0
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +89 -0
- package/edit/monitoring.coreos.com.receiver/types/webhook.add.vue +65 -0
- package/edit/monitoring.coreos.com.receiver/types/webhook.banner.vue +24 -0
- package/edit/monitoring.coreos.com.receiver/types/webhook.vue +68 -0
- package/edit/monitoring.coreos.com.route.vue +179 -0
- package/edit/namespace.vue +213 -0
- package/edit/network.harvesterhci.io.clusternetwork/index.vue +19 -0
- package/edit/network.harvesterhci.io.clusternetwork/vlan.vue +134 -0
- package/edit/networking.istio.io.destinationrule/LoadBalancer.vue +185 -0
- package/edit/networking.istio.io.destinationrule/index.vue +233 -0
- package/edit/networking.k8s.io.ingress/Certificate.vue +119 -0
- package/edit/networking.k8s.io.ingress/Certificates.vue +101 -0
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +117 -0
- package/edit/networking.k8s.io.ingress/Rule.vue +133 -0
- package/edit/networking.k8s.io.ingress/RulePath.vue +178 -0
- package/edit/networking.k8s.io.ingress/Rules.vue +133 -0
- package/edit/networking.k8s.io.ingress/index.vue +150 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +91 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +50 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +287 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +93 -0
- package/edit/networking.k8s.io.networkpolicy/index.vue +267 -0
- package/edit/node.vue +69 -0
- package/edit/persistentvolume/index.vue +298 -0
- package/edit/persistentvolume/plugins/awsElasticBlockStore.vue +74 -0
- package/edit/persistentvolume/plugins/azureDisk.vue +119 -0
- package/edit/persistentvolume/plugins/azureFile.vue +63 -0
- package/edit/persistentvolume/plugins/cephfs.vue +80 -0
- package/edit/persistentvolume/plugins/cinder.vue +69 -0
- package/edit/persistentvolume/plugins/csi.vue +107 -0
- package/edit/persistentvolume/plugins/fc.vue +82 -0
- package/edit/persistentvolume/plugins/flexVolume.vue +77 -0
- package/edit/persistentvolume/plugins/flocker.vue +35 -0
- package/edit/persistentvolume/plugins/gcePersistentDisk.vue +74 -0
- package/edit/persistentvolume/plugins/glusterfs.vue +60 -0
- package/edit/persistentvolume/plugins/hostPath.vue +72 -0
- package/edit/persistentvolume/plugins/iscsi.vue +125 -0
- package/edit/persistentvolume/plugins/local.vue +32 -0
- package/edit/persistentvolume/plugins/longhorn.vue +88 -0
- package/edit/persistentvolume/plugins/nfs.vue +60 -0
- package/edit/persistentvolume/plugins/photonPersistentDisk.vue +48 -0
- package/edit/persistentvolume/plugins/portworxVolume.vue +61 -0
- package/edit/persistentvolume/plugins/quobyte.vue +68 -0
- package/edit/persistentvolume/plugins/rbd.vue +88 -0
- package/edit/persistentvolume/plugins/scaleIO.vue +101 -0
- package/edit/persistentvolume/plugins/storageos.vue +73 -0
- package/edit/persistentvolume/plugins/vsphereVolume.vue +43 -0
- package/edit/persistentvolumeclaim.vue +271 -0
- package/edit/provisioning.cattle.io.cluster/ACE.vue +82 -0
- package/edit/provisioning.cattle.io.cluster/AgentEnv.vue +37 -0
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +242 -0
- package/edit/provisioning.cattle.io.cluster/DrainOptions.vue +129 -0
- package/edit/provisioning.cattle.io.cluster/Labels.vue +30 -0
- package/edit/provisioning.cattle.io.cluster/MachinePool.vue +239 -0
- package/edit/provisioning.cattle.io.cluster/RegistryConfigs.vue +154 -0
- package/edit/provisioning.cattle.io.cluster/RegistryMirrors.vue +75 -0
- package/edit/provisioning.cattle.io.cluster/S3Config.vue +121 -0
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +288 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/CustomCommand.tests.ts +42 -0
- package/edit/provisioning.cattle.io.cluster/import.vue +174 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +505 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +2095 -0
- package/edit/rbac.authorization.k8s.io.clusterrole.vue +8 -0
- package/edit/rbac.authorization.k8s.io.role.vue +8 -0
- package/edit/resources.cattle.io.backup.vue +252 -0
- package/edit/resources.cattle.io.restore.vue +264 -0
- package/edit/secret/basic.vue +54 -0
- package/edit/secret/generic.vue +63 -0
- package/edit/secret/index.vue +307 -0
- package/edit/secret/registry.vue +127 -0
- package/edit/secret/ssh.vue +74 -0
- package/edit/secret/tls.vue +86 -0
- package/edit/service.vue +487 -0
- package/edit/serviceaccount.vue +148 -0
- package/edit/storage.k8s.io.storageclass/index.vue +212 -0
- package/edit/storage.k8s.io.storageclass/provisioners/custom.vue +20 -0
- package/edit/storage.k8s.io.storageclass/provisioners/driver.longhorn.io.vue +35 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +159 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-disk.vue +65 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-file.vue +32 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/cinder.vue +58 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +105 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/glusterfs.vue +54 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/no-provisioner.vue +21 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/portworx-volume.vue +48 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/quobyte.vue +51 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/rbd.vue +62 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/scaleio.vue +76 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/storageos.vue +40 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +67 -0
- package/edit/token.vue +275 -0
- package/edit/ui.cattle.io.navlink.vue +430 -0
- package/edit/workload/Job.vue +235 -0
- package/edit/workload/Upgrading.vue +294 -0
- package/edit/workload/VolumeClaimTemplate.vue +136 -0
- package/edit/workload/index.vue +1106 -0
- package/edit/workload/storage/Mount.vue +153 -0
- package/edit/workload/storage/__tests__/Mount.test.ts +98 -0
- package/edit/workload/storage/__tests__/Storage.test.ts +21 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +54 -0
- package/edit/workload/storage/azureDisk.vue +80 -0
- package/edit/workload/storage/azureFile.vue +52 -0
- package/edit/workload/storage/csi/driver.longhorn.io.vue +41 -0
- package/edit/workload/storage/csi/index.vue +65 -0
- package/edit/workload/storage/ephemeralVolume/index.vue +76 -0
- package/edit/workload/storage/gcePersistentDisk.vue +47 -0
- package/edit/workload/storage/hostPath.vue +100 -0
- package/edit/workload/storage/index.vue +360 -0
- package/edit/workload/storage/nfs.vue +78 -0
- package/edit/workload/storage/persistentVolumeClaim/index.vue +144 -0
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +224 -0
- package/edit/workload/storage/secret.vue +181 -0
- package/edit/workload/storage/vsphereVolume.vue +55 -0
- package/layouts/blank.vue +17 -0
- package/layouts/default.vue +827 -0
- package/layouts/error.vue +119 -0
- package/layouts/home.vue +84 -0
- package/layouts/plain.vue +89 -0
- package/layouts/unauthenticated.vue +26 -0
- package/list/catalog.cattle.io.app.vue +50 -0
- package/list/catalog.cattle.io.clusterrepo.vue +90 -0
- package/list/cis.cattle.io.clusterscan.vue +64 -0
- package/list/fleet.cattle.io.bundle.vue +108 -0
- package/list/fleet.cattle.io.cluster.vue +79 -0
- package/list/fleet.cattle.io.clustergroup.vue +71 -0
- package/list/fleet.cattle.io.clusterregistrationtoken.vue +81 -0
- package/list/fleet.cattle.io.gitrepo.vue +57 -0
- package/list/group.principal.vue +143 -0
- package/list/harvesterhci.io.cloudtemplate.vue +78 -0
- package/list/harvesterhci.io.dashboard/HarvesterUpgrade.vue +210 -0
- package/list/harvesterhci.io.dashboard/index.vue +774 -0
- package/list/harvesterhci.io.host/index.vue +174 -0
- package/list/harvesterhci.io.management.cluster.vue +181 -0
- package/list/harvesterhci.io.networkattachmentdefinition.vue +167 -0
- package/list/harvesterhci.io.setting.vue +241 -0
- package/list/harvesterhci.io.virtualmachinebackup.vue +172 -0
- package/list/harvesterhci.io.virtualmachineimage.vue +47 -0
- package/list/harvesterhci.io.virtualmachinetemplateversion.vue +177 -0
- package/list/harvesterhci.io.volume.vue +122 -0
- package/list/helm.cattle.io.projecthelmchart.vue +124 -0
- package/list/kubevirt.io.virtualmachine.vue +191 -0
- package/list/logging.banzaicloud.io.clusterflow.vue +36 -0
- package/list/logging.banzaicloud.io.flow.vue +41 -0
- package/list/management.cattle.io.cluster.vue +31 -0
- package/list/management.cattle.io.feature.vue +306 -0
- package/list/management.cattle.io.setting.vue +166 -0
- package/list/management.cattle.io.user.vue +121 -0
- package/list/monitoring.coreos.com.alertmanagerconfig.vue +89 -0
- package/list/namespace.vue +44 -0
- package/list/node.vue +191 -0
- package/list/persistentvolume.vue +27 -0
- package/list/provisioning.cattle.io.cluster.vue +162 -0
- package/list/service.vue +43 -0
- package/list/ui.cattle.io.navlink.vue +49 -0
- package/list/workload.vue +130 -0
- package/machine-config/amazonec2.vue +664 -0
- package/machine-config/azure.vue +445 -0
- package/machine-config/digitalocean.vue +228 -0
- package/machine-config/generic.vue +101 -0
- package/machine-config/harvester.vue +528 -0
- package/machine-config/linode.vue +186 -0
- package/machine-config/vmwarevsphere.vue +1018 -0
- package/middleware/authenticated.js +387 -0
- package/middleware/i18n.js +10 -0
- package/mixins/auth-config.js +304 -0
- package/mixins/back-link.js +15 -0
- package/mixins/brand.js +122 -0
- package/mixins/chart.js +384 -0
- package/mixins/child-hook.js +82 -0
- package/mixins/closeable.js +47 -0
- package/mixins/compact-input.js +24 -0
- package/mixins/create-edit-view/impl.js +200 -0
- package/mixins/create-edit-view/index.js +46 -0
- package/mixins/harvester-vm/impl.js +267 -0
- package/mixins/harvester-vm/index.js +1313 -0
- package/mixins/labeled-form-element.js +137 -0
- package/mixins/login.js +31 -0
- package/mixins/metric-poller.js +19 -0
- package/mixins/page-actions.js +34 -0
- package/mixins/v1-workload-metrics.js +43 -0
- package/mixins/vue-select-overrides.js +98 -0
- package/models/app.js +25 -0
- package/models/apps.daemonset.js +4 -0
- package/models/apps.deployment.js +13 -0
- package/models/apps.replicaset.js +4 -0
- package/models/apps.statefulset.js +4 -0
- package/models/autoscaling.horizontalpodautoscaler.js +44 -0
- package/models/batch.cronjob.js +71 -0
- package/models/batch.job.js +4 -0
- package/models/catalog.cattle.io.app.js +315 -0
- package/models/catalog.cattle.io.clusterrepo.js +163 -0
- package/models/catalog.cattle.io.operation.js +43 -0
- package/models/catalog.cattle.io.repo.js +4 -0
- package/models/chart.js +50 -0
- package/models/chartinstallaction.js +17 -0
- package/models/chartupgradeaction.js +12 -0
- package/models/cis.cattle.io.clusterscan.js +157 -0
- package/models/cis.cattle.io.clusterscanbenchmark.js +18 -0
- package/models/cis.cattle.io.clusterscanprofile.js +14 -0
- package/models/cis.cattle.io.clusterscanreport.js +62 -0
- package/models/cloudcredential.js +172 -0
- package/models/cluster/node.js +411 -0
- package/models/cluster.x-k8s.io.machine.js +244 -0
- package/models/cluster.x-k8s.io.machinedeployment.js +196 -0
- package/models/cluster.x-k8s.io.machineset.js +23 -0
- package/models/clusterroletemplatebinding.js +27 -0
- package/models/configmap.js +20 -0
- package/models/constraints.gatekeeper.sh.constraint.js +75 -0
- package/models/etcdbackup.js +40 -0
- package/models/event.js +23 -0
- package/models/fleet.cattle.io.bundle.js +132 -0
- package/models/fleet.cattle.io.cluster.js +133 -0
- package/models/fleet.cattle.io.clustergroup.js +62 -0
- package/models/fleet.cattle.io.clusterregistrationtoken.js +14 -0
- package/models/fleet.cattle.io.gitrepo.js +315 -0
- package/models/group.principal.js +71 -0
- package/models/harvester/configmap.js +32 -0
- package/models/harvester/harvesterhci.io.blockdevice.js +55 -0
- package/models/harvester/harvesterhci.io.keypair.js +12 -0
- package/models/harvester/harvesterhci.io.setting.js +127 -0
- package/models/harvester/harvesterhci.io.supportbundle.js +35 -0
- package/models/harvester/harvesterhci.io.upgrade.js +226 -0
- package/models/harvester/harvesterhci.io.virtualmachinebackup.js +113 -0
- package/models/harvester/harvesterhci.io.virtualmachineimage.js +252 -0
- package/models/harvester/harvesterhci.io.virtualmachinerestore.js +43 -0
- package/models/harvester/harvesterhci.io.virtualmachinetemplate.js +69 -0
- package/models/harvester/harvesterhci.io.virtualmachinetemplateversion.js +218 -0
- package/models/harvester/k8s.cni.cncf.io.networkattachmentdefinition.js +32 -0
- package/models/harvester/kubevirt.io.virtualmachine.js +850 -0
- package/models/harvester/kubevirt.io.virtualmachineinstance.js +142 -0
- package/models/harvester/management.cattle.io.managedchart.js +191 -0
- package/models/harvester/management.cattle.io.setting.js +40 -0
- package/models/harvester/network.harvesterhci.io.clusternetwork.js +100 -0
- package/models/harvester/network.harvesterhci.io.nodenetwork.js +34 -0
- package/models/harvester/node.js +260 -0
- package/models/harvester/persistentvolumeclaim.js +166 -0
- package/models/harvester/pod.js +185 -0
- package/models/harvesterhci.io.management.cluster.js +33 -0
- package/models/helm.cattle.io.projecthelmchart.js +39 -0
- package/models/k8s.cni.cncf.io.networkattachmentdefinition.js +93 -0
- package/models/logging.banzaicloud.io.clusterflow.js +36 -0
- package/models/logging.banzaicloud.io.clusteroutput.js +4 -0
- package/models/logging.banzaicloud.io.flow.js +110 -0
- package/models/logging.banzaicloud.io.output.js +161 -0
- package/models/management.cattle.io.authconfig.js +69 -0
- package/models/management.cattle.io.cluster.js +427 -0
- package/models/management.cattle.io.clusterroletemplatebinding.js +130 -0
- package/models/management.cattle.io.feature.js +56 -0
- package/models/management.cattle.io.fleetworkspace.js +74 -0
- package/models/management.cattle.io.globalrole.js +127 -0
- package/models/management.cattle.io.globalrolebinding.js +59 -0
- package/models/management.cattle.io.kontainerdriver.js +68 -0
- package/models/management.cattle.io.node.js +139 -0
- package/models/management.cattle.io.nodepool.js +167 -0
- package/models/management.cattle.io.nodetemplate.js +139 -0
- package/models/management.cattle.io.project.js +135 -0
- package/models/management.cattle.io.projectroletemplatebinding.js +150 -0
- package/models/management.cattle.io.roletemplate.js +173 -0
- package/models/management.cattle.io.setting.js +42 -0
- package/models/management.cattle.io.user.js +201 -0
- package/models/metrics.k8s.io.nodemetrics.js +41 -0
- package/models/monitoring.coreos.com.alertmanagerconfig.js +125 -0
- package/models/monitoring.coreos.com.podmonitor.js +23 -0
- package/models/monitoring.coreos.com.prometheusrule.js +29 -0
- package/models/monitoring.coreos.com.receiver.js +195 -0
- package/models/monitoring.coreos.com.route.js +162 -0
- package/models/monitoring.coreos.com.servicemonitor.js +23 -0
- package/models/namespace.js +189 -0
- package/models/networking.istio.io.destinationrule.js +20 -0
- package/models/networking.k8s.io.ingress.js +196 -0
- package/models/persistentvolume.js +142 -0
- package/models/persistentvolumeclaim.js +18 -0
- package/models/pod.js +183 -0
- package/models/principal.js +42 -0
- package/models/projectroletemplatebinding.js +20 -0
- package/models/provisioning.cattle.io.cluster.js +617 -0
- package/models/rbac.authorization.k8s.io.clusterrole.js +17 -0
- package/models/rbac.authorization.k8s.io.role.js +52 -0
- package/models/replicationcontroller.js +4 -0
- package/models/resources.cattle.io.backup.js +29 -0
- package/models/resources.cattle.io.restore.js +33 -0
- package/models/rke-machine-config.cattle.io.harvesterconfig.js +19 -0
- package/models/rke-machine.cattle.io.amazonec2machinetemplate.js +15 -0
- package/models/rke-machine.cattle.io.azuremachinetemplate.js +15 -0
- package/models/rke-machine.cattle.io.digitaloceanmachinetemplate.js +15 -0
- package/models/rke-machine.cattle.io.linodemachinetemplate.js +15 -0
- package/models/rke-machine.cattle.io.machinetemplate.js +22 -0
- package/models/rke-machine.cattle.io.vmwarevspheremachinetemplate.js +14 -0
- package/models/rke.cattle.io.etcdsnapshot.js +69 -0
- package/models/schema.js +17 -0
- package/models/secret.js +352 -0
- package/models/service.js +179 -0
- package/models/storage.k8s.io.storageclass.js +121 -0
- package/models/templates.gatekeeper.sh.constrainttemplate.js +23 -0
- package/models/token.js +19 -0
- package/models/ui.cattle.io.navlink.js +38 -0
- package/models/workload.js +853 -0
- package/nuxt.config.js +683 -0
- package/package.json +165 -0
- package/pages/about.vue +209 -0
- package/pages/account/create-key.vue +17 -0
- package/pages/account/index.vue +227 -0
- package/pages/auth/login.vue +426 -0
- package/pages/auth/logout.vue +18 -0
- package/pages/auth/setup.vue +430 -0
- package/pages/auth/verify.vue +134 -0
- package/pages/c/_cluster/_product/_resource/_id.vue +12 -0
- package/pages/c/_cluster/_product/_resource/_namespace/_id.vue +12 -0
- package/pages/c/_cluster/_product/_resource/create.vue +12 -0
- package/pages/c/_cluster/_product/_resource/index.vue +12 -0
- package/pages/c/_cluster/_product/index.vue +15 -0
- package/pages/c/_cluster/_product/members/index.vue +91 -0
- package/pages/c/_cluster/_product/namespaces.vue +75 -0
- package/pages/c/_cluster/_product/projectsnamespaces.vue +301 -0
- package/pages/c/_cluster/apps/charts/chart.vue +307 -0
- package/pages/c/_cluster/apps/charts/index.vue +595 -0
- package/pages/c/_cluster/apps/charts/install.vue +1638 -0
- package/pages/c/_cluster/apps/index.vue +17 -0
- package/pages/c/_cluster/auth/config/_id.vue +32 -0
- package/pages/c/_cluster/auth/config/index.vue +104 -0
- package/pages/c/_cluster/auth/group.principal/assign-edit.vue +133 -0
- package/pages/c/_cluster/auth/index.vue +19 -0
- package/pages/c/_cluster/auth/roles/_resource/_id.vue +12 -0
- package/pages/c/_cluster/auth/roles/_resource/create.vue +12 -0
- package/pages/c/_cluster/auth/roles/index.vue +193 -0
- package/pages/c/_cluster/backup/index.vue +11 -0
- package/pages/c/_cluster/cis/index.vue +11 -0
- package/pages/c/_cluster/ecm/index.vue +16 -0
- package/pages/c/_cluster/explorer/ConfigBadge.vue +55 -0
- package/pages/c/_cluster/explorer/EventsTable.vue +88 -0
- package/pages/c/_cluster/explorer/explorer-utils.js +17 -0
- package/pages/c/_cluster/explorer/index.vue +559 -0
- package/pages/c/_cluster/explorer/tools/index.vue +482 -0
- package/pages/c/_cluster/explorer/tools/pages/_page.vue +26 -0
- package/pages/c/_cluster/fleet/index.vue +474 -0
- package/pages/c/_cluster/gatekeeper/constraints/index.vue +90 -0
- package/pages/c/_cluster/gatekeeper/index.vue +67 -0
- package/pages/c/_cluster/harvester/airgapupgrade/index.vue +306 -0
- package/pages/c/_cluster/harvester/console/_uid/serial.vue +51 -0
- package/pages/c/_cluster/harvester/console/_uid/vnc.vue +46 -0
- package/pages/c/_cluster/harvester/index.vue +24 -0
- package/pages/c/_cluster/harvester/support/index.vue +154 -0
- package/pages/c/_cluster/harvesterManager/index.vue +24 -0
- package/pages/c/_cluster/index.vue +17 -0
- package/pages/c/_cluster/istio/index.vue +139 -0
- package/pages/c/_cluster/legacy/index.vue +22 -0
- package/pages/c/_cluster/legacy/pages/_page.vue +26 -0
- package/pages/c/_cluster/legacy/project/_page.vue +54 -0
- package/pages/c/_cluster/legacy/project/index.vue +29 -0
- package/pages/c/_cluster/legacy/project/pipelines.vue +74 -0
- package/pages/c/_cluster/logging/index.vue +87 -0
- package/pages/c/_cluster/longhorn/index.vue +68 -0
- package/pages/c/_cluster/manager/cloudCredential/_id.vue +16 -0
- package/pages/c/_cluster/manager/cloudCredential/create.vue +16 -0
- package/pages/c/_cluster/manager/cloudCredential/index.vue +89 -0
- package/pages/c/_cluster/manager/index.vue +22 -0
- package/pages/c/_cluster/manager/pages/_page.vue +23 -0
- package/pages/c/_cluster/mcapps/index.vue +21 -0
- package/pages/c/_cluster/mcapps/pages/_page.vue +22 -0
- package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/index.vue +12 -0
- package/pages/c/_cluster/monitoring/alertmanagerconfig/_alertmanagerconfigid/receiver.vue +310 -0
- package/pages/c/_cluster/monitoring/alertmanagerconfig/index.vue +24 -0
- package/pages/c/_cluster/monitoring/index.vue +207 -0
- package/pages/c/_cluster/monitoring/monitor/_namespace/_id.vue +19 -0
- package/pages/c/_cluster/monitoring/monitor/create.vue +27 -0
- package/pages/c/_cluster/monitoring/monitor/index.vue +81 -0
- package/pages/c/_cluster/monitoring/route-receiver/_id.vue +27 -0
- package/pages/c/_cluster/monitoring/route-receiver/create.vue +19 -0
- package/pages/c/_cluster/monitoring/route-receiver/index.vue +114 -0
- package/pages/c/_cluster/navlinks/_group.vue +42 -0
- package/pages/c/_cluster/neuvector/index.vue +66 -0
- package/pages/c/_cluster/settings/banners.vue +279 -0
- package/pages/c/_cluster/settings/brand.vue +344 -0
- package/pages/c/_cluster/settings/index.vue +22 -0
- package/pages/c/index.vue +9 -0
- package/pages/clusters/index.vue +21 -0
- package/pages/docs/_doc.vue +320 -0
- package/pages/docs/toc.js +27 -0
- package/pages/fail-whale.vue +111 -0
- package/pages/home.vue +447 -0
- package/pages/index.vue +22 -0
- package/pages/plugins.vue +387 -0
- package/pages/prefs.vue +233 -0
- package/pages/rio/mesh.vue +505 -0
- package/pages/support/index.vue +284 -0
- package/pkg/auto-import.js +81 -0
- package/pkg/babel.config.js +8 -0
- package/pkg/dynamic-importer.lib.js +62 -0
- package/pkg/import.js +10 -0
- package/pkg/model-loader.lib.js +3 -0
- package/pkg/tsconfig.json +49 -0
- package/pkg/vue.config.js +120 -0
- package/plugins/axios.js +67 -0
- package/plugins/back-button.js +5 -0
- package/plugins/codemirror-loader.js +5 -0
- package/plugins/codemirror.js +169 -0
- package/plugins/dashboard-store/actions.js +443 -0
- package/plugins/dashboard-store/classify.js +35 -0
- package/plugins/dashboard-store/extensions.js +22 -0
- package/plugins/dashboard-store/getters.js +287 -0
- package/plugins/dashboard-store/index.js +158 -0
- package/plugins/dashboard-store/model-loader.js +73 -0
- package/plugins/dashboard-store/mutations.js +262 -0
- package/plugins/dashboard-store/normalize.js +48 -0
- package/plugins/dashboard-store/rehydrate-all.js +44 -0
- package/plugins/dashboard-store/resource-class.js +1813 -0
- package/plugins/directives.js +41 -0
- package/plugins/extend-router.js +60 -0
- package/plugins/global-formatters.js +10 -0
- package/plugins/i18n.js +101 -0
- package/plugins/int-number.js +19 -0
- package/plugins/js-yaml.js +4 -0
- package/plugins/lookup.js +50 -0
- package/plugins/nuxt-client-init.js +3 -0
- package/plugins/plugin.js +22 -0
- package/plugins/portal.js +4 -0
- package/plugins/replaceall.js +19 -0
- package/plugins/resize.js +5 -0
- package/plugins/shortkey.js +4 -0
- package/plugins/steve/actions.js +373 -0
- package/plugins/steve/getters.js +105 -0
- package/plugins/steve/hybrid-class.js +103 -0
- package/plugins/steve/index.js +70 -0
- package/plugins/steve/mutations.js +27 -0
- package/plugins/steve/norman-class.js +51 -0
- package/plugins/steve/performanceTesting.js +123 -0
- package/plugins/steve/steve-class.js +31 -0
- package/plugins/steve/subscribe.js +633 -0
- package/plugins/steve/urloptions.js +47 -0
- package/plugins/tooltip.js +4 -0
- package/plugins/transitions.js +4 -0
- package/plugins/trim-whitespace.js +37 -0
- package/plugins/v-select.js +4 -0
- package/plugins/vue-clipboard2.js +4 -0
- package/plugins/vue-js-modal.js +4 -0
- package/promptRemove/kubevirt.io.virtualmachine.vue +178 -0
- package/scripts/build-pkg.sh +51 -0
- package/scripts/pkgfile.js +23 -0
- package/scripts/publish-pkg.sh +18 -0
- package/scripts/publish-shell.sh +52 -0
- package/scripts/serve-pkgs +62 -0
- package/server/server-middleware.js +19 -0
- package/server/server.crt +22 -0
- package/server/server.csr +16 -0
- package/server/server.key +27 -0
- package/server/v3.ext +8 -0
- package/server/verdaccio-middleware.js +56 -0
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +39 -0
- package/store/action-menu.js +229 -0
- package/store/auth.js +329 -0
- package/store/aws.js +209 -0
- package/store/catalog.js +661 -0
- package/store/digitalocean.js +198 -0
- package/store/features.js +66 -0
- package/store/github.js +252 -0
- package/store/growl.js +89 -0
- package/store/harvester-common.js +126 -0
- package/store/i18n.js +318 -0
- package/store/index.js +1073 -0
- package/store/linode.js +142 -0
- package/store/plugins.js +222 -0
- package/store/prefs.js +484 -0
- package/store/type-map.js +1839 -0
- package/store/uiplugins.ts +112 -0
- package/store/wm.js +84 -0
- package/types/index.d.ts +7 -0
- package/utils/__tests__/array.test.ts +502 -0
- package/utils/__tests__/object.test.ts +152 -0
- package/utils/__tests__/selector.test.ts +444 -0
- package/utils/alertmanagerconfig.js +162 -0
- package/utils/array.ts +179 -0
- package/utils/auth.js +81 -0
- package/utils/aws.js +0 -0
- package/utils/cluster.js +45 -0
- package/utils/color.js +92 -0
- package/utils/computed.js +45 -0
- package/utils/create-yaml.js +359 -0
- package/utils/crypto/LICENSE.txt +15 -0
- package/utils/crypto/browserHashUtils.js +33 -0
- package/utils/crypto/browserMd5.js +183 -0
- package/utils/crypto/browserSha1.js +149 -0
- package/utils/crypto/browserSha256.js +237 -0
- package/utils/crypto/index.js +181 -0
- package/utils/custom-validators.js +45 -0
- package/utils/download.js +35 -0
- package/utils/dynamic-importer.js +120 -0
- package/utils/ember-page.js +30 -0
- package/utils/error.js +80 -0
- package/utils/gatekeeper/util.js +35 -0
- package/utils/grafana.js +87 -0
- package/utils/group.js +70 -0
- package/utils/install-redirect.js +55 -0
- package/utils/monitoring.js +73 -0
- package/utils/namespace-filter.js +31 -0
- package/utils/object.js +338 -0
- package/utils/parse-externalid.js +139 -0
- package/utils/platform.js +64 -0
- package/utils/poller-sequential.js +53 -0
- package/utils/poller.js +39 -0
- package/utils/position.js +175 -0
- package/utils/promise.js +95 -0
- package/utils/queue.js +70 -0
- package/utils/router.js +27 -0
- package/utils/select.js +67 -0
- package/utils/selector.js +227 -0
- package/utils/socket.js +315 -0
- package/utils/sort.js +225 -0
- package/utils/stream.js +49 -0
- package/utils/string.js +286 -0
- package/utils/time.js +56 -0
- package/utils/type-helpers.ts +9 -0
- package/utils/units.js +184 -0
- package/utils/url.ts +171 -0
- package/utils/validators/cidr.js +5 -0
- package/utils/validators/cluster-name.js +12 -0
- package/utils/validators/container-images.js +24 -0
- package/utils/validators/cron-schedule.js +9 -0
- package/utils/validators/flow-output.js +15 -0
- package/utils/validators/index.js +243 -0
- package/utils/validators/kubernetes-name.js +39 -0
- package/utils/validators/logging-outputs.js +11 -0
- package/utils/validators/monitoring-route.js +13 -0
- package/utils/validators/pod-affinity.js +128 -0
- package/utils/validators/prometheusrule.js +76 -0
- package/utils/validators/role-template.js +19 -0
- package/utils/validators/service.js +136 -0
- package/utils/validators/setting.js +48 -0
- package/utils/validators/vm-datavolumes.js +38 -0
- package/utils/validators/vm-image.js +32 -0
- package/utils/validators/vm.js +214 -0
- package/utils/version.js +127 -0
- package/utils/window.js +46 -0
|
@@ -0,0 +1,1313 @@
|
|
|
1
|
+
import jsyaml from 'js-yaml';
|
|
2
|
+
import isEqual from 'lodash/isEqual';
|
|
3
|
+
import isEmpty from 'lodash/isEmpty';
|
|
4
|
+
import difference from 'lodash/difference';
|
|
5
|
+
|
|
6
|
+
import { sortBy } from '@shell/utils/sort';
|
|
7
|
+
import { clone, set } from '@shell/utils/object';
|
|
8
|
+
import { allHash } from '@shell/utils/promise';
|
|
9
|
+
import { randomStr } from '@shell/utils/string';
|
|
10
|
+
import { base64Decode } from '@shell/utils/crypto';
|
|
11
|
+
import { formatSi, parseSi } from '@shell/utils/units';
|
|
12
|
+
import { SOURCE_TYPE, ACCESS_CREDENTIALS } from '@shell/config/harvester-map';
|
|
13
|
+
import { _CLONE } from '@shell/config/query-params';
|
|
14
|
+
import {
|
|
15
|
+
PVC, HCI, STORAGE_CLASS, NODE, SECRET, CONFIG_MAP, NETWORK_ATTACHMENT
|
|
16
|
+
} from '@shell/config/types';
|
|
17
|
+
import { HCI_SETTING } from '@shell/config/settings';
|
|
18
|
+
import { HCI as HCI_ANNOTATIONS, HOSTNAME } from '@shell/config/labels-annotations';
|
|
19
|
+
import impl, { QGA_JSON, USB_TABLET } from '@shell/mixins/harvester-vm/impl';
|
|
20
|
+
|
|
21
|
+
export const MANAGEMENT_NETWORK = 'management Network';
|
|
22
|
+
|
|
23
|
+
export const OS = [{
|
|
24
|
+
label: 'Windows',
|
|
25
|
+
value: 'windows'
|
|
26
|
+
}, {
|
|
27
|
+
label: 'Linux',
|
|
28
|
+
value: 'linux'
|
|
29
|
+
}, {
|
|
30
|
+
label: 'Debian',
|
|
31
|
+
value: 'debian'
|
|
32
|
+
}, {
|
|
33
|
+
label: 'Fedora',
|
|
34
|
+
value: 'fedora'
|
|
35
|
+
}, {
|
|
36
|
+
label: 'Gentoo',
|
|
37
|
+
value: 'gentoo'
|
|
38
|
+
}, {
|
|
39
|
+
label: 'Mandriva',
|
|
40
|
+
value: 'mandriva'
|
|
41
|
+
}, {
|
|
42
|
+
label: 'Oracle',
|
|
43
|
+
value: 'oracle'
|
|
44
|
+
}, {
|
|
45
|
+
label: 'Red Hat',
|
|
46
|
+
value: 'redhat'
|
|
47
|
+
}, {
|
|
48
|
+
label: 'openSUSE',
|
|
49
|
+
value: 'openSUSE',
|
|
50
|
+
}, {
|
|
51
|
+
label: 'Turbolinux',
|
|
52
|
+
value: 'turbolinux'
|
|
53
|
+
}, {
|
|
54
|
+
label: 'Ubuntu',
|
|
55
|
+
value: 'ubuntu'
|
|
56
|
+
}, {
|
|
57
|
+
label: 'Xandros',
|
|
58
|
+
value: 'xandros'
|
|
59
|
+
}, {
|
|
60
|
+
label: 'Other Linux',
|
|
61
|
+
match: ['centos'],
|
|
62
|
+
value: 'otherLinux'
|
|
63
|
+
}];
|
|
64
|
+
|
|
65
|
+
export const CD_ROM = 'cd-rom';
|
|
66
|
+
export const HARD_DISK = 'disk';
|
|
67
|
+
|
|
68
|
+
export default {
|
|
69
|
+
mixins: [impl],
|
|
70
|
+
|
|
71
|
+
props: {
|
|
72
|
+
value: {
|
|
73
|
+
type: Object,
|
|
74
|
+
required: true,
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
resource: {
|
|
78
|
+
type: String,
|
|
79
|
+
default: ''
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
async fetch() {
|
|
84
|
+
const hash = {
|
|
85
|
+
pvcs: this.$store.dispatch('harvester/findAll', { type: PVC }),
|
|
86
|
+
storageClasses: this.$store.dispatch('harvester/findAll', { type: STORAGE_CLASS }),
|
|
87
|
+
sshs: this.$store.dispatch('harvester/findAll', { type: HCI.SSH }),
|
|
88
|
+
settings: this.$store.dispatch('harvester/findAll', { type: HCI.SETTING }),
|
|
89
|
+
images: this.$store.dispatch('harvester/findAll', { type: HCI.IMAGE }),
|
|
90
|
+
versions: this.$store.dispatch('harvester/findAll', { type: HCI.VM_VERSION }),
|
|
91
|
+
templates: this.$store.dispatch('harvester/findAll', { type: HCI.VM_TEMPLATE }),
|
|
92
|
+
networkAttachment: this.$store.dispatch('harvester/findAll', { type: NETWORK_ATTACHMENT }),
|
|
93
|
+
vmis: this.$store.dispatch('harvester/findAll', { type: HCI.VMI }),
|
|
94
|
+
vmims: this.$store.dispatch('harvester/findAll', { type: HCI.VMIM }),
|
|
95
|
+
vms: this.$store.dispatch('harvester/findAll', { type: HCI.VM }),
|
|
96
|
+
secrets: this.$store.dispatch('harvester/findAll', { type: SECRET }),
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
if (this.$store.getters['harvester/schemaFor'](NODE)) {
|
|
100
|
+
hash.nodes = this.$store.dispatch('harvester/findAll', { type: NODE });
|
|
101
|
+
}
|
|
102
|
+
await allHash(hash);
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
data() {
|
|
106
|
+
const isClone = this.realMode === _CLONE;
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
OS,
|
|
110
|
+
isClone,
|
|
111
|
+
spec: null,
|
|
112
|
+
osType: 'linux',
|
|
113
|
+
sshKey: [],
|
|
114
|
+
runStrategy: 'RerunOnFailure',
|
|
115
|
+
installAgent: true,
|
|
116
|
+
hasCreateVolumes: [],
|
|
117
|
+
installUSBTablet: true,
|
|
118
|
+
networkScript: '',
|
|
119
|
+
userScript: '',
|
|
120
|
+
imageId: '',
|
|
121
|
+
diskRows: [],
|
|
122
|
+
networkRows: [],
|
|
123
|
+
machineType: '',
|
|
124
|
+
secretName: '',
|
|
125
|
+
secretRef: null,
|
|
126
|
+
showAdvanced: false,
|
|
127
|
+
deleteAgent: true,
|
|
128
|
+
memory: null,
|
|
129
|
+
cpu: '',
|
|
130
|
+
reservedMemory: null,
|
|
131
|
+
accessCredentials: [],
|
|
132
|
+
efiEnabled: false,
|
|
133
|
+
secureBoot: false,
|
|
134
|
+
userDataTemplateId: ''
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
computed: {
|
|
139
|
+
images() {
|
|
140
|
+
return this.$store.getters['harvester/all'](HCI.IMAGE);
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
versions() {
|
|
144
|
+
return this.$store.getters['harvester/all'](HCI.VM_VERSION);
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
templates() {
|
|
148
|
+
return this.$store.getters['harvester/all'](HCI.VM_TEMPLATE);
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
pvcs() {
|
|
152
|
+
return this.$store.getters['harvester/all'](PVC);
|
|
153
|
+
},
|
|
154
|
+
|
|
155
|
+
secrets() {
|
|
156
|
+
return this.$store.getters['harvester/all'](SECRET);
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
nodesIdOptions() {
|
|
160
|
+
const nodes = this.$store.getters['harvester/all'](NODE);
|
|
161
|
+
|
|
162
|
+
return nodes.filter(N => !N.isUnSchedulable).map((node) => {
|
|
163
|
+
return {
|
|
164
|
+
label: node.nameDisplay,
|
|
165
|
+
value: node.id
|
|
166
|
+
};
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
defaultStorageClass() {
|
|
171
|
+
const defaultStorage = this.$store.getters['harvester/all'](STORAGE_CLASS).find( O => O.isDefault);
|
|
172
|
+
|
|
173
|
+
return defaultStorage?.metadata?.name || 'longhorn';
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
storageClassSetting() {
|
|
177
|
+
try {
|
|
178
|
+
const storageClassValue = this.$store.getters['harvester/all'](HCI.SETTING).find( O => O.id === HCI_SETTING.DEFAULT_STORAGE_CLASS)?.value;
|
|
179
|
+
|
|
180
|
+
return JSON.parse(storageClassValue);
|
|
181
|
+
} catch (e) {
|
|
182
|
+
return {};
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
customDefaultStorageClass() {
|
|
187
|
+
return this.storageClassSetting.storageClass;
|
|
188
|
+
},
|
|
189
|
+
|
|
190
|
+
customVolumeMode() {
|
|
191
|
+
return this.storageClassSetting.volumeMode || 'Block';
|
|
192
|
+
},
|
|
193
|
+
|
|
194
|
+
customAccessMode() {
|
|
195
|
+
return this.storageClassSetting.accessModes || 'ReadWriteMany';
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
isWindows() {
|
|
199
|
+
return this.osType === 'windows';
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
needNewSecret() {
|
|
203
|
+
// When creating a template it is always necessary to create a new secret.
|
|
204
|
+
return this.resource === HCI.VM_VERSION || this.isCreate;
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
|
|
208
|
+
async created() {
|
|
209
|
+
await this.$store.dispatch('harvester/findAll', { type: SECRET });
|
|
210
|
+
|
|
211
|
+
this.getInitConfig({ value: this.value });
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
methods: {
|
|
215
|
+
getInitConfig(config) {
|
|
216
|
+
const { value } = config;
|
|
217
|
+
|
|
218
|
+
const vm = this.resource === HCI.VM ? value : this.resource === HCI.BACKUP ? this.value.status?.source : value.spec.vm;
|
|
219
|
+
|
|
220
|
+
const spec = vm?.spec;
|
|
221
|
+
|
|
222
|
+
if (!spec) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
const resources = spec.template.spec.domain.resources;
|
|
226
|
+
|
|
227
|
+
// If the user is created via yaml, there may be no "resources.limits": kubectl apply -f https://kubevirt.io/labs/manifests/vm.yaml
|
|
228
|
+
if (!resources?.limits || (resources?.limits && !resources?.limits?.memory && resources?.limits?.memory !== null)) {
|
|
229
|
+
spec.template.spec.domain.resources = {
|
|
230
|
+
...spec.template.spec.domain.resources,
|
|
231
|
+
limits: {
|
|
232
|
+
...spec.template.spec.domain.resources.limits,
|
|
233
|
+
memory: spec.template.spec.domain.resources.requests.memory
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
const runStrategy = spec.runStrategy || 'RerunOnFailure';
|
|
239
|
+
const machineType = value.machineType;
|
|
240
|
+
const cpu = spec.template.spec.domain?.cpu?.cores;
|
|
241
|
+
const memory = spec.template.spec.domain.resources.limits.memory;
|
|
242
|
+
const reservedMemory = vm.metadata?.annotations?.[HCI_ANNOTATIONS.VM_RESERVED_MEMORY];
|
|
243
|
+
|
|
244
|
+
const sshKey = this.getSSHFromAnnotation(spec) || [];
|
|
245
|
+
|
|
246
|
+
const imageId = this.getRootImageId(vm) || '';
|
|
247
|
+
const diskRows = this.getDiskRows(vm);
|
|
248
|
+
const networkRows = this.getNetworkRows(vm);
|
|
249
|
+
const hasCreateVolumes = this.getHasCreatedVolumes(spec) || [];
|
|
250
|
+
|
|
251
|
+
let { userData = undefined, networkData = undefined } = this.getSecretCloudData(spec);
|
|
252
|
+
|
|
253
|
+
if (this.resource === HCI.BACKUP) {
|
|
254
|
+
const secretBackups = this.value.status?.secretBackups;
|
|
255
|
+
|
|
256
|
+
if (secretBackups) {
|
|
257
|
+
const secretNetworkData = secretBackups[0]?.data?.networkdata || '';
|
|
258
|
+
const secretUserData = secretBackups[0]?.data?.userdata || '';
|
|
259
|
+
|
|
260
|
+
userData = base64Decode(secretUserData);
|
|
261
|
+
networkData = base64Decode(secretNetworkData);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
const osType = this.getOsType(vm) || 'linux';
|
|
265
|
+
|
|
266
|
+
userData = this.isCreate ? this.getInitUserData({ osType }) : userData;
|
|
267
|
+
const installUSBTablet = this.isInstallUSBTablet(spec);
|
|
268
|
+
const installAgent = this.isCreate ? true : this.hasInstallAgent(userData, osType, true);
|
|
269
|
+
const efiEnabled = this.isEfiEnabled(spec);
|
|
270
|
+
const secureBoot = this.isSecureBoot(spec);
|
|
271
|
+
|
|
272
|
+
const secretRef = this.getSecret(spec);
|
|
273
|
+
const accessCredentials = this.getAccessCredentials(spec);
|
|
274
|
+
|
|
275
|
+
if (Object.prototype.hasOwnProperty.call(spec, 'running')) {
|
|
276
|
+
delete spec.running;
|
|
277
|
+
spec.runStrategy = 'RerunOnFailure';
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
this.$set(this, 'spec', spec);
|
|
281
|
+
this.$set(this, 'runStrategy', runStrategy);
|
|
282
|
+
this.$set(this, 'secretRef', secretRef);
|
|
283
|
+
this.$set(this, 'accessCredentials', accessCredentials);
|
|
284
|
+
this.$set(this, 'userScript', userData);
|
|
285
|
+
this.$set(this, 'networkScript', networkData);
|
|
286
|
+
|
|
287
|
+
this.$set(this, 'sshKey', sshKey);
|
|
288
|
+
this.$set(this, 'osType', osType);
|
|
289
|
+
this.$set(this, 'installAgent', installAgent);
|
|
290
|
+
|
|
291
|
+
this.$set(this, 'cpu', cpu);
|
|
292
|
+
this.$set(this, 'memory', memory);
|
|
293
|
+
this.$set(this, 'reservedMemory', reservedMemory);
|
|
294
|
+
this.$set(this, 'machineType', machineType);
|
|
295
|
+
|
|
296
|
+
this.$set(this, 'installUSBTablet', installUSBTablet);
|
|
297
|
+
this.$set(this, 'efiEnabled', efiEnabled);
|
|
298
|
+
this.$set(this, 'secureBoot', secureBoot);
|
|
299
|
+
|
|
300
|
+
this.$set(this, 'hasCreateVolumes', hasCreateVolumes);
|
|
301
|
+
this.$set(this, 'networkRows', networkRows);
|
|
302
|
+
this.$set(this, 'imageId', imageId);
|
|
303
|
+
|
|
304
|
+
this.$set(this, 'diskRows', diskRows);
|
|
305
|
+
},
|
|
306
|
+
|
|
307
|
+
getDiskRows(vm) {
|
|
308
|
+
const namespace = vm.metadata.namespace;
|
|
309
|
+
const _volumes = vm.spec.template.spec.volumes || [];
|
|
310
|
+
const _disks = vm.spec.template.spec.domain.devices.disks || [];
|
|
311
|
+
const _volumeClaimTemplates = this.getVolumeClaimTemplates(vm);
|
|
312
|
+
|
|
313
|
+
let out = [];
|
|
314
|
+
|
|
315
|
+
if (_disks.length === 0) {
|
|
316
|
+
out.push({
|
|
317
|
+
id: randomStr(5),
|
|
318
|
+
source: SOURCE_TYPE.IMAGE,
|
|
319
|
+
name: 'disk-0',
|
|
320
|
+
accessMode: 'ReadWriteMany',
|
|
321
|
+
bus: 'virtio',
|
|
322
|
+
volumeName: '',
|
|
323
|
+
size: '10Gi',
|
|
324
|
+
type: HARD_DISK,
|
|
325
|
+
storageClassName: '',
|
|
326
|
+
image: this.imageId,
|
|
327
|
+
volumeMode: 'Block',
|
|
328
|
+
});
|
|
329
|
+
} else {
|
|
330
|
+
out = _disks.map( (DISK, index) => {
|
|
331
|
+
const volume = _volumes.find( V => V.name === DISK.name );
|
|
332
|
+
|
|
333
|
+
let size = '';
|
|
334
|
+
let image = '';
|
|
335
|
+
let source = '';
|
|
336
|
+
let realName = '';
|
|
337
|
+
let container = '';
|
|
338
|
+
let volumeName = '';
|
|
339
|
+
let accessMode = '';
|
|
340
|
+
let volumeMode = '';
|
|
341
|
+
let storageClassName = '';
|
|
342
|
+
let hotpluggable = false;
|
|
343
|
+
|
|
344
|
+
const type = DISK?.cdrom ? CD_ROM : HARD_DISK;
|
|
345
|
+
|
|
346
|
+
if (volume?.containerDisk) { // SOURCE_TYPE.CONTAINER
|
|
347
|
+
source = SOURCE_TYPE.CONTAINER;
|
|
348
|
+
container = volume.containerDisk.image;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (volume.persistentVolumeClaim && volume.persistentVolumeClaim?.claimName) {
|
|
352
|
+
volumeName = volume.persistentVolumeClaim.claimName;
|
|
353
|
+
const DVT = _volumeClaimTemplates.find( T => T.metadata.name === volumeName);
|
|
354
|
+
|
|
355
|
+
realName = volumeName;
|
|
356
|
+
// If the DVT can be found, it cannot be an existing volume
|
|
357
|
+
if (DVT) {
|
|
358
|
+
// has annotation (HCI_ANNOTATIONS.IMAGE_ID) => SOURCE_TYPE.IMAGE
|
|
359
|
+
if (DVT.metadata?.annotations?.[HCI_ANNOTATIONS.IMAGE_ID] !== undefined) {
|
|
360
|
+
image = DVT.metadata?.annotations?.[HCI_ANNOTATIONS.IMAGE_ID];
|
|
361
|
+
source = SOURCE_TYPE.IMAGE;
|
|
362
|
+
} else {
|
|
363
|
+
source = SOURCE_TYPE.NEW;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
const dataVolumeSpecPVC = DVT?.spec || {};
|
|
367
|
+
|
|
368
|
+
volumeMode = dataVolumeSpecPVC?.volumeMode;
|
|
369
|
+
accessMode = dataVolumeSpecPVC?.accessModes?.[0];
|
|
370
|
+
size = dataVolumeSpecPVC?.resources?.requests?.storage || '10Gi';
|
|
371
|
+
storageClassName = dataVolumeSpecPVC?.storageClassName;
|
|
372
|
+
} else { // SOURCE_TYPE.ATTACH_VOLUME
|
|
373
|
+
const allPVCs = this.$store.getters['harvester/all'](PVC);
|
|
374
|
+
const pvcResource = allPVCs.find( O => O.id === `${ namespace }/${ volume?.persistentVolumeClaim?.claimName }`);
|
|
375
|
+
|
|
376
|
+
source = SOURCE_TYPE.ATTACH_VOLUME;
|
|
377
|
+
accessMode = pvcResource?.spec?.accessModes?.[0] || 'ReadWriteMany';
|
|
378
|
+
size = pvcResource?.spec?.resources?.requests?.storage || '10Gi';
|
|
379
|
+
storageClassName = pvcResource?.spec?.storageClassName;
|
|
380
|
+
volumeMode = pvcResource?.spec?.volumeMode || 'Block';
|
|
381
|
+
volumeName = pvcResource?.metadata?.name || '';
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
hotpluggable = volume.persistentVolumeClaim.hotpluggable || false;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
const bus = DISK?.disk?.bus || DISK?.cdrom?.bus;
|
|
388
|
+
|
|
389
|
+
const bootOrder = DISK?.bootOrder ? DISK?.bootOrder : index;
|
|
390
|
+
|
|
391
|
+
const parseValue = parseSi(size);
|
|
392
|
+
|
|
393
|
+
const formatSize = formatSi(parseValue, {
|
|
394
|
+
increment: 1024,
|
|
395
|
+
addSuffix: false,
|
|
396
|
+
maxExponent: 3,
|
|
397
|
+
minExponent: 3,
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
const allVolumeStatus = JSON.parse(vm.metadata?.annotations?.[HCI_ANNOTATIONS.VM_VOLUME_STATUS] || '[]');
|
|
401
|
+
const volumeStatus = allVolumeStatus.find(volume => realName === volume.name);
|
|
402
|
+
|
|
403
|
+
return {
|
|
404
|
+
id: randomStr(5),
|
|
405
|
+
bootOrder,
|
|
406
|
+
source,
|
|
407
|
+
name: DISK.name,
|
|
408
|
+
realName,
|
|
409
|
+
bus,
|
|
410
|
+
volumeName,
|
|
411
|
+
container,
|
|
412
|
+
accessMode,
|
|
413
|
+
size: `${ formatSize }Gi`,
|
|
414
|
+
volumeMode: volumeMode || this.customVolumeMode,
|
|
415
|
+
image,
|
|
416
|
+
type,
|
|
417
|
+
storageClassName,
|
|
418
|
+
hotpluggable,
|
|
419
|
+
volumeStatus,
|
|
420
|
+
};
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
out = sortBy(out, 'bootOrder');
|
|
425
|
+
|
|
426
|
+
return out.filter( O => O.name !== 'cloudinitdisk');
|
|
427
|
+
},
|
|
428
|
+
|
|
429
|
+
getNetworkRows(vm) {
|
|
430
|
+
const networks = vm.spec.template.spec.networks || [];
|
|
431
|
+
const interfaces = vm.spec.template.spec.domain.devices.interfaces || [];
|
|
432
|
+
|
|
433
|
+
const out = interfaces.map( (I, index) => {
|
|
434
|
+
const network = networks.find( N => I.name === N.name);
|
|
435
|
+
|
|
436
|
+
const type = I.sriov ? 'sriov' : I.bridge ? 'bridge' : 'masquerade';
|
|
437
|
+
|
|
438
|
+
const isPod = !!network.pod;
|
|
439
|
+
|
|
440
|
+
return {
|
|
441
|
+
...I,
|
|
442
|
+
index,
|
|
443
|
+
type,
|
|
444
|
+
isPod,
|
|
445
|
+
model: I.model,
|
|
446
|
+
networkName: isPod ? MANAGEMENT_NETWORK : network?.multus?.networkName,
|
|
447
|
+
};
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
return out;
|
|
451
|
+
},
|
|
452
|
+
|
|
453
|
+
parseVM() {
|
|
454
|
+
this.parseOther();
|
|
455
|
+
this.parseAccessCredentials();
|
|
456
|
+
this.parseNetworkRows(this.networkRows);
|
|
457
|
+
this.parseDiskRows(this.diskRows);
|
|
458
|
+
},
|
|
459
|
+
|
|
460
|
+
parseOther() {
|
|
461
|
+
if (!this.spec.template.spec.domain.machine) {
|
|
462
|
+
this.$set(this.spec.template.spec.domain, 'machine', { type: this.machineType });
|
|
463
|
+
} else {
|
|
464
|
+
this.$set(this.spec.template.spec.domain.machine, 'type', this.machineType);
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
this.spec.template.spec.domain.cpu.cores = this.cpu;
|
|
468
|
+
this.spec.template.spec.domain.resources.limits.cpu = this.cpu;
|
|
469
|
+
this.spec.template.spec.domain.resources.limits.memory = this.memory;
|
|
470
|
+
|
|
471
|
+
// parse reserved memory
|
|
472
|
+
const vm = this.resource === HCI.VM ? this.value : this.value.spec.vm;
|
|
473
|
+
|
|
474
|
+
if (!this.reservedMemory) {
|
|
475
|
+
delete vm.metadata.annotations[HCI_ANNOTATIONS.VM_RESERVED_MEMORY];
|
|
476
|
+
} else {
|
|
477
|
+
vm.metadata.annotations[HCI_ANNOTATIONS.VM_RESERVED_MEMORY] = this.reservedMemory;
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
|
|
481
|
+
parseDiskRows(disk) {
|
|
482
|
+
const disks = [];
|
|
483
|
+
const volumes = [];
|
|
484
|
+
const diskNameLables = [];
|
|
485
|
+
const volumeClaimTemplates = [];
|
|
486
|
+
|
|
487
|
+
disk.forEach( (R, index) => {
|
|
488
|
+
const prefixName = this.value.metadata?.name || '';
|
|
489
|
+
|
|
490
|
+
let dataVolumeName = '';
|
|
491
|
+
|
|
492
|
+
if (R.source === SOURCE_TYPE.ATTACH_VOLUME) {
|
|
493
|
+
dataVolumeName = R.volumeName;
|
|
494
|
+
} else if (this.isClone || !this.hasCreateVolumes.includes(R.realName)) {
|
|
495
|
+
dataVolumeName = `${ prefixName }-${ R.name }-${ randomStr(5).toLowerCase() }`;
|
|
496
|
+
} else {
|
|
497
|
+
dataVolumeName = R.realName;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
const _disk = this.parseDisk(R, index);
|
|
501
|
+
const _volume = this.parseVolume(R, dataVolumeName);
|
|
502
|
+
const _dataVolumeTemplate = this.parseVolumeClaimTemplate(R, dataVolumeName);
|
|
503
|
+
|
|
504
|
+
disks.push(_disk);
|
|
505
|
+
volumes.push(_volume);
|
|
506
|
+
diskNameLables.push(dataVolumeName);
|
|
507
|
+
|
|
508
|
+
if (R.source !== SOURCE_TYPE.CONTAINER && R.source !== SOURCE_TYPE.ATTACH_VOLUME) {
|
|
509
|
+
volumeClaimTemplates.push(_dataVolumeTemplate);
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
|
|
513
|
+
if (!this.secretName || this.needNewSecret) {
|
|
514
|
+
this.secretName = this.generateSecretName(this.secretNamePrefix);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
if (!disks.find( D => D.name === 'cloudinitdisk')) {
|
|
518
|
+
if (this.networkScript || this.userScript || this.sshKey.length > 0) {
|
|
519
|
+
disks.push({
|
|
520
|
+
name: 'cloudinitdisk',
|
|
521
|
+
disk: { bus: 'virtio' }
|
|
522
|
+
});
|
|
523
|
+
|
|
524
|
+
volumes.push({
|
|
525
|
+
name: 'cloudinitdisk',
|
|
526
|
+
cloudInitNoCloud: {
|
|
527
|
+
secretRef: { name: this.secretName },
|
|
528
|
+
networkDataSecretRef: { name: this.secretName }
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
let spec = {
|
|
535
|
+
...this.spec,
|
|
536
|
+
runStrategy: this.runStrategy,
|
|
537
|
+
template: {
|
|
538
|
+
...this.spec.template,
|
|
539
|
+
metadata: {
|
|
540
|
+
...this.spec?.template?.metadata,
|
|
541
|
+
annotations: {
|
|
542
|
+
...this.spec?.template?.metadata?.annotations,
|
|
543
|
+
[HCI_ANNOTATIONS.SSH_NAMES]: JSON.stringify(this.sshKey)
|
|
544
|
+
},
|
|
545
|
+
labels: {
|
|
546
|
+
...this.spec?.template?.metadata?.labels,
|
|
547
|
+
[HCI_ANNOTATIONS.VM_NAME]: this.value?.metadata?.name,
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
spec: {
|
|
551
|
+
...this.spec.template?.spec,
|
|
552
|
+
domain: {
|
|
553
|
+
...this.spec.template?.spec?.domain,
|
|
554
|
+
devices: {
|
|
555
|
+
...this.spec.template?.spec?.domain?.devices,
|
|
556
|
+
disks,
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
volumes,
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
if (volumes.length === 0) {
|
|
565
|
+
delete spec.template.spec.volumes;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
if (this.resource === HCI.VM) {
|
|
569
|
+
if (!this.isSingle) {
|
|
570
|
+
spec = this.multiVMScheduler(spec);
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
this.$set(this.value.metadata, 'annotations', {
|
|
574
|
+
...this.value.metadata.annotations,
|
|
575
|
+
[HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE]: JSON.stringify(volumeClaimTemplates),
|
|
576
|
+
[HCI_ANNOTATIONS.NETWORK_IPS]: JSON.stringify(this.value.networkIps)
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
this.$set(this.value.metadata, 'labels', {
|
|
580
|
+
...this.value.metadata.labels,
|
|
581
|
+
[HCI_ANNOTATIONS.CREATOR]: 'harvester',
|
|
582
|
+
[HCI_ANNOTATIONS.OS]: this.osType
|
|
583
|
+
});
|
|
584
|
+
|
|
585
|
+
this.$set(this.value, 'spec', spec);
|
|
586
|
+
this.$set(this, 'spec', spec);
|
|
587
|
+
} else if (this.resource === HCI.VM_VERSION) {
|
|
588
|
+
this.$set(this.value.spec.vm, 'spec', spec);
|
|
589
|
+
this.$set(this.value.spec.vm.metadata, 'annotations', { ...this.value.spec.vm.metadata.annotations, [HCI_ANNOTATIONS.VOLUME_CLAIM_TEMPLATE]: JSON.stringify(volumeClaimTemplates) });
|
|
590
|
+
this.$set(this.value.spec.vm.metadata, 'labels', { [HCI_ANNOTATIONS.OS]: this.osType });
|
|
591
|
+
this.$set(this, 'spec', spec);
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
|
|
595
|
+
multiVMScheduler(spec) {
|
|
596
|
+
spec.template.metadata.labels[HCI_ANNOTATIONS.VM_NAME_PREFIX] = this.namePrefix;
|
|
597
|
+
|
|
598
|
+
const rule = {
|
|
599
|
+
weight: 1,
|
|
600
|
+
podAffinityTerm: {
|
|
601
|
+
topologyKey: HOSTNAME,
|
|
602
|
+
labelSelector: { matchLabels: { [HCI_ANNOTATIONS.VM_NAME_PREFIX]: this.namePrefix } }
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
return {
|
|
607
|
+
...spec,
|
|
608
|
+
template: {
|
|
609
|
+
...spec.template,
|
|
610
|
+
spec: {
|
|
611
|
+
...spec.template.spec,
|
|
612
|
+
affinity: {
|
|
613
|
+
...spec.template.spec.affinity,
|
|
614
|
+
podAntiAffinity: {
|
|
615
|
+
...spec.template.spec?.affinity?.podAntiAffinity,
|
|
616
|
+
preferredDuringSchedulingIgnoredDuringExecution: [
|
|
617
|
+
...(spec.template.spec?.affinity?.podAntiAffinity?.preferredDuringSchedulingIgnoredDuringExecution || []),
|
|
618
|
+
rule
|
|
619
|
+
]
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
},
|
|
626
|
+
|
|
627
|
+
parseNetworkRows(networkRow) {
|
|
628
|
+
const networks = [];
|
|
629
|
+
const interfaces = [];
|
|
630
|
+
|
|
631
|
+
networkRow.forEach( (R) => {
|
|
632
|
+
const _network = this.parseNetwork(R);
|
|
633
|
+
const _interface = this.parseInterface(R);
|
|
634
|
+
|
|
635
|
+
networks.push(_network);
|
|
636
|
+
interfaces.push(_interface);
|
|
637
|
+
});
|
|
638
|
+
|
|
639
|
+
const spec = {
|
|
640
|
+
...this.spec.template.spec,
|
|
641
|
+
domain: {
|
|
642
|
+
...this.spec.template.spec.domain,
|
|
643
|
+
devices: {
|
|
644
|
+
...this.spec.template.spec.domain.devices,
|
|
645
|
+
interfaces,
|
|
646
|
+
},
|
|
647
|
+
},
|
|
648
|
+
networks
|
|
649
|
+
};
|
|
650
|
+
|
|
651
|
+
this.$set(this.spec.template, 'spec', spec);
|
|
652
|
+
},
|
|
653
|
+
|
|
654
|
+
parseAccessCredentials() {
|
|
655
|
+
const out = [];
|
|
656
|
+
const annotations = {};
|
|
657
|
+
const users = JSON.parse(this.spec?.template?.metadata?.annotations?.[HCI_ANNOTATIONS.DYNAMIC_SSHKEYS_USERS] || '[]');
|
|
658
|
+
|
|
659
|
+
for (const row of this.accessCredentials) {
|
|
660
|
+
if (this.needNewSecret) {
|
|
661
|
+
row.secretName = this.generateSecretName(this.secretNamePrefix);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
if (row.source === ACCESS_CREDENTIALS.RESET_PWD) {
|
|
665
|
+
users.push(row.username);
|
|
666
|
+
out.push({
|
|
667
|
+
userPassword: {
|
|
668
|
+
source: { secret: { secretName: row.secretName } },
|
|
669
|
+
propagationMethod: { qemuGuestAgent: { } }
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
if (row.source === ACCESS_CREDENTIALS.INJECT_SSH) {
|
|
675
|
+
users.push(...row.users);
|
|
676
|
+
annotations[row.secretName] = row.sshkeys;
|
|
677
|
+
out.push({
|
|
678
|
+
sshPublicKey: {
|
|
679
|
+
source: { secret: { secretName: row.secretName } },
|
|
680
|
+
propagationMethod: { qemuGuestAgent: { users: row.users } }
|
|
681
|
+
}
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
if (out.length === 0 && !!this.spec.template.spec.accessCredentials) {
|
|
687
|
+
delete this.spec.template.spec.accessCredentials;
|
|
688
|
+
} else {
|
|
689
|
+
this.spec.template.spec.accessCredentials = out;
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
if (users.length !== 0) {
|
|
693
|
+
this.spec.template.metadata.annotations[HCI_ANNOTATIONS.DYNAMIC_SSHKEYS_USERS] = JSON.stringify(Array.from(new Set(users)));
|
|
694
|
+
this.spec.template.metadata.annotations[HCI_ANNOTATIONS.DYNAMIC_SSHKEYS_NAMES] = JSON.stringify(annotations);
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
|
|
698
|
+
getInitUserData(config) {
|
|
699
|
+
const _QGA_JSON = this.getMatchQGA(config.osType);
|
|
700
|
+
const out = jsyaml.dump(_QGA_JSON);
|
|
701
|
+
|
|
702
|
+
return out.startsWith('#cloud-config') ? out : `#cloud-config\n${ out }`;
|
|
703
|
+
},
|
|
704
|
+
|
|
705
|
+
getUserData(config) {
|
|
706
|
+
const { returnType = 'string' } = config;
|
|
707
|
+
|
|
708
|
+
let userDataJson = this.convertToJson(this.userScript) || {};
|
|
709
|
+
|
|
710
|
+
const sshAuthorizedKeys = userDataJson?.ssh_authorized_keys || [];
|
|
711
|
+
|
|
712
|
+
if (userDataJson && sshAuthorizedKeys) {
|
|
713
|
+
const sshList = new Set([...this.getSSHListValue(this.sshKey), ...sshAuthorizedKeys]);
|
|
714
|
+
|
|
715
|
+
userDataJson.ssh_authorized_keys = [...sshList];
|
|
716
|
+
} else {
|
|
717
|
+
userDataJson.ssh_authorized_keys = this.getSSHListValue(this.sshKey);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
if (userDataJson.ssh_authorized_keys && userDataJson.ssh_authorized_keys.length === 0) {
|
|
721
|
+
delete userDataJson.ssh_authorized_keys;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
userDataJson = config.installAgent ? this.mergeQGA({ userDataJson: clone(userDataJson), ...config }) : this.deleteQGA({ userDataJson, ...config });
|
|
725
|
+
|
|
726
|
+
if (returnType === 'string') {
|
|
727
|
+
const out = jsyaml.dump(userDataJson);
|
|
728
|
+
|
|
729
|
+
const outValue = out.replace(/[\r\n]/g, '').replace(/\ +/g, '');
|
|
730
|
+
|
|
731
|
+
if (outValue === "''") {
|
|
732
|
+
return undefined;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
return `#cloud-config\n${ out }`;
|
|
736
|
+
} else {
|
|
737
|
+
return userDataJson;
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
|
|
741
|
+
updateSSHKey(neu) {
|
|
742
|
+
this.$set(this, 'sshKey', neu);
|
|
743
|
+
},
|
|
744
|
+
|
|
745
|
+
updateCpuMemory(cpu, memory) {
|
|
746
|
+
this.$set(this, 'cpu', cpu);
|
|
747
|
+
this.$set(this, 'memory', memory);
|
|
748
|
+
},
|
|
749
|
+
|
|
750
|
+
parseDisk(R, index) {
|
|
751
|
+
const out = { name: R.name };
|
|
752
|
+
|
|
753
|
+
if (R.type === HARD_DISK) {
|
|
754
|
+
out.disk = { bus: R.bus };
|
|
755
|
+
} else if (R.type === CD_ROM) {
|
|
756
|
+
out.cdrom = { bus: R.bus };
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
out.bootOrder = index + 1;
|
|
760
|
+
|
|
761
|
+
return out;
|
|
762
|
+
},
|
|
763
|
+
|
|
764
|
+
parseVolume(R, dataVolumeName) {
|
|
765
|
+
const out = { name: R.name };
|
|
766
|
+
|
|
767
|
+
if (R.source === SOURCE_TYPE.CONTAINER) {
|
|
768
|
+
out.containerDisk = { image: R.container };
|
|
769
|
+
} else if (R.source === SOURCE_TYPE.IMAGE || R.source === SOURCE_TYPE.NEW || R.source === SOURCE_TYPE.ATTACH_VOLUME) {
|
|
770
|
+
out.persistentVolumeClaim = { claimName: dataVolumeName };
|
|
771
|
+
if (R.hotpluggable) {
|
|
772
|
+
out.persistentVolumeClaim.hotpluggable = true;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
return out;
|
|
777
|
+
},
|
|
778
|
+
|
|
779
|
+
parseVolumeClaimTemplate(R, dataVolumeName) {
|
|
780
|
+
if (!String(R.size).includes('Gi') && R.size) {
|
|
781
|
+
R.size = `${ R.size }Gi`;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
const out = {
|
|
785
|
+
metadata: { name: dataVolumeName },
|
|
786
|
+
spec: {
|
|
787
|
+
accessModes: [R.accessMode],
|
|
788
|
+
resources: { requests: { storage: R.size } },
|
|
789
|
+
volumeMode: R.volumeMode
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
switch (R.source) {
|
|
794
|
+
case SOURCE_TYPE.NEW:
|
|
795
|
+
out.spec.storageClassName = R.storageClassName || this.customDefaultStorageClass || this.defaultStorageClass;
|
|
796
|
+
break;
|
|
797
|
+
case SOURCE_TYPE.IMAGE: {
|
|
798
|
+
const image = this.images.find( I => R.image === I.id);
|
|
799
|
+
|
|
800
|
+
if (image) {
|
|
801
|
+
out.spec.storageClassName = `longhorn-${ image.metadata.name }`;
|
|
802
|
+
out.metadata.annotations = { [HCI_ANNOTATIONS.IMAGE_ID]: image.id };
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
break;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
return out;
|
|
810
|
+
},
|
|
811
|
+
|
|
812
|
+
getSSHListValue(arr) {
|
|
813
|
+
return arr.map( id => this.getSSHValue(id)).filter( O => O !== undefined);
|
|
814
|
+
},
|
|
815
|
+
|
|
816
|
+
parseInterface(R) {
|
|
817
|
+
const _interface = {};
|
|
818
|
+
const type = R.type;
|
|
819
|
+
|
|
820
|
+
_interface[type] = {};
|
|
821
|
+
|
|
822
|
+
if (R.macAddress) {
|
|
823
|
+
_interface.macAddress = R.macAddress;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
// TODO: delete
|
|
827
|
+
if (R.ports && R.type === 'masquerade') {
|
|
828
|
+
const ports = [];
|
|
829
|
+
|
|
830
|
+
for (const item of R.ports) {
|
|
831
|
+
ports.push({
|
|
832
|
+
...item,
|
|
833
|
+
port: parseInt(item.port)
|
|
834
|
+
});
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
_interface.ports = ports;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
_interface.model = R.model;
|
|
841
|
+
_interface.name = R.name;
|
|
842
|
+
|
|
843
|
+
return _interface;
|
|
844
|
+
},
|
|
845
|
+
|
|
846
|
+
parseNetwork(R) {
|
|
847
|
+
const out = { name: R.name };
|
|
848
|
+
|
|
849
|
+
if (R.isPod) {
|
|
850
|
+
out.pod = {};
|
|
851
|
+
} else {
|
|
852
|
+
out.multus = { networkName: R.networkName };
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
return out;
|
|
856
|
+
},
|
|
857
|
+
|
|
858
|
+
updateUserData(value) {
|
|
859
|
+
this.userScript = value;
|
|
860
|
+
},
|
|
861
|
+
|
|
862
|
+
updateNetworkData(value) {
|
|
863
|
+
this.networkScript = value;
|
|
864
|
+
},
|
|
865
|
+
|
|
866
|
+
mergeQGA(config) {
|
|
867
|
+
const { userDataJson, osType } = config;
|
|
868
|
+
const _QGA_JSON = this.getMatchQGA(osType);
|
|
869
|
+
|
|
870
|
+
userDataJson.package_update = true;
|
|
871
|
+
if (Array.isArray(userDataJson.packages)) {
|
|
872
|
+
if (!userDataJson.packages.includes('qemu-guest-agent')) {
|
|
873
|
+
userDataJson.packages.push('qemu-guest-agent');
|
|
874
|
+
}
|
|
875
|
+
} else {
|
|
876
|
+
userDataJson.packages = QGA_JSON.packages;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
if (Array.isArray(userDataJson.runcmd)) {
|
|
880
|
+
let findIndex = -1;
|
|
881
|
+
const hasSameRuncmd = userDataJson.runcmd.find( S => Array.isArray(S) && S.join('-') === _QGA_JSON.runcmd[0].join('-'));
|
|
882
|
+
|
|
883
|
+
const hasSimilarRuncmd = userDataJson.runcmd.find( (S, index) => {
|
|
884
|
+
if (Array.isArray(S) && S.join('-') === this.getSimilarRuncmd(osType).join('-')) {
|
|
885
|
+
findIndex = index;
|
|
886
|
+
|
|
887
|
+
return true;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
return false;
|
|
891
|
+
});
|
|
892
|
+
|
|
893
|
+
if (hasSimilarRuncmd) {
|
|
894
|
+
userDataJson.runcmd[findIndex] = _QGA_JSON.runcmd[0];
|
|
895
|
+
} else if (!hasSameRuncmd) {
|
|
896
|
+
userDataJson.runcmd.push(_QGA_JSON.runcmd[0]);
|
|
897
|
+
}
|
|
898
|
+
} else {
|
|
899
|
+
userDataJson.runcmd = _QGA_JSON.runcmd;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
return userDataJson;
|
|
903
|
+
},
|
|
904
|
+
|
|
905
|
+
deleteQGA(config) {
|
|
906
|
+
const { userDataJson, osType, deletePackage = false } = config;
|
|
907
|
+
|
|
908
|
+
const userDataTemplateValue = this.$store.getters['harvester/byId'](CONFIG_MAP, this.userDataTemplateId)?.data?.cloudInit || '';
|
|
909
|
+
|
|
910
|
+
if (Array.isArray(userDataJson.packages) && deletePackage) {
|
|
911
|
+
const templateHasQGAPackage = this.convertToJson(userDataTemplateValue);
|
|
912
|
+
|
|
913
|
+
for (let i = 0; i < userDataJson.packages.length; i++) {
|
|
914
|
+
if (userDataJson.packages[i] === 'qemu-guest-agent') {
|
|
915
|
+
if (!(Array.isArray(templateHasQGAPackage?.packages) && templateHasQGAPackage.packages.includes('qemu-guest-agent'))) {
|
|
916
|
+
userDataJson.packages.splice(i, 1);
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
if (userDataJson.packages?.length === 0) {
|
|
922
|
+
delete userDataJson.packages;
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
if (Array.isArray(userDataJson.runcmd)) {
|
|
927
|
+
const _QGA_JSON = this.getMatchQGA(osType);
|
|
928
|
+
|
|
929
|
+
for (let i = 0; i < userDataJson.runcmd.length; i++) {
|
|
930
|
+
if (Array.isArray(userDataJson.runcmd[i]) && userDataJson.runcmd[i].join('-') === _QGA_JSON.runcmd[0].join('-')) {
|
|
931
|
+
userDataJson.runcmd.splice(i, 1);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
if (userDataJson.runcmd.length === 0) {
|
|
936
|
+
delete userDataJson.runcmd;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
if (!userDataJson.packages) {
|
|
941
|
+
delete userDataJson.package_update;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
if (!Object.keys(userDataJson).length > 0) {
|
|
945
|
+
return '';
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
return userDataJson;
|
|
949
|
+
},
|
|
950
|
+
|
|
951
|
+
generateSecretName(name) {
|
|
952
|
+
return name ? `${ name }-${ randomStr(5).toLowerCase() }` : undefined;
|
|
953
|
+
},
|
|
954
|
+
|
|
955
|
+
getOwnerReferencesFromVM(resource) {
|
|
956
|
+
const name = resource.metadata.name;
|
|
957
|
+
const kind = resource.kind;
|
|
958
|
+
const apiVersion = this.resource === HCI.VM ? 'kubevirt.io/v1' : 'harvesterhci.io/v1beta1';
|
|
959
|
+
const uid = resource?.metadata?.uid;
|
|
960
|
+
|
|
961
|
+
return [{
|
|
962
|
+
name,
|
|
963
|
+
kind,
|
|
964
|
+
uid,
|
|
965
|
+
apiVersion,
|
|
966
|
+
}];
|
|
967
|
+
},
|
|
968
|
+
|
|
969
|
+
async saveSecret(vm) {
|
|
970
|
+
if (!vm?.spec || !this.secretName) {
|
|
971
|
+
return true;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
let secret = this.getSecret(vm.spec);
|
|
975
|
+
|
|
976
|
+
const userData = this.getUserData({ osType: this.osType, installAgent: this.installAgent });
|
|
977
|
+
|
|
978
|
+
if (!secret || this.needNewSecret) {
|
|
979
|
+
secret = await this.$store.dispatch('harvester/create', {
|
|
980
|
+
metadata: {
|
|
981
|
+
name: this.secretName,
|
|
982
|
+
namespace: this.value.metadata.namespace,
|
|
983
|
+
labels: { [HCI_ANNOTATIONS.CLOUD_INIT]: 'harvester' },
|
|
984
|
+
ownerReferences: this.getOwnerReferencesFromVM(vm)
|
|
985
|
+
},
|
|
986
|
+
type: SECRET
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
try {
|
|
991
|
+
if (secret) {
|
|
992
|
+
if (userData) {
|
|
993
|
+
secret.setData('userdata', userData);
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
if (this.networkScript) {
|
|
997
|
+
secret.setData('networkdata', this.networkScript);
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
await secret.save();
|
|
1001
|
+
}
|
|
1002
|
+
} catch (e) {
|
|
1003
|
+
return Promise.reject(e);
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
|
|
1007
|
+
async saveAccessCredentials(vm) {
|
|
1008
|
+
if (!vm?.spec) {
|
|
1009
|
+
return true;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
// save
|
|
1013
|
+
const toSave = [];
|
|
1014
|
+
|
|
1015
|
+
for (const row of this.accessCredentials) {
|
|
1016
|
+
let secretRef = row.secretRef;
|
|
1017
|
+
|
|
1018
|
+
if (!secretRef || this.needNewSecret) {
|
|
1019
|
+
secretRef = await this.$store.dispatch('harvester/create', {
|
|
1020
|
+
metadata: {
|
|
1021
|
+
name: row.secretName,
|
|
1022
|
+
namespace: vm.metadata.namespace,
|
|
1023
|
+
labels: { [HCI_ANNOTATIONS.CLOUD_INIT]: 'harvester' },
|
|
1024
|
+
ownerReferences: this.getOwnerReferencesFromVM(vm)
|
|
1025
|
+
},
|
|
1026
|
+
type: SECRET
|
|
1027
|
+
});
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
if (row.source === ACCESS_CREDENTIALS.RESET_PWD) {
|
|
1031
|
+
secretRef.setData(row.username, row.newPassword);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
if (row.source === ACCESS_CREDENTIALS.INJECT_SSH) {
|
|
1035
|
+
for (const secretId of row.sshkeys) {
|
|
1036
|
+
const keypair = (this.$store.getters['harvester/all'](HCI.SSH) || []).find(s => s.id === secretId);
|
|
1037
|
+
|
|
1038
|
+
secretRef.setData(`${ keypair.metadata.namespace }-${ keypair.metadata.name }`, keypair.spec.publicKey);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
toSave.push(secretRef);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
try {
|
|
1046
|
+
for (const resource of toSave) {
|
|
1047
|
+
await resource.save();
|
|
1048
|
+
}
|
|
1049
|
+
} catch (e) {
|
|
1050
|
+
return Promise.reject(e);
|
|
1051
|
+
}
|
|
1052
|
+
},
|
|
1053
|
+
|
|
1054
|
+
getAccessCredentialsValidation() {
|
|
1055
|
+
const errors = [];
|
|
1056
|
+
|
|
1057
|
+
for (let i = 0; i < this.accessCredentials.length; i++) {
|
|
1058
|
+
const row = this.accessCredentials[i];
|
|
1059
|
+
const source = row.source;
|
|
1060
|
+
|
|
1061
|
+
if (source === ACCESS_CREDENTIALS.RESET_PWD) {
|
|
1062
|
+
if (!row.username) {
|
|
1063
|
+
const fieldName = this.t('harvester.virtualMachine.input.username');
|
|
1064
|
+
const message = this.t('validation.required', { key: fieldName });
|
|
1065
|
+
|
|
1066
|
+
errors.push(message);
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
if (!row.newPassword) {
|
|
1070
|
+
const fieldName = this.t('harvester.virtualMachine.input.password');
|
|
1071
|
+
const message = this.t('validation.required', { key: fieldName });
|
|
1072
|
+
|
|
1073
|
+
errors.push(message);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
if (row.newPassword && row.newPassword.length < 6) {
|
|
1077
|
+
const fieldName = this.t('harvester.virtualMachine.input.password');
|
|
1078
|
+
const message = this.t('validation.number.min', { key: fieldName, val: '6' });
|
|
1079
|
+
|
|
1080
|
+
errors.push(message);
|
|
1081
|
+
}
|
|
1082
|
+
} else {
|
|
1083
|
+
if (!row.users || row.users.length === 0) {
|
|
1084
|
+
const fieldName = this.t('harvester.virtualMachine.input.username');
|
|
1085
|
+
const message = this.t('validation.required', { key: fieldName });
|
|
1086
|
+
|
|
1087
|
+
errors.push(message);
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
if (!row.sshkeys || row.sshkeys.length === 0) {
|
|
1091
|
+
const fieldName = this.t('harvester.virtualMachine.input.sshKeyValue');
|
|
1092
|
+
const message = this.t('validation.required', { key: fieldName });
|
|
1093
|
+
|
|
1094
|
+
errors.push(message);
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
if (errors.length > 0) {
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
return errors;
|
|
1104
|
+
},
|
|
1105
|
+
|
|
1106
|
+
getHasCreatedVolumes(spec) {
|
|
1107
|
+
const out = [];
|
|
1108
|
+
|
|
1109
|
+
if (spec.template.spec.volumes) {
|
|
1110
|
+
spec.template.spec.volumes.forEach((V) => {
|
|
1111
|
+
if (V?.persistentVolumeClaim?.claimName) {
|
|
1112
|
+
out.push(V.persistentVolumeClaim.claimName);
|
|
1113
|
+
}
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
return out;
|
|
1118
|
+
},
|
|
1119
|
+
|
|
1120
|
+
handlerUSBTablet(val) {
|
|
1121
|
+
const hasExist = this.isInstallUSBTablet(this.spec);
|
|
1122
|
+
const inputs = this.spec.template.spec.domain.devices?.inputs || [];
|
|
1123
|
+
|
|
1124
|
+
if (val && !hasExist) {
|
|
1125
|
+
if (inputs.length > 0) {
|
|
1126
|
+
inputs.push(USB_TABLET[0]);
|
|
1127
|
+
} else {
|
|
1128
|
+
Object.assign(this.spec.template.spec.domain.devices, {
|
|
1129
|
+
inputs: [
|
|
1130
|
+
USB_TABLET[0]
|
|
1131
|
+
]
|
|
1132
|
+
});
|
|
1133
|
+
}
|
|
1134
|
+
} else if (!val) {
|
|
1135
|
+
const index = inputs.findIndex(O => isEqual(O, USB_TABLET[0]));
|
|
1136
|
+
|
|
1137
|
+
if (hasExist && inputs.length === 1) {
|
|
1138
|
+
this.$delete(this.spec.template.spec.domain.devices, 'inputs');
|
|
1139
|
+
} else if (hasExist) {
|
|
1140
|
+
inputs.splice(index, 1);
|
|
1141
|
+
this.$set(this.spec.template.spec.domain.devices, 'inputs', inputs);
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
|
|
1146
|
+
setBootMethod(boot = { efi: false, secureBoot: false }) {
|
|
1147
|
+
if (boot.efi && boot.secureBoot) {
|
|
1148
|
+
set(this.spec.template.spec.domain, 'features.smm.enabled', true);
|
|
1149
|
+
set(this.spec.template.spec.domain, 'firmware.bootloader.efi.secureBoot', true);
|
|
1150
|
+
} else if (boot.efi && !boot.secureBoot) {
|
|
1151
|
+
set(this.spec.template.spec.domain, 'features.smm.enabled', false);
|
|
1152
|
+
set(this.spec.template.spec.domain, 'firmware.bootloader.efi.secureBoot', false);
|
|
1153
|
+
} else {
|
|
1154
|
+
this.$delete(this.spec.template.spec.domain, 'firmware');
|
|
1155
|
+
this.$delete(this.spec.template.spec.domain.features, 'smm');
|
|
1156
|
+
}
|
|
1157
|
+
},
|
|
1158
|
+
|
|
1159
|
+
deleteSSHFromUserData(ssh = []) {
|
|
1160
|
+
const sshAuthorizedKeys = this.getSSHFromUserData(this.userScript);
|
|
1161
|
+
|
|
1162
|
+
ssh.map((id) => {
|
|
1163
|
+
const index = sshAuthorizedKeys.findIndex(value => value === this.getSSHValue(id));
|
|
1164
|
+
|
|
1165
|
+
if (index >= 0) {
|
|
1166
|
+
sshAuthorizedKeys.splice(index, 1);
|
|
1167
|
+
}
|
|
1168
|
+
});
|
|
1169
|
+
|
|
1170
|
+
const userDataJson = this.convertToJson(this.userScript);
|
|
1171
|
+
|
|
1172
|
+
userDataJson.ssh_authorized_keys = sshAuthorizedKeys;
|
|
1173
|
+
|
|
1174
|
+
if (sshAuthorizedKeys.length === 0) {
|
|
1175
|
+
delete userDataJson.ssh_authorized_keys;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
if (isEmpty(userDataJson)) {
|
|
1179
|
+
this.$set(this, 'userScript', undefined);
|
|
1180
|
+
} else {
|
|
1181
|
+
this.$set(this, 'userScript', jsyaml.dump(userDataJson));
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
this.refreshYamlEditor();
|
|
1185
|
+
},
|
|
1186
|
+
|
|
1187
|
+
refreshYamlEditor() {
|
|
1188
|
+
this.$nextTick(() => {
|
|
1189
|
+
this.$refs.yamlEditor?.updateValue();
|
|
1190
|
+
});
|
|
1191
|
+
},
|
|
1192
|
+
|
|
1193
|
+
toggleAdvanced() {
|
|
1194
|
+
this.showAdvanced = !this.showAdvanced;
|
|
1195
|
+
},
|
|
1196
|
+
|
|
1197
|
+
updateAgent(value) {
|
|
1198
|
+
if (!value) {
|
|
1199
|
+
this.deletePackage = true;
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
|
|
1203
|
+
updateDataTemplateId(type, id) {
|
|
1204
|
+
if (type === 'user') {
|
|
1205
|
+
const oldInstallAgent = this.installAgent;
|
|
1206
|
+
|
|
1207
|
+
this.userDataTemplateId = id;
|
|
1208
|
+
this.$nextTick(() => {
|
|
1209
|
+
if (oldInstallAgent) {
|
|
1210
|
+
this.installAgent = oldInstallAgent;
|
|
1211
|
+
}
|
|
1212
|
+
});
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
|
|
1217
|
+
watch: {
|
|
1218
|
+
diskRows: {
|
|
1219
|
+
handler(neu, old) {
|
|
1220
|
+
if (Array.isArray(neu)) {
|
|
1221
|
+
const imageId = neu[0]?.image;
|
|
1222
|
+
const image = this.images.find( I => imageId === I.id);
|
|
1223
|
+
const osType = image?.imageOSType;
|
|
1224
|
+
|
|
1225
|
+
const oldImageId = old[0]?.image;
|
|
1226
|
+
|
|
1227
|
+
if (this.isCreate && oldImageId === imageId) {
|
|
1228
|
+
this.osType = osType;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
},
|
|
1233
|
+
|
|
1234
|
+
secretRef: {
|
|
1235
|
+
handler(secret) {
|
|
1236
|
+
if (secret && this.resource !== HCI.BACKUP) {
|
|
1237
|
+
this.userScript = secret?.decodedData?.userdata;
|
|
1238
|
+
this.networkScript = secret?.decodedData?.networkdata;
|
|
1239
|
+
this.secretName = secret?.metadata.name;
|
|
1240
|
+
this.refreshYamlEditor();
|
|
1241
|
+
}
|
|
1242
|
+
},
|
|
1243
|
+
immediate: true,
|
|
1244
|
+
deep: true
|
|
1245
|
+
},
|
|
1246
|
+
|
|
1247
|
+
isWindows(val) {
|
|
1248
|
+
if (val) {
|
|
1249
|
+
this.$set(this, 'sshKey', []);
|
|
1250
|
+
this.$set(this, 'userScript', undefined);
|
|
1251
|
+
this.$set(this, 'installAgent', false);
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
|
|
1255
|
+
installUSBTablet(val) {
|
|
1256
|
+
this.handlerUSBTablet(val);
|
|
1257
|
+
},
|
|
1258
|
+
|
|
1259
|
+
efiEnabled(val) {
|
|
1260
|
+
this.setBootMethod({ efi: val, secureBoot: this.secureBoot });
|
|
1261
|
+
},
|
|
1262
|
+
|
|
1263
|
+
secureBoot(val) {
|
|
1264
|
+
this.setBootMethod({ efi: this.efiEnabled, secureBoot: val });
|
|
1265
|
+
},
|
|
1266
|
+
|
|
1267
|
+
installAgent: {
|
|
1268
|
+
/**
|
|
1269
|
+
* rules
|
|
1270
|
+
* 1. The value in user Data is the first priority
|
|
1271
|
+
* 2. After selecting the template, if checkbox is checked, only merge operation will be performed on user data,
|
|
1272
|
+
* if checkbox is unchecked, no value will be deleted in user data
|
|
1273
|
+
*/
|
|
1274
|
+
handler(neu) {
|
|
1275
|
+
if (this.deleteAgent) {
|
|
1276
|
+
const out = this.getUserData({
|
|
1277
|
+
installAgent: neu, osType: this.osType, deletePackage: this.deletePackage
|
|
1278
|
+
});
|
|
1279
|
+
|
|
1280
|
+
this.$set(this, 'userScript', out);
|
|
1281
|
+
this.refreshYamlEditor();
|
|
1282
|
+
}
|
|
1283
|
+
this.deleteAgent = true;
|
|
1284
|
+
this.deletePackage = false;
|
|
1285
|
+
},
|
|
1286
|
+
immediate: true
|
|
1287
|
+
},
|
|
1288
|
+
|
|
1289
|
+
osType(neu) {
|
|
1290
|
+
const out = this.getUserData({ installAgent: this.installAgent, osType: neu });
|
|
1291
|
+
|
|
1292
|
+
this.$set(this, 'userScript', out);
|
|
1293
|
+
this.refreshYamlEditor();
|
|
1294
|
+
},
|
|
1295
|
+
|
|
1296
|
+
userScript(neu, old) {
|
|
1297
|
+
const hasInstallAgent = this.hasInstallAgent(neu, this.osType, this.installAgent);
|
|
1298
|
+
|
|
1299
|
+
if (hasInstallAgent !== this.installAgent) {
|
|
1300
|
+
this.deleteAgent = false;
|
|
1301
|
+
this.installAgent = hasInstallAgent;
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
|
|
1305
|
+
sshKey(neu, old) {
|
|
1306
|
+
const _diff = difference(old, neu);
|
|
1307
|
+
|
|
1308
|
+
if (_diff.length && this.isEdit) {
|
|
1309
|
+
this.deleteSSHFromUserData(_diff);
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
};
|