feat(environment): environment support for kubesolo [R8S-983] (#2648)

This commit is contained in:
Steven Kang
2026-06-02 09:21:08 +12:00
committed by GitHub
parent 61198a0c04
commit 50081cbdaa
7 changed files with 1001 additions and 22 deletions
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 739 KiB

@@ -3,7 +3,7 @@ import { EnvironmentGroupId } from '@/react/portainer/environments/types';
import { EdgeGroup } from '../../edge-groups/types';
export type Platform = 'standalone' | 'swarm' | 'podman' | 'k8s';
export type Platform = 'standalone' | 'swarm' | 'podman' | 'k8s' | 'kubesolo';
export type OS = 'win' | 'linux';
export interface ScriptFormValues {
@@ -2,8 +2,8 @@ import { FeatureId } from '@/react/portainer/feature-flags/enums';
import Docker from '@/assets/ico/vendor/docker.svg?c';
import Podman from '@/assets/ico/vendor/podman.svg?c';
import Kubernetes from '@/assets/ico/vendor/kubernetes.svg?c';
import Kubesolo from '@/assets/ico/vendor/kubesolo.svg?c';
import Azure from '@/assets/ico/vendor/azure.svg?c';
import KaaS from '@/assets/ico/vendor/kaas-icon.svg?c';
import InstallK8s from '@/assets/ico/vendor/install-kubernetes.svg?c';
import { BoxSelectorOption } from '@@/BoxSelector';
@@ -14,7 +14,7 @@ export type EnvironmentOptionValue =
| 'podman'
| 'kubernetes'
| 'aci'
| 'kaas'
| 'kubesolo'
| 'k8sInstall';
export interface EnvironmentOption extends BoxSelectorOption<EnvironmentOptionValue> {
@@ -66,14 +66,14 @@ export const existingEnvironmentTypes: EnvironmentOption[] = [
export const newEnvironmentTypes: EnvironmentOption[] = [
{
id: 'kaas',
value: 'kaas',
label: 'Provision KaaS Cluster (Deprecated)',
id: 'kubesolo',
value: 'kubesolo',
label: 'KubeSolo (Edge)',
description:
"Provision a Kubernetes cluster via a cloud provider's Kubernetes as a Service",
icon: KaaS,
'Deploy a single-node Kubernetes edge environment with KubeSolo',
icon: Kubesolo,
iconType: 'logo',
feature: FeatureId.KAAS_PROVISIONING,
feature: FeatureId.KUBESOLO,
disabledWhenLimited: true,
},
{
@@ -99,6 +99,6 @@ export const formTitles: Record<EnvironmentOptionValue, string> = {
podman: 'Connect to your Podman environment',
kubernetes: 'Connect to your Kubernetes environment',
aci: 'Connect to your ACI environment',
kaas: 'Provision a KaaS environment',
kubesolo: 'Deploy a kubesolo edge environment',
k8sInstall: 'Create a Kubernetes cluster',
};
@@ -14,7 +14,6 @@ import { Widget, WidgetBody, WidgetTitle } from '@@/Widget';
import { PageHeader } from '@@/PageHeader';
import { Button } from '@@/buttons';
import { FormSection } from '@@/form-components/FormSection';
import { Alert } from '@@/Alert';
import { StickyFooter } from '@@/StickyFooter/StickyFooter';
import {
@@ -94,15 +93,6 @@ export function EnvironmentCreationView() {
<WidgetTitle icon={Wand2} title="Environment Wizard" />
<WidgetBody>
<FormSection title={formTitles[currentStep.id]}>
{currentStep.id === 'kaas' && (
<Alert color="warn" title="Deprecated Feature" className="mb-2">
Provisioning a KaaS environment from Portainer is deprecated
and will be removed in a future release. You will still be
able to use any Kubernetes clusters provisioned using this
method but will no longer have access to any of the
KaaS-specific management functionality.
</Alert>
)}
<Component
onCreate={handleCreateEnvironment}
isDockerStandalone={isDockerStandalone}
@@ -222,7 +212,8 @@ function useAnalyticsState() {
kubernetesAgent: 0,
kubernetesEdgeAgentAsync: 0,
kubernetesEdgeAgentStandard: 0,
kaasAgent: 0,
kubesoloEdgeAgentStandard: 0,
kubesoloEdgeAgentAsync: 0,
aciApi: 0,
localEndpoint: 0,
});
@@ -10,7 +10,8 @@ export interface AnalyticsState {
kubernetesAgent: number;
kubernetesEdgeAgentStandard: number;
kubernetesEdgeAgentAsync: number;
kaasAgent: number;
kubesoloEdgeAgentStandard: number;
kubesoloEdgeAgentAsync: number;
aciApi: number;
localEndpoint: number; // docker socket
}
@@ -39,6 +39,7 @@ export enum FeatureId {
K8S_ADM_ONLY_SECRETS = 'k8s-admin-only-secrets',
K8S_ROLLING_RESTART = 'k8s-rolling-restart',
K8SINSTALL = 'k8s-install',
KUBESOLO = 'kubesolo',
K8S_ANNOTATIONS = 'k8s-annotations',
CA_FILE = 'ca-file',
K8S_REQUIRE_NOTE_ON_APPLICATIONS = 'k8s-note-on-applications',
@@ -20,6 +20,7 @@ export async function init(edition: Edition) {
[FeatureId.K8S_CREATE_FROM_KUBECONFIG]: Edition.BE,
[FeatureId.KAAS_PROVISIONING]: Edition.BE,
[FeatureId.K8SINSTALL]: Edition.BE,
[FeatureId.KUBESOLO]: Edition.BE,
[FeatureId.ACTIVITY_AUDIT]: Edition.BE,
[FeatureId.EXTERNAL_AUTH_LDAP]: Edition.BE,
[FeatureId.HIDE_INTERNAL_AUTH]: Edition.BE,