dashboard-shell-shell 1.0.111
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/csp/dark/rancher-logo.svg +148 -0
- package/assets/brand/csp/favicon.png +0 -0
- package/assets/brand/csp/metadata.json +3 -0
- package/assets/brand/csp/rancher-logo.svg +130 -0
- 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/harvester/favicon.png +0 -0
- package/assets/brand/harvester/metadata.json +3 -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 +1 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/brand/suse/metadata.json +3 -0
- package/assets/brand/suse/rancher-logo.svg +1 -0
- package/assets/data/aws-regions.json +39 -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/featured/img1.jpg +0 -0
- package/assets/images/featured.jpg +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/generic-plugin.svg +1 -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/harvester.svg +1 -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/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/nutanix.svg +12 -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/outscale.svg +19 -0
- package/assets/images/providers/ovhcloudmks.svg +122 -0
- package/assets/images/providers/ovhcloudpubliccloud.svg +122 -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/openid.svg +18 -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 +34 -0
- package/assets/styles/base/_basic.scss +146 -0
- package/assets/styles/base/_color.scss +11 -0
- package/assets/styles/base/_functions.scss +134 -0
- package/assets/styles/base/_helpers.scss +267 -0
- package/assets/styles/base/_mixins.scss +163 -0
- package/assets/styles/base/_typography.scss +69 -0
- package/assets/styles/base/_variables.scss +70 -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 +222 -0
- package/assets/styles/global/_cards.scss +94 -0
- package/assets/styles/global/_columns.scss +126 -0
- package/assets/styles/global/_form.scss +146 -0
- package/assets/styles/global/_gauges.scss +55 -0
- package/assets/styles/global/_labeled-input.scss +140 -0
- package/assets/styles/global/_layout.scss +165 -0
- package/assets/styles/global/_resource.scss +89 -0
- package/assets/styles/global/_select.scss +193 -0
- package/assets/styles/global/_table.scss +106 -0
- package/assets/styles/global/_tooltip.scss +165 -0
- package/assets/styles/themes/_csp.scss +25 -0
- package/assets/styles/themes/_dark.scss +232 -0
- package/assets/styles/themes/_light.scss +556 -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-select.scss +391 -0
- package/assets/translations/en-us.yaml +8103 -0
- package/assets/translations/zh-hans.yaml +7678 -0
- package/babel.config.js +35 -0
- package/chart/__tests__/S3.test.ts +64 -0
- package/chart/example.vue +18 -0
- package/chart/gatekeeper.vue +69 -0
- package/chart/istio.vue +284 -0
- package/chart/logging/index.vue +84 -0
- package/chart/monitoring/ClusterSelector.vue +215 -0
- package/chart/monitoring/StorageClassSelector.vue +49 -0
- package/chart/monitoring/alerting/index.vue +188 -0
- package/chart/monitoring/grafana/index.vue +378 -0
- package/chart/monitoring/index.vue +364 -0
- package/chart/monitoring/prometheus/index.vue +373 -0
- package/chart/rancher-backup/S3.vue +190 -0
- package/chart/rancher-backup/index.vue +260 -0
- package/cloud-credential/__tests__/azure.test.ts +43 -0
- package/cloud-credential/__tests__/harvester.test.ts +18 -0
- package/cloud-credential/aws.vue +109 -0
- package/cloud-credential/azure.vue +132 -0
- package/cloud-credential/digitalocean.vue +55 -0
- package/cloud-credential/gcp.vue +82 -0
- package/cloud-credential/generic.vue +100 -0
- package/cloud-credential/harvester.vue +125 -0
- package/cloud-credential/linode.vue +58 -0
- package/cloud-credential/pnap.vue +92 -0
- package/cloud-credential/s3.vue +143 -0
- package/cloud-credential/vmwarevsphere.vue +109 -0
- package/components/ActionDropdown.vue +248 -0
- package/components/ActionMenu.vue +366 -0
- package/components/ActionMenuShell.vue +105 -0
- package/components/AdvancedSection.vue +40 -0
- package/components/Alert.vue +55 -0
- package/components/AlertTable.vue +123 -0
- package/components/AppModal.vue +231 -0
- package/components/AssignTo.vue +185 -0
- package/components/AsyncButton.vue +315 -0
- package/components/AwsComplianceBanner.vue +47 -0
- package/components/BackLink.vue +44 -0
- package/components/BannerGraphic.vue +94 -0
- package/components/BrandImage.vue +135 -0
- package/components/ButtonDropdown.vue +318 -0
- package/components/ButtonGroup.vue +120 -0
- package/components/ButtonMultiAction.vue +51 -0
- package/components/Carousel.vue +397 -0
- package/components/Certificates.vue +161 -0
- package/components/ChartHeading.vue +25 -0
- package/components/ChartReadme.vue +100 -0
- package/components/ClusterBadge.vue +48 -0
- package/components/ClusterIconMenu.vue +189 -0
- package/components/ClusterProviderIcon.vue +131 -0
- package/components/CodeMirror.vue +488 -0
- package/components/Collapse.vue +87 -0
- package/components/CollapsibleCard.vue +121 -0
- package/components/CommunityLinks.vue +216 -0
- package/components/CompoundStatusBadge.vue +53 -0
- package/components/ConsumptionGauge.vue +148 -0
- package/components/ContainerResourceLimit.vue +254 -0
- package/components/CopyCode.vue +74 -0
- package/components/CopyToClipboard.vue +44 -0
- package/components/CopyToClipboardText.vue +82 -0
- package/components/CountBox.vue +114 -0
- package/components/CountGauge.vue +180 -0
- package/components/CreateDriver.vue +81 -0
- package/components/CruResource.vue +931 -0
- package/components/CruResourceFooter.vue +127 -0
- package/components/DashboardMetrics.vue +125 -0
- package/components/DashboardOptions.vue +147 -0
- package/components/DetailText.vue +215 -0
- package/components/DetailTop.vue +374 -0
- package/components/Dialog.vue +136 -0
- package/components/DisableAuthProviderModal.vue +114 -0
- package/components/DraggableZone.vue +181 -0
- package/components/EmberPage.vue +622 -0
- package/components/EmberPageView.vue +39 -0
- package/components/EtcdInfoBanner.vue +76 -0
- package/components/ExplorerMembers.vue +453 -0
- package/components/ExplorerProjectsNamespaces.vue +612 -0
- package/components/ExtensionPanel.vue +42 -0
- package/components/FileDiff.vue +184 -0
- package/components/FixedBanner.vue +277 -0
- package/components/Flag.vue +83 -0
- package/components/Glance.vue +79 -0
- package/components/GlobalRoleBindings.vue +425 -0
- package/components/GradientBox.vue +82 -0
- package/components/GrafanaDashboard.vue +321 -0
- package/components/GroupPanel.vue +57 -0
- package/components/GrowlManager.vue +212 -0
- package/components/HardwareResourceGauge.vue +170 -0
- package/components/HarvesterServiceAddOnConfig.vue +207 -0
- package/components/IconMessage.vue +101 -0
- package/components/IconOrSvg.vue +184 -0
- package/components/Import.vue +260 -0
- package/components/Inactivity.vue +236 -0
- package/components/IndentedPanel.vue +26 -0
- package/components/InfoBox.vue +84 -0
- package/components/InputOrDisplay.vue +65 -0
- package/components/KeyValueView.vue +283 -0
- package/components/LabelValue.vue +42 -0
- package/components/LandingPagePreference.vue +152 -0
- package/components/LazyImage.vue +70 -0
- package/components/Loading.vue +85 -0
- package/components/LocaleSelector.vue +175 -0
- package/components/LogItem.vue +69 -0
- package/components/Markdown.vue +138 -0
- package/components/MessageLink.vue +79 -0
- package/components/ModalWithCard.vue +137 -0
- package/components/MoveModal.vue +166 -0
- package/components/PaginatedResourceTable.vue +133 -0
- package/components/PercentageBar.vue +127 -0
- package/components/PodSecurityAdmission.vue +306 -0
- package/components/ProgressBarMulti.vue +173 -0
- package/components/PromptChangePassword.vue +123 -0
- package/components/PromptModal.vue +109 -0
- package/components/PromptRemove.vue +471 -0
- package/components/PromptRestore.vue +327 -0
- package/components/Questions/Array.vue +38 -0
- package/components/Questions/Boolean.vue +37 -0
- package/components/Questions/CloudCredential.vue +54 -0
- package/components/Questions/Enum.vue +53 -0
- package/components/Questions/Float.vue +41 -0
- package/components/Questions/Int.vue +41 -0
- package/components/Questions/Question.js +145 -0
- package/components/Questions/QuestionMap.vue +45 -0
- package/components/Questions/Radio.vue +35 -0
- package/components/Questions/Reference.vue +167 -0
- package/components/Questions/String.vue +51 -0
- package/components/Questions/Yaml.vue +48 -0
- package/components/Questions/__tests__/Boolean.test.ts +125 -0
- package/components/Questions/__tests__/Float.test.ts +125 -0
- package/components/Questions/__tests__/Int.test.ts +125 -0
- package/components/Questions/__tests__/String.test.ts +125 -0
- package/components/Questions/__tests__/Yaml.test.ts +125 -0
- package/components/Questions/__tests__/utils/questions-defaults.ts +20 -0
- package/components/Questions/index.vue +522 -0
- package/components/Random.vue +100 -0
- package/components/RelatedResources.vue +187 -0
- package/components/ResourceCancelModal.vue +127 -0
- package/components/ResourceDetail/Masthead.vue +692 -0
- package/components/ResourceDetail/__tests__/Masthead.test.ts +61 -0
- package/components/ResourceDetail/index.vue +534 -0
- package/components/ResourceList/Masthead.vue +246 -0
- package/components/ResourceList/ResourceLoadingIndicator.vue +137 -0
- package/components/ResourceList/index.vue +306 -0
- package/components/ResourceList/resource-list.config.js +7 -0
- package/components/ResourceSummary.vue +173 -0
- package/components/ResourceTable.vue +661 -0
- package/components/ResourceYaml.vue +403 -0
- package/components/RoleBindings.vue +470 -0
- package/components/SelectIconGrid.vue +414 -0
- package/components/Setting.vue +115 -0
- package/components/SideNav.vue +568 -0
- package/components/SimpleBox.vue +121 -0
- package/components/SingleClusterInfo.vue +199 -0
- package/components/SortableTable/THead.vue +526 -0
- package/components/SortableTable/actions.js +153 -0
- package/components/SortableTable/advanced-filtering.js +272 -0
- package/components/SortableTable/debug.js +117 -0
- package/components/SortableTable/filtering.js +290 -0
- package/components/SortableTable/grouping.js +48 -0
- package/components/SortableTable/index.vue +2089 -0
- package/components/SortableTable/paging.js +147 -0
- package/components/SortableTable/selection.js +640 -0
- package/components/SortableTable/sortable-config.ts +4 -0
- package/components/SortableTable/sorting.js +129 -0
- package/components/StatusTable.vue +61 -0
- package/components/TabTitle.vue +78 -0
- package/components/Tabbed/Tab.vue +129 -0
- package/components/Tabbed/index.vue +569 -0
- package/components/TableDataUserIcon.vue +47 -0
- package/components/TableSparkLine.vue +108 -0
- package/components/Tag.vue +19 -0
- package/components/Tip.vue +43 -0
- package/components/TypeDescription.vue +65 -0
- package/components/Wizard.vue +704 -0
- package/components/YamlEditor.vue +296 -0
- package/components/__tests__/AppModal.test.ts +106 -0
- package/components/__tests__/ApplicationCard.test.ts +27 -0
- package/components/__tests__/AsyncButton.test.ts +148 -0
- package/components/__tests__/BackLink.test.ts +33 -0
- package/components/__tests__/ButtonGroup.test.ts +121 -0
- package/components/__tests__/ButtonMultiAction.test.ts +31 -0
- package/components/__tests__/Carousel.test.ts +72 -0
- package/components/__tests__/Certificates.test.ts +31 -0
- package/components/__tests__/ClusterBadge.test.ts +32 -0
- package/components/__tests__/CodeMirror.test.ts +93 -0
- package/components/__tests__/Collapse.test.ts +44 -0
- package/components/__tests__/CollapsibleCard.test.ts +64 -0
- package/components/__tests__/ConsumptionGauge.test.ts +88 -0
- package/components/__tests__/ContainerResourceLimit.test.ts +35 -0
- package/components/__tests__/CopyCode.test.ts +16 -0
- package/components/__tests__/CruResource.test.ts +155 -0
- package/components/__tests__/EtcdInfoBanner.test.ts +39 -0
- package/components/__tests__/FixedBanner.test.ts +114 -0
- package/components/__tests__/GrowlManager.test.ts +146 -0
- package/components/__tests__/NamespaceFilter.test.ts +247 -0
- package/components/__tests__/PercentageBar.test.ts +32 -0
- package/components/__tests__/PodSecurityAdmission.test.ts +440 -0
- package/components/__tests__/ProjectRow.test.ts +59 -0
- package/components/__tests__/PromptRestore.test.ts +139 -0
- package/components/__tests__/SimpleBox.spec.ts +28 -0
- package/components/__tests__/TabTitle.test.ts +136 -0
- package/components/auth/AllowedPrincipals.vue +122 -0
- package/components/auth/AuthBanner.vue +104 -0
- package/components/auth/AzureWarning.vue +77 -0
- package/components/auth/Principal.vue +212 -0
- package/components/auth/RoleDetailEdit.vue +808 -0
- package/components/auth/SelectPrincipal.vue +260 -0
- package/components/auth/__tests__/Principal.test.ts +40 -0
- package/components/auth/__tests__/RoleDetailEdit.test.ts +83 -0
- package/components/auth/login/github.vue +23 -0
- package/components/auth/login/ldap.vue +106 -0
- package/components/auth/login/oauth.vue +26 -0
- package/components/auth/login/oidc.vue +32 -0
- package/components/auth/login/saml.vue +39 -0
- package/components/cards/ApplicationCard.vue +145 -0
- package/components/fleet/FleetBundleResources.vue +86 -0
- package/components/fleet/FleetBundles.vue +136 -0
- package/components/fleet/FleetClusters.vue +208 -0
- package/components/fleet/FleetIntro.vue +65 -0
- package/components/fleet/FleetNoWorkspaces.vue +62 -0
- package/components/fleet/FleetRepos.vue +184 -0
- package/components/fleet/FleetResources.vue +83 -0
- package/components/fleet/FleetStatus.vue +301 -0
- package/components/fleet/FleetSummary.vue +210 -0
- package/components/fleet/ForceDirectedTreeChart/chartIcons.js +17 -0
- package/components/fleet/ForceDirectedTreeChart/index.vue +565 -0
- package/components/fleet/ResourcesSummary.vue +93 -0
- package/components/fleet/__tests__/FleetSummary.test.ts +362 -0
- package/components/form/ArrayList.vue +418 -0
- package/components/form/ArrayListGrouped.vue +141 -0
- package/components/form/ArrayListSelect.vue +103 -0
- package/components/form/BannerSettings.vue +220 -0
- package/components/form/ChangePassword.vue +461 -0
- package/components/form/ClusterAppearance.vue +132 -0
- package/components/form/ColorInput.vue +200 -0
- package/components/form/Command.vue +213 -0
- package/components/form/Conditions.vue +93 -0
- package/components/form/EnvVars.vue +154 -0
- package/components/form/Error.vue +66 -0
- package/components/form/FileImageSelector.vue +140 -0
- package/components/form/FileSelector.vue +169 -0
- package/components/form/Footer.vue +116 -0
- package/components/form/GitPicker.vue +590 -0
- package/components/form/HealthCheck.vue +86 -0
- package/components/form/HookOption.vue +258 -0
- package/components/form/InputWithSelect.vue +329 -0
- package/components/form/KeyValue.vue +962 -0
- package/components/form/LabeledSelect.vue +723 -0
- package/components/form/Labels.vue +151 -0
- package/components/form/LifecycleHooks.vue +87 -0
- package/components/form/MatchExpressions.vue +446 -0
- package/components/form/Members/ClusterMembershipEditor.vue +61 -0
- package/components/form/Members/ClusterPermissionsEditor.vue +314 -0
- package/components/form/Members/MembershipEditor.vue +230 -0
- package/components/form/Members/ProjectMembershipEditor.vue +63 -0
- package/components/form/Members/__tests__/MembershipEditor.test.ts +62 -0
- package/components/form/NameNsDescription.vue +554 -0
- package/components/form/Networking.vue +273 -0
- package/components/form/NodeAffinity.vue +250 -0
- package/components/form/NodeScheduling.vue +202 -0
- package/components/form/NotificationSettings.vue +71 -0
- package/components/form/Password.vue +185 -0
- package/components/form/PlusMinus.vue +109 -0
- package/components/form/PodAffinity.vue +497 -0
- package/components/form/Ports.vue +310 -0
- package/components/form/Probe.vue +374 -0
- package/components/form/ProjectMemberEditor.vue +342 -0
- package/components/form/ResourceLabeledSelect.vue +154 -0
- package/components/form/ResourceQuota/Namespace.vue +117 -0
- package/components/form/ResourceQuota/NamespaceRow.vue +220 -0
- package/components/form/ResourceQuota/Project.vue +103 -0
- package/components/form/ResourceQuota/ProjectRow.vue +115 -0
- package/components/form/ResourceQuota/shared.js +147 -0
- package/components/form/ResourceSelector.vue +146 -0
- package/components/form/ResourceTabs/index.vue +292 -0
- package/components/form/RuleSelector.vue +184 -0
- package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +193 -0
- package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +104 -0
- package/components/form/SSHKnownHosts/index.vue +101 -0
- package/components/form/SchedulingCustomization.vue +85 -0
- package/components/form/SecretSelector.vue +269 -0
- package/components/form/Security.vue +247 -0
- package/components/form/Select.vue +370 -0
- package/components/form/SelectOrCreateAuthSecret.vue +693 -0
- package/components/form/ServiceNameSelect.vue +168 -0
- package/components/form/ServicePorts.vue +340 -0
- package/components/form/ShellInput.vue +91 -0
- package/components/form/SimpleSecretSelector.vue +258 -0
- package/components/form/Taints.vue +98 -0
- package/components/form/Tolerations.vue +315 -0
- package/components/form/UnitInput.vue +257 -0
- package/components/form/ValueFromResource.vue +394 -0
- package/components/form/WorkloadPorts.vue +514 -0
- package/components/form/__tests__/ArrayList.test.ts +124 -0
- package/components/form/__tests__/ArrayListGrouped.test.ts +41 -0
- package/components/form/__tests__/BannerSettings.test.ts +54 -0
- package/components/form/__tests__/ColorInput.test.ts +27 -0
- package/components/form/__tests__/Command.test.ts +64 -0
- package/components/form/__tests__/Error.test.ts +56 -0
- package/components/form/__tests__/FileImageSelector.test.ts +42 -0
- package/components/form/__tests__/FileSelector.test.ts +76 -0
- package/components/form/__tests__/HookOption.test.ts +28 -0
- package/components/form/__tests__/InputWithSelect.test.ts +42 -0
- package/components/form/__tests__/KeyValue.test.ts +179 -0
- package/components/form/__tests__/LabeledSelect.test.ts +217 -0
- package/components/form/__tests__/MatchExpressions.test.ts +78 -0
- package/components/form/__tests__/NameNsDescription.test.ts +72 -0
- package/components/form/__tests__/NodeAffinity.test.ts +39 -0
- package/components/form/__tests__/NodeScheduling.test.ts +44 -0
- package/components/form/__tests__/PodAffinity.test.ts +47 -0
- package/components/form/__tests__/Probe.test.ts +74 -0
- package/components/form/__tests__/SSHKnownHosts.test.ts +59 -0
- package/components/form/__tests__/Security.test.ts +55 -0
- package/components/form/__tests__/Select.test.ts +30 -0
- package/components/form/__tests__/SelectOrCreateAuthSecret.test.ts +34 -0
- package/components/form/__tests__/ServiceNameSelect.test.ts +42 -0
- package/components/form/__tests__/Taints.test.ts +71 -0
- package/components/form/__tests__/UnitInput.test.ts +256 -0
- package/components/form/labeled-select-utils/labeled-select-pagination.ts +151 -0
- package/components/form/labeled-select-utils/labeled-select.utils.ts +122 -0
- package/components/formatter/AppSummaryGraph.vue +154 -0
- package/components/formatter/BadgeStateFormatter.vue +63 -0
- package/components/formatter/Capitalize.vue +28 -0
- package/components/formatter/Checked.vue +31 -0
- package/components/formatter/CloudCredExpired.vue +69 -0
- package/components/formatter/CloudCredPublicData.vue +30 -0
- package/components/formatter/ClusterLink.vue +117 -0
- package/components/formatter/ClusterProvider.vue +38 -0
- package/components/formatter/CopyToClipboard.vue +18 -0
- package/components/formatter/Date.vue +74 -0
- package/components/formatter/DelayedValue.vue +46 -0
- package/components/formatter/Endpoints.vue +106 -0
- package/components/formatter/ExtensionCache.vue +74 -0
- package/components/formatter/ExternalLink.vue +11 -0
- package/components/formatter/FleetClusterSummaryGraph.vue +27 -0
- package/components/formatter/FleetSummaryGraph.vue +122 -0
- package/components/formatter/IconIsDefault.vue +34 -0
- package/components/formatter/IconText.vue +49 -0
- package/components/formatter/ImageName.vue +23 -0
- package/components/formatter/ImagePercentageBar.vue +86 -0
- package/components/formatter/IngressFullPath.vue +22 -0
- package/components/formatter/IngressTarget.vue +96 -0
- package/components/formatter/InternalExternalIP.vue +62 -0
- package/components/formatter/InvolvedObjectLink.vue +54 -0
- package/components/formatter/KeyValue.vue +78 -0
- package/components/formatter/Link.vue +189 -0
- package/components/formatter/LinkDetail.vue +58 -0
- package/components/formatter/LinkDetailImage.vue +31 -0
- package/components/formatter/LinkName.vue +66 -0
- package/components/formatter/List.vue +22 -0
- package/components/formatter/ListLink.vue +37 -0
- package/components/formatter/ListLinkDetail.vue +30 -0
- package/components/formatter/LiveDate.vue +167 -0
- package/components/formatter/LiveDuration.vue +78 -0
- package/components/formatter/LiveExpiryBadgeState.vue +79 -0
- package/components/formatter/LiveExpiryDate.vue +87 -0
- package/components/formatter/LivePodRestarts.vue +50 -0
- package/components/formatter/MachineSummaryGraph.vue +108 -0
- package/components/formatter/Number.vue +34 -0
- package/components/formatter/Percentage.vue +25 -0
- package/components/formatter/PercentageBar.vue +41 -0
- package/components/formatter/PodImages.vue +72 -0
- package/components/formatter/PodsUsage.vue +29 -0
- package/components/formatter/Port.vue +24 -0
- package/components/formatter/Principal.vue +22 -0
- package/components/formatter/PrincipalGroupBindings.vue +59 -0
- package/components/formatter/QualityText.vue +21 -0
- package/components/formatter/RKETemplateName.vue +37 -0
- package/components/formatter/ReceiverIcons.vue +132 -0
- package/components/formatter/RunBookLink.vue +20 -0
- package/components/formatter/Scale.vue +143 -0
- package/components/formatter/ScanResult.vue +33 -0
- package/components/formatter/SecretData.vue +55 -0
- package/components/formatter/SecretType.vue +41 -0
- package/components/formatter/ServiceTargets.vue +121 -0
- package/components/formatter/ServiceType.vue +54 -0
- package/components/formatter/Shortened.vue +55 -0
- package/components/formatter/Si.vue +46 -0
- package/components/formatter/Translate.vue +32 -0
- package/components/formatter/VerticalScroll.vue +17 -0
- package/components/formatter/VirtualServiceGateways.vue +111 -0
- package/components/formatter/WorkloadDetailEndpoints.vue +107 -0
- package/components/formatter/WorkloadHealthScale.vue +339 -0
- package/components/formatter/__tests__/Checked.test.ts +19 -0
- package/components/formatter/__tests__/ClusterLink.test.ts +101 -0
- package/components/formatter/__tests__/Date.test.ts +60 -0
- package/components/formatter/__tests__/LinkDetail.test.ts +72 -0
- package/components/formatter/__tests__/LiveDate.test.ts +90 -0
- package/components/formatter/__tests__/PodsUsage.test.ts +55 -0
- package/components/formatter/__tests__/Si.test.ts +35 -0
- package/components/formatter/__tests__/WorkloadDetailEndpoints.test.ts +81 -0
- package/components/graph/AspectPreserver.vue +79 -0
- package/components/graph/Bar.vue +81 -0
- package/components/graph/Circle.vue +164 -0
- package/components/graph/HalfCircle.vue +46 -0
- package/components/graph/LinePlot.vue +189 -0
- package/components/graph/ProgressArc.vue +94 -0
- package/components/nav/Favorite.vue +56 -0
- package/components/nav/GlobalLoading.vue +25 -0
- package/components/nav/Group.vue +462 -0
- package/components/nav/Header.vue +1156 -0
- package/components/nav/HeaderPageActionMenu.vue +22 -0
- package/components/nav/Jump.vue +128 -0
- package/components/nav/NamespaceFilter.vue +1155 -0
- package/components/nav/Pinned.vue +52 -0
- package/components/nav/TopLevelMenu.helper.ts +562 -0
- package/components/nav/TopLevelMenu.vue +1602 -0
- package/components/nav/Type.vue +292 -0
- package/components/nav/WindowManager/ChartReadme.vue +48 -0
- package/components/nav/WindowManager/ContainerLogs.vue +877 -0
- package/components/nav/WindowManager/ContainerShell.vue +585 -0
- package/components/nav/WindowManager/KubectlShell.vue +42 -0
- package/components/nav/WindowManager/MachineSsh.vue +21 -0
- package/components/nav/WindowManager/Window.vue +105 -0
- package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +197 -0
- package/components/nav/WindowManager/__tests__/ContainerShell.test.ts +571 -0
- package/components/nav/WindowManager/index.vue +587 -0
- package/components/nav/WorkspaceSwitcher.vue +190 -0
- package/components/nav/__tests__/TopLevelMenu.test.ts +598 -0
- package/components/nav/__tests__/Type.test.ts +491 -0
- package/components/templates/blank.vue +20 -0
- package/components/templates/default.vue +263 -0
- package/components/templates/home.vue +126 -0
- package/components/templates/plain.vue +134 -0
- package/components/templates/standalone.vue +9 -0
- package/components/templates/unauthenticated.vue +26 -0
- package/components/user.retention/user-retention-header.vue +34 -0
- package/composables/focusTrap.ts +68 -0
- package/composables/useClickOutside.ts +81 -0
- package/composables/useCompactInput.test.ts +36 -0
- package/composables/useCompactInput.ts +20 -0
- package/composables/useI18n.ts +26 -0
- package/composables/useLabeledFormElement.test.ts +135 -0
- package/composables/useLabeledFormElement.ts +153 -0
- package/composables/useUserRetentionValidation.test.ts +178 -0
- package/composables/useUserRetentionValidation.ts +201 -0
- package/config/__test__/home-links.test.ts +57 -0
- package/config/cookies.js +4 -0
- package/config/elemental-types.js +9 -0
- package/config/features.js +6 -0
- package/config/harvester-manager-types.js +3 -0
- package/config/home-links.js +209 -0
- package/config/labels-annotations.js +192 -0
- package/config/local-storage.js +6 -0
- package/config/page-actions.js +4 -0
- package/config/pagination-table-headers.js +80 -0
- package/config/persistentVolume.ts +108 -0
- package/config/pod-security-admission.ts +82 -0
- package/config/private-label.js +94 -0
- package/config/product/apps.js +148 -0
- package/config/product/auth.js +218 -0
- package/config/product/backup.js +61 -0
- package/config/product/cis.js +158 -0
- package/config/product/explorer.js +632 -0
- package/config/product/fleet.js +100 -0
- package/config/product/gatekeeper.js +119 -0
- package/config/product/istio.js +89 -0
- package/config/product/legacy.js +62 -0
- package/config/product/logging.js +377 -0
- package/config/product/longhorn.js +49 -0
- package/config/product/manager.js +217 -0
- package/config/product/monitoring.js +287 -0
- package/config/product/navlinks.js +32 -0
- package/config/product/neuvector.js +30 -0
- package/config/product/settings.js +161 -0
- package/config/product/uiplugins.js +18 -0
- package/config/query-params.js +79 -0
- package/config/roles.ts +409 -0
- package/config/router/index.js +26 -0
- package/config/router/navigation-guards/attempt-first-login.js +73 -0
- package/config/router/navigation-guards/authentication.js +64 -0
- package/config/router/navigation-guards/clusters.js +132 -0
- package/config/router/navigation-guards/i18n.js +13 -0
- package/config/router/navigation-guards/index.js +23 -0
- package/config/router/navigation-guards/install-redirect.js +95 -0
- package/config/router/navigation-guards/load-initial-settings.js +15 -0
- package/config/router/navigation-guards/page-title.js +12 -0
- package/config/router/navigation-guards/products.js +15 -0
- package/config/router/navigation-guards/record-last-route.js +24 -0
- package/config/router/navigation-guards/runtime-extension-route.js +31 -0
- package/config/router/navigation-guards/server-upgrade-growl.js +19 -0
- package/config/router/routes.js +488 -0
- package/config/schema.js +32 -0
- package/config/secret.js +14 -0
- package/config/settings.ts +258 -0
- package/config/store.js +184 -0
- package/config/system-namespaces.js +18 -0
- package/config/table-headers.js +1115 -0
- package/config/types.js +353 -0
- package/config/uiplugins.js +272 -0
- package/config/version.js +33 -0
- package/config/workload.ts +1 -0
- package/core/plugin-helpers.ts +220 -0
- package/core/plugin-routes.ts +144 -0
- package/core/plugin.ts +367 -0
- package/core/plugins-loader.js +31 -0
- package/core/plugins.js +471 -0
- package/core/types-provisioning.ts +361 -0
- package/core/types.ts +661 -0
- package/detail/__tests__/autoscaling.horizontalpodautoscaler.test.ts +135 -0
- package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +119 -0
- package/detail/__tests__/service.test.ts +62 -0
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +254 -0
- package/detail/catalog.cattle.io.app.vue +181 -0
- package/detail/catalog.cattle.io.clusterrepo.vue +35 -0
- package/detail/cis.cattle.io.clusterscan.vue +372 -0
- package/detail/configmap.vue +81 -0
- package/detail/constraints.gatekeeper.sh.constraint.vue +66 -0
- package/detail/fleet.cattle.io.bundle.vue +63 -0
- package/detail/fleet.cattle.io.cluster.vue +99 -0
- package/detail/fleet.cattle.io.clustergroup.vue +76 -0
- package/detail/fleet.cattle.io.gitrepo.vue +148 -0
- package/detail/harvesterhci.io.management.cluster.vue +104 -0
- package/detail/helm.cattle.io.projecthelmchart.vue +249 -0
- package/detail/management.cattle.io.fleetworkspace.vue +100 -0
- package/detail/management.cattle.io.globalrole.vue +8 -0
- package/detail/management.cattle.io.roletemplate.vue +11 -0
- package/detail/management.cattle.io.user.vue +312 -0
- package/detail/namespace.vue +269 -0
- package/detail/networking.k8s.io.ingress.vue +74 -0
- package/detail/node.vue +330 -0
- package/detail/pod.vue +255 -0
- package/detail/provisioning.cattle.io.cluster.vue +1134 -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 +313 -0
- package/detail/service.vue +202 -0
- package/detail/workload/index.vue +541 -0
- package/dialog/AddClusterMemberDialog.vue +86 -0
- package/dialog/AddCustomBadgeDialog.vue +465 -0
- package/dialog/AddProjectMemberDialog.vue +181 -0
- package/dialog/AddonConfigConfirmationDialog.vue +101 -0
- package/dialog/DeactivateDriverDialog.vue +138 -0
- package/dialog/DiagnosticTimingsDialog.vue +141 -0
- package/dialog/DrainNode.vue +247 -0
- package/dialog/ForceMachineRemoveDialog.vue +131 -0
- package/dialog/GenericPrompt.vue +135 -0
- package/dialog/GitRepoForceUpdateDialog.vue +132 -0
- package/dialog/RollbackWorkloadDialog.vue +308 -0
- package/dialog/RotateCertificatesDialog.vue +205 -0
- package/dialog/RotateEncryptionKeyDialog.vue +191 -0
- package/dialog/SaveAsRKETemplateDialog.vue +139 -0
- package/dialog/ScaleMachineDownDialog.vue +156 -0
- package/dialog/ScalePoolDownDialog.vue +121 -0
- package/dialog/SloDialog.vue +97 -0
- package/directives/clean-html.js +15 -0
- package/directives/clean-tooltip.js +32 -0
- package/directives/focus.js +47 -0
- package/directives/int-number.js +21 -0
- package/directives/positive-int-number.js +19 -0
- package/directives/strip-html-aria-label.js +19 -0
- package/directives/trim-whitespace.js +19 -0
- package/edit/__tests__/cis.cattle.io.clusterscan.test.ts +87 -0
- package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +246 -0
- package/edit/__tests__/kontainerDriver.test.ts +110 -0
- package/edit/__tests__/management.cattle.io.clusterroletemplatebinding.test.ts +71 -0
- package/edit/__tests__/management.cattle.io.setting.test.ts +109 -0
- package/edit/__tests__/monitoring.coreos.com.prometheusrule.test.ts +57 -0
- package/edit/__tests__/namespace.test.ts +49 -0
- package/edit/__tests__/nodeDriver.test.ts +89 -0
- package/edit/__tests__/service.test.ts +100 -0
- package/edit/__tests__/ui.cattle.io.navlink.test.ts +114 -0
- package/edit/auth/AuthProviderWarningBanners.vue +34 -0
- package/edit/auth/__tests__/AuthProviderWarningBanners.test.ts +19 -0
- package/edit/auth/__tests__/azuread.test.ts +238 -0
- package/edit/auth/__tests__/oidc.test.ts +151 -0
- package/edit/auth/azuread.vue +537 -0
- package/edit/auth/github.vue +269 -0
- package/edit/auth/googleoauth.vue +256 -0
- package/edit/auth/ldap/__tests__/config.test.ts +58 -0
- package/edit/auth/ldap/config.vue +403 -0
- package/edit/auth/ldap/index.vue +156 -0
- package/edit/auth/oidc.vue +412 -0
- package/edit/auth/saml.vue +432 -0
- package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +58 -0
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +130 -0
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +343 -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 +220 -0
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +198 -0
- package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +71 -0
- package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +58 -0
- package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +65 -0
- package/edit/catalog.cattle.io.clusterrepo.vue +336 -0
- package/edit/cis.cattle.io.clusterscan.vue +377 -0
- package/edit/cis.cattle.io.clusterscanbenchmark.vue +153 -0
- package/edit/cis.cattle.io.clusterscanprofile.vue +150 -0
- package/edit/cloudcredential.vue +319 -0
- package/edit/configmap.vue +163 -0
- package/edit/constraints.gatekeeper.sh.constraint/MatchKinds.vue +72 -0
- package/edit/constraints.gatekeeper.sh.constraint/NamespaceList.vue +78 -0
- package/edit/constraints.gatekeeper.sh.constraint/Scope.vue +52 -0
- package/edit/constraints.gatekeeper.sh.constraint/index.vue +368 -0
- package/edit/fleet.cattle.io.cluster.vue +105 -0
- package/edit/fleet.cattle.io.clustergroup.vue +187 -0
- package/edit/fleet.cattle.io.gitrepo.vue +910 -0
- package/edit/group.principal.vue +65 -0
- package/edit/helm.cattle.io.projecthelmchart.vue +163 -0
- package/edit/k8s.cni.cncf.io.networkattachmentdefinition.vue +94 -0
- package/edit/kontainerDriver.vue +67 -0
- package/edit/logging-flow/Match.vue +142 -0
- package/edit/logging-flow/index.vue +549 -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/__tests__/logging.banzaicloud.io.output.test.ts +279 -0
- package/edit/logging.banzaicloud.io.output/index.vue +386 -0
- package/edit/logging.banzaicloud.io.output/providers/__tests__/loki.test.ts +13 -0
- package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +77 -0
- package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +94 -0
- package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +112 -0
- package/edit/logging.banzaicloud.io.output/providers/datadog.vue +95 -0
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +234 -0
- package/edit/logging.banzaicloud.io.output/providers/file.vue +47 -0
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +152 -0
- package/edit/logging.banzaicloud.io.output/providers/gcs.vue +102 -0
- package/edit/logging.banzaicloud.io.output/providers/gelf.vue +167 -0
- package/edit/logging.banzaicloud.io.output/providers/kafka.vue +166 -0
- package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +76 -0
- package/edit/logging.banzaicloud.io.output/providers/logdna.vue +72 -0
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +107 -0
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +172 -0
- package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +71 -0
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +225 -0
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +142 -0
- package/edit/logging.banzaicloud.io.output/providers/s3.vue +122 -0
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +180 -0
- package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +59 -0
- package/edit/logging.banzaicloud.io.output/providers/syslog.vue +234 -0
- package/edit/logging.banzaicloud.io.output/providers/utils.js +27 -0
- package/edit/management.cattle.io.clusterroletemplatebinding.vue +71 -0
- package/edit/management.cattle.io.fleetworkspace.vue +245 -0
- package/edit/management.cattle.io.globalrole.vue +8 -0
- package/edit/management.cattle.io.node.vue +72 -0
- package/edit/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +111 -0
- package/edit/management.cattle.io.project.vue +255 -0
- package/edit/management.cattle.io.projectroletemplatebinding.vue +96 -0
- package/edit/management.cattle.io.roletemplate.vue +11 -0
- package/edit/management.cattle.io.setting.vue +264 -0
- package/edit/management.cattle.io.user.vue +264 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +324 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/index.vue +287 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +423 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +152 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/tls.vue +272 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +175 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +282 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +203 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +140 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +230 -0
- package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +534 -0
- package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +229 -0
- package/edit/monitoring.coreos.com.prometheusrule/RecordingRule.vue +112 -0
- package/edit/monitoring.coreos.com.prometheusrule/index.vue +223 -0
- package/edit/monitoring.coreos.com.receiver/auth.vue +142 -0
- package/edit/monitoring.coreos.com.receiver/index.vue +357 -0
- package/edit/monitoring.coreos.com.receiver/tls.vue +72 -0
- package/edit/monitoring.coreos.com.receiver/types/__tests__/email.test.ts +57 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +130 -0
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +237 -0
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +97 -0
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +88 -0
- package/edit/monitoring.coreos.com.receiver/types/webhook.add.vue +65 -0
- package/edit/monitoring.coreos.com.receiver/types/webhook.banner.vue +28 -0
- package/edit/monitoring.coreos.com.receiver/types/webhook.vue +93 -0
- package/edit/monitoring.coreos.com.route.vue +237 -0
- package/edit/namespace.vue +282 -0
- package/edit/networking.istio.io.destinationrule/LoadBalancer.vue +194 -0
- package/edit/networking.istio.io.destinationrule/index.vue +237 -0
- package/edit/networking.k8s.io.ingress/Certificate.vue +134 -0
- package/edit/networking.k8s.io.ingress/Certificates.vue +111 -0
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +145 -0
- package/edit/networking.k8s.io.ingress/IngressClass.vue +65 -0
- package/edit/networking.k8s.io.ingress/Rule.vue +188 -0
- package/edit/networking.k8s.io.ingress/RulePath.vue +224 -0
- package/edit/networking.k8s.io.ingress/Rules.vue +155 -0
- package/edit/networking.k8s.io.ingress/index.vue +300 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +108 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +50 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +401 -0
- package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +93 -0
- package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.test.ts +180 -0
- package/edit/networking.k8s.io.networkpolicy/__tests__/utils/mock.json +158 -0
- package/edit/networking.k8s.io.networkpolicy/__tests__/utils/selectors.test.ts +45 -0
- package/edit/networking.k8s.io.networkpolicy/index.vue +299 -0
- package/edit/node.vue +82 -0
- package/edit/nodeDriver.vue +72 -0
- package/edit/persistentvolume/__tests__/persistentvolume.test.ts +93 -0
- package/edit/persistentvolume/index.vue +380 -0
- package/edit/persistentvolume/plugins/awsElasticBlockStore.vue +90 -0
- package/edit/persistentvolume/plugins/azureDisk.vue +136 -0
- package/edit/persistentvolume/plugins/azureFile.vue +78 -0
- package/edit/persistentvolume/plugins/cephfs.vue +109 -0
- package/edit/persistentvolume/plugins/cinder.vue +89 -0
- package/edit/persistentvolume/plugins/csi.vue +209 -0
- package/edit/persistentvolume/plugins/fc.vue +101 -0
- package/edit/persistentvolume/plugins/flexVolume.vue +102 -0
- package/edit/persistentvolume/plugins/flocker.vue +45 -0
- package/edit/persistentvolume/plugins/gcePersistentDisk.vue +90 -0
- package/edit/persistentvolume/plugins/glusterfs.vue +70 -0
- package/edit/persistentvolume/plugins/hostPath.vue +82 -0
- package/edit/persistentvolume/plugins/iscsi.vue +170 -0
- package/edit/persistentvolume/plugins/local.vue +37 -0
- package/edit/persistentvolume/plugins/longhorn.vue +99 -0
- package/edit/persistentvolume/plugins/nfs.vue +70 -0
- package/edit/persistentvolume/plugins/photonPersistentDisk.vue +58 -0
- package/edit/persistentvolume/plugins/portworxVolume.vue +71 -0
- package/edit/persistentvolume/plugins/quobyte.vue +88 -0
- package/edit/persistentvolume/plugins/rbd.vue +127 -0
- package/edit/persistentvolume/plugins/scaleIO.vue +146 -0
- package/edit/persistentvolume/plugins/storageos.vue +98 -0
- package/edit/persistentvolume/plugins/vsphereVolume.vue +63 -0
- package/edit/persistentvolumeclaim.vue +395 -0
- package/edit/pod.vue +27 -0
- package/edit/policy.poddisruptionbudget.vue +152 -0
- package/edit/provisioning.cattle.io.cluster/AgentEnv.vue +40 -0
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +303 -0
- package/edit/provisioning.cattle.io.cluster/Labels.vue +46 -0
- package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +324 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +306 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +564 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/CustomCommand.test.ts +129 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/DirectoryConfig.test.ts +182 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +54 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +72 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +546 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/utils/cluster.ts +391 -0
- package/edit/provisioning.cattle.io.cluster/index.vue +733 -0
- package/edit/provisioning.cattle.io.cluster/rke2.vue +2547 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest.vue +49 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +112 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +221 -0
- package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +335 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +700 -0
- package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +219 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +374 -0
- package/edit/provisioning.cattle.io.cluster/tabs/MemberRoles.vue +40 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +153 -0
- package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +138 -0
- package/edit/provisioning.cattle.io.cluster/tabs/networking/ACE.vue +73 -0
- package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +214 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +211 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryMirrors.vue +138 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/__tests__/RegistryConfigs.test.ts +66 -0
- package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +149 -0
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +155 -0
- package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +76 -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 +454 -0
- package/edit/resources.cattle.io.restore.vue +326 -0
- package/edit/secret/__tests__/ssh.test.ts +79 -0
- package/edit/secret/basic.vue +64 -0
- package/edit/secret/generic.vue +64 -0
- package/edit/secret/index.vue +407 -0
- package/edit/secret/registry.vue +145 -0
- package/edit/secret/ssh.vue +106 -0
- package/edit/secret/tls.vue +94 -0
- package/edit/service.vue +549 -0
- package/edit/serviceaccount.vue +193 -0
- package/edit/storage.k8s.io.storageclass/index.vue +307 -0
- package/edit/storage.k8s.io.storageclass/provisioners/custom.vue +25 -0
- package/edit/storage.k8s.io.storageclass/provisioners/driver.harvesterhci.io.vue +114 -0
- package/edit/storage.k8s.io.storageclass/provisioners/driver.longhorn.io.vue +40 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +180 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-disk.vue +75 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/azure-file.vue +47 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/cinder.vue +69 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +117 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/glusterfs.vue +99 -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 +83 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/quobyte.vue +91 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/rbd.vue +117 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/scaleio.vue +116 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/storageos.vue +65 -0
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +97 -0
- package/edit/token.vue +316 -0
- package/edit/ui.cattle.io.navlink.vue +461 -0
- package/edit/workload/Job.vue +339 -0
- package/edit/workload/Upgrading.vue +372 -0
- package/edit/workload/VolumeClaimTemplate.vue +136 -0
- package/edit/workload/__tests__/Job.test.ts +72 -0
- package/edit/workload/__tests__/Upgrading.test.ts +61 -0
- package/edit/workload/__tests__/index.test.ts +103 -0
- package/edit/workload/index.vue +676 -0
- package/edit/workload/mixins/workload.js +1067 -0
- package/edit/workload/storage/ContainerMountPaths.vue +171 -0
- package/edit/workload/storage/Mount.vue +157 -0
- package/edit/workload/storage/__tests__/Mount.test.ts +102 -0
- package/edit/workload/storage/__tests__/Storage.test.ts +106 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +73 -0
- package/edit/workload/storage/azureDisk.vue +104 -0
- package/edit/workload/storage/azureFile.vue +74 -0
- package/edit/workload/storage/csi/driver.longhorn.io.vue +48 -0
- package/edit/workload/storage/csi/index.vue +122 -0
- package/edit/workload/storage/emptyDir.vue +88 -0
- package/edit/workload/storage/ephemeralVolume/index.vue +108 -0
- package/edit/workload/storage/gcePersistentDisk.vue +73 -0
- package/edit/workload/storage/hostPath.vue +115 -0
- package/edit/workload/storage/index.vue +339 -0
- package/edit/workload/storage/nfs.vue +78 -0
- package/edit/workload/storage/persistentVolumeClaim/__tests__/persistentvolumeclaim.test.ts +38 -0
- package/edit/workload/storage/persistentVolumeClaim/index.vue +154 -0
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +256 -0
- package/edit/workload/storage/secret.vue +186 -0
- package/edit/workload/storage/vsphereVolume.vue +73 -0
- package/initialize/App.vue +70 -0
- package/initialize/app-extended.js +112 -0
- package/initialize/entry-helpers.js +147 -0
- package/initialize/entry.js +33 -0
- package/initialize/install-components.js +11 -0
- package/initialize/install-directives.js +61 -0
- package/initialize/install-plugins.js +128 -0
- package/list/__tests__/workload.test.ts +55 -0
- package/list/catalog.cattle.io.app.vue +76 -0
- package/list/catalog.cattle.io.clusterrepo.vue +83 -0
- package/list/cis.cattle.io.clusterscan.vue +76 -0
- package/list/fleet.cattle.io.bundle.vue +127 -0
- package/list/fleet.cattle.io.cluster.vue +95 -0
- package/list/fleet.cattle.io.clustergroup.vue +88 -0
- package/list/fleet.cattle.io.clusterregistrationtoken.vue +94 -0
- package/list/fleet.cattle.io.gitrepo.vue +108 -0
- package/list/group.principal.vue +153 -0
- package/list/harvesterhci.io.management.cluster.vue +244 -0
- package/list/helm.cattle.io.projecthelmchart.vue +157 -0
- package/list/logging.banzaicloud.io.clusterflow.vue +44 -0
- package/list/logging.banzaicloud.io.flow.vue +45 -0
- package/list/management.cattle.io.cluster.vue +54 -0
- package/list/management.cattle.io.feature.vue +367 -0
- package/list/management.cattle.io.fleetworkspace.vue +44 -0
- package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +51 -0
- package/list/management.cattle.io.setting.vue +117 -0
- package/list/management.cattle.io.user.vue +178 -0
- package/list/monitoring.coreos.com.alertmanagerconfig.vue +83 -0
- package/list/namespace.vue +79 -0
- package/list/networking.k8s.io.ingress.vue +39 -0
- package/list/node.vue +418 -0
- package/list/persistentvolume.vue +89 -0
- package/list/persistentvolumeclaim.vue +32 -0
- package/list/provisioning.cattle.io.cluster.vue +318 -0
- package/list/rbac.authorization.k8s.io.clusterrolebinding.vue +47 -0
- package/list/service.vue +48 -0
- package/list/ui.cattle.io.navlink.vue +72 -0
- package/list/workload.vue +187 -0
- package/machine-config/__tests__/vmwarevsphere.test.ts +257 -0
- package/machine-config/amazonec2.vue +702 -0
- package/machine-config/azure.vue +901 -0
- package/machine-config/digitalocean.vue +231 -0
- package/machine-config/generic.vue +103 -0
- package/machine-config/linode.vue +189 -0
- package/machine-config/pnap.vue +288 -0
- package/machine-config/vmwarevsphere-config.ts +17 -0
- package/machine-config/vmwarevsphere.vue +1252 -0
- package/mixins/__tests__/auth-config.test.ts +74 -0
- package/mixins/__tests__/chart.test.ts +104 -0
- package/mixins/__tests__/create-edit-view.test.ts +56 -0
- package/mixins/auth-config.js +332 -0
- package/mixins/back-link.js +15 -0
- package/mixins/brand.js +211 -0
- package/mixins/browser-tab-visibility.js +31 -0
- package/mixins/chart.js +557 -0
- package/mixins/child-hook.js +82 -0
- package/mixins/closeable.js +47 -0
- package/mixins/compact-input.ts +25 -0
- package/mixins/create-edit-view/impl.js +201 -0
- package/mixins/create-edit-view/index.js +48 -0
- package/mixins/fetch.client.js +90 -0
- package/mixins/form-validation.js +197 -0
- package/mixins/labeled-form-element.ts +225 -0
- package/mixins/login.js +31 -0
- package/mixins/metric-poller.js +19 -0
- package/mixins/page-actions.js +36 -0
- package/mixins/resource-fetch-api-pagination.js +339 -0
- package/mixins/resource-fetch-namespaced.js +90 -0
- package/mixins/resource-fetch.js +290 -0
- package/mixins/resource-manager.js +109 -0
- package/mixins/vue-select-overrides.js +102 -0
- package/models/__tests__/apps.deployment.test.ts +93 -0
- package/models/__tests__/batch.cronjob.test.ts +88 -0
- package/models/__tests__/catalog.cattle.io.app.test.ts +148 -0
- package/models/__tests__/cluster.test.ts +44 -0
- package/models/__tests__/fleet.cattle.io.cluster.test.ts +36 -0
- package/models/__tests__/fleet.cattle.io.gitrepo.test.ts +157 -0
- package/models/__tests__/management.cattle.io.cluster.test.ts +23 -0
- package/models/__tests__/management.cattle.io.node.ts +181 -0
- package/models/__tests__/management.cattle.io.nodepool.ts +83 -0
- package/models/__tests__/namespace.test.ts +165 -0
- package/models/__tests__/node.test.ts +74 -0
- package/models/__tests__/provisioning.cattle.io.cluster.test.ts +155 -0
- package/models/__tests__/schema.tests.ts +24 -0
- package/models/__tests__/secret.test.ts +80 -0
- package/models/__tests__/steve-schema.test.ts +73 -0
- package/models/__tests__/storage.k8s.io.storageclass.test.ts +22 -0
- package/models/__tests__/workload.test.ts +91 -0
- package/models/app.js +25 -0
- package/models/apps.controllerrevision.js +7 -0
- package/models/apps.daemonset.js +22 -0
- package/models/apps.deployment.js +71 -0
- package/models/apps.replicaset.js +11 -0
- package/models/apps.statefulset.js +49 -0
- package/models/autoscaling.horizontalpodautoscaler.js +44 -0
- package/models/batch.cronjob.js +85 -0
- package/models/batch.job.js +19 -0
- package/models/catalog.cattle.io.app.js +488 -0
- package/models/catalog.cattle.io.clusterrepo.js +223 -0
- package/models/catalog.cattle.io.operation.js +43 -0
- package/models/catalog.cattle.io.repo.js +4 -0
- package/models/catalog.cattle.io.uiplugin.js +37 -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 +179 -0
- package/models/cis.cattle.io.clusterscanbenchmark.js +18 -0
- package/models/cis.cattle.io.clusterscanprofile.js +31 -0
- package/models/cis.cattle.io.clusterscanreport.js +62 -0
- package/models/cloudcredential.js +336 -0
- package/models/cluster/node.js +487 -0
- package/models/cluster/schema.js +6 -0
- package/models/cluster.js +44 -0
- package/models/cluster.x-k8s.io.machine.js +272 -0
- package/models/cluster.x-k8s.io.machinedeployment.js +228 -0
- package/models/cluster.x-k8s.io.machineset.js +23 -0
- package/models/clusterroletemplatebinding.js +31 -0
- package/models/configmap.js +20 -0
- package/models/constraints.gatekeeper.sh.constraint.js +121 -0
- package/models/driver.js +63 -0
- package/models/etcdbackup.js +45 -0
- package/models/event.js +34 -0
- package/models/fleet.cattle.io.bundle.js +168 -0
- package/models/fleet.cattle.io.cluster.js +221 -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 +548 -0
- package/models/group.principal.js +71 -0
- package/models/helm.cattle.io.projecthelmchart.js +38 -0
- package/models/k8s.cni.cncf.io.networkattachmentdefinition.js +88 -0
- package/models/kontainerdriver.js +85 -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 +114 -0
- package/models/logging.banzaicloud.io.output.js +173 -0
- package/models/management/schema.js +6 -0
- package/models/management.cattle.io.authconfig.js +70 -0
- package/models/management.cattle.io.cluster.js +501 -0
- package/models/management.cattle.io.clusterroletemplatebinding.js +143 -0
- package/models/management.cattle.io.feature.js +56 -0
- package/models/management.cattle.io.fleetworkspace.js +90 -0
- package/models/management.cattle.io.gitreporestriction.js +5 -0
- package/models/management.cattle.io.globalrole.js +172 -0
- package/models/management.cattle.io.globalrolebinding.js +59 -0
- package/models/management.cattle.io.kontainerdriver.js +90 -0
- package/models/management.cattle.io.node.js +179 -0
- package/models/management.cattle.io.nodepool.js +185 -0
- package/models/management.cattle.io.nodetemplate.js +139 -0
- package/models/management.cattle.io.podsecurityadmissionconfigurationtemplate.js +3 -0
- package/models/management.cattle.io.project.js +182 -0
- package/models/management.cattle.io.projectroletemplatebinding.js +150 -0
- package/models/management.cattle.io.roletemplate.js +216 -0
- package/models/management.cattle.io.setting.js +71 -0
- package/models/management.cattle.io.user.js +302 -0
- package/models/metrics.k8s.io.nodemetrics.js +41 -0
- package/models/monitoring.coreos.com.alertmanagerconfig.js +126 -0
- package/models/monitoring.coreos.com.podmonitor.js +23 -0
- package/models/monitoring.coreos.com.prometheusrule.js +38 -0
- package/models/monitoring.coreos.com.receiver.js +197 -0
- package/models/monitoring.coreos.com.route.js +162 -0
- package/models/monitoring.coreos.com.servicemonitor.js +23 -0
- package/models/namespace.js +262 -0
- package/models/networking.istio.io.destinationrule.js +19 -0
- package/models/networking.k8s.io.ingress.js +209 -0
- package/models/nodedriver.js +93 -0
- package/models/persistentvolume.js +43 -0
- package/models/persistentvolumeclaim.js +63 -0
- package/models/pod.js +279 -0
- package/models/principal.js +42 -0
- package/models/projectroletemplatebinding.js +35 -0
- package/models/provisioning.cattle.io.cluster.js +1091 -0
- package/models/rbac.authorization.k8s.io.clusterrole.js +17 -0
- package/models/rbac.authorization.k8s.io.clusterrolebinding.js +16 -0
- package/models/rbac.authorization.k8s.io.role.js +52 -0
- package/models/rbac.authorization.k8s.io.rolebinding.js +16 -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.pnapmachinetemplate.js +15 -0
- package/models/rke-machine.cattle.io.vmwarevspheremachinetemplate.js +14 -0
- package/models/rke.cattle.io.etcdsnapshot.js +76 -0
- package/models/schema.js +38 -0
- package/models/secret.js +473 -0
- package/models/service.js +193 -0
- package/models/steve-schema.ts +254 -0
- package/models/storage.k8s.io.storageclass.js +164 -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 +688 -0
- package/models/workload.service.js +341 -0
- package/package.json +173 -0
- package/pages/404.vue +15 -0
- package/pages/__tests__/prefs.test.ts +96 -0
- package/pages/about.vue +303 -0
- package/pages/account/create-key.vue +16 -0
- package/pages/account/index.vue +252 -0
- package/pages/auth/login.vue +591 -0
- package/pages/auth/logout.vue +44 -0
- package/pages/auth/setup.vue +521 -0
- package/pages/auth/verify.vue +198 -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 +8 -0
- package/pages/c/_cluster/_product/namespaces.vue +77 -0
- package/pages/c/_cluster/_product/projectsnamespaces.vue +6 -0
- package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +18 -0
- package/pages/c/_cluster/apps/charts/chart.vue +452 -0
- package/pages/c/_cluster/apps/charts/index.vue +718 -0
- package/pages/c/_cluster/apps/charts/install.helpers.js +15 -0
- package/pages/c/_cluster/apps/charts/install.vue +2050 -0
- package/pages/c/_cluster/auth/config/_id.vue +35 -0
- package/pages/c/_cluster/auth/config/index.vue +116 -0
- package/pages/c/_cluster/auth/group.principal/assign-edit.vue +138 -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 +215 -0
- package/pages/c/_cluster/auth/user.retention/index.vue +323 -0
- package/pages/c/_cluster/ecm/index.vue +14 -0
- package/pages/c/_cluster/explorer/ConfigBadge.vue +64 -0
- package/pages/c/_cluster/explorer/EventsTable.vue +121 -0
- package/pages/c/_cluster/explorer/__tests__/index.test.ts +264 -0
- package/pages/c/_cluster/explorer/explorer-utils.js +17 -0
- package/pages/c/_cluster/explorer/index.vue +1002 -0
- package/pages/c/_cluster/explorer/tools/__tests__/index.test.ts +71 -0
- package/pages/c/_cluster/explorer/tools/index.vue +397 -0
- package/pages/c/_cluster/explorer/tools/pages/_page.vue +29 -0
- package/pages/c/_cluster/fleet/GitRepoGraphConfig.js +249 -0
- package/pages/c/_cluster/fleet/index.vue +506 -0
- package/pages/c/_cluster/gatekeeper/constraints/index.vue +90 -0
- package/pages/c/_cluster/gatekeeper/index.vue +78 -0
- package/pages/c/_cluster/istio/index.vue +149 -0
- package/pages/c/_cluster/legacy/pages/_page.vue +29 -0
- package/pages/c/_cluster/legacy/project/_page.vue +57 -0
- package/pages/c/_cluster/legacy/project/index.vue +32 -0
- package/pages/c/_cluster/legacy/project/pipelines.vue +96 -0
- package/pages/c/_cluster/logging/index.vue +94 -0
- package/pages/c/_cluster/longhorn/__tests__/longhorn.index.test.ts +92 -0
- package/pages/c/_cluster/longhorn/index.vue +107 -0
- package/pages/c/_cluster/manager/cloudCredential/_id.vue +15 -0
- package/pages/c/_cluster/manager/cloudCredential/create.vue +15 -0
- package/pages/c/_cluster/manager/cloudCredential/index.vue +158 -0
- package/pages/c/_cluster/manager/drivers/kontainerDriver/_id.vue +12 -0
- package/pages/c/_cluster/manager/drivers/kontainerDriver/create.vue +15 -0
- package/pages/c/_cluster/manager/drivers/kontainerDriver/index.vue +91 -0
- package/pages/c/_cluster/manager/drivers/nodeDriver/_id.vue +12 -0
- package/pages/c/_cluster/manager/drivers/nodeDriver/create.vue +15 -0
- package/pages/c/_cluster/manager/drivers/nodeDriver/index.vue +60 -0
- package/pages/c/_cluster/manager/jwt.authentication/index.vue +244 -0
- package/pages/c/_cluster/manager/pages/_page.vue +22 -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 +320 -0
- package/pages/c/_cluster/monitoring/alertmanagerconfig/index.vue +24 -0
- package/pages/c/_cluster/monitoring/index.vue +202 -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 +99 -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 +133 -0
- package/pages/c/_cluster/navlinks/_group.vue +42 -0
- package/pages/c/_cluster/neuvector/index.vue +75 -0
- package/pages/c/_cluster/settings/DefaultLinksEditor.vue +128 -0
- package/pages/c/_cluster/settings/banners.vue +361 -0
- package/pages/c/_cluster/settings/brand.vue +648 -0
- package/pages/c/_cluster/settings/index.vue +20 -0
- package/pages/c/_cluster/settings/links.vue +167 -0
- package/pages/c/_cluster/settings/performance.vue +515 -0
- package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +175 -0
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +551 -0
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +193 -0
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +134 -0
- package/pages/c/_cluster/uiplugins/DeveloperInstallDialog.vue +261 -0
- package/pages/c/_cluster/uiplugins/InstallDialog.vue +366 -0
- package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +503 -0
- package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +83 -0
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +152 -0
- package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +76 -0
- package/pages/c/_cluster/uiplugins/__tests__/SetupUIPlugins.test.ts +77 -0
- package/pages/c/_cluster/uiplugins/index.vue +1288 -0
- package/pages/clusters/index.vue +21 -0
- package/pages/diagnostic.vue +532 -0
- package/pages/fail-whale.vue +197 -0
- package/pages/home.vue +848 -0
- package/pages/index.vue +54 -0
- package/pages/prefs.vue +367 -0
- package/pages/support/index.vue +263 -0
- package/pkg/auto-import.js +118 -0
- package/pkg/babel.config.js +8 -0
- package/pkg/dynamic-importer.lib.js +82 -0
- package/pkg/dynamic-plugin-loader.js +28 -0
- package/pkg/import.js +10 -0
- package/pkg/model-loader-require.lib.js +3 -0
- package/pkg/tsconfig.json +65 -0
- package/pkg/vue.config.js +146 -0
- package/plugins/axios.js +31 -0
- package/plugins/clean-html.js +103 -0
- package/plugins/codemirror-loader.js +5 -0
- package/plugins/codemirror.js +359 -0
- package/plugins/dashboard-store/__tests__/actions.test.ts +250 -0
- package/plugins/dashboard-store/__tests__/getters.test.ts +100 -0
- package/plugins/dashboard-store/__tests__/mutations.test.ts +391 -0
- package/plugins/dashboard-store/__tests__/resource-class.test.ts +49 -0
- package/plugins/dashboard-store/__tests__/utils/store-mocks.ts +7 -0
- package/plugins/dashboard-store/actions.js +784 -0
- package/plugins/dashboard-store/classify.js +18 -0
- package/plugins/dashboard-store/getters.js +457 -0
- package/plugins/dashboard-store/index.js +53 -0
- package/plugins/dashboard-store/model-loader-require.js +12 -0
- package/plugins/dashboard-store/model-loader.js +76 -0
- package/plugins/dashboard-store/mutations.js +548 -0
- package/plugins/dashboard-store/normalize.js +48 -0
- package/plugins/dashboard-store/resource-class.js +1902 -0
- package/plugins/ember-cookie.js +13 -0
- package/plugins/extend-router.js +80 -0
- package/plugins/floating-vue.js +1 -0
- package/plugins/formatters.js +15 -0
- package/plugins/global-formatters.js +20 -0
- package/plugins/i18n.js +136 -0
- package/plugins/js-yaml.js +4 -0
- package/plugins/nuxt-client-init.js +3 -0
- package/plugins/plugin.js +93 -0
- package/plugins/replaceall.js +19 -0
- package/plugins/shortkey.js +282 -0
- package/plugins/steve/__tests__/getters.test.ts +214 -0
- package/plugins/steve/__tests__/header-warnings.test.ts +238 -0
- package/plugins/steve/__tests__/mutations.test.ts +50 -0
- package/plugins/steve/__tests__/resource-utils.test.ts +159 -0
- package/plugins/steve/__tests__/steve-class.test.ts +59 -0
- package/plugins/steve/__tests__/subscribe.spec.ts +109 -0
- package/plugins/steve/__tests__/utils/mutation.test.helpers.ts +105 -0
- package/plugins/steve/__tests__/utils/steve-mocks.ts +31 -0
- package/plugins/steve/accept-or-reject-socket-message.ts +103 -0
- package/plugins/steve/actions.js +386 -0
- package/plugins/steve/caches/resourceCache.js +60 -0
- package/plugins/steve/getters.js +342 -0
- package/plugins/steve/header-warnings.ts +91 -0
- package/plugins/steve/hybrid-class.js +102 -0
- package/plugins/steve/index.js +76 -0
- package/plugins/steve/mutations.js +210 -0
- package/plugins/steve/norman-class.js +198 -0
- package/plugins/steve/performanceTesting.js +128 -0
- package/plugins/steve/projectAndNamespaceFiltering.utils.ts +80 -0
- package/plugins/steve/resource-utils.ts +38 -0
- package/plugins/steve/resourceWatcher.js +251 -0
- package/plugins/steve/schema.d.ts +22 -0
- package/plugins/steve/schema.utils.js +25 -0
- package/plugins/steve/steve-class.js +61 -0
- package/plugins/steve/steve-description-class.js +36 -0
- package/plugins/steve/steve-pagination-utils.ts +513 -0
- package/plugins/steve/subscribe.js +1092 -0
- package/plugins/steve/worker/index.js +24 -0
- package/plugins/steve/worker/web-worker.advanced.js +320 -0
- package/plugins/steve/worker/web-worker.basic.js +116 -0
- package/plugins/steve-create-worker.js +14 -0
- package/plugins/version.js +11 -0
- package/promptRemove/management.cattle.io.fleetworkspace.vue +98 -0
- package/promptRemove/management.cattle.io.globalrole.vue +49 -0
- package/promptRemove/management.cattle.io.project.vue +131 -0
- package/promptRemove/management.cattle.io.roletemplate.vue +51 -0
- package/promptRemove/mixin/roleDeletionCheck.js +105 -0
- package/promptRemove/pod.vue +132 -0
- package/public/index.html +74 -0
- package/rancher-components/Accordion/Accordion.test.ts +45 -0
- package/rancher-components/Accordion/Accordion.vue +86 -0
- package/rancher-components/Accordion/index.ts +1 -0
- package/rancher-components/BadgeState/BadgeState.test.ts +12 -0
- package/rancher-components/BadgeState/BadgeState.vue +118 -0
- package/rancher-components/BadgeState/index.ts +1 -0
- package/rancher-components/Banner/Banner.test.ts +59 -0
- package/rancher-components/Banner/Banner.vue +257 -0
- package/rancher-components/Banner/index.ts +1 -0
- package/rancher-components/Card/Card.test.ts +37 -0
- package/rancher-components/Card/Card.vue +187 -0
- package/rancher-components/Card/index.ts +1 -0
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +68 -0
- package/rancher-components/Form/Checkbox/Checkbox.vue +488 -0
- package/rancher-components/Form/Checkbox/index.ts +1 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +57 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +471 -0
- package/rancher-components/Form/LabeledInput/index.ts +1 -0
- package/rancher-components/Form/Radio/RadioButton.test.ts +33 -0
- package/rancher-components/Form/Radio/RadioButton.vue +304 -0
- package/rancher-components/Form/Radio/RadioGroup.test.ts +27 -0
- package/rancher-components/Form/Radio/RadioGroup.vue +298 -0
- package/rancher-components/Form/Radio/index.ts +2 -0
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +199 -0
- package/rancher-components/Form/TextArea/index.ts +1 -0
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +94 -0
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +192 -0
- package/rancher-components/Form/ToggleSwitch/index.ts +1 -0
- package/rancher-components/Form/index.ts +5 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +140 -0
- package/rancher-components/LabeledTooltip/index.ts +1 -0
- package/rancher-components/RcButton/RcButton.test.ts +97 -0
- package/rancher-components/RcButton/RcButton.vue +95 -0
- package/rancher-components/RcButton/index.ts +2 -0
- package/rancher-components/RcButton/types.ts +17 -0
- package/rancher-components/RcDropdown/RcDropdown.vue +124 -0
- package/rancher-components/RcDropdown/RcDropdownItem.vue +121 -0
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +66 -0
- package/rancher-components/RcDropdown/RcDropdownSeparator.vue +6 -0
- package/rancher-components/RcDropdown/RcDropdownTrigger.vue +42 -0
- package/rancher-components/RcDropdown/index.ts +5 -0
- package/rancher-components/RcDropdown/types.ts +49 -0
- package/rancher-components/RcDropdown/useDropdownCollection.ts +46 -0
- package/rancher-components/RcDropdown/useDropdownContext.ts +113 -0
- package/rancher-components/StringList/StringList.test.ts +754 -0
- package/rancher-components/StringList/StringList.vue +645 -0
- package/rancher-components/StringList/index.ts +1 -0
- package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +69 -0
- package/scripts/build-pkg.sh +102 -0
- package/scripts/clean +6 -0
- package/scripts/drone-build-pkg.sh +31 -0
- package/scripts/extension/bundle +86 -0
- package/scripts/extension/helm/charts/ui-plugin-server/.helmignore +23 -0
- package/scripts/extension/helm/charts/ui-plugin-server/Chart.yaml +18 -0
- package/scripts/extension/helm/charts/ui-plugin-server/templates/_helpers.tpl +63 -0
- package/scripts/extension/helm/charts/ui-plugin-server/templates/cr.yaml +14 -0
- package/scripts/extension/helm/charts/ui-plugin-server/values.yaml +8 -0
- package/scripts/extension/helm/package/Dockerfile +27 -0
- package/scripts/extension/helm/package/nginx.conf +17 -0
- package/scripts/extension/helm/scripts/package +31 -0
- package/scripts/extension/helm/scripts/patch +128 -0
- package/scripts/extension/helm/scripts/version +31 -0
- package/scripts/extension/helmpatch +67 -0
- package/scripts/extension/parse-tag-name +39 -0
- package/scripts/extension/publish +476 -0
- package/scripts/pkgfile.js +23 -0
- package/scripts/publish-pkg.sh +18 -0
- package/scripts/publish-shell.sh +115 -0
- package/scripts/record-deps.js +37 -0
- package/scripts/serve-pkgs +71 -0
- package/scripts/sync-shell-deps +37 -0
- package/scripts/test-plugins-build.sh +248 -0
- package/scripts/typegen.sh +102 -0
- package/scripts/vue-migrate.js +686 -0
- package/server/har-file.js +183 -0
- package/server/server-middleware.js +11 -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/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +39 -0
- package/store/__tests__/auth.test.ts +120 -0
- package/store/__tests__/catalog.test.ts +207 -0
- package/store/__tests__/index.test.ts +110 -0
- package/store/__tests__/type-map.test.ts +1122 -0
- package/store/action-menu.js +240 -0
- package/store/auth.js +409 -0
- package/store/aws.js +256 -0
- package/store/catalog.js +666 -0
- package/store/cru-resource.ts +26 -0
- package/store/customisation.js +35 -0
- package/store/digitalocean.js +198 -0
- package/store/features.js +73 -0
- package/store/github.js +109 -0
- package/store/gitlab.js +159 -0
- package/store/growl.js +98 -0
- package/store/i18n.js +356 -0
- package/store/index.js +1290 -0
- package/store/linode.js +142 -0
- package/store/plugins.js +210 -0
- package/store/pnap.js +128 -0
- package/store/prefs.js +531 -0
- package/store/resource-fetch.js +44 -0
- package/store/store-types.js +7 -0
- package/store/type-map.js +2057 -0
- package/store/type-map.utils.ts +243 -0
- package/store/uiplugins.ts +67 -0
- package/store/wm.js +95 -0
- package/tsconfig.json +48 -0
- package/tsconfig.paths.json +21 -0
- package/types/api.d.ts +1 -0
- package/types/components/labeledSelect.ts +50 -0
- package/types/components/paginatedResourceTable.ts +25 -0
- package/types/components/resourceLabeledSelect.ts +48 -0
- package/types/fleet.d.ts +1 -0
- package/types/form.ts +1 -0
- package/types/generic.ts +2 -0
- package/types/rancher/index.d.ts +9 -0
- package/types/resources/fleet.d.ts +57 -0
- package/types/resources/pod-security-admission.ts +36 -0
- package/types/resources/settings.d.ts +93 -0
- package/types/resources/userPreferences.d.ts +13 -0
- package/types/shell/index.d.ts +4704 -0
- package/types/store/dashboard-store.types.ts +46 -0
- package/types/store/pagination.types.ts +470 -0
- package/types/store/type-map.ts +30 -0
- package/types/store/vuex.d.ts +17 -0
- package/types/t.ts +1 -0
- package/types/vue-shim.d +20 -0
- package/types/vue-shim.d.ts +20 -0
- package/utils/__mocks__/socket.js +21 -0
- package/utils/__tests__/array.test.ts +514 -0
- package/utils/__tests__/cluster.test.ts +57 -0
- package/utils/__tests__/create-yaml.test.ts +490 -0
- package/utils/__tests__/formatter.test.ts +77 -0
- package/utils/__tests__/grafana.test.ts +44 -0
- package/utils/__tests__/kontainer.test.ts +180 -0
- package/utils/__tests__/object.test.ts +409 -0
- package/utils/__tests__/pod-security-admission.test.ts +61 -0
- package/utils/__tests__/selector.test.ts +444 -0
- package/utils/__tests__/sort.test.ts +61 -0
- package/utils/__tests__/string.test.ts +91 -0
- package/utils/__tests__/version.test.ts +18 -0
- package/utils/alertmanagerconfig.js +181 -0
- package/utils/array.ts +256 -0
- package/utils/async.ts +38 -0
- package/utils/auth.js +334 -0
- package/utils/aws.js +0 -0
- package/utils/axios.js +171 -0
- package/utils/azure.js +24 -0
- package/utils/banners.js +103 -0
- package/utils/clipboard.js +5 -0
- package/utils/cluster.js +298 -0
- package/utils/color.js +147 -0
- package/utils/computed.js +45 -0
- package/utils/config.js +4 -0
- package/utils/cookie-universal.js +10 -0
- package/utils/create-yaml.js +518 -0
- package/utils/crypto/LICENSE.txt +15 -0
- package/utils/crypto/browserHashUtils.js +51 -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 +32 -0
- package/utils/dom.js +15 -0
- package/utils/download.js +35 -0
- package/utils/duration.js +43 -0
- package/utils/dynamic-importer.js +134 -0
- package/utils/ember-page.js +30 -0
- package/utils/error.js +131 -0
- package/utils/favicon.js +49 -0
- package/utils/fleet.ts +191 -0
- package/utils/formatter.js +13 -0
- package/utils/gatekeeper/util.js +35 -0
- package/utils/gc/gc-interval.ts +40 -0
- package/utils/gc/gc-root-store.js +76 -0
- package/utils/gc/gc-route-changed.ts +44 -0
- package/utils/gc/gc-types.ts +21 -0
- package/utils/gc/gc.ts +282 -0
- package/utils/git.ts +92 -0
- package/utils/grafana.js +114 -0
- package/utils/ingress.ts +64 -0
- package/utils/kontainer.ts +190 -0
- package/utils/kube.js +9 -0
- package/utils/monitoring.js +63 -0
- package/utils/namespace-filter.js +43 -0
- package/utils/object.js +501 -0
- package/utils/pagination-utils.ts +176 -0
- package/utils/pagination-wrapper.ts +70 -0
- package/utils/parse-externalid.js +139 -0
- package/utils/platform.js +64 -0
- package/utils/pod-security-admission.ts +39 -0
- package/utils/poller-sequential.js +53 -0
- package/utils/poller.js +39 -0
- package/utils/position.js +172 -0
- package/utils/promise.js +115 -0
- package/utils/queue.js +70 -0
- package/utils/router.js +119 -0
- package/utils/select.js +65 -0
- package/utils/selector.js +229 -0
- package/utils/settings.ts +108 -0
- package/utils/socket.js +409 -0
- package/utils/sort.js +225 -0
- package/utils/stream.js +49 -0
- package/utils/string.js +362 -0
- package/utils/svg-filter.js +301 -0
- package/utils/time.js +121 -0
- package/utils/title.ts +3 -0
- package/utils/type-helpers.ts +9 -0
- package/utils/uiplugins.ts +319 -0
- package/utils/unit-tests/ChildRenderingRouterLinkStub.ts +36 -0
- package/utils/units.js +184 -0
- package/utils/url.ts +171 -0
- package/utils/v-sphere.ts +285 -0
- package/utils/validators/__tests__/cidr.test.ts +33 -0
- package/utils/validators/cidr.js +14 -0
- package/utils/validators/cluster-name.js +12 -0
- package/utils/validators/container-images.js +24 -0
- package/utils/validators/cron-schedule.js +14 -0
- package/utils/validators/flow-output.js +15 -0
- package/utils/validators/formRules/__tests__/index.test.ts +1218 -0
- package/utils/validators/formRules/index.ts +535 -0
- package/utils/validators/index.js +244 -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 +27 -0
- package/utils/validators/service.js +136 -0
- package/utils/validators/setting.js +9 -0
- package/utils/version.js +128 -0
- package/utils/versions.ts +39 -0
- package/utils/width.js +39 -0
- package/utils/window.js +46 -0
- package/vue-config-helper.js +135 -0
- package/vue.config.js +577 -0
|
@@ -0,0 +1,2547 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import difference from 'lodash/difference';
|
|
3
|
+
import throttle from 'lodash/throttle';
|
|
4
|
+
import isArray from 'lodash/isArray';
|
|
5
|
+
import merge from 'lodash/merge';
|
|
6
|
+
import CreateEditView from '@shell/mixins/create-edit-view';
|
|
7
|
+
import FormValidation from '@shell/mixins/form-validation';
|
|
8
|
+
import { normalizeName } from '@shell/utils/kube';
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
CAPI,
|
|
12
|
+
MANAGEMENT,
|
|
13
|
+
NAMESPACE,
|
|
14
|
+
NORMAN,
|
|
15
|
+
SCHEMA,
|
|
16
|
+
DEFAULT_WORKSPACE,
|
|
17
|
+
SECRET,
|
|
18
|
+
HCI,
|
|
19
|
+
} from '@shell/config/types';
|
|
20
|
+
import { _CREATE, _EDIT, _VIEW } from '@shell/config/query-params';
|
|
21
|
+
|
|
22
|
+
import { findBy, removeObject, clear } from '@shell/utils/array';
|
|
23
|
+
import { createYaml } from '@shell/utils/create-yaml';
|
|
24
|
+
import {
|
|
25
|
+
clone, diff, set, get, isEmpty, mergeWithReplaceArrays
|
|
26
|
+
} from '@shell/utils/object';
|
|
27
|
+
import { allHash } from '@shell/utils/promise';
|
|
28
|
+
import { getAllOptionsAfterCurrentVersion, filterOutDeprecatedPatchVersions, isHarvesterSatisfiesVersion, labelForAddon } from '@shell/utils/cluster';
|
|
29
|
+
|
|
30
|
+
import { BadgeState } from '@components/BadgeState';
|
|
31
|
+
import { Banner } from '@components/Banner';
|
|
32
|
+
import CruResource, { CONTEXT_HOOK_EDIT_YAML } from '@shell/components/CruResource';
|
|
33
|
+
import Loading from '@shell/components/Loading';
|
|
34
|
+
import NameNsDescription from '@shell/components/form/NameNsDescription';
|
|
35
|
+
import Tab from '@shell/components/Tabbed/Tab';
|
|
36
|
+
import Tabbed from '@shell/components/Tabbed';
|
|
37
|
+
|
|
38
|
+
import { canViewClusterMembershipEditor } from '@shell/components/form/Members/ClusterMembershipEditor';
|
|
39
|
+
import semver from 'semver';
|
|
40
|
+
|
|
41
|
+
import { CLOUD_CREDENTIAL_OVERRIDE } from '@shell/models/nodedriver';
|
|
42
|
+
import { SETTING } from '@shell/config/settings';
|
|
43
|
+
import { base64Encode } from '@shell/utils/crypto';
|
|
44
|
+
import { CAPI as CAPI_ANNOTATIONS, CLUSTER_BADGE } from '@shell/config/labels-annotations';
|
|
45
|
+
import AgentEnv from '@shell/edit/provisioning.cattle.io.cluster/AgentEnv';
|
|
46
|
+
import Labels from '@shell/edit/provisioning.cattle.io.cluster/Labels';
|
|
47
|
+
import MachinePool from '@shell/edit/provisioning.cattle.io.cluster/tabs/MachinePool';
|
|
48
|
+
import SelectCredential from './SelectCredential';
|
|
49
|
+
import { ELEMENTAL_SCHEMA_IDS, KIND, ELEMENTAL_CLUSTER_PROVIDER } from '../../config/elemental-types';
|
|
50
|
+
import AgentConfiguration from '@shell/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue';
|
|
51
|
+
import { getApplicableExtensionEnhancements } from '@shell/core/plugin-helpers';
|
|
52
|
+
import { ExtensionPoint, TabLocation } from '@shell/core/types';
|
|
53
|
+
import MemberRoles from '@shell/edit/provisioning.cattle.io.cluster/tabs/MemberRoles';
|
|
54
|
+
import Basics from '@shell/edit/provisioning.cattle.io.cluster/tabs/Basics';
|
|
55
|
+
import Etcd from '@shell/edit/provisioning.cattle.io.cluster/tabs/etcd';
|
|
56
|
+
import Networking from '@shell/edit/provisioning.cattle.io.cluster/tabs/networking';
|
|
57
|
+
import Upgrade from '@shell/edit/provisioning.cattle.io.cluster/tabs/upgrade';
|
|
58
|
+
import Registries from '@shell/edit/provisioning.cattle.io.cluster/tabs/registries';
|
|
59
|
+
import AddOnConfig from '@shell/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig';
|
|
60
|
+
import Advanced from '@shell/edit/provisioning.cattle.io.cluster/tabs/Advanced';
|
|
61
|
+
import { DEFAULT_COMMON_BASE_PATH, DEFAULT_SUBDIRS } from '@shell/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig';
|
|
62
|
+
import ClusterAppearance from '@shell/components/form/ClusterAppearance';
|
|
63
|
+
import AddOnAdditionalManifest from '@shell/edit/provisioning.cattle.io.cluster/tabs/AddOnAdditionalManifest';
|
|
64
|
+
import VsphereUtils, { VMWARE_VSPHERE } from '@shell/utils/v-sphere';
|
|
65
|
+
import { mapGetters } from 'vuex';
|
|
66
|
+
import { SCHEDULING_CUSTOMIZATION } from '@shell/store/features';
|
|
67
|
+
const HARVESTER = 'harvester';
|
|
68
|
+
const HARVESTER_CLOUD_PROVIDER = 'harvester-cloud-provider';
|
|
69
|
+
const NETBIOS_TRUNCATION_LENGTH = 15;
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Classes to be adopted by the node badges in Machine pools
|
|
73
|
+
*/
|
|
74
|
+
const NODE_TOTAL = {
|
|
75
|
+
error: {
|
|
76
|
+
color: 'bg-error',
|
|
77
|
+
icon: 'icon-x',
|
|
78
|
+
},
|
|
79
|
+
warning: {
|
|
80
|
+
color: 'bg-warning',
|
|
81
|
+
icon: 'icon-warning',
|
|
82
|
+
},
|
|
83
|
+
success: {
|
|
84
|
+
color: 'bg-success',
|
|
85
|
+
icon: 'icon-checkmark'
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
const CLUSTER_AGENT_CUSTOMIZATION = 'clusterAgentDeploymentCustomization';
|
|
89
|
+
const FLEET_AGENT_CUSTOMIZATION = 'fleetAgentDeploymentCustomization';
|
|
90
|
+
|
|
91
|
+
const REGISTRIES_TAB_NAME = 'registry';
|
|
92
|
+
|
|
93
|
+
const isAzureK8sUnsupported = (version) => semver.gte(version, '1.30.0');
|
|
94
|
+
|
|
95
|
+
export default {
|
|
96
|
+
emits: ['update:value', 'input'],
|
|
97
|
+
|
|
98
|
+
components: {
|
|
99
|
+
AgentEnv,
|
|
100
|
+
BadgeState,
|
|
101
|
+
Banner,
|
|
102
|
+
AgentConfiguration,
|
|
103
|
+
CruResource,
|
|
104
|
+
Labels,
|
|
105
|
+
Loading,
|
|
106
|
+
MachinePool,
|
|
107
|
+
NameNsDescription,
|
|
108
|
+
SelectCredential,
|
|
109
|
+
Tab,
|
|
110
|
+
Tabbed,
|
|
111
|
+
MemberRoles,
|
|
112
|
+
Basics,
|
|
113
|
+
Etcd,
|
|
114
|
+
Networking,
|
|
115
|
+
Upgrade,
|
|
116
|
+
Registries,
|
|
117
|
+
AddOnConfig,
|
|
118
|
+
Advanced,
|
|
119
|
+
ClusterAppearance,
|
|
120
|
+
AddOnAdditionalManifest
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
mixins: [CreateEditView, FormValidation],
|
|
124
|
+
|
|
125
|
+
props: {
|
|
126
|
+
mode: {
|
|
127
|
+
type: String,
|
|
128
|
+
required: true,
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
value: {
|
|
132
|
+
type: Object,
|
|
133
|
+
required: true,
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
provider: {
|
|
137
|
+
type: String,
|
|
138
|
+
required: true,
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
providerConfig: {
|
|
142
|
+
type: Object,
|
|
143
|
+
default: () => null
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
async fetch() {
|
|
148
|
+
await this.fetchRke2Versions();
|
|
149
|
+
await this.initSpecs();
|
|
150
|
+
await this.initAddons();
|
|
151
|
+
await this.initRegistry();
|
|
152
|
+
await this.initSchedulingCustomization();
|
|
153
|
+
|
|
154
|
+
Object.entries(this.chartValues).forEach(([name, value]) => {
|
|
155
|
+
const key = this.chartVersionKey(name);
|
|
156
|
+
|
|
157
|
+
this.userChartValues[key] = value;
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
this.setAgentConfiguration();
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
data() {
|
|
164
|
+
if (!this.value.spec.rkeConfig) {
|
|
165
|
+
this.value.spec.rkeConfig = {};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
if (!this.value.spec.rkeConfig.chartValues) {
|
|
169
|
+
this.value.spec.rkeConfig.chartValues = {};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (!this.value.spec.rkeConfig.upgradeStrategy) {
|
|
173
|
+
this.value.spec.rkeConfig.upgradeStrategy = {
|
|
174
|
+
controlPlaneConcurrency: '1',
|
|
175
|
+
controlPlaneDrainOptions: {},
|
|
176
|
+
workerConcurrency: '1',
|
|
177
|
+
workerDrainOptions: {},
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// default for dataDirectories configuration obj
|
|
182
|
+
if (!this.value.spec.rkeConfig.dataDirectories) {
|
|
183
|
+
this.value.spec.rkeConfig.dataDirectories = {
|
|
184
|
+
systemAgent: '',
|
|
185
|
+
provisioning: '',
|
|
186
|
+
k8sDistro: '',
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// default for dataDirectories configuration systemAgent config
|
|
191
|
+
if (!this.value.spec.rkeConfig.dataDirectories.systemAgent) {
|
|
192
|
+
this.value.spec.rkeConfig.dataDirectories.systemAgent = '';
|
|
193
|
+
}
|
|
194
|
+
// default for dataDirectories configuration provisioning config
|
|
195
|
+
if (!this.value.spec.rkeConfig.dataDirectories.provisioning) {
|
|
196
|
+
this.value.spec.rkeConfig.dataDirectories.provisioning = '';
|
|
197
|
+
}
|
|
198
|
+
// default for dataDirectories configuration k8sDistro config
|
|
199
|
+
if (!this.value.spec.rkeConfig.dataDirectories.k8sDistro) {
|
|
200
|
+
this.value.spec.rkeConfig.dataDirectories.k8sDistro = '';
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (!this.value.spec.rkeConfig.machineGlobalConfig) {
|
|
204
|
+
this.value.spec.rkeConfig.machineGlobalConfig = {};
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (!this.value.spec.rkeConfig.machineSelectorConfig?.length) {
|
|
208
|
+
this.value.spec.rkeConfig.machineSelectorConfig = [{ config: {} }];
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const truncateLimit = this.value.defaultHostnameLengthLimit || 0;
|
|
212
|
+
|
|
213
|
+
return {
|
|
214
|
+
loadedOnce: false,
|
|
215
|
+
lastIdx: 0,
|
|
216
|
+
allPSAs: [],
|
|
217
|
+
credentialId: '',
|
|
218
|
+
credential: null,
|
|
219
|
+
machinePools: null,
|
|
220
|
+
rke2Versions: null,
|
|
221
|
+
k3sVersions: null,
|
|
222
|
+
defaultRke2: '',
|
|
223
|
+
defaultK3s: '',
|
|
224
|
+
s3Backup: false,
|
|
225
|
+
/**
|
|
226
|
+
* All info related to a specific version of the chart
|
|
227
|
+
*
|
|
228
|
+
* This includes chart itself, README and values
|
|
229
|
+
*
|
|
230
|
+
* { [chartName:string]: { chart: json, readme: string, values: json } }
|
|
231
|
+
*/
|
|
232
|
+
versionInfo: {},
|
|
233
|
+
membershipUpdate: {},
|
|
234
|
+
showDeprecatedPatchVersions: false,
|
|
235
|
+
systemRegistry: null,
|
|
236
|
+
registryHost: null,
|
|
237
|
+
showCustomRegistryInput: false,
|
|
238
|
+
showCustomRegistryAdvancedInput: false,
|
|
239
|
+
registrySecret: null,
|
|
240
|
+
userChartValues: {},
|
|
241
|
+
userChartValuesTemp: {},
|
|
242
|
+
addonsRev: 0,
|
|
243
|
+
fvFormRuleSets: [{
|
|
244
|
+
path: 'metadata.name', rules: ['subDomain'], translationKey: 'nameNsDescription.name.label'
|
|
245
|
+
}],
|
|
246
|
+
harvesterVersionRange: {},
|
|
247
|
+
cisOverride: false,
|
|
248
|
+
truncateLimit,
|
|
249
|
+
busy: false,
|
|
250
|
+
machinePoolValidation: {}, // map of validation states for each machine pool
|
|
251
|
+
machinePoolErrors: {},
|
|
252
|
+
addonConfigValidation: {}, // validation state of each addon config (boolean of whether codemirror's yaml lint passed)
|
|
253
|
+
allNamespaces: [],
|
|
254
|
+
extensionTabs: getApplicableExtensionEnhancements(this, ExtensionPoint.TAB, TabLocation.CLUSTER_CREATE_RKE2, this.$route, this),
|
|
255
|
+
clusterAgentDeploymentCustomization: null,
|
|
256
|
+
schedulingCustomizationFeatureEnabled: false,
|
|
257
|
+
clusterAgentDefaultPC: null,
|
|
258
|
+
clusterAgentDefaultPDB: null,
|
|
259
|
+
activeTab: null,
|
|
260
|
+
REGISTRIES_TAB_NAME,
|
|
261
|
+
labelForAddon
|
|
262
|
+
|
|
263
|
+
};
|
|
264
|
+
},
|
|
265
|
+
|
|
266
|
+
computed: {
|
|
267
|
+
...mapGetters({ features: 'features/get' }),
|
|
268
|
+
isActiveTabRegistries() {
|
|
269
|
+
return this.activeTab?.selectedName === REGISTRIES_TAB_NAME;
|
|
270
|
+
},
|
|
271
|
+
clusterName() {
|
|
272
|
+
return this.value.metadata?.name || '';
|
|
273
|
+
},
|
|
274
|
+
showClusterAppearance() {
|
|
275
|
+
return this.mode === _CREATE;
|
|
276
|
+
},
|
|
277
|
+
clusterBadgeAbbreviation() {
|
|
278
|
+
return this.$store.getters['customisation/getPreviewCluster'];
|
|
279
|
+
},
|
|
280
|
+
rkeConfig() {
|
|
281
|
+
return this.value.spec.rkeConfig;
|
|
282
|
+
},
|
|
283
|
+
|
|
284
|
+
isElementalCluster() {
|
|
285
|
+
return this.provider === ELEMENTAL_CLUSTER_PROVIDER || this.value?.machineProvider?.toLowerCase() === KIND.MACHINE_INV_SELECTOR_TEMPLATES.toLowerCase();
|
|
286
|
+
},
|
|
287
|
+
|
|
288
|
+
chartValues() {
|
|
289
|
+
return this.value.spec.rkeConfig.chartValues;
|
|
290
|
+
},
|
|
291
|
+
|
|
292
|
+
serverConfig() {
|
|
293
|
+
return this.value.spec.rkeConfig.machineGlobalConfig;
|
|
294
|
+
},
|
|
295
|
+
|
|
296
|
+
agentConfig() {
|
|
297
|
+
return this.value.agentConfig;
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
unsupportedSelectorConfig() {
|
|
301
|
+
let global = 0;
|
|
302
|
+
let kubeletOnly = 0;
|
|
303
|
+
let other = 0;
|
|
304
|
+
|
|
305
|
+
// The form supports one config that has no selector for all the main parts
|
|
306
|
+
// And one or more configs that have a selector and exactly only kubelet-args.
|
|
307
|
+
// If there are any other properties set, or multiple configs with no selector
|
|
308
|
+
// show a warning that you're editing only part of the config in the UI.
|
|
309
|
+
|
|
310
|
+
for (const conf of this.value.spec?.rkeConfig?.machineSelectorConfig) {
|
|
311
|
+
if (conf.machineLabelSelector) {
|
|
312
|
+
const keys = Object.keys(conf.config || {});
|
|
313
|
+
|
|
314
|
+
if (keys.length === 0 || (keys.length === 1 && keys[0] === 'kubelet-arg')) {
|
|
315
|
+
kubeletOnly++;
|
|
316
|
+
} else {
|
|
317
|
+
other++;
|
|
318
|
+
}
|
|
319
|
+
} else {
|
|
320
|
+
global++;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// eslint-disable-next-line no-console
|
|
325
|
+
console.log(`Global: ${ global }, Kubelet Only: ${ kubeletOnly }, Other: ${ other }`);
|
|
326
|
+
|
|
327
|
+
return (global > 1 || other > 0);
|
|
328
|
+
},
|
|
329
|
+
|
|
330
|
+
versionOptions() {
|
|
331
|
+
const cur = this.liveValue?.spec?.kubernetesVersion || '';
|
|
332
|
+
const existingRke2 = this.mode === _EDIT && cur.includes('rke2');
|
|
333
|
+
const existingK3s = this.mode === _EDIT && cur.includes('k3s');
|
|
334
|
+
const isAzure = this.agentConfig?.['cloud-provider-name'] === 'azure';
|
|
335
|
+
|
|
336
|
+
let allValidRke2Versions = getAllOptionsAfterCurrentVersion(this.$store, this.rke2Versions, (existingRke2 ? cur : null), this.defaultRke2);
|
|
337
|
+
let allValidK3sVersions = getAllOptionsAfterCurrentVersion(this.$store, this.k3sVersions, (existingK3s ? cur : null), this.defaultK3s);
|
|
338
|
+
|
|
339
|
+
if (!this.showDeprecatedPatchVersions) {
|
|
340
|
+
// Normally, we only want to show the most recent patch version
|
|
341
|
+
// for each Kubernetes minor version. However, if the user
|
|
342
|
+
// opts in to showing deprecated versions, we don't filter them.
|
|
343
|
+
allValidRke2Versions = filterOutDeprecatedPatchVersions(allValidRke2Versions, cur);
|
|
344
|
+
allValidK3sVersions = filterOutDeprecatedPatchVersions(allValidK3sVersions, cur);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (isAzure) {
|
|
348
|
+
allValidRke2Versions = allValidRke2Versions.filter((v) => !isAzureK8sUnsupported(v.value));
|
|
349
|
+
allValidK3sVersions = allValidK3sVersions.filter((v) => !isAzureK8sUnsupported(v.value));
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
const showRke2 = allValidRke2Versions.length && !existingK3s;
|
|
353
|
+
const showK3s = allValidK3sVersions.length && !existingRke2;
|
|
354
|
+
const out = [];
|
|
355
|
+
|
|
356
|
+
if (showRke2) {
|
|
357
|
+
if (showK3s) {
|
|
358
|
+
out.push({ kind: 'group', label: this.t('cluster.provider.rke2') });
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
out.push(...allValidRke2Versions);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
if (showK3s) {
|
|
365
|
+
if (showRke2) {
|
|
366
|
+
out.push({ kind: 'group', label: this.t('cluster.provider.k3s') });
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
out.push(...allValidK3sVersions);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
if (cur) {
|
|
373
|
+
const existing = out.find((x) => x.value === cur);
|
|
374
|
+
|
|
375
|
+
if (existing) {
|
|
376
|
+
existing.disabled = false;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return out;
|
|
381
|
+
},
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Kube Version
|
|
385
|
+
*/
|
|
386
|
+
selectedVersion() {
|
|
387
|
+
const str = this.value.spec.kubernetesVersion;
|
|
388
|
+
|
|
389
|
+
if (!str) {
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
const out = findBy(this.versionOptions, 'value', str);
|
|
394
|
+
|
|
395
|
+
// Adding the option 'none' to Container Network select (used in Basics component)
|
|
396
|
+
// https://github.com/rancher/dashboard/issues/10338
|
|
397
|
+
// there's an update loop on refresh that might include 'none'
|
|
398
|
+
// multiple times... Prevent that
|
|
399
|
+
if (out?.serverArgs?.cni?.options && !out.serverArgs?.cni?.options.includes('none')) {
|
|
400
|
+
out.serverArgs.cni.options.push('none');
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
return out;
|
|
404
|
+
},
|
|
405
|
+
|
|
406
|
+
haveArgInfo() {
|
|
407
|
+
return Boolean(this.selectedVersion?.serverArgs && this.selectedVersion?.agentArgs);
|
|
408
|
+
},
|
|
409
|
+
|
|
410
|
+
serverArgs() {
|
|
411
|
+
return this.selectedVersion?.serverArgs || {};
|
|
412
|
+
},
|
|
413
|
+
|
|
414
|
+
agentArgs() {
|
|
415
|
+
return this.selectedVersion?.agentArgs || {};
|
|
416
|
+
},
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* The addons (kube charts) applicable for the selected kube version
|
|
420
|
+
*
|
|
421
|
+
* { [chartName:string]: { repo: string, version: string } }
|
|
422
|
+
*/
|
|
423
|
+
chartVersions() {
|
|
424
|
+
return this.selectedVersion?.charts || {};
|
|
425
|
+
},
|
|
426
|
+
|
|
427
|
+
needCredential() {
|
|
428
|
+
// Check non-provider specific config
|
|
429
|
+
if (
|
|
430
|
+
this.provider === 'custom' ||
|
|
431
|
+
this.provider === 'import' ||
|
|
432
|
+
this.isElementalCluster || // Elemental cluster can make use of `cloud-credential`: false
|
|
433
|
+
this.mode === _VIEW
|
|
434
|
+
) {
|
|
435
|
+
return false;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
// Check provider specific config
|
|
439
|
+
if (this.cloudCredentialsOverride === true || this.cloudCredentialsOverride === false) {
|
|
440
|
+
return this.cloudCredentialsOverride;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
if (this.providerConfig?.spec?.builtin === false && this.providerConfig?.spec?.addCloudCredential === false) {
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
return true;
|
|
448
|
+
},
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Override the native way of determining if cloud credentials are required (builtin ++ node driver spec.addCloudCredentials)
|
|
452
|
+
*
|
|
453
|
+
* 1) Override via extensions
|
|
454
|
+
* - `true` or actual component - return true
|
|
455
|
+
* - `false` - return false
|
|
456
|
+
* 2) Override via hardcoded setting
|
|
457
|
+
*/
|
|
458
|
+
cloudCredentialsOverride() {
|
|
459
|
+
const cloudCredential = this.$plugin.getDynamic('cloud-credential', this.provider);
|
|
460
|
+
|
|
461
|
+
if (cloudCredential === undefined) {
|
|
462
|
+
return CLOUD_CREDENTIAL_OVERRIDE[this.provider];
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
return !!cloudCredential;
|
|
466
|
+
},
|
|
467
|
+
|
|
468
|
+
hasMachinePools() {
|
|
469
|
+
if (this.provider === 'custom' || this.provider === 'import') {
|
|
470
|
+
return false;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
return true;
|
|
474
|
+
},
|
|
475
|
+
|
|
476
|
+
unremovedMachinePools() {
|
|
477
|
+
return (this.machinePools || []).filter((x) => !x.remove);
|
|
478
|
+
},
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Extension provider where being provisioned by an extension
|
|
482
|
+
*/
|
|
483
|
+
extensionProvider() {
|
|
484
|
+
const extClass = this.$plugin.getDynamic('provisioner', this.provider);
|
|
485
|
+
|
|
486
|
+
if (extClass) {
|
|
487
|
+
return new extClass({
|
|
488
|
+
dispatch: this.$store.dispatch,
|
|
489
|
+
getters: this.$store.getters,
|
|
490
|
+
axios: this.$store.$axios,
|
|
491
|
+
$plugin: this.$store.app.$plugin,
|
|
492
|
+
$t: this.t,
|
|
493
|
+
isCreate: this.isCreate
|
|
494
|
+
});
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
return undefined;
|
|
498
|
+
},
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Is a namespace needed? Only supported for providers from extensions, otherwise default is no
|
|
502
|
+
*/
|
|
503
|
+
needsNamespace() {
|
|
504
|
+
return this.extensionProvider ? !!this.extensionProvider.namespaced : false;
|
|
505
|
+
},
|
|
506
|
+
|
|
507
|
+
machineConfigSchema() {
|
|
508
|
+
let schema;
|
|
509
|
+
|
|
510
|
+
if (!this.hasMachinePools) {
|
|
511
|
+
return null;
|
|
512
|
+
} else if (this.isElementalCluster) {
|
|
513
|
+
schema = ELEMENTAL_SCHEMA_IDS.MACHINE_INV_SELECTOR_TEMPLATES;
|
|
514
|
+
} else {
|
|
515
|
+
schema = `${ CAPI.MACHINE_CONFIG_GROUP }.${ this.provider }config`;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// If this is an extension provider then the extension can provide the schema
|
|
519
|
+
const extensionSchema = this.extensionProvider?.machineConfigSchema;
|
|
520
|
+
|
|
521
|
+
if (extensionSchema) {
|
|
522
|
+
// machineConfigSchema can either be the schema name (string) or the schema itself (object)
|
|
523
|
+
if (typeof extensionSchema === 'object') {
|
|
524
|
+
return extensionSchema;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// Name of schema to use
|
|
528
|
+
schema = extensionSchema;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
return this.$store.getters['management/schemaFor'](schema);
|
|
532
|
+
},
|
|
533
|
+
|
|
534
|
+
nodeTotals() {
|
|
535
|
+
const roles = ['etcd', 'controlPlane', 'worker'];
|
|
536
|
+
const counts = {};
|
|
537
|
+
const out = {
|
|
538
|
+
color: {},
|
|
539
|
+
label: {},
|
|
540
|
+
icon: {},
|
|
541
|
+
tooltip: {},
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
for (const role of roles) {
|
|
545
|
+
counts[role] = 0;
|
|
546
|
+
out.color[role] = NODE_TOTAL.success.color;
|
|
547
|
+
out.icon[role] = NODE_TOTAL.success.icon;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
for (const row of this.machinePools || []) {
|
|
551
|
+
if (row.remove) {
|
|
552
|
+
continue;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
const qty = parseInt(row.pool.quantity, 10);
|
|
556
|
+
|
|
557
|
+
if (isNaN(qty)) {
|
|
558
|
+
continue;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
for (const role of roles) {
|
|
562
|
+
counts[role] = counts[role] + (row.pool[`${ role }Role`] ? qty : 0);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
for (const role of roles) {
|
|
567
|
+
out.label[role] = this.t(`cluster.machinePool.nodeTotals.label.${ role }`, { count: counts[role] });
|
|
568
|
+
out.tooltip[role] = this.t(`cluster.machinePool.nodeTotals.tooltip.${ role }`, { count: counts[role] });
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
if (counts.etcd === 0) {
|
|
572
|
+
out.color.etcd = NODE_TOTAL.error.color;
|
|
573
|
+
out.icon.etcd = NODE_TOTAL.error.icon;
|
|
574
|
+
} else if (counts.etcd === 1 || counts.etcd % 2 === 0 || counts.etcd > 7) {
|
|
575
|
+
out.color.etcd = NODE_TOTAL.warning.color;
|
|
576
|
+
out.icon.etcd = NODE_TOTAL.warning.icon;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
if (counts.controlPlane === 0) {
|
|
580
|
+
out.color.controlPlane = NODE_TOTAL.error.color;
|
|
581
|
+
out.icon.controlPlane = NODE_TOTAL.error.icon;
|
|
582
|
+
} else if (counts.controlPlane === 1) {
|
|
583
|
+
out.color.controlPlane = NODE_TOTAL.warning.color;
|
|
584
|
+
out.icon.controlPlane = NODE_TOTAL.warning.icon;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
if (counts.worker === 0) {
|
|
588
|
+
out.color.worker = NODE_TOTAL.error.color;
|
|
589
|
+
out.icon.worker = NODE_TOTAL.error.icon;
|
|
590
|
+
} else if (counts.worker === 1) {
|
|
591
|
+
out.color.worker = NODE_TOTAL.warning.color;
|
|
592
|
+
out.icon.worker = NODE_TOTAL.warning.icon;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
return out;
|
|
596
|
+
},
|
|
597
|
+
|
|
598
|
+
showCni() {
|
|
599
|
+
return !!this.serverArgs.cni;
|
|
600
|
+
},
|
|
601
|
+
|
|
602
|
+
showCloudProvider() {
|
|
603
|
+
return !!this.agentArgs['cloud-provider-name'];
|
|
604
|
+
},
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* The chart names of the addons applicable to the current kube version and selected cloud provider
|
|
608
|
+
*/
|
|
609
|
+
addonNames() {
|
|
610
|
+
const names = [];
|
|
611
|
+
const cni = this.serverConfig.cni;
|
|
612
|
+
|
|
613
|
+
if (typeof cni === 'string') {
|
|
614
|
+
names.push(...cni.split(',').map((x) => `rke2-${ x }`));
|
|
615
|
+
} else if (Array.isArray(cni)) {
|
|
616
|
+
names.push(...cni.map((x) => `rke2-${ x }`));
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
if (this.showCloudProvider) { // Shouldn't be removed such that changes to it will re-trigger this watch
|
|
620
|
+
if (this.agentConfig?.['cloud-provider-name'] === 'rancher-vsphere') {
|
|
621
|
+
names.push('rancher-vsphere-cpi', 'rancher-vsphere-csi');
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
if (this.agentConfig?.['cloud-provider-name'] === HARVESTER) {
|
|
625
|
+
names.push(HARVESTER_CLOUD_PROVIDER);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
return names;
|
|
630
|
+
},
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* The charts of the addons applicable to the current kube version and selected cloud provider
|
|
634
|
+
*
|
|
635
|
+
* These are the charts themselves and do not include chart readme or values
|
|
636
|
+
*/
|
|
637
|
+
addonVersions() {
|
|
638
|
+
const versions = this.addonNames.map((name) => this.versionInfo[name]?.chart);
|
|
639
|
+
|
|
640
|
+
return versions.filter((x) => !!x);
|
|
641
|
+
},
|
|
642
|
+
|
|
643
|
+
cloudProviderOptions() {
|
|
644
|
+
const out = [{
|
|
645
|
+
label: this.$store.getters['i18n/t']('cluster.rke2.cloudProvider.defaultValue.label'),
|
|
646
|
+
value: '',
|
|
647
|
+
disabled: this.canAzureMigrateOnEdit
|
|
648
|
+
}];
|
|
649
|
+
|
|
650
|
+
if (!!this.agentArgs['cloud-provider-name']?.options) {
|
|
651
|
+
const preferred = this.$store.getters['plugins/cloudProviderForDriver'](this.provider);
|
|
652
|
+
|
|
653
|
+
for (const opt of this.agentArgs['cloud-provider-name']?.options) {
|
|
654
|
+
// If we don't have a preferred provider... show all options
|
|
655
|
+
const showAllOptions = preferred === undefined;
|
|
656
|
+
// If we have a preferred provider... only show default, preferred and external
|
|
657
|
+
const isPreferred = opt === preferred;
|
|
658
|
+
const isExternal = opt === 'external';
|
|
659
|
+
const isAzure = opt === 'azure';
|
|
660
|
+
|
|
661
|
+
let disabled = false;
|
|
662
|
+
|
|
663
|
+
if ((this.isHarvesterExternalCredential || this.isHarvesterIncompatible) && isPreferred) {
|
|
664
|
+
disabled = true;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
if (isAzure && isAzureK8sUnsupported(this.value.spec.kubernetesVersion)) {
|
|
668
|
+
disabled = true;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
if (!isAzure && !isExternal && this.canAzureMigrateOnEdit) {
|
|
672
|
+
disabled = true;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
if (showAllOptions || isPreferred || isExternal) {
|
|
676
|
+
out.push({
|
|
677
|
+
label: this.$store.getters['i18n/withFallback'](`cluster.cloudProvider."${ opt }".label`, null, opt),
|
|
678
|
+
value: opt,
|
|
679
|
+
disabled,
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
const cur = this.agentConfig?.['cloud-provider-name'];
|
|
686
|
+
|
|
687
|
+
if (cur && !out.find((x) => x.value === cur)) {
|
|
688
|
+
out.unshift({ label: `${ cur } (Current)`, value: cur });
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
return out;
|
|
692
|
+
},
|
|
693
|
+
|
|
694
|
+
isAzureProviderUnsupported() {
|
|
695
|
+
const isAzureAvailable = !!this.cloudProviderOptions.find((p) => p.value === 'azure');
|
|
696
|
+
const isAzureSelected = this.agentConfig['cloud-provider-name'] === 'azure';
|
|
697
|
+
|
|
698
|
+
return isAzureAvailable && (isAzureK8sUnsupported(this.value.spec.kubernetesVersion) || isAzureSelected);
|
|
699
|
+
},
|
|
700
|
+
|
|
701
|
+
canAzureMigrateOnEdit() {
|
|
702
|
+
if (!this.isEdit) {
|
|
703
|
+
return false;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
const isAzureLiveProvider = this.liveValue.agentConfig['cloud-provider-name'] === 'azure';
|
|
707
|
+
|
|
708
|
+
return isAzureLiveProvider &&
|
|
709
|
+
semver.gte(this.liveValue?.spec?.kubernetesVersion, '1.27.0') &&
|
|
710
|
+
semver.lt(this.liveValue?.spec?.kubernetesVersion, '1.30.0');
|
|
711
|
+
},
|
|
712
|
+
|
|
713
|
+
canManageMembers() {
|
|
714
|
+
return canViewClusterMembershipEditor(this.$store);
|
|
715
|
+
},
|
|
716
|
+
|
|
717
|
+
isHarvesterDriver() {
|
|
718
|
+
return this.$route.query.type === HARVESTER;
|
|
719
|
+
},
|
|
720
|
+
|
|
721
|
+
defaultVersion() {
|
|
722
|
+
const all = this.versionOptions.filter((x) => !!x.value);
|
|
723
|
+
const first = all[0]?.value;
|
|
724
|
+
const preferred = all.find((x) => x.value === this.defaultRke2)?.value;
|
|
725
|
+
|
|
726
|
+
const rke2 = getAllOptionsAfterCurrentVersion(this.$store, this.rke2Versions, null);
|
|
727
|
+
const showRke2 = rke2.length;
|
|
728
|
+
let out;
|
|
729
|
+
|
|
730
|
+
if (this.isHarvesterDriver && showRke2) {
|
|
731
|
+
const satisfiesVersion = rke2.filter((v) => {
|
|
732
|
+
return isHarvesterSatisfiesVersion(v.value);
|
|
733
|
+
}) || [];
|
|
734
|
+
|
|
735
|
+
if (satisfiesVersion.length > 0) {
|
|
736
|
+
out = satisfiesVersion[0]?.value;
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
if (!out) {
|
|
741
|
+
out = preferred || first;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
return out;
|
|
745
|
+
},
|
|
746
|
+
|
|
747
|
+
appsOSWarning() {
|
|
748
|
+
if (this.mode !== _EDIT) {
|
|
749
|
+
return null;
|
|
750
|
+
}
|
|
751
|
+
const { linuxWorkerCount, windowsWorkerCount } = this.value?.mgmt?.status || {};
|
|
752
|
+
|
|
753
|
+
if (!windowsWorkerCount) {
|
|
754
|
+
if (!!this.machinePools?.find((pool) => {
|
|
755
|
+
return pool?.config?.os === 'windows';
|
|
756
|
+
})) {
|
|
757
|
+
return this.t('cluster.banner.os', { newOS: 'Windows', existingOS: 'Linux' });
|
|
758
|
+
}
|
|
759
|
+
} else if (!linuxWorkerCount) {
|
|
760
|
+
if (this.machinePools.find((pool) => {
|
|
761
|
+
return pool?.config?.os === 'linux';
|
|
762
|
+
})) {
|
|
763
|
+
return this.t('cluster.banner.os', { newOS: 'Linux', existingOS: 'Windows' });
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
return null;
|
|
768
|
+
},
|
|
769
|
+
|
|
770
|
+
showForm() {
|
|
771
|
+
return !!this.credentialId || !this.needCredential;
|
|
772
|
+
},
|
|
773
|
+
|
|
774
|
+
isHarvesterExternalCredential() {
|
|
775
|
+
return this.credential?.harvestercredentialConfig?.clusterType === 'external';
|
|
776
|
+
},
|
|
777
|
+
|
|
778
|
+
isHarvesterIncompatible() {
|
|
779
|
+
let ccmRke2Version = (this.chartVersions['harvester-cloud-provider'] || {})['version'];
|
|
780
|
+
let csiRke2Version = (this.chartVersions['harvester-csi-driver'] || {})['version'];
|
|
781
|
+
|
|
782
|
+
const ccmVersion = this.harvesterVersionRange?.['harvester-cloud-provider'];
|
|
783
|
+
const csiVersion = this.harvesterVersionRange?.['harvester-csi-provider'];
|
|
784
|
+
|
|
785
|
+
if ((ccmRke2Version || '').endsWith('00')) {
|
|
786
|
+
ccmRke2Version = ccmRke2Version.slice(0, -2);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
if ((csiRke2Version || '').endsWith('00')) {
|
|
790
|
+
csiRke2Version = csiRke2Version.slice(0, -2);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
if (ccmVersion && csiVersion) {
|
|
794
|
+
if (semver.satisfies(ccmRke2Version, ccmVersion) &&
|
|
795
|
+
semver.satisfies(csiRke2Version, csiVersion)) {
|
|
796
|
+
return false;
|
|
797
|
+
} else {
|
|
798
|
+
return true;
|
|
799
|
+
}
|
|
800
|
+
} else {
|
|
801
|
+
return false;
|
|
802
|
+
}
|
|
803
|
+
},
|
|
804
|
+
|
|
805
|
+
validationPassed() {
|
|
806
|
+
const validRequiredPools = this.hasMachinePools ? this.hasRequiredNodes() : true;
|
|
807
|
+
|
|
808
|
+
let base = (this.provider === 'custom' || this.isElementalCluster || !!this.credentialId || !this.needCredential);
|
|
809
|
+
|
|
810
|
+
// and in all of the validation statuses for each machine pool
|
|
811
|
+
Object.values(this.machinePoolValidation).forEach((v) => (base = base && v));
|
|
812
|
+
|
|
813
|
+
const hasAddonConfigErrors = Object.values(this.addonConfigValidation).filter((v) => v === false).length > 0;
|
|
814
|
+
|
|
815
|
+
return validRequiredPools && base && !hasAddonConfigErrors;
|
|
816
|
+
},
|
|
817
|
+
currentCluster() {
|
|
818
|
+
if (this.mode === _EDIT) {
|
|
819
|
+
return { ...this.value };
|
|
820
|
+
} else {
|
|
821
|
+
return this.$store.getters['customisation/getPreviewCluster'];
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
localValue: {
|
|
825
|
+
get() {
|
|
826
|
+
return this.value;
|
|
827
|
+
},
|
|
828
|
+
set(newValue) {
|
|
829
|
+
this.$emit('update:value', newValue);
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
|
|
834
|
+
watch: {
|
|
835
|
+
clusterBadgeAbbreviation: {
|
|
836
|
+
immediate: true,
|
|
837
|
+
handler(neu) {
|
|
838
|
+
if (!neu) {
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
if (Object.keys(neu.badge).length <= 0) {
|
|
843
|
+
return { ...this.value };
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
const obj = {
|
|
847
|
+
[CLUSTER_BADGE.ICON_TEXT]: neu.badge.iconText, [CLUSTER_BADGE.COLOR]: neu.badge.color, [CLUSTER_BADGE.TEXT]: neu.badge.text
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
this.value.metadata.annotations = {
|
|
851
|
+
...this.value.metadata.annotations,
|
|
852
|
+
...obj
|
|
853
|
+
};
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
|
|
857
|
+
credentialId(val) {
|
|
858
|
+
if (val) {
|
|
859
|
+
this.credential = this.$store.getters['rancher/byId'](NORMAN.CLOUD_CREDENTIAL, this.credentialId);
|
|
860
|
+
|
|
861
|
+
if (this.isHarvesterDriver) {
|
|
862
|
+
this.setHarvesterVersionRange();
|
|
863
|
+
}
|
|
864
|
+
} else {
|
|
865
|
+
this.credential = null;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
this.value.spec.cloudCredentialSecretName = val;
|
|
869
|
+
},
|
|
870
|
+
|
|
871
|
+
addonNames(neu, old) {
|
|
872
|
+
// To catch the 'some addons' --> 'no addons' case also check array length (`difference([], [1,2,3]) === []`)
|
|
873
|
+
const diff = old.length !== neu.length || difference(neu, old).length;
|
|
874
|
+
|
|
875
|
+
if (diff) {
|
|
876
|
+
// Allow time for addonNames to update... then fetch any missing addons
|
|
877
|
+
this.$nextTick(() => this.initAddons());
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
|
|
881
|
+
selectedVersion() {
|
|
882
|
+
this.versionInfo = {}; // Invalidate cache such that version info relevent to selected kube version is updated
|
|
883
|
+
|
|
884
|
+
// Allow time for addonNames to update... then fetch any missing addons
|
|
885
|
+
this.$nextTick(() => this.initAddons());
|
|
886
|
+
if (this.mode === _CREATE) {
|
|
887
|
+
this.initServerAgentArgs();
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
|
|
891
|
+
showCni(neu) {
|
|
892
|
+
// Update `serverConfig.cni to recalculate addonNames...
|
|
893
|
+
// ... which will eventually update `value.spec.rkeConfig.chartValues`
|
|
894
|
+
if (neu) {
|
|
895
|
+
// Type supports CNI, assign default if we can
|
|
896
|
+
if (!this.serverConfig.cni) {
|
|
897
|
+
const def = this.serverArgs.cni.default;
|
|
898
|
+
|
|
899
|
+
this.serverConfig.cni = def;
|
|
900
|
+
}
|
|
901
|
+
} else {
|
|
902
|
+
// Type doesn't support cni, clear `cni`
|
|
903
|
+
this.serverConfig.cni = undefined;
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
|
|
907
|
+
showCloudProvider(neu) {
|
|
908
|
+
if (!neu) {
|
|
909
|
+
// No cloud provider available? Then clear cloud provider setting. This will recalculate addonNames...
|
|
910
|
+
// ... which will eventually update `value.spec.rkeConfig.chartValues`
|
|
911
|
+
this.agentConfig['cloud-provider-name'] = undefined;
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
},
|
|
915
|
+
|
|
916
|
+
created() {
|
|
917
|
+
this.registerBeforeHook(this.saveMachinePools, 'save-machine-pools', 1);
|
|
918
|
+
this.registerBeforeHook(this.setRegistryConfig, 'set-registry-config');
|
|
919
|
+
this.registerBeforeHook(this.handleVsphereCpiSecret, 'sync-vsphere-cpi');
|
|
920
|
+
this.registerBeforeHook(this.handleVsphereCsiSecret, 'sync-vsphere-csi');
|
|
921
|
+
this.registerAfterHook(this.cleanupMachinePools, 'cleanup-machine-pools');
|
|
922
|
+
this.registerAfterHook(this.saveRoleBindings, 'save-role-bindings');
|
|
923
|
+
|
|
924
|
+
// Register any hooks for this extension provider
|
|
925
|
+
if (this.extensionProvider?.registerSaveHooks) {
|
|
926
|
+
this.extensionProvider.registerSaveHooks(this.registerBeforeHook, this.registerAfterHook, this.value);
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
|
|
930
|
+
methods: {
|
|
931
|
+
set,
|
|
932
|
+
|
|
933
|
+
async handleVsphereCpiSecret() {
|
|
934
|
+
return VsphereUtils.handleVsphereCpiSecret(this);
|
|
935
|
+
},
|
|
936
|
+
|
|
937
|
+
async handleVsphereCsiSecret() {
|
|
938
|
+
return VsphereUtils.handleVsphereCsiSecret(this);
|
|
939
|
+
},
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Initialize all the cluster specs
|
|
943
|
+
*/
|
|
944
|
+
async initSpecs() {
|
|
945
|
+
if (!this.value.spec) {
|
|
946
|
+
this.value.spec = {};
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
if (!this.value.spec.machineSelectorConfig) {
|
|
950
|
+
this.value.spec.machineSelectorConfig = [];
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
if (!this.value.spec.machineSelectorConfig.find((x) => !x.machineLabelSelector)) {
|
|
954
|
+
this.value.spec.machineSelectorConfig.unshift({ config: {} });
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
if (this.value.spec.cloudCredentialSecretName) {
|
|
958
|
+
await this.$store.dispatch('rancher/findAll', { type: NORMAN.CLOUD_CREDENTIAL });
|
|
959
|
+
this.credentialId = `${ this.value.spec.cloudCredentialSecretName }`;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
if (!this.value.spec.kubernetesVersion) {
|
|
963
|
+
this.value.spec.kubernetesVersion = this.defaultVersion;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
if (this.rkeConfig.etcd?.s3?.bucket) {
|
|
967
|
+
this.s3Backup = true;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
if (!this.rkeConfig.etcd) {
|
|
971
|
+
this.rkeConfig.etcd = {
|
|
972
|
+
disableSnapshots: false,
|
|
973
|
+
s3: null,
|
|
974
|
+
snapshotRetention: 5,
|
|
975
|
+
snapshotScheduleCron: '0 */5 * * *',
|
|
976
|
+
};
|
|
977
|
+
} else if (typeof this.rkeConfig.etcd.disableSnapshots === 'undefined') {
|
|
978
|
+
const disableSnapshots = !this.rkeConfig.etcd.snapshotRetention && !this.rkeConfig.etcd.snapshotScheduleCron;
|
|
979
|
+
|
|
980
|
+
this.rkeConfig.etcd.disableSnapshots = disableSnapshots;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
// Namespaces if required - this is mainly for custom provisioners via extensions that want
|
|
984
|
+
// to allow creating their resources in a different namespace
|
|
985
|
+
if (this.needsNamespace) {
|
|
986
|
+
this.allNamespaces = await this.$store.dispatch('management/findAll', { type: NAMESPACE });
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
if (!this.machinePools) {
|
|
990
|
+
await this.initMachinePools(this.value.spec.rkeConfig.machinePools);
|
|
991
|
+
if (this.mode === _CREATE && !this.machinePools.length) {
|
|
992
|
+
await this.addMachinePool();
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
if (this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName === undefined) {
|
|
997
|
+
this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName = '';
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
if ( isEmpty(this.value?.spec?.localClusterAuthEndpoint) ) {
|
|
1001
|
+
set(this.value, 'spec.localClusterAuthEndpoint', { enabled: false });
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Fetch RKE versions and their configurations to be mapped to the form
|
|
1007
|
+
*/
|
|
1008
|
+
async fetchRke2Versions() {
|
|
1009
|
+
if (!this.rke2Versions) {
|
|
1010
|
+
const hash = {
|
|
1011
|
+
rke2Versions: this.$store.dispatch('management/request', { url: '/v1-rke2-release/releases' }),
|
|
1012
|
+
k3sVersions: this.$store.dispatch('management/request', { url: '/v1-k3s-release/releases' }),
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
if (this.$store.getters['management/canList'](MANAGEMENT.PSA)) {
|
|
1016
|
+
hash.allPSAs = await this.$store.dispatch('management/findAll', { type: MANAGEMENT.PSA });
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
// Get the latest versions from the global settings if possible
|
|
1020
|
+
const globalSettings = await this.$store.getters['management/all'](MANAGEMENT.SETTING) || [];
|
|
1021
|
+
const defaultRke2Setting = globalSettings.find((setting) => setting.id === 'rke2-default-version') || {};
|
|
1022
|
+
const defaultK3sSetting = globalSettings.find((setting) => setting.id === 'k3s-default-version') || {};
|
|
1023
|
+
|
|
1024
|
+
let defaultRke2 = defaultRke2Setting?.value || defaultRke2Setting?.default;
|
|
1025
|
+
let defaultK3s = defaultK3sSetting?.value || defaultK3sSetting?.default;
|
|
1026
|
+
|
|
1027
|
+
// RKE2: Use the channel if we can not get the version from the settings
|
|
1028
|
+
if (!defaultRke2) {
|
|
1029
|
+
hash.rke2Channels = this.$store.dispatch('management/request', { url: '/v1-rke2-release/channels' });
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
// K3S: Use the channel if we can not get the version from the settings
|
|
1033
|
+
if (!defaultK3s) {
|
|
1034
|
+
hash.k3sChannels = this.$store.dispatch('management/request', { url: '/v1-k3s-release/channels' });
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
const res = await allHash(hash);
|
|
1038
|
+
|
|
1039
|
+
this.allPSAs = res.allPSAs || [];
|
|
1040
|
+
this.rke2Versions = res.rke2Versions.data || [];
|
|
1041
|
+
this.k3sVersions = res.k3sVersions.data || [];
|
|
1042
|
+
|
|
1043
|
+
if (!defaultRke2) {
|
|
1044
|
+
const rke2Channels = res.rke2Channels.data || [];
|
|
1045
|
+
|
|
1046
|
+
defaultRke2 = rke2Channels.find((x) => x.id === 'default')?.latest;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
if (!defaultK3s) {
|
|
1050
|
+
const k3sChannels = res.k3sChannels.data || [];
|
|
1051
|
+
|
|
1052
|
+
defaultK3s = k3sChannels.find((x) => x.id === 'default')?.latest;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
if (!this.rke2Versions.length && !this.k3sVersions.length) {
|
|
1056
|
+
throw new Error('No version info found in KDM');
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
// Store default versions
|
|
1060
|
+
this.defaultRke2 = defaultRke2;
|
|
1061
|
+
this.defaultK3s = defaultK3s;
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
|
|
1065
|
+
async initSchedulingCustomization() {
|
|
1066
|
+
this.schedulingCustomizationFeatureEnabled = this.features(SCHEDULING_CUSTOMIZATION);
|
|
1067
|
+
try {
|
|
1068
|
+
this.clusterAgentDefaultPC = JSON.parse((await this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.CLUSTER_AGENT_DEFAULT_PRIORITY_CLASS })).value) || null;
|
|
1069
|
+
} catch (e) {
|
|
1070
|
+
this.errors.push(e);
|
|
1071
|
+
}
|
|
1072
|
+
try {
|
|
1073
|
+
this.clusterAgentDefaultPDB = JSON.parse((await this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.CLUSTER_AGENT_DEFAULT_POD_DISTRIBUTION_BUDGET })).value) || null;
|
|
1074
|
+
} catch (e) {
|
|
1075
|
+
this.errors.push(e);
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
if (this.schedulingCustomizationFeatureEnabled && this.mode === _CREATE && isEmpty(this.value?.spec?.clusterAgentDeploymentCustomization?.schedulingCustomization)) {
|
|
1079
|
+
set(this.value, 'spec.clusterAgentDeploymentCustomization.schedulingCustomization', { priorityClass: this.clusterAgentDefaultPC, podDisruptionBudget: this.clusterAgentDefaultPDB });
|
|
1080
|
+
}
|
|
1081
|
+
},
|
|
1082
|
+
|
|
1083
|
+
setSchedulingCustomization(val) {
|
|
1084
|
+
if (val) {
|
|
1085
|
+
set(this.value, 'spec.clusterAgentDeploymentCustomization.schedulingCustomization', { priorityClass: this.clusterAgentDefaultPC, podDisruptionBudget: this.clusterAgentDefaultPDB });
|
|
1086
|
+
} else {
|
|
1087
|
+
delete this.value.spec.clusterAgentDeploymentCustomization.schedulingCustomization;
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
|
|
1091
|
+
cleanAgentConfiguration(model, key) {
|
|
1092
|
+
if (!model || !model[key]) {
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
const v = model[key];
|
|
1097
|
+
|
|
1098
|
+
if (Array.isArray(v) && v.length === 0) {
|
|
1099
|
+
delete model[key];
|
|
1100
|
+
} else if (v && typeof v === 'object') {
|
|
1101
|
+
Object.keys(v).forEach((k) => {
|
|
1102
|
+
// delete these auxiliary props used in podAffinity and nodeAffinity that shouldn't be sent to the server
|
|
1103
|
+
if (k === '_namespaceOption' || k === '_namespaces' || k === '_anti' || k === '_id') {
|
|
1104
|
+
delete v[k];
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
// prevent cleanup of "namespaceSelector" when an empty object because it represents all namespaces in pod/node affinity
|
|
1108
|
+
// https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#podaffinityterm-v1-core
|
|
1109
|
+
if (k !== 'namespaceSelector') {
|
|
1110
|
+
this.cleanAgentConfiguration(v, k);
|
|
1111
|
+
}
|
|
1112
|
+
});
|
|
1113
|
+
|
|
1114
|
+
if (Object.keys(v).length === 0) {
|
|
1115
|
+
delete model[key];
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
},
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Clean agent configuration objects, so we only send values when the user has configured something
|
|
1122
|
+
*/
|
|
1123
|
+
agentConfigurationCleanup() {
|
|
1124
|
+
this.cleanAgentConfiguration(this.value.spec, CLUSTER_AGENT_CUSTOMIZATION);
|
|
1125
|
+
this.cleanAgentConfiguration(this.value.spec, FLEET_AGENT_CUSTOMIZATION);
|
|
1126
|
+
},
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* Ensure we have empty models for the two agent configurations
|
|
1130
|
+
*/
|
|
1131
|
+
setAgentConfiguration() {
|
|
1132
|
+
// Cluster Agent Configuration
|
|
1133
|
+
if (!this.value.spec[CLUSTER_AGENT_CUSTOMIZATION]) {
|
|
1134
|
+
this.value.spec[CLUSTER_AGENT_CUSTOMIZATION] = {};
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
// Fleet Agent Configuration
|
|
1138
|
+
if (!this.value.spec[FLEET_AGENT_CUSTOMIZATION]) {
|
|
1139
|
+
this.value.spec[FLEET_AGENT_CUSTOMIZATION] = {};
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* set instanceNameLimit to 15 to all pool machine if truncateHostnames checkbox is clicked
|
|
1145
|
+
*/
|
|
1146
|
+
truncateHostname(neu) {
|
|
1147
|
+
if (neu) {
|
|
1148
|
+
this.value.defaultHostnameLengthLimit = NETBIOS_TRUNCATION_LENGTH;
|
|
1149
|
+
this.truncateLimit = NETBIOS_TRUNCATION_LENGTH;
|
|
1150
|
+
} else {
|
|
1151
|
+
this.truncateLimit = 0;
|
|
1152
|
+
this.value.removeDefaultHostnameLengthLimit();
|
|
1153
|
+
}
|
|
1154
|
+
},
|
|
1155
|
+
|
|
1156
|
+
enableLocalClusterAuthEndpoint(neu) {
|
|
1157
|
+
this.localValue.spec.localClusterAuthEndpoint.enabled = neu;
|
|
1158
|
+
if (!neu) {
|
|
1159
|
+
delete this.localValue.spec.localClusterAuthEndpoint.caCerts;
|
|
1160
|
+
delete this.localValue.spec.localClusterAuthEndpoint.fqdn;
|
|
1161
|
+
} else {
|
|
1162
|
+
this.localValue.spec.localClusterAuthEndpoint.caCerts = '';
|
|
1163
|
+
this.localValue.spec.localClusterAuthEndpoint.fqdn = '';
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Get machine pools from the cluster configuration
|
|
1169
|
+
* this.value.spec.rkeConfig.machinePools
|
|
1170
|
+
*/
|
|
1171
|
+
async initMachinePools(existing) {
|
|
1172
|
+
const out = [];
|
|
1173
|
+
|
|
1174
|
+
if (existing?.length) {
|
|
1175
|
+
for (const pool of existing) {
|
|
1176
|
+
let type;
|
|
1177
|
+
|
|
1178
|
+
if (this.isElementalCluster) {
|
|
1179
|
+
type = ELEMENTAL_SCHEMA_IDS.MACHINE_INV_SELECTOR_TEMPLATES;
|
|
1180
|
+
} else {
|
|
1181
|
+
type = `${ CAPI.MACHINE_CONFIG_GROUP }.${ pool.machineConfigRef.kind.toLowerCase() }`;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
let config;
|
|
1185
|
+
let configMissing = false;
|
|
1186
|
+
|
|
1187
|
+
if (this.$store.getters['management/canList'](type)) {
|
|
1188
|
+
try {
|
|
1189
|
+
config = await this.$store.dispatch('management/find', {
|
|
1190
|
+
type,
|
|
1191
|
+
id: `${ this.value.metadata.namespace }/${ pool.machineConfigRef.name }`,
|
|
1192
|
+
});
|
|
1193
|
+
} catch (e) {
|
|
1194
|
+
// Some users can't see the config, that's ok.
|
|
1195
|
+
// we will display a banner for a 404 only for elemental
|
|
1196
|
+
if (e?.status === 404) {
|
|
1197
|
+
if (this.isElementalCluster) {
|
|
1198
|
+
configMissing = true;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
// @TODO what if the pool is missing?
|
|
1205
|
+
const id = `pool${ ++this.lastIdx }`;
|
|
1206
|
+
|
|
1207
|
+
out.push({
|
|
1208
|
+
id,
|
|
1209
|
+
remove: false,
|
|
1210
|
+
create: false,
|
|
1211
|
+
update: true,
|
|
1212
|
+
pool: clone(pool),
|
|
1213
|
+
config: config ? await this.$store.dispatch('management/clone', { resource: config }) : null,
|
|
1214
|
+
configMissing
|
|
1215
|
+
});
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
this.machinePools = out;
|
|
1220
|
+
},
|
|
1221
|
+
|
|
1222
|
+
async addMachinePool(idx) {
|
|
1223
|
+
// this.machineConfigSchema is the schema for the Machine Pool's machine configuration for the given provider
|
|
1224
|
+
if (!this.machineConfigSchema) {
|
|
1225
|
+
return;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
const numCurrentPools = this.machinePools.length || 0;
|
|
1229
|
+
|
|
1230
|
+
let config;
|
|
1231
|
+
|
|
1232
|
+
if (this.extensionProvider?.createMachinePoolMachineConfig) {
|
|
1233
|
+
config = await this.extensionProvider.createMachinePoolMachineConfig(idx, this.machinePools, this.value);
|
|
1234
|
+
} else {
|
|
1235
|
+
// Default - use the schema
|
|
1236
|
+
config = await this.$store.dispatch('management/createPopulated', {
|
|
1237
|
+
type: this.machineConfigSchema.id,
|
|
1238
|
+
metadata: { namespace: DEFAULT_WORKSPACE }
|
|
1239
|
+
});
|
|
1240
|
+
|
|
1241
|
+
// If there is no specific model, the applyDefaults does nothing by default
|
|
1242
|
+
config.applyDefaults(idx, this.machinePools);
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
const name = `pool${ ++this.lastIdx }`;
|
|
1246
|
+
|
|
1247
|
+
const pool = {
|
|
1248
|
+
id: name,
|
|
1249
|
+
config,
|
|
1250
|
+
remove: false,
|
|
1251
|
+
create: true,
|
|
1252
|
+
update: false,
|
|
1253
|
+
uid: name,
|
|
1254
|
+
pool: {
|
|
1255
|
+
name,
|
|
1256
|
+
etcdRole: numCurrentPools === 0,
|
|
1257
|
+
controlPlaneRole: numCurrentPools === 0,
|
|
1258
|
+
workerRole: true,
|
|
1259
|
+
hostnamePrefix: '',
|
|
1260
|
+
labels: {},
|
|
1261
|
+
quantity: 1,
|
|
1262
|
+
unhealthyNodeTimeout: '0m',
|
|
1263
|
+
machineConfigRef: {
|
|
1264
|
+
kind: this.machineConfigSchema.attributes?.kind,
|
|
1265
|
+
name: null,
|
|
1266
|
+
},
|
|
1267
|
+
drainBeforeDelete: true
|
|
1268
|
+
},
|
|
1269
|
+
};
|
|
1270
|
+
|
|
1271
|
+
if (this.provider === VMWARE_VSPHERE) {
|
|
1272
|
+
pool.pool.machineOS = 'linux';
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
if (this.isElementalCluster) {
|
|
1276
|
+
pool.pool.machineConfigRef.apiVersion = `${ this.machineConfigSchema.attributes.group }/${ this.machineConfigSchema.attributes.version }`;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
this.machinePools.push(pool);
|
|
1280
|
+
|
|
1281
|
+
this.$nextTick(() => {
|
|
1282
|
+
if (this.$refs.pools?.select) {
|
|
1283
|
+
this.$refs.pools.select(name);
|
|
1284
|
+
}
|
|
1285
|
+
});
|
|
1286
|
+
},
|
|
1287
|
+
|
|
1288
|
+
removeMachinePool(idx) {
|
|
1289
|
+
const entry = this.machinePools[idx];
|
|
1290
|
+
|
|
1291
|
+
if (!entry) {
|
|
1292
|
+
return;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
if (entry.create) {
|
|
1296
|
+
// If this is a new pool that isn't saved yet, it can just be dropped
|
|
1297
|
+
removeObject(this.machinePools, entry);
|
|
1298
|
+
} else {
|
|
1299
|
+
// Mark for removal on save
|
|
1300
|
+
entry.remove = true;
|
|
1301
|
+
}
|
|
1302
|
+
},
|
|
1303
|
+
|
|
1304
|
+
async syncMachineConfigWithLatest(machinePool) {
|
|
1305
|
+
if (machinePool?.config?.id) {
|
|
1306
|
+
// Use management/request instead of management/find to avoid overwriting the current machine pool in the store
|
|
1307
|
+
const _latestConfig = await this.$store.dispatch('management/request', { url: `/v1/${ machinePool.config.type }s/${ machinePool.config.id }` });
|
|
1308
|
+
const latestConfig = await this.$store.dispatch('management/create', _latestConfig);
|
|
1309
|
+
|
|
1310
|
+
const clonedCurrentConfig = await this.$store.dispatch('management/clone', { resource: machinePool.config });
|
|
1311
|
+
const clonedLatestConfig = await this.$store.dispatch('management/clone', { resource: latestConfig });
|
|
1312
|
+
|
|
1313
|
+
// We don't allow the user to edit any of the fields in metadata from the UI so it's safe to override it with the
|
|
1314
|
+
// metadata defined by the latest backend value. This is primarily used to ensure the resourceVersion is up to date.
|
|
1315
|
+
delete clonedCurrentConfig.metadata;
|
|
1316
|
+
|
|
1317
|
+
if (this.provider === VMWARE_VSPHERE) {
|
|
1318
|
+
machinePool.config = mergeWithReplaceArrays(clonedLatestConfig, clonedCurrentConfig);
|
|
1319
|
+
} else {
|
|
1320
|
+
machinePool.config = merge(clonedLatestConfig, clonedCurrentConfig);
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
},
|
|
1324
|
+
|
|
1325
|
+
async saveMachinePools(hookContext) {
|
|
1326
|
+
if (hookContext === CONTEXT_HOOK_EDIT_YAML) {
|
|
1327
|
+
await new Promise((resolve, reject) => {
|
|
1328
|
+
this.$store.dispatch('cluster/promptModal', {
|
|
1329
|
+
component: 'GenericPrompt',
|
|
1330
|
+
componentProps: {
|
|
1331
|
+
title: this.t('cluster.rke2.modal.editYamlMachinePool.title'),
|
|
1332
|
+
body: this.t('cluster.rke2.modal.editYamlMachinePool.body'),
|
|
1333
|
+
applyMode: 'editAndContinue',
|
|
1334
|
+
confirm: async(confirmed) => {
|
|
1335
|
+
if (confirmed) {
|
|
1336
|
+
await this.validateMachinePool();
|
|
1337
|
+
|
|
1338
|
+
if (this.errors.length) {
|
|
1339
|
+
reject(new Error('Machine Pool validation errors'));
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
resolve();
|
|
1343
|
+
} else {
|
|
1344
|
+
reject(new Error('User Cancelled'));
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
});
|
|
1349
|
+
});
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
const finalPools = [];
|
|
1353
|
+
|
|
1354
|
+
// If the extension provider wants to do this, let them
|
|
1355
|
+
if (this.extensionProvider?.saveMachinePoolConfigs) {
|
|
1356
|
+
return await this.extensionProvider.saveMachinePoolConfigs(this.machinePools, this.value);
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
for (const entry of this.machinePools) {
|
|
1360
|
+
if (entry.remove) {
|
|
1361
|
+
continue;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
await this.syncMachineConfigWithLatest(entry);
|
|
1365
|
+
|
|
1366
|
+
// Capitals and such aren't allowed;
|
|
1367
|
+
entry.pool.name = normalizeName(entry.pool.name) || 'pool';
|
|
1368
|
+
|
|
1369
|
+
const prefix = `${ this.value.metadata.name }-${ entry.pool.name }`.substr(0, 50).toLowerCase();
|
|
1370
|
+
|
|
1371
|
+
if (entry.create) {
|
|
1372
|
+
if (!entry.config.metadata?.name) {
|
|
1373
|
+
entry.config.metadata.generateName = `nc-${ prefix }-`;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
const neu = await entry.config.save();
|
|
1377
|
+
|
|
1378
|
+
entry.config = neu;
|
|
1379
|
+
entry.pool.machineConfigRef.name = neu.metadata.name;
|
|
1380
|
+
entry.create = false;
|
|
1381
|
+
entry.update = true;
|
|
1382
|
+
} else if (entry.update) {
|
|
1383
|
+
entry.config = await entry.config.save();
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
// Ensure Elemental clusters have a hostname prefix
|
|
1387
|
+
if (this.isElementalCluster && !entry.pool.hostnamePrefix) {
|
|
1388
|
+
entry.pool.hostnamePrefix = `${ prefix }-`;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
finalPools.push(entry.pool);
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
this.value.spec.rkeConfig.machinePools = finalPools;
|
|
1395
|
+
},
|
|
1396
|
+
|
|
1397
|
+
async cleanupMachinePools() {
|
|
1398
|
+
for (const entry of this.machinePools) {
|
|
1399
|
+
if (entry.remove && entry.config) {
|
|
1400
|
+
try {
|
|
1401
|
+
await entry.config.remove();
|
|
1402
|
+
} catch (e) { }
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
},
|
|
1406
|
+
|
|
1407
|
+
async saveRoleBindings() {
|
|
1408
|
+
await this.value.waitForMgmt();
|
|
1409
|
+
|
|
1410
|
+
if (this.membershipUpdate.save) {
|
|
1411
|
+
await this.membershipUpdate.save(this.value.mgmt.id);
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* Ensure that all the existing node roles pool are at least 1 each
|
|
1417
|
+
*/
|
|
1418
|
+
hasRequiredNodes() {
|
|
1419
|
+
return this.nodeTotals?.color && Object.values(this.nodeTotals.color).every((color) => color !== NODE_TOTAL.error.color);
|
|
1420
|
+
},
|
|
1421
|
+
|
|
1422
|
+
cancelCredential() {
|
|
1423
|
+
if (this.$refs.cruresource) {
|
|
1424
|
+
this.$refs.cruresource.emitOrRoute();
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
|
|
1428
|
+
done() {
|
|
1429
|
+
let routeName = 'c-cluster-product-resource';
|
|
1430
|
+
|
|
1431
|
+
if (this.mode === _CREATE && (this.provider === 'import' || this.provider === 'custom')) {
|
|
1432
|
+
// Go show the registration command
|
|
1433
|
+
routeName = 'c-cluster-product-resource-namespace-id';
|
|
1434
|
+
}
|
|
1435
|
+
|
|
1436
|
+
this.$router.push({
|
|
1437
|
+
name: routeName,
|
|
1438
|
+
params: {
|
|
1439
|
+
cluster: this.$route.params.cluster,
|
|
1440
|
+
product: this.$store.getters['productId'],
|
|
1441
|
+
resource: CAPI.RANCHER_CLUSTER,
|
|
1442
|
+
namespace: this.value.metadata.namespace,
|
|
1443
|
+
id: this.value.metadata.name,
|
|
1444
|
+
},
|
|
1445
|
+
});
|
|
1446
|
+
},
|
|
1447
|
+
|
|
1448
|
+
showAddonConfirmation() {
|
|
1449
|
+
return new Promise((resolve, reject) => {
|
|
1450
|
+
this.$store.dispatch('cluster/promptModal', {
|
|
1451
|
+
component: 'AddonConfigConfirmationDialog',
|
|
1452
|
+
resources: [(value) => resolve(value)]
|
|
1453
|
+
});
|
|
1454
|
+
});
|
|
1455
|
+
},
|
|
1456
|
+
|
|
1457
|
+
// Set busy before save and clear after save
|
|
1458
|
+
async saveOverride(btnCb) {
|
|
1459
|
+
this['busy'] = true;
|
|
1460
|
+
|
|
1461
|
+
// If the provider is from an extension, let it do the provision step
|
|
1462
|
+
if (this.extensionProvider?.provision) {
|
|
1463
|
+
const errors = await this.extensionProvider?.provision(this.value, this.machinePools);
|
|
1464
|
+
const okay = (errors || []).length === 0;
|
|
1465
|
+
|
|
1466
|
+
this.errors = errors;
|
|
1467
|
+
this['busy'] = false;
|
|
1468
|
+
|
|
1469
|
+
btnCb(okay);
|
|
1470
|
+
|
|
1471
|
+
if (okay) {
|
|
1472
|
+
// If saved okay, go to the done route
|
|
1473
|
+
return this.done();
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
// Default save
|
|
1478
|
+
return this._doSaveOverride((done) => {
|
|
1479
|
+
this['busy'] = false;
|
|
1480
|
+
|
|
1481
|
+
return btnCb(done);
|
|
1482
|
+
});
|
|
1483
|
+
},
|
|
1484
|
+
|
|
1485
|
+
async _doSaveOverride(btnCb) {
|
|
1486
|
+
// We cannot use the hook, because it is triggered on YAML toggle without restore initialized data
|
|
1487
|
+
this.agentConfigurationCleanup();
|
|
1488
|
+
|
|
1489
|
+
const isEditVersion = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
|
|
1490
|
+
|
|
1491
|
+
if (isEditVersion) {
|
|
1492
|
+
const shouldContinue = await this.showAddonConfirmation();
|
|
1493
|
+
|
|
1494
|
+
if (!shouldContinue) {
|
|
1495
|
+
return btnCb('cancelled');
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
this.validateClusterName();
|
|
1500
|
+
|
|
1501
|
+
await this.validateMachinePool();
|
|
1502
|
+
|
|
1503
|
+
if (this.errors.length) {
|
|
1504
|
+
btnCb(false);
|
|
1505
|
+
|
|
1506
|
+
return;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
try {
|
|
1510
|
+
const clusterId = get(this.credential, 'decodedData.clusterId') || '';
|
|
1511
|
+
|
|
1512
|
+
this.applyChartValues(this.value.spec.rkeConfig);
|
|
1513
|
+
|
|
1514
|
+
const isUpgrade = this.isEdit && this.liveValue?.spec?.kubernetesVersion !== this.value?.spec?.kubernetesVersion;
|
|
1515
|
+
|
|
1516
|
+
if (this.agentConfig?.['cloud-provider-name'] === HARVESTER && clusterId && (this.isCreate || isUpgrade)) {
|
|
1517
|
+
const namespace = this.machinePools?.[0]?.config?.vmNamespace;
|
|
1518
|
+
|
|
1519
|
+
const res = await this.$store.dispatch('management/request', {
|
|
1520
|
+
url: `/k8s/clusters/${ clusterId }/v1/harvester/kubeconfig`,
|
|
1521
|
+
method: 'POST',
|
|
1522
|
+
data: {
|
|
1523
|
+
csiClusterRoleName: 'harvesterhci.io:csi-driver',
|
|
1524
|
+
clusterRoleName: 'harvesterhci.io:cloudprovider',
|
|
1525
|
+
namespace,
|
|
1526
|
+
serviceAccountName: this.value.metadata.name,
|
|
1527
|
+
},
|
|
1528
|
+
});
|
|
1529
|
+
|
|
1530
|
+
const kubeconfig = res.data;
|
|
1531
|
+
|
|
1532
|
+
const harvesterKubeconfigSecret = await this.createKubeconfigSecret(kubeconfig);
|
|
1533
|
+
|
|
1534
|
+
this.agentConfig['cloud-provider-config'] = `secret://fleet-default:${ harvesterKubeconfigSecret?.metadata?.name }`;
|
|
1535
|
+
|
|
1536
|
+
if (this.isCreate) {
|
|
1537
|
+
set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.global.cattle.clusterName`, this.value.metadata.name);
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
const distroSubdir = this.value?.spec?.kubernetesVersion?.includes('k3s') ? DEFAULT_SUBDIRS.K8S_DISTRO_K3S : DEFAULT_SUBDIRS.K8S_DISTRO_RKE2;
|
|
1541
|
+
const distroRoot = this.value?.spec?.rkeConfig?.dataDirectories?.k8sDistro?.length ? this.value?.spec?.rkeConfig?.dataDirectories?.k8sDistro : `${ DEFAULT_COMMON_BASE_PATH }/${ distroSubdir }`;
|
|
1542
|
+
|
|
1543
|
+
set(this.chartValues, `${ HARVESTER_CLOUD_PROVIDER }.cloudConfigPath`, `${ distroRoot }/etc/config-files/cloud-provider-config`);
|
|
1544
|
+
}
|
|
1545
|
+
} catch (err) {
|
|
1546
|
+
this.errors.push(err);
|
|
1547
|
+
|
|
1548
|
+
btnCb(false);
|
|
1549
|
+
|
|
1550
|
+
return;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
// Remove null profile on machineGlobalConfig - https://github.com/rancher/dashboard/issues/8480
|
|
1554
|
+
if (this.value.spec?.rkeConfig?.machineGlobalConfig?.profile === null) {
|
|
1555
|
+
delete this.value.spec.rkeConfig.machineGlobalConfig.profile;
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
// Store the current data for fleet and cluster agent so that we can re-apply it later if the save fails
|
|
1559
|
+
// The cleanup occurs before save with agentConfigurationCleanup()
|
|
1560
|
+
const clusterAgentDeploymentCustomization = this.value.spec[CLUSTER_AGENT_CUSTOMIZATION] ? JSON.parse(JSON.stringify(this.value.spec[CLUSTER_AGENT_CUSTOMIZATION])) : null;
|
|
1561
|
+
const fleetAgentDeploymentCustomization = this.value.spec[FLEET_AGENT_CUSTOMIZATION] ? JSON.parse(JSON.stringify(this.value.spec[FLEET_AGENT_CUSTOMIZATION])) : null;
|
|
1562
|
+
|
|
1563
|
+
await this.save(btnCb);
|
|
1564
|
+
|
|
1565
|
+
// comes from createEditView mixin
|
|
1566
|
+
// if there are any errors saving, restore the agent config data
|
|
1567
|
+
if (this.errors?.length) {
|
|
1568
|
+
// Ensure the agent configuration is set back to the values before we changed (cleaned) it
|
|
1569
|
+
this.value.spec[CLUSTER_AGENT_CUSTOMIZATION] = clusterAgentDeploymentCustomization;
|
|
1570
|
+
this.value.spec[FLEET_AGENT_CUSTOMIZATION] = fleetAgentDeploymentCustomization;
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
|
|
1574
|
+
async actuallySave(url) {
|
|
1575
|
+
if (this.extensionProvider?.saveCluster) {
|
|
1576
|
+
return await this.extensionProvider?.saveCluster(this.value, this.schema);
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
if (this.isCreate) {
|
|
1580
|
+
url = url || this.schema.linkFor('collection');
|
|
1581
|
+
const res = await this.value.save({ url });
|
|
1582
|
+
|
|
1583
|
+
if (res) {
|
|
1584
|
+
Object.assign(this.value, res);
|
|
1585
|
+
}
|
|
1586
|
+
} else {
|
|
1587
|
+
await this.value.save();
|
|
1588
|
+
}
|
|
1589
|
+
},
|
|
1590
|
+
|
|
1591
|
+
// create a secret to reference the harvester cluster kubeconfig in rkeConfig
|
|
1592
|
+
async createKubeconfigSecret(kubeconfig = '') {
|
|
1593
|
+
const clusterName = this.value.metadata.name;
|
|
1594
|
+
const secret = await this.$store.dispatch('management/create', {
|
|
1595
|
+
type: SECRET,
|
|
1596
|
+
metadata: {
|
|
1597
|
+
namespace: 'fleet-default', generateName: 'harvesterconfig', annotations: { [CAPI_ANNOTATIONS.SECRET_AUTH]: clusterName, [CAPI_ANNOTATIONS.SECRET_WILL_DELETE]: 'true' }
|
|
1598
|
+
},
|
|
1599
|
+
data: { credential: base64Encode(kubeconfig) }
|
|
1600
|
+
});
|
|
1601
|
+
|
|
1602
|
+
return secret.save({ url: '/v1/secrets', method: 'POST' });
|
|
1603
|
+
},
|
|
1604
|
+
|
|
1605
|
+
cancel() {
|
|
1606
|
+
this.$router.push({
|
|
1607
|
+
name: 'c-cluster-product-resource',
|
|
1608
|
+
params: {
|
|
1609
|
+
cluster: this.$route.params.cluster,
|
|
1610
|
+
product: this.$store.getters['productId'],
|
|
1611
|
+
resource: CAPI.RANCHER_CLUSTER,
|
|
1612
|
+
},
|
|
1613
|
+
});
|
|
1614
|
+
},
|
|
1615
|
+
|
|
1616
|
+
/**
|
|
1617
|
+
* Ensure all chart information required to show addons is available
|
|
1618
|
+
*
|
|
1619
|
+
* This basically means
|
|
1620
|
+
* 1) That the full chart relating to the addon is fetched (which includes core chart, readme and values)
|
|
1621
|
+
* 2) We're ready to cache any values the user provides for each addon
|
|
1622
|
+
*/
|
|
1623
|
+
async initAddons() {
|
|
1624
|
+
this.addonConfigValidation = {};
|
|
1625
|
+
|
|
1626
|
+
for (const chartName of this.addonNames) {
|
|
1627
|
+
const entry = this.chartVersions[chartName];
|
|
1628
|
+
|
|
1629
|
+
// prevent fetching of addon config for 'none' CNI option
|
|
1630
|
+
// https://github.com/rancher/dashboard/issues/10338
|
|
1631
|
+
if (this.versionInfo[chartName] || chartName.includes('none')) {
|
|
1632
|
+
continue;
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
try {
|
|
1636
|
+
const res = await this.$store.dispatch('catalog/getVersionInfo', {
|
|
1637
|
+
repoType: 'cluster',
|
|
1638
|
+
repoName: entry.repo,
|
|
1639
|
+
chartName,
|
|
1640
|
+
versionName: entry.version,
|
|
1641
|
+
});
|
|
1642
|
+
|
|
1643
|
+
this.versionInfo[chartName] = res;
|
|
1644
|
+
const key = this.chartVersionKey(chartName);
|
|
1645
|
+
|
|
1646
|
+
if (!this.userChartValues[key]) {
|
|
1647
|
+
this.userChartValues[key] = {};
|
|
1648
|
+
}
|
|
1649
|
+
} catch (e) {
|
|
1650
|
+
console.error(`Failed to fetch or process chart info for ${ chartName }`); // eslint-disable-line no-console
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
},
|
|
1654
|
+
|
|
1655
|
+
showAddons(key) {
|
|
1656
|
+
this.addonsRev++;
|
|
1657
|
+
this.addonNames.forEach((name) => {
|
|
1658
|
+
const chartValues = this.versionInfo[name]?.questions ? this.initYamlEditor(name) : {};
|
|
1659
|
+
|
|
1660
|
+
this.userChartValuesTemp[name] = chartValues;
|
|
1661
|
+
});
|
|
1662
|
+
this.refreshComponentWithYamls(key);
|
|
1663
|
+
},
|
|
1664
|
+
refreshComponentWithYamls(key) {
|
|
1665
|
+
const component = this.$refs[key];
|
|
1666
|
+
|
|
1667
|
+
if (Array.isArray(component) && component.length > 0) {
|
|
1668
|
+
this.refreshYamls(component[0].$refs);
|
|
1669
|
+
} else if (component) {
|
|
1670
|
+
this.refreshYamls(component.$refs);
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
|
|
1674
|
+
refreshYamls(refs) {
|
|
1675
|
+
const keys = Object.keys(refs).filter((x) => x.startsWith('yaml'));
|
|
1676
|
+
|
|
1677
|
+
for (const k of keys) {
|
|
1678
|
+
const entry = refs[k];
|
|
1679
|
+
const list = isArray(entry) ? entry : [entry];
|
|
1680
|
+
|
|
1681
|
+
for (const component of list) {
|
|
1682
|
+
component?.refresh(); // `yaml` ref can be undefined on switching from Basic to Addon tab (Azure --> Amazon --> addon)
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
},
|
|
1686
|
+
|
|
1687
|
+
updateValues(name, values) {
|
|
1688
|
+
this.userChartValuesTemp[name] = values;
|
|
1689
|
+
this.syncChartValues(name);
|
|
1690
|
+
},
|
|
1691
|
+
|
|
1692
|
+
syncChartValues: throttle(function(name) {
|
|
1693
|
+
const fromChart = this.versionInfo[name]?.values;
|
|
1694
|
+
const fromUser = this.userChartValuesTemp[name];
|
|
1695
|
+
const different = diff(fromChart, fromUser);
|
|
1696
|
+
|
|
1697
|
+
this.userChartValues[this.chartVersionKey(name)] = different;
|
|
1698
|
+
}, 250, { leading: true }),
|
|
1699
|
+
|
|
1700
|
+
initYamlEditor(name) {
|
|
1701
|
+
const defaultChartValue = this.versionInfo[name];
|
|
1702
|
+
const key = this.chartVersionKey(name);
|
|
1703
|
+
|
|
1704
|
+
return mergeWithReplaceArrays(defaultChartValue?.values, this.userChartValues[key]);
|
|
1705
|
+
},
|
|
1706
|
+
|
|
1707
|
+
initServerAgentArgs() {
|
|
1708
|
+
for (const k in this.serverArgs) {
|
|
1709
|
+
if (this.serverConfig[k] === undefined) {
|
|
1710
|
+
const def = this.serverArgs[k].default;
|
|
1711
|
+
|
|
1712
|
+
this.serverConfig[k] = (def !== undefined ? def : undefined);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
for (const k in this.agentArgs) {
|
|
1717
|
+
if (this.agentConfig?.[k] === undefined) {
|
|
1718
|
+
const def = this.agentArgs[k].default;
|
|
1719
|
+
|
|
1720
|
+
this.agentConfig[k] = (def !== undefined ? def : undefined);
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
if (!this.serverConfig?.profile) {
|
|
1725
|
+
this.serverConfig.profile = null;
|
|
1726
|
+
}
|
|
1727
|
+
},
|
|
1728
|
+
|
|
1729
|
+
chartVersionKey(name) {
|
|
1730
|
+
const addonVersion = this.addonVersions.find((av) => av.name === name);
|
|
1731
|
+
|
|
1732
|
+
return addonVersion ? `${ name }-${ addonVersion.version }` : name;
|
|
1733
|
+
},
|
|
1734
|
+
|
|
1735
|
+
onMembershipUpdate(update) {
|
|
1736
|
+
this['membershipUpdate'] = update;
|
|
1737
|
+
},
|
|
1738
|
+
|
|
1739
|
+
async initRegistry() {
|
|
1740
|
+
// Check for an existing cluster scoped registry
|
|
1741
|
+
const clusterRegistry = this.agentConfig?.['system-default-registry'] || '';
|
|
1742
|
+
|
|
1743
|
+
// Check for the global registry
|
|
1744
|
+
this.systemRegistry = (await this.$store.dispatch('management/find', { type: MANAGEMENT.SETTING, id: SETTING.SYSTEM_DEFAULT_REGISTRY })).value || '';
|
|
1745
|
+
|
|
1746
|
+
// The order of precedence is to use the cluster scoped registry
|
|
1747
|
+
// if it exists, then use the global scoped registry as a fallback
|
|
1748
|
+
if (clusterRegistry) {
|
|
1749
|
+
this.registryHost = clusterRegistry;
|
|
1750
|
+
} else {
|
|
1751
|
+
this.registryHost = this.systemRegistry;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
let registrySecret = null;
|
|
1755
|
+
let regs = this.rkeConfig.registries;
|
|
1756
|
+
|
|
1757
|
+
if (!regs) {
|
|
1758
|
+
regs = {};
|
|
1759
|
+
this.rkeConfig.registries = regs;
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
if (!regs.configs) {
|
|
1763
|
+
regs.configs = {};
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
if (!regs.mirrors) {
|
|
1767
|
+
regs.mirrors = {};
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
const config = regs.configs[this.registryHost];
|
|
1771
|
+
|
|
1772
|
+
if (config) {
|
|
1773
|
+
registrySecret = config.authConfigSecretName;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
this.registrySecret = registrySecret;
|
|
1777
|
+
|
|
1778
|
+
const hasMirrorsOrAuthConfig = Object.keys(regs.configs).length > 0 || Object.keys(regs.mirrors).length > 0;
|
|
1779
|
+
|
|
1780
|
+
if (this.registryHost || registrySecret || hasMirrorsOrAuthConfig) {
|
|
1781
|
+
this.showCustomRegistryInput = true;
|
|
1782
|
+
|
|
1783
|
+
if (hasMirrorsOrAuthConfig) {
|
|
1784
|
+
this.showCustomRegistryAdvancedInput = true;
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
},
|
|
1788
|
+
|
|
1789
|
+
setRegistryConfig() {
|
|
1790
|
+
const hostname = (this.registryHost || '').trim();
|
|
1791
|
+
|
|
1792
|
+
if (this.systemRegistry) {
|
|
1793
|
+
// Empty string overrides the system default to nothing
|
|
1794
|
+
this.agentConfig['system-default-registry'] = '';
|
|
1795
|
+
} else {
|
|
1796
|
+
// No need to set anything
|
|
1797
|
+
this.agentConfig['system-default-registry'] = undefined;
|
|
1798
|
+
}
|
|
1799
|
+
if (!hostname || hostname === this.systemRegistry) {
|
|
1800
|
+
// Undefined removes the key which uses the global setting without hardcoding it into the config
|
|
1801
|
+
this.agentConfig['system-default-registry'] = undefined;
|
|
1802
|
+
} else {
|
|
1803
|
+
this.agentConfig['system-default-registry'] = hostname;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
if (hostname && this.registrySecret) {
|
|
1807
|
+
// For a registry with basic auth, but no mirrors,
|
|
1808
|
+
// add a single registry config with the basic auth secret.
|
|
1809
|
+
const basicAuthConfig = {
|
|
1810
|
+
[hostname]: {
|
|
1811
|
+
authConfigSecretName: this.registrySecret,
|
|
1812
|
+
caBundle: null,
|
|
1813
|
+
insecureSkipVerify: false,
|
|
1814
|
+
tlsSecretName: null,
|
|
1815
|
+
}
|
|
1816
|
+
};
|
|
1817
|
+
|
|
1818
|
+
const rkeConfig = this.value.spec.rkeConfig;
|
|
1819
|
+
|
|
1820
|
+
if (!rkeConfig) {
|
|
1821
|
+
this.value.spec.rkeConfig = { registries: { configs: basicAuthConfig } };
|
|
1822
|
+
} else if (rkeConfig.registries.configs && Object.keys(rkeConfig.registries.configs).length > 0) {
|
|
1823
|
+
// If some existing authentication secrets are already configured
|
|
1824
|
+
// for registry mirrors, the basic auth is added to the existing ones.
|
|
1825
|
+
const existingConfigs = rkeConfig.registries.configs;
|
|
1826
|
+
|
|
1827
|
+
this.value.spec.rkeConfig.registries.configs = { ...basicAuthConfig, ...existingConfigs };
|
|
1828
|
+
} else {
|
|
1829
|
+
const existingMirrorAndAuthConfig = this.value.spec.rkeConfig.registries;
|
|
1830
|
+
|
|
1831
|
+
this.value.spec.rkeConfig.registries = {
|
|
1832
|
+
...existingMirrorAndAuthConfig,
|
|
1833
|
+
configs: basicAuthConfig
|
|
1834
|
+
};
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
},
|
|
1838
|
+
|
|
1839
|
+
updateConfigs(configs) {
|
|
1840
|
+
// Update authentication configuration
|
|
1841
|
+
// for each mirror
|
|
1842
|
+
if (!this.value.spec?.rkeConfig) {
|
|
1843
|
+
this.value.spec.rkeConfig = { registries: {} };
|
|
1844
|
+
}
|
|
1845
|
+
this.value.spec.rkeConfig.registries.configs = configs;
|
|
1846
|
+
},
|
|
1847
|
+
|
|
1848
|
+
generateYaml() {
|
|
1849
|
+
const resource = this.value;
|
|
1850
|
+
const inStore = this.$store.getters['currentStore'](resource);
|
|
1851
|
+
const schemas = this.$store.getters[`${ inStore }/all`](SCHEMA);
|
|
1852
|
+
const clonedResource = clone(resource);
|
|
1853
|
+
|
|
1854
|
+
this.applyChartValues(clonedResource.spec.rkeConfig);
|
|
1855
|
+
|
|
1856
|
+
const out = createYaml(schemas, resource.type, clonedResource);
|
|
1857
|
+
|
|
1858
|
+
return out;
|
|
1859
|
+
},
|
|
1860
|
+
|
|
1861
|
+
applyChartValues(rkeConfig) {
|
|
1862
|
+
rkeConfig.chartValues = {};
|
|
1863
|
+
this.addonNames.forEach((name) => {
|
|
1864
|
+
const key = this.chartVersionKey(name);
|
|
1865
|
+
const userValues = this.userChartValues[key];
|
|
1866
|
+
|
|
1867
|
+
if (userValues) {
|
|
1868
|
+
rkeConfig.chartValues[name] = userValues;
|
|
1869
|
+
}
|
|
1870
|
+
});
|
|
1871
|
+
},
|
|
1872
|
+
get,
|
|
1873
|
+
|
|
1874
|
+
setHarvesterDefaultCloudProvider() {
|
|
1875
|
+
if (this.isHarvesterDriver &&
|
|
1876
|
+
this.mode === _CREATE &&
|
|
1877
|
+
this.agentConfig &&
|
|
1878
|
+
!this.agentConfig['cloud-provider-name'] &&
|
|
1879
|
+
!this.isHarvesterExternalCredential &&
|
|
1880
|
+
!this.isHarvesterIncompatible
|
|
1881
|
+
) {
|
|
1882
|
+
this.agentConfig['cloud-provider-name'] = HARVESTER;
|
|
1883
|
+
} else {
|
|
1884
|
+
this.agentConfig['cloud-provider-name'] = '';
|
|
1885
|
+
}
|
|
1886
|
+
},
|
|
1887
|
+
|
|
1888
|
+
async setHarvesterVersionRange() {
|
|
1889
|
+
const clusterId = this.credential?.decodedData?.clusterId;
|
|
1890
|
+
const clusterType = this.credential?.decodedData?.clusterType;
|
|
1891
|
+
|
|
1892
|
+
if (clusterId && clusterType === 'imported') {
|
|
1893
|
+
const url = `/k8s/clusters/${ clusterId }/v1`;
|
|
1894
|
+
const res = await this.$store.dispatch('cluster/request', { url: `${ url }/${ HCI.SETTING }s` });
|
|
1895
|
+
|
|
1896
|
+
const version = (res?.data || []).find((s) => s.id === 'harvester-csi-ccm-versions');
|
|
1897
|
+
|
|
1898
|
+
if (version) {
|
|
1899
|
+
this.harvesterVersionRange = JSON.parse(version.value || version.default || '{}');
|
|
1900
|
+
} else {
|
|
1901
|
+
this.harvesterVersionRange = {};
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
this.setHarvesterDefaultCloudProvider();
|
|
1905
|
+
},
|
|
1906
|
+
toggleCustomRegistry(neu) {
|
|
1907
|
+
this.showCustomRegistryInput = neu;
|
|
1908
|
+
if (this.registryHost) {
|
|
1909
|
+
this.registryHost = null;
|
|
1910
|
+
this.registrySecret = null;
|
|
1911
|
+
} else {
|
|
1912
|
+
this.initRegistry();
|
|
1913
|
+
}
|
|
1914
|
+
},
|
|
1915
|
+
|
|
1916
|
+
/**
|
|
1917
|
+
* Reset PSA on several input changes for given conditions
|
|
1918
|
+
*/
|
|
1919
|
+
togglePsaDefault() {
|
|
1920
|
+
// This option is created from the server and is guaranteed to exist #8032
|
|
1921
|
+
const hardcodedTemplate = 'rancher-restricted';
|
|
1922
|
+
const cisValue = this.agentConfig?.profile || this.serverConfig?.profile;
|
|
1923
|
+
|
|
1924
|
+
if (!this.cisOverride) {
|
|
1925
|
+
if (cisValue) {
|
|
1926
|
+
this.value.spec.defaultPodSecurityAdmissionConfigurationTemplateName = hardcodedTemplate;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
},
|
|
1930
|
+
|
|
1931
|
+
handleCisChange() {
|
|
1932
|
+
this.togglePsaDefault();
|
|
1933
|
+
this.updateCisProfile();
|
|
1934
|
+
},
|
|
1935
|
+
|
|
1936
|
+
updateCisProfile() {
|
|
1937
|
+
// If the user selects any Worker CIS Profile,
|
|
1938
|
+
// protect-kernel-defaults should be set to false
|
|
1939
|
+
// in the RKE2 worker/agent config.
|
|
1940
|
+
const selectedCisProfile = this.agentConfig?.profile;
|
|
1941
|
+
|
|
1942
|
+
if (selectedCisProfile) {
|
|
1943
|
+
this.agentConfig['protect-kernel-defaults'] = true;
|
|
1944
|
+
} else {
|
|
1945
|
+
this.agentConfig['protect-kernel-defaults'] = false;
|
|
1946
|
+
}
|
|
1947
|
+
},
|
|
1948
|
+
updateAdditionalManifest(neu) {
|
|
1949
|
+
this.value.spec.rkeConfig.additionalManifest = neu;
|
|
1950
|
+
},
|
|
1951
|
+
|
|
1952
|
+
/**
|
|
1953
|
+
* Handle k8s changes side effects, like PSA resets
|
|
1954
|
+
*/
|
|
1955
|
+
handleKubernetesChange(value, old) {
|
|
1956
|
+
if (value) {
|
|
1957
|
+
this.togglePsaDefault();
|
|
1958
|
+
|
|
1959
|
+
// If Harvester driver, reset cloud provider if not compatible
|
|
1960
|
+
if (this.isHarvesterDriver && this.mode === _CREATE && this.isHarvesterIncompatible) {
|
|
1961
|
+
this.setHarvesterDefaultCloudProvider();
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
},
|
|
1965
|
+
|
|
1966
|
+
handleShowDeprecatedPatchVersionsChanged(value) {
|
|
1967
|
+
this.showDeprecatedPatchVersions = value;
|
|
1968
|
+
},
|
|
1969
|
+
/**
|
|
1970
|
+
* Track Machine Pool validation status
|
|
1971
|
+
*/
|
|
1972
|
+
machinePoolValidationChanged(id, value) {
|
|
1973
|
+
if (value === undefined) {
|
|
1974
|
+
delete this.machinePoolValidation[id];
|
|
1975
|
+
} else {
|
|
1976
|
+
this.machinePoolValidation[id] = value;
|
|
1977
|
+
}
|
|
1978
|
+
},
|
|
1979
|
+
handleEnabledSystemServicesChanged(val) {
|
|
1980
|
+
this.serverConfig.disable = val;
|
|
1981
|
+
},
|
|
1982
|
+
|
|
1983
|
+
handleCiliumValuesChanged(neu) {
|
|
1984
|
+
if (neu === undefined) {
|
|
1985
|
+
return;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
const name = this.chartVersionKey('rke2-cilium');
|
|
1989
|
+
|
|
1990
|
+
this.userChartValues = {
|
|
1991
|
+
...this.userChartValues,
|
|
1992
|
+
[name]: { ...neu }
|
|
1993
|
+
};
|
|
1994
|
+
},
|
|
1995
|
+
|
|
1996
|
+
handleCisChanged() {
|
|
1997
|
+
this.handleCisChange();
|
|
1998
|
+
},
|
|
1999
|
+
|
|
2000
|
+
handlePsaDefaultChanged() {
|
|
2001
|
+
this.cisOverride = !this.cisOverride;
|
|
2002
|
+
this.togglePsaDefault();
|
|
2003
|
+
},
|
|
2004
|
+
|
|
2005
|
+
handleMachinePoolError(error) {
|
|
2006
|
+
this.machinePoolErrors = merge(this.machinePoolErrors, error);
|
|
2007
|
+
|
|
2008
|
+
const errors = Object.entries(this.machinePoolErrors)
|
|
2009
|
+
.map((x) => {
|
|
2010
|
+
if (!x[1].length) {
|
|
2011
|
+
return;
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
const formattedFields = (() => {
|
|
2015
|
+
switch (x[1].length) {
|
|
2016
|
+
case 1:
|
|
2017
|
+
return x[1][0];
|
|
2018
|
+
case 2:
|
|
2019
|
+
return `${ x[1][0] } and ${ x[1][1] }`;
|
|
2020
|
+
default: {
|
|
2021
|
+
const [head, ...rest] = x[1];
|
|
2022
|
+
|
|
2023
|
+
return `${ rest.join(', ') }, and ${ head }`;
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
})();
|
|
2027
|
+
|
|
2028
|
+
return this.t('cluster.banner.machinePoolError', {
|
|
2029
|
+
count: x[1].length, pool_name: x[0], fields: formattedFields
|
|
2030
|
+
}, true);
|
|
2031
|
+
})
|
|
2032
|
+
.filter((x) => x);
|
|
2033
|
+
|
|
2034
|
+
if (!errors) {
|
|
2035
|
+
return;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
this.errors = errors;
|
|
2039
|
+
},
|
|
2040
|
+
handleS3BackupChanged(neu) {
|
|
2041
|
+
this.s3Backup = neu;
|
|
2042
|
+
if (neu) {
|
|
2043
|
+
// We need to make sure that s3 doesn't already have an existing value otherwise when editing a cluster with s3 defined this will clear s3.
|
|
2044
|
+
if (isEmpty(this.rkeConfig.etcd?.s3)) {
|
|
2045
|
+
this.rkeConfig.etcd.s3 = {};
|
|
2046
|
+
}
|
|
2047
|
+
} else {
|
|
2048
|
+
this.rkeConfig.etcd.s3 = null;
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
2051
|
+
handleConfigEtcdExposeMetricsChanged(neu) {
|
|
2052
|
+
this.serverConfig['etcd-expose-metrics'] = neu;
|
|
2053
|
+
},
|
|
2054
|
+
handleRegistryHostChanged(neu) {
|
|
2055
|
+
this.registryHost = neu;
|
|
2056
|
+
},
|
|
2057
|
+
handleRegistrySecretChanged(neu) {
|
|
2058
|
+
this.registrySecret = neu;
|
|
2059
|
+
},
|
|
2060
|
+
validateClusterName() {
|
|
2061
|
+
if (!this.value.metadata.name && this.agentConfig?.['cloud-provider-name'] === HARVESTER) {
|
|
2062
|
+
this.errors.push(this.t('validation.required', { key: this.t('cluster.name.label') }, true));
|
|
2063
|
+
}
|
|
2064
|
+
},
|
|
2065
|
+
async validateMachinePool() {
|
|
2066
|
+
if (this.errors) {
|
|
2067
|
+
clear(this.errors);
|
|
2068
|
+
}
|
|
2069
|
+
if (this.value.cloudProvider === 'aws') {
|
|
2070
|
+
const missingProfileName = this.machinePools.some((mp) => !mp.config.iamInstanceProfile);
|
|
2071
|
+
|
|
2072
|
+
if (missingProfileName) {
|
|
2073
|
+
this.errors.push(this.t('cluster.validation.iamInstanceProfileName', {}, true));
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
for (const [index] of this.machinePools.entries()) { // validator machine config
|
|
2078
|
+
if (typeof this.$refs.pool[index]?.test === 'function') {
|
|
2079
|
+
try {
|
|
2080
|
+
const res = await this.$refs.pool[index].test();
|
|
2081
|
+
|
|
2082
|
+
if (Array.isArray(res) && res.length > 0) {
|
|
2083
|
+
this.errors.push(...res);
|
|
2084
|
+
}
|
|
2085
|
+
} catch (e) {
|
|
2086
|
+
this.errors.push(e);
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
},
|
|
2091
|
+
|
|
2092
|
+
addonConfigValidationChanged(configName, isValid) {
|
|
2093
|
+
this.addonConfigValidation[configName] = isValid;
|
|
2094
|
+
},
|
|
2095
|
+
|
|
2096
|
+
handleTabChange(data) {
|
|
2097
|
+
this.activeTab = data;
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
};
|
|
2101
|
+
</script>
|
|
2102
|
+
|
|
2103
|
+
<template>
|
|
2104
|
+
<Loading v-if="$fetchState.pending && !loadedOnce" />
|
|
2105
|
+
<Banner
|
|
2106
|
+
v-else-if="$fetchState.error"
|
|
2107
|
+
color="error"
|
|
2108
|
+
:label="$fetchState.error"
|
|
2109
|
+
/>
|
|
2110
|
+
<CruResource
|
|
2111
|
+
v-else
|
|
2112
|
+
ref="cruresource"
|
|
2113
|
+
:mode="mode"
|
|
2114
|
+
:validation-passed="validationPassed && fvFormIsValid"
|
|
2115
|
+
:resource="value"
|
|
2116
|
+
:errors="errors"
|
|
2117
|
+
:cancel-event="true"
|
|
2118
|
+
:done-route="doneRoute"
|
|
2119
|
+
:apply-hooks="applyHooks"
|
|
2120
|
+
:generate-yaml="generateYaml"
|
|
2121
|
+
class="rke2"
|
|
2122
|
+
component-testid="rke2-custom-create"
|
|
2123
|
+
@done="done"
|
|
2124
|
+
@finish="saveOverride"
|
|
2125
|
+
@cancel="cancel"
|
|
2126
|
+
@error="e => errors = e"
|
|
2127
|
+
>
|
|
2128
|
+
<div class="header-warnings">
|
|
2129
|
+
<Banner
|
|
2130
|
+
v-if="isEdit"
|
|
2131
|
+
color="warning"
|
|
2132
|
+
data-testid="edit-cluster-reprovisioning-documentation"
|
|
2133
|
+
>
|
|
2134
|
+
<span v-clean-html="t('cluster.banner.rke2-k3-reprovisioning', {}, true)" />
|
|
2135
|
+
</Banner>
|
|
2136
|
+
</div>
|
|
2137
|
+
<SelectCredential
|
|
2138
|
+
v-if="needCredential"
|
|
2139
|
+
v-model:value="credentialId"
|
|
2140
|
+
:mode="mode"
|
|
2141
|
+
:provider="provider"
|
|
2142
|
+
:cancel="cancelCredential"
|
|
2143
|
+
:showing-form="showForm"
|
|
2144
|
+
:default-on-cancel="true"
|
|
2145
|
+
data-testid="select-credential"
|
|
2146
|
+
class="mt-20"
|
|
2147
|
+
/>
|
|
2148
|
+
|
|
2149
|
+
<div
|
|
2150
|
+
v-if="showForm"
|
|
2151
|
+
data-testid="form"
|
|
2152
|
+
class="mt-20"
|
|
2153
|
+
>
|
|
2154
|
+
<NameNsDescription
|
|
2155
|
+
v-if="!isView"
|
|
2156
|
+
v-model:value="localValue"
|
|
2157
|
+
:mode="mode"
|
|
2158
|
+
:namespaced="needsNamespace"
|
|
2159
|
+
:namespace-options="allNamespaces"
|
|
2160
|
+
name-label="cluster.name.label"
|
|
2161
|
+
name-placeholder="cluster.name.placeholder"
|
|
2162
|
+
description-label="cluster.description.label"
|
|
2163
|
+
description-placeholder="cluster.description.placeholder"
|
|
2164
|
+
:rules="{ name: fvGetAndReportPathRules('metadata.name') }"
|
|
2165
|
+
@update:value="$emit('input', $event)"
|
|
2166
|
+
>
|
|
2167
|
+
<template #customize>
|
|
2168
|
+
<ClusterAppearance
|
|
2169
|
+
:name="clusterName"
|
|
2170
|
+
:currentCluster="currentCluster"
|
|
2171
|
+
:mode="mode"
|
|
2172
|
+
/>
|
|
2173
|
+
</template>
|
|
2174
|
+
</NameNsDescription>
|
|
2175
|
+
|
|
2176
|
+
<Banner
|
|
2177
|
+
v-if="appsOSWarning"
|
|
2178
|
+
color="error"
|
|
2179
|
+
>
|
|
2180
|
+
{{ appsOSWarning }}
|
|
2181
|
+
</Banner>
|
|
2182
|
+
|
|
2183
|
+
<!-- Pools Extras -->
|
|
2184
|
+
<template v-if="hasMachinePools">
|
|
2185
|
+
<div class="clearfix">
|
|
2186
|
+
<h2
|
|
2187
|
+
v-t="'cluster.tabs.machinePools'"
|
|
2188
|
+
class="pull-left"
|
|
2189
|
+
/>
|
|
2190
|
+
<div
|
|
2191
|
+
v-if="!isView"
|
|
2192
|
+
class="pull-right"
|
|
2193
|
+
>
|
|
2194
|
+
<BadgeState
|
|
2195
|
+
v-clean-tooltip="nodeTotals.tooltip.etcd"
|
|
2196
|
+
:color="nodeTotals.color.etcd"
|
|
2197
|
+
:icon="nodeTotals.icon.etcd"
|
|
2198
|
+
:label="nodeTotals.label.etcd"
|
|
2199
|
+
class="mr-10"
|
|
2200
|
+
/>
|
|
2201
|
+
<BadgeState
|
|
2202
|
+
v-clean-tooltip="nodeTotals.tooltip.controlPlane"
|
|
2203
|
+
:color="nodeTotals.color.controlPlane"
|
|
2204
|
+
:icon="nodeTotals.icon.controlPlane"
|
|
2205
|
+
:label="nodeTotals.label.controlPlane"
|
|
2206
|
+
class="mr-10"
|
|
2207
|
+
/>
|
|
2208
|
+
<BadgeState
|
|
2209
|
+
v-clean-tooltip="nodeTotals.tooltip.worker"
|
|
2210
|
+
:color="nodeTotals.color.worker"
|
|
2211
|
+
:icon="nodeTotals.icon.worker"
|
|
2212
|
+
:label="nodeTotals.label.worker"
|
|
2213
|
+
/>
|
|
2214
|
+
</div>
|
|
2215
|
+
</div>
|
|
2216
|
+
|
|
2217
|
+
<!-- Extra Tabs for Machine Pool -->
|
|
2218
|
+
<Tabbed
|
|
2219
|
+
ref="pools"
|
|
2220
|
+
:side-tabs="true"
|
|
2221
|
+
:show-tabs-add-remove="!isView"
|
|
2222
|
+
@addTab="addMachinePool($event)"
|
|
2223
|
+
@removeTab="removeMachinePool($event)"
|
|
2224
|
+
>
|
|
2225
|
+
<template
|
|
2226
|
+
v-for="(obj, idx) in machinePools"
|
|
2227
|
+
:key="idx"
|
|
2228
|
+
>
|
|
2229
|
+
<Tab
|
|
2230
|
+
v-if="!obj.remove"
|
|
2231
|
+
:key="obj.id"
|
|
2232
|
+
:name="obj.id"
|
|
2233
|
+
:label="obj.pool.name || '(Not Named)'"
|
|
2234
|
+
:show-header="false"
|
|
2235
|
+
:error="!machinePoolValidation[obj.id]"
|
|
2236
|
+
>
|
|
2237
|
+
<MachinePool
|
|
2238
|
+
ref="pool"
|
|
2239
|
+
:value="obj"
|
|
2240
|
+
:cluster="value"
|
|
2241
|
+
:mode="mode"
|
|
2242
|
+
:provider="provider"
|
|
2243
|
+
:credential-id="credentialId"
|
|
2244
|
+
:idx="idx"
|
|
2245
|
+
:machine-pools="machinePools"
|
|
2246
|
+
:busy="busy"
|
|
2247
|
+
:pool-id="obj.id"
|
|
2248
|
+
:pool-create-mode="obj.create"
|
|
2249
|
+
@error="handleMachinePoolError"
|
|
2250
|
+
@validationChanged="v => machinePoolValidationChanged(obj.id, v)"
|
|
2251
|
+
/>
|
|
2252
|
+
</Tab>
|
|
2253
|
+
</template>
|
|
2254
|
+
<div v-if="!unremovedMachinePools.length">
|
|
2255
|
+
{{ t('cluster.machinePool.noPoolsDisclaimer') }}
|
|
2256
|
+
</div>
|
|
2257
|
+
</Tabbed>
|
|
2258
|
+
<div class="spacer" />
|
|
2259
|
+
</template>
|
|
2260
|
+
|
|
2261
|
+
<!-- Cluster Tabs -->
|
|
2262
|
+
<h2 v-t="'cluster.tabs.cluster'" />
|
|
2263
|
+
<Tabbed
|
|
2264
|
+
:side-tabs="true"
|
|
2265
|
+
class="min-height"
|
|
2266
|
+
@changed="handleTabChange"
|
|
2267
|
+
>
|
|
2268
|
+
<Tab
|
|
2269
|
+
name="basic"
|
|
2270
|
+
label-key="cluster.tabs.basic"
|
|
2271
|
+
:weight="11"
|
|
2272
|
+
@active="refreshComponentWithYamls('tab-Basics')"
|
|
2273
|
+
>
|
|
2274
|
+
<!-- Basic -->
|
|
2275
|
+
<Basics
|
|
2276
|
+
ref="tab-Basics"
|
|
2277
|
+
v-model:value="localValue"
|
|
2278
|
+
:live-value="liveValue"
|
|
2279
|
+
:mode="mode"
|
|
2280
|
+
:provider="provider"
|
|
2281
|
+
:user-chart-values="userChartValues"
|
|
2282
|
+
:credential="credential"
|
|
2283
|
+
:cis-override="cisOverride"
|
|
2284
|
+
:all-psas="allPSAs"
|
|
2285
|
+
:addon-versions="addonVersions"
|
|
2286
|
+
:show-deprecated-patch-versions="showDeprecatedPatchVersions"
|
|
2287
|
+
:selected-version="selectedVersion"
|
|
2288
|
+
:is-harvester-driver="isHarvesterDriver"
|
|
2289
|
+
:is-harvester-incompatible="isHarvesterIncompatible"
|
|
2290
|
+
:version-options="versionOptions"
|
|
2291
|
+
:is-elemental-cluster="isElementalCluster"
|
|
2292
|
+
:have-arg-info="haveArgInfo"
|
|
2293
|
+
:show-cni="showCni"
|
|
2294
|
+
:show-cloud-provider="showCloudProvider"
|
|
2295
|
+
:cloud-provider-options="cloudProviderOptions"
|
|
2296
|
+
:is-azure-provider-unsupported="isAzureProviderUnsupported"
|
|
2297
|
+
:can-azure-migrate-on-edit="canAzureMigrateOnEdit"
|
|
2298
|
+
@update:value="$emit('input', $event)"
|
|
2299
|
+
@cilium-values-changed="handleCiliumValuesChanged"
|
|
2300
|
+
@enabled-system-services-changed="handleEnabledSystemServicesChanged"
|
|
2301
|
+
@kubernetes-changed="handleKubernetesChange"
|
|
2302
|
+
@cis-changed="handleCisChanged"
|
|
2303
|
+
@psa-default-changed="handlePsaDefaultChanged"
|
|
2304
|
+
@show-deprecated-patch-versions-changed="handleShowDeprecatedPatchVersionsChanged"
|
|
2305
|
+
/>
|
|
2306
|
+
</Tab>
|
|
2307
|
+
|
|
2308
|
+
<!-- Member Roles -->
|
|
2309
|
+
<Tab
|
|
2310
|
+
v-if="canManageMembers"
|
|
2311
|
+
name="memberRoles"
|
|
2312
|
+
label-key="cluster.tabs.memberRoles"
|
|
2313
|
+
:weight="10"
|
|
2314
|
+
>
|
|
2315
|
+
<MemberRoles
|
|
2316
|
+
v-model:value="localValue"
|
|
2317
|
+
:mode="mode"
|
|
2318
|
+
:on-membership-update="onMembershipUpdate"
|
|
2319
|
+
@update:value="$emit('input', $event)"
|
|
2320
|
+
/>
|
|
2321
|
+
</Tab>
|
|
2322
|
+
<!-- etcd -->
|
|
2323
|
+
<Tab
|
|
2324
|
+
name="etcd"
|
|
2325
|
+
label-key="cluster.tabs.etcd"
|
|
2326
|
+
>
|
|
2327
|
+
<Etcd
|
|
2328
|
+
v-model:value="localValue"
|
|
2329
|
+
:mode="mode"
|
|
2330
|
+
:s3-backup="s3Backup"
|
|
2331
|
+
:register-before-hook="registerBeforeHook"
|
|
2332
|
+
:selected-version="selectedVersion"
|
|
2333
|
+
@update:value="$emit('input', $event)"
|
|
2334
|
+
@s3-backup-changed="handleS3BackupChanged"
|
|
2335
|
+
@config-etcd-expose-metrics-changed="handleConfigEtcdExposeMetricsChanged"
|
|
2336
|
+
/>
|
|
2337
|
+
</Tab>
|
|
2338
|
+
|
|
2339
|
+
<!-- Networking -->
|
|
2340
|
+
<Tab
|
|
2341
|
+
v-if="haveArgInfo"
|
|
2342
|
+
name="networking"
|
|
2343
|
+
label-key="cluster.tabs.networking"
|
|
2344
|
+
>
|
|
2345
|
+
<Networking
|
|
2346
|
+
v-model:value="localValue"
|
|
2347
|
+
:mode="mode"
|
|
2348
|
+
:selected-version="selectedVersion"
|
|
2349
|
+
:truncate-limit="truncateLimit"
|
|
2350
|
+
@truncate-hostname-changed="truncateHostname"
|
|
2351
|
+
@cluster-cidr-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-cidr'] = val"
|
|
2352
|
+
@service-cidr-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['service-cidr'] = val"
|
|
2353
|
+
@cluster-domain-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-domain'] = val"
|
|
2354
|
+
@cluster-dns-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['cluster-dns'] = val"
|
|
2355
|
+
@service-node-port-range-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['service-node-port-range'] = val"
|
|
2356
|
+
@tls-san-changed="(val)=>localValue.spec.rkeConfig.machineGlobalConfig['tls-san'] = val"
|
|
2357
|
+
@local-cluster-auth-endpoint-changed="enableLocalClusterAuthEndpoint"
|
|
2358
|
+
@ca-certs-changed="(val)=>localValue.spec.localClusterAuthEndpoint.caCerts = val"
|
|
2359
|
+
@fqdn-changed="(val)=>localValue.spec.localClusterAuthEndpoint.fqdn = val"
|
|
2360
|
+
/>
|
|
2361
|
+
</Tab>
|
|
2362
|
+
|
|
2363
|
+
<!-- Upgrade -->
|
|
2364
|
+
<Tab
|
|
2365
|
+
name="upgrade"
|
|
2366
|
+
label-key="cluster.tabs.upgrade"
|
|
2367
|
+
>
|
|
2368
|
+
<Upgrade
|
|
2369
|
+
v-model:value="localValue"
|
|
2370
|
+
:mode="mode"
|
|
2371
|
+
@update:value="$emit('input', $event)"
|
|
2372
|
+
/>
|
|
2373
|
+
</Tab>
|
|
2374
|
+
|
|
2375
|
+
<!-- Registries -->
|
|
2376
|
+
<Tab
|
|
2377
|
+
:name="REGISTRIES_TAB_NAME"
|
|
2378
|
+
label-key="cluster.tabs.registry"
|
|
2379
|
+
>
|
|
2380
|
+
<Registries
|
|
2381
|
+
v-if="isActiveTabRegistries"
|
|
2382
|
+
v-model:value="localValue"
|
|
2383
|
+
:mode="mode"
|
|
2384
|
+
:register-before-hook="registerBeforeHook"
|
|
2385
|
+
:show-custom-registry-input="showCustomRegistryInput"
|
|
2386
|
+
:registry-host="registryHost"
|
|
2387
|
+
:registry-secret="registrySecret"
|
|
2388
|
+
:show-custom-registry-advanced-input="showCustomRegistryAdvancedInput"
|
|
2389
|
+
@update:value="$emit('input', $event)"
|
|
2390
|
+
@update-configs-changed="updateConfigs"
|
|
2391
|
+
@custom-registry-changed="toggleCustomRegistry"
|
|
2392
|
+
@registry-host-changed="handleRegistryHostChanged"
|
|
2393
|
+
@registry-secret-changed="handleRegistrySecretChanged"
|
|
2394
|
+
/>
|
|
2395
|
+
</Tab>
|
|
2396
|
+
|
|
2397
|
+
<!-- Add-on Configs -->
|
|
2398
|
+
<Tab
|
|
2399
|
+
v-for="v in addonVersions"
|
|
2400
|
+
:key="v.name"
|
|
2401
|
+
:name="v.name"
|
|
2402
|
+
:label="labelForAddon($store, v.name, false)"
|
|
2403
|
+
:weight="9"
|
|
2404
|
+
:showHeader="false"
|
|
2405
|
+
:error="addonConfigValidation[v.name]===false"
|
|
2406
|
+
@active="showAddons(v.name)"
|
|
2407
|
+
>
|
|
2408
|
+
<AddOnConfig
|
|
2409
|
+
:ref="v.name"
|
|
2410
|
+
v-model:value="localValue"
|
|
2411
|
+
:mode="mode"
|
|
2412
|
+
:version-info="versionInfo"
|
|
2413
|
+
:addon-version="v"
|
|
2414
|
+
:addons-rev="addonsRev"
|
|
2415
|
+
:user-chart-values-temp="userChartValuesTemp"
|
|
2416
|
+
:init-yaml-editor="initYamlEditor"
|
|
2417
|
+
@update:value="$emit('input', $event)"
|
|
2418
|
+
@update-questions="syncChartValues"
|
|
2419
|
+
@update-values="updateValues"
|
|
2420
|
+
@validationChanged="e => addonConfigValidationChanged(v.name, e)"
|
|
2421
|
+
/>
|
|
2422
|
+
</Tab>
|
|
2423
|
+
|
|
2424
|
+
<!-- Add-on Additional Manifest -->
|
|
2425
|
+
<Tab
|
|
2426
|
+
name="additionalmanifest"
|
|
2427
|
+
label-key="cluster.tabs.addOnAdditionalManifest"
|
|
2428
|
+
:showHeader="false"
|
|
2429
|
+
@active="refreshComponentWithYamls('additionalmanifest')"
|
|
2430
|
+
>
|
|
2431
|
+
<AddOnAdditionalManifest
|
|
2432
|
+
ref="additionalmanifest"
|
|
2433
|
+
:value="value"
|
|
2434
|
+
:mode="mode"
|
|
2435
|
+
@additional-manifest-changed="updateAdditionalManifest"
|
|
2436
|
+
/>
|
|
2437
|
+
</Tab>
|
|
2438
|
+
|
|
2439
|
+
<!-- Cluster Agent Configuration -->
|
|
2440
|
+
<Tab
|
|
2441
|
+
v-if="value.spec.clusterAgentDeploymentCustomization"
|
|
2442
|
+
name="clusteragentconfig"
|
|
2443
|
+
label-key="cluster.agentConfig.tabs.cluster"
|
|
2444
|
+
>
|
|
2445
|
+
<AgentConfiguration
|
|
2446
|
+
v-model:value="value.spec.clusterAgentDeploymentCustomization"
|
|
2447
|
+
data-testid="rke2-cluster-agent-config"
|
|
2448
|
+
type="cluster"
|
|
2449
|
+
:mode="mode"
|
|
2450
|
+
:scheduling-customization-feature-enabled="schedulingCustomizationFeatureEnabled"
|
|
2451
|
+
:default-p-c="clusterAgentDefaultPC"
|
|
2452
|
+
:default-p-d-b="clusterAgentDefaultPDB"
|
|
2453
|
+
@scheduling-customization-changed="setSchedulingCustomization"
|
|
2454
|
+
/>
|
|
2455
|
+
</Tab>
|
|
2456
|
+
|
|
2457
|
+
<!-- Fleet Agent Configuration -->
|
|
2458
|
+
<Tab
|
|
2459
|
+
name="fleetagentconfig"
|
|
2460
|
+
label-key="cluster.agentConfig.tabs.fleet"
|
|
2461
|
+
>
|
|
2462
|
+
<AgentConfiguration
|
|
2463
|
+
v-if="value.spec.fleetAgentDeploymentCustomization"
|
|
2464
|
+
v-model:value="value.spec.fleetAgentDeploymentCustomization"
|
|
2465
|
+
data-testid="rke2-fleet-agent-config"
|
|
2466
|
+
type="fleet"
|
|
2467
|
+
:mode="mode"
|
|
2468
|
+
/>
|
|
2469
|
+
</Tab>
|
|
2470
|
+
|
|
2471
|
+
<!-- Advanced -->
|
|
2472
|
+
<Tab
|
|
2473
|
+
v-if="haveArgInfo || agentArgs['protect-kernel-defaults']"
|
|
2474
|
+
name="advanced"
|
|
2475
|
+
label-key="cluster.tabs.advanced"
|
|
2476
|
+
:weight="-1"
|
|
2477
|
+
>
|
|
2478
|
+
<Advanced
|
|
2479
|
+
v-model:value="localValue"
|
|
2480
|
+
:mode="mode"
|
|
2481
|
+
:have-arg-info="haveArgInfo"
|
|
2482
|
+
:selected-version="selectedVersion"
|
|
2483
|
+
@update:value="$emit('input', $event)"
|
|
2484
|
+
/>
|
|
2485
|
+
</Tab>
|
|
2486
|
+
|
|
2487
|
+
<AgentEnv
|
|
2488
|
+
v-model:value="localValue"
|
|
2489
|
+
:mode="mode"
|
|
2490
|
+
@update:value="$emit('input', $event)"
|
|
2491
|
+
/>
|
|
2492
|
+
<Labels
|
|
2493
|
+
v-model:value="localValue"
|
|
2494
|
+
:mode="mode"
|
|
2495
|
+
@update:value="$emit('input', $event)"
|
|
2496
|
+
/>
|
|
2497
|
+
|
|
2498
|
+
<!-- Extension tabs -->
|
|
2499
|
+
<Tab
|
|
2500
|
+
v-for="tab, i in extensionTabs"
|
|
2501
|
+
:key="`${tab.name}${i}`"
|
|
2502
|
+
:name="tab.name"
|
|
2503
|
+
:label="tab.label"
|
|
2504
|
+
:label-key="tab.labelKey"
|
|
2505
|
+
:weight="tab.weight"
|
|
2506
|
+
:tooltip="tab.tooltip"
|
|
2507
|
+
:show-header="tab.showHeader"
|
|
2508
|
+
:display-alert-icon="tab.displayAlertIcon"
|
|
2509
|
+
:error="tab.error"
|
|
2510
|
+
:badge="tab.badge"
|
|
2511
|
+
>
|
|
2512
|
+
<component
|
|
2513
|
+
:is="tab.component"
|
|
2514
|
+
:resource="value"
|
|
2515
|
+
/>
|
|
2516
|
+
</Tab>
|
|
2517
|
+
</Tabbed>
|
|
2518
|
+
</div>
|
|
2519
|
+
|
|
2520
|
+
<Banner
|
|
2521
|
+
v-if="unsupportedSelectorConfig"
|
|
2522
|
+
color="warning"
|
|
2523
|
+
:label="t('cluster.banner.warning')"
|
|
2524
|
+
/>
|
|
2525
|
+
|
|
2526
|
+
<template
|
|
2527
|
+
v-if="needCredential && !credentialId"
|
|
2528
|
+
#form-footer
|
|
2529
|
+
>
|
|
2530
|
+
<div><!-- Hide the outer footer --></div>
|
|
2531
|
+
</template>
|
|
2532
|
+
</CruResource>
|
|
2533
|
+
</template>
|
|
2534
|
+
|
|
2535
|
+
<style lang="scss" scoped>
|
|
2536
|
+
.min-height {
|
|
2537
|
+
min-height: 40em;
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
.patch-version {
|
|
2541
|
+
margin-top: 5px;
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2544
|
+
.header-warnings .banner {
|
|
2545
|
+
margin-bottom: 0;
|
|
2546
|
+
}
|
|
2547
|
+
</style>
|