From 2945edb066850480293a161e66f65cd8ad61bec8 Mon Sep 17 00:00:00 2001 From: Loft Bot <73976634+loft-bot@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:56:01 +0000 Subject: [PATCH] [skip ci] repo-sync --- gen/models/V1EphemeralContainer.ts | 284 + gen/models/V1HostIP.ts | 41 + gen/models/V1ModifyVolumeStatus.ts | 58 + gen/models/V1PersistentVolumeClaim.ts | 75 + .../V1PersistentVolumeClaimCondition.ts | 85 + gen/models/V1PersistentVolumeClaimStatus.ts | 130 + gen/models/V1Pod.ts | 75 + gen/models/V1PodCondition.ts | 91 + gen/models/V1PodDNSConfig.ts | 62 + gen/models/V1PodDNSConfigOption.ts | 48 + gen/models/V1PodIP.ts | 41 + gen/models/V1PodOS.ts | 41 + gen/models/V1PodReadinessGate.ts | 41 + gen/models/V1PodResourceClaim.ts | 61 + gen/models/V1PodResourceClaimStatus.ts | 51 + gen/models/V1PodSchedulingGate.ts | 41 + gen/models/V1PodSpec.ts | 440 + gen/models/V1PodStatus.ts | 210 + gen/models/V1TopologySpreadConstraint.ts | 123 + gen/models/managementV1Cloud.ts | 46 + gen/models/managementV1ClusterSpec.ts | 16 + gen/models/managementV1ClusterStatus.ts | 11 + gen/models/managementV1ConfigList.ts | 64 + gen/models/managementV1ConfigStatus.ts | 16 + gen/models/managementV1CostControl.ts | 62 + .../managementV1CostControlClusterConfig.ts | 44 + .../managementV1CostControlGlobalConfig.ts | 36 + .../managementV1CostControlResourcePrice.ts | 48 + gen/models/managementV1CostControlSettings.ts | 60 + ...nagementV1DevPodEnvironmentTemplateSpec.ts | 24 +- ...managementV1DevPodWorkspaceInstanceSpec.ts | 8 + ...ntV1DevPodWorkspaceInstanceTroubleshoot.ts | 114 + .../managementV1DevPodWorkspacePreset.ts | 77 + .../managementV1DevPodWorkspacePresetList.ts | 64 + .../managementV1DevPodWorkspacePresetSpec.ts | 105 + gen/models/managementV1MaintenanceWindow.ts | 48 + gen/models/managementV1ProjectSpec.ts | 8 + gen/models/managementV1ProjectTemplates.ts | 11 + ...agementV1VirtualClusterExternalDatabase.ts | 75 + ...entV1VirtualClusterExternalDatabaseSpec.ts | 38 + ...tV1VirtualClusterExternalDatabaseStatus.ts | 38 + gen/models/storageV1ClusterSpec.ts | 16 + gen/models/storageV1ClusterStatus.ts | 11 + ...geV1DevPodEnvironmentTemplateDefinition.ts | 46 + ...orageV1DevPodEnvironmentTemplateVersion.ts | 10 +- .../storageV1DevPodWorkspacePresetSource.ts | 48 + .../storageV1DevPodWorkspacePresetVersion.ts | 72 + .../storageV1DevPodWorkspaceTemplate.ts | 77 + .../storageV1DevPodWorkspaceTemplateSpec.ts | 100 + gen/models/storageV1EnvironmentRef.ts | 10 + gen/models/storageV1Metrics.ts | 64 + gen/models/storageV1OpenCost.ts | 46 + gen/models/storageV1PresetRef.ts | 48 + gen/models/storageV1RequirePreset.ts | 38 + gen/models/storageV1Storage.ts | 48 + gen/models/uiV1UISettingsSpec.ts | 12 +- gen/resources.ts | 30 + lib/index.d.ts | 7365 ++++++++++------- lib/index.esm.js | 2 +- lib/index.js | 2 +- package.json | 2 +- src/client.ts | 19 +- 62 files changed, 8097 insertions(+), 2980 deletions(-) create mode 100644 gen/models/V1EphemeralContainer.ts create mode 100644 gen/models/V1HostIP.ts create mode 100644 gen/models/V1ModifyVolumeStatus.ts create mode 100644 gen/models/V1PersistentVolumeClaim.ts create mode 100644 gen/models/V1PersistentVolumeClaimCondition.ts create mode 100644 gen/models/V1PersistentVolumeClaimStatus.ts create mode 100644 gen/models/V1Pod.ts create mode 100644 gen/models/V1PodCondition.ts create mode 100644 gen/models/V1PodDNSConfig.ts create mode 100644 gen/models/V1PodDNSConfigOption.ts create mode 100644 gen/models/V1PodIP.ts create mode 100644 gen/models/V1PodOS.ts create mode 100644 gen/models/V1PodReadinessGate.ts create mode 100644 gen/models/V1PodResourceClaim.ts create mode 100644 gen/models/V1PodResourceClaimStatus.ts create mode 100644 gen/models/V1PodSchedulingGate.ts create mode 100644 gen/models/V1PodSpec.ts create mode 100644 gen/models/V1PodStatus.ts create mode 100644 gen/models/V1TopologySpreadConstraint.ts create mode 100644 gen/models/managementV1Cloud.ts create mode 100644 gen/models/managementV1ConfigList.ts create mode 100644 gen/models/managementV1CostControl.ts create mode 100644 gen/models/managementV1CostControlClusterConfig.ts create mode 100644 gen/models/managementV1CostControlGlobalConfig.ts create mode 100644 gen/models/managementV1CostControlResourcePrice.ts create mode 100644 gen/models/managementV1CostControlSettings.ts create mode 100644 gen/models/managementV1DevPodWorkspaceInstanceTroubleshoot.ts create mode 100644 gen/models/managementV1DevPodWorkspacePreset.ts create mode 100644 gen/models/managementV1DevPodWorkspacePresetList.ts create mode 100644 gen/models/managementV1DevPodWorkspacePresetSpec.ts create mode 100644 gen/models/managementV1MaintenanceWindow.ts create mode 100644 gen/models/managementV1VirtualClusterExternalDatabase.ts create mode 100644 gen/models/managementV1VirtualClusterExternalDatabaseSpec.ts create mode 100644 gen/models/managementV1VirtualClusterExternalDatabaseStatus.ts create mode 100644 gen/models/storageV1DevPodEnvironmentTemplateDefinition.ts create mode 100644 gen/models/storageV1DevPodWorkspacePresetSource.ts create mode 100644 gen/models/storageV1DevPodWorkspacePresetVersion.ts create mode 100644 gen/models/storageV1DevPodWorkspaceTemplate.ts create mode 100644 gen/models/storageV1DevPodWorkspaceTemplateSpec.ts create mode 100644 gen/models/storageV1Metrics.ts create mode 100644 gen/models/storageV1OpenCost.ts create mode 100644 gen/models/storageV1PresetRef.ts create mode 100644 gen/models/storageV1RequirePreset.ts create mode 100644 gen/models/storageV1Storage.ts diff --git a/gen/models/V1EphemeralContainer.ts b/gen/models/V1EphemeralContainer.ts new file mode 100644 index 0000000..0eda861 --- /dev/null +++ b/gen/models/V1EphemeralContainer.ts @@ -0,0 +1,284 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { V1ContainerPort } from '../models/V1ContainerPort'; +import { V1ContainerResizePolicy } from '../models/V1ContainerResizePolicy'; +import { V1EnvFromSource } from '../models/V1EnvFromSource'; +import { V1EnvVar } from '../models/V1EnvVar'; +import { V1Lifecycle } from '../models/V1Lifecycle'; +import { V1Probe } from '../models/V1Probe'; +import { V1ResourceRequirements } from '../models/V1ResourceRequirements'; +import { V1SecurityContext } from '../models/V1SecurityContext'; +import { V1VolumeDevice } from '../models/V1VolumeDevice'; +import { V1VolumeMount } from '../models/V1VolumeMount'; + + +/** +* An EphemeralContainer is a temporary container that you may add to an existing Pod for user-initiated activities such as debugging. Ephemeral containers have no resource or scheduling guarantees, and they will not be restarted when they exit or when a Pod is removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the Pod to exceed its resource allocation. To add an ephemeral container, use the ephemeralcontainers subresource of an existing Pod. Ephemeral containers may not be removed or restarted. +*/ +export class V1EphemeralContainer { + /** + * Arguments to the entrypoint. The image\'s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + 'args'?: Array; + /** + * Entrypoint array. Not executed within a shell. The image\'s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + 'command'?: Array; + /** + * List of environment variables to set in the container. Cannot be updated. + */ + 'env'?: Array; + /** + * List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. + */ + 'envFrom'?: Array; + /** + * Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + */ + 'image'?: string; + /** + * Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn\'t present on disk. Container will fail if the image isn\'t present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn\'t present + */ + 'imagePullPolicy'?: V1EphemeralContainerImagePullPolicyEnum; + 'lifecycle'?: V1Lifecycle; + 'livenessProbe'?: V1Probe; + /** + * Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers. + */ + 'name': string; + /** + * Ports are not allowed for ephemeral containers. + */ + 'ports'?: Array; + 'readinessProbe'?: V1Probe; + /** + * Resources resize policy for the container. + */ + 'resizePolicy'?: Array; + 'resources'?: V1ResourceRequirements; + /** + * Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers. + */ + 'restartPolicy'?: string; + 'securityContext'?: V1SecurityContext; + 'startupProbe'?: V1Probe; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. + */ + 'stdin'?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false + */ + 'stdinOnce'?: boolean; + /** + * If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container uses the namespaces configured in the Pod spec. The container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined. + */ + 'targetContainerName'?: string; + /** + * Optional: Path at which the file to which the container\'s termination message will be written is mounted into the container\'s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. + */ + 'terminationMessagePath'?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. Possible enum values: - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents. - `\"File\"` is the default behavior and will set the container status message to the contents of the container\'s terminationMessagePath when the container exits. + */ + 'terminationMessagePolicy'?: V1EphemeralContainerTerminationMessagePolicyEnum; + /** + * Whether this container should allocate a TTY for itself, also requires \'stdin\' to be true. Default is false. + */ + 'tty'?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + 'volumeDevices'?: Array; + /** + * Pod volumes to mount into the container\'s filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated. + */ + 'volumeMounts'?: Array; + /** + * Container\'s working directory. If not specified, the container runtime\'s default will be used, which might be configured in the container image. Cannot be updated. + */ + 'workingDir'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "args", + "baseName": "args", + "type": "Array", + "format": "" + }, + { + "name": "command", + "baseName": "command", + "type": "Array", + "format": "" + }, + { + "name": "env", + "baseName": "env", + "type": "Array", + "format": "" + }, + { + "name": "envFrom", + "baseName": "envFrom", + "type": "Array", + "format": "" + }, + { + "name": "image", + "baseName": "image", + "type": "string", + "format": "" + }, + { + "name": "imagePullPolicy", + "baseName": "imagePullPolicy", + "type": "V1EphemeralContainerImagePullPolicyEnum", + "format": "" + }, + { + "name": "lifecycle", + "baseName": "lifecycle", + "type": "V1Lifecycle", + "format": "" + }, + { + "name": "livenessProbe", + "baseName": "livenessProbe", + "type": "V1Probe", + "format": "" + }, + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "ports", + "baseName": "ports", + "type": "Array", + "format": "" + }, + { + "name": "readinessProbe", + "baseName": "readinessProbe", + "type": "V1Probe", + "format": "" + }, + { + "name": "resizePolicy", + "baseName": "resizePolicy", + "type": "Array", + "format": "" + }, + { + "name": "resources", + "baseName": "resources", + "type": "V1ResourceRequirements", + "format": "" + }, + { + "name": "restartPolicy", + "baseName": "restartPolicy", + "type": "string", + "format": "" + }, + { + "name": "securityContext", + "baseName": "securityContext", + "type": "V1SecurityContext", + "format": "" + }, + { + "name": "startupProbe", + "baseName": "startupProbe", + "type": "V1Probe", + "format": "" + }, + { + "name": "stdin", + "baseName": "stdin", + "type": "boolean", + "format": "" + }, + { + "name": "stdinOnce", + "baseName": "stdinOnce", + "type": "boolean", + "format": "" + }, + { + "name": "targetContainerName", + "baseName": "targetContainerName", + "type": "string", + "format": "" + }, + { + "name": "terminationMessagePath", + "baseName": "terminationMessagePath", + "type": "string", + "format": "" + }, + { + "name": "terminationMessagePolicy", + "baseName": "terminationMessagePolicy", + "type": "V1EphemeralContainerTerminationMessagePolicyEnum", + "format": "" + }, + { + "name": "tty", + "baseName": "tty", + "type": "boolean", + "format": "" + }, + { + "name": "volumeDevices", + "baseName": "volumeDevices", + "type": "Array", + "format": "" + }, + { + "name": "volumeMounts", + "baseName": "volumeMounts", + "type": "Array", + "format": "" + }, + { + "name": "workingDir", + "baseName": "workingDir", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1EphemeralContainer.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum V1EphemeralContainerImagePullPolicyEnum { + Always = 'Always', + IfNotPresent = 'IfNotPresent', + Never = 'Never' +} +export enum V1EphemeralContainerTerminationMessagePolicyEnum { + FallbackToLogsOnError = 'FallbackToLogsOnError', + File = 'File' +} + diff --git a/gen/models/V1HostIP.ts b/gen/models/V1HostIP.ts new file mode 100644 index 0000000..1aaa658 --- /dev/null +++ b/gen/models/V1HostIP.ts @@ -0,0 +1,41 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* HostIP represents a single IP address allocated to the host. +*/ +export class V1HostIP { + /** + * IP is the IP address assigned to the host + */ + 'ip': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "ip", + "baseName": "ip", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1HostIP.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1ModifyVolumeStatus.ts b/gen/models/V1ModifyVolumeStatus.ts new file mode 100644 index 0000000..b401bc8 --- /dev/null +++ b/gen/models/V1ModifyVolumeStatus.ts @@ -0,0 +1,58 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* ModifyVolumeStatus represents the status object of ControllerModifyVolume operation +*/ +export class V1ModifyVolumeStatus { + /** + * status is the status of the ControllerModifyVolume operation. It can be in any of following states: - Pending Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as the specified VolumeAttributesClass not existing. - InProgress InProgress indicates that the volume is being modified. - Infeasible Infeasible indicates that the request has been rejected as invalid by the CSI driver. To resolve the error, a valid VolumeAttributesClass needs to be specified. Note: New statuses can be added in the future. Consumers should check for unknown statuses and fail appropriately. Possible enum values: - `\"InProgress\"` InProgress indicates that the volume is being modified - `\"Infeasible\"` Infeasible indicates that the request has been rejected as invalid by the CSI driver. To resolve the error, a valid VolumeAttributesClass needs to be specified - `\"Pending\"` Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as the specified VolumeAttributesClass not existing + */ + 'status': V1ModifyVolumeStatusStatusEnum; + /** + * targetVolumeAttributesClassName is the name of the VolumeAttributesClass the PVC currently being reconciled + */ + 'targetVolumeAttributesClassName'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "status", + "baseName": "status", + "type": "V1ModifyVolumeStatusStatusEnum", + "format": "" + }, + { + "name": "targetVolumeAttributesClassName", + "baseName": "targetVolumeAttributesClassName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1ModifyVolumeStatus.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum V1ModifyVolumeStatusStatusEnum { + InProgress = 'InProgress', + Infeasible = 'Infeasible', + Pending = 'Pending' +} + diff --git a/gen/models/V1PersistentVolumeClaim.ts b/gen/models/V1PersistentVolumeClaim.ts new file mode 100644 index 0000000..7d67999 --- /dev/null +++ b/gen/models/V1PersistentVolumeClaim.ts @@ -0,0 +1,75 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { V1ObjectMeta } from '../models/V1ObjectMeta'; +import { V1PersistentVolumeClaimSpec } from '../models/V1PersistentVolumeClaimSpec'; +import { V1PersistentVolumeClaimStatus } from '../models/V1PersistentVolumeClaimStatus'; + + +/** +* PersistentVolumeClaim is a user\'s request for and claim to a persistent volume +*/ +export class V1PersistentVolumeClaim { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + 'apiVersion'?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + 'kind'?: string; + 'metadata'?: V1ObjectMeta; + 'spec'?: V1PersistentVolumeClaimSpec; + 'status'?: V1PersistentVolumeClaimStatus; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string", + "format": "" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta", + "format": "" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1PersistentVolumeClaimSpec", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "V1PersistentVolumeClaimStatus", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PersistentVolumeClaim.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PersistentVolumeClaimCondition.ts b/gen/models/V1PersistentVolumeClaimCondition.ts new file mode 100644 index 0000000..4b9fd04 --- /dev/null +++ b/gen/models/V1PersistentVolumeClaimCondition.ts @@ -0,0 +1,85 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* PersistentVolumeClaimCondition contains details about state of pvc +*/ +export class V1PersistentVolumeClaimCondition { + /** + * lastProbeTime is the time we probed the condition. + */ + 'lastProbeTime'?: Date; + /** + * lastTransitionTime is the time the condition transitioned from one status to another. + */ + 'lastTransitionTime'?: Date; + /** + * message is the human-readable message indicating details about last transition. + */ + 'message'?: string; + /** + * reason is a unique, this should be a short, machine understandable string that gives the reason for condition\'s last transition. If it reports \"Resizing\" that means the underlying persistent volume is being resized. + */ + 'reason'?: string; + 'status': string; + 'type': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "lastProbeTime", + "baseName": "lastProbeTime", + "type": "Date", + "format": "date-time" + }, + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date", + "format": "date-time" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PersistentVolumeClaimCondition.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PersistentVolumeClaimStatus.ts b/gen/models/V1PersistentVolumeClaimStatus.ts new file mode 100644 index 0000000..4339b49 --- /dev/null +++ b/gen/models/V1PersistentVolumeClaimStatus.ts @@ -0,0 +1,130 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { V1ModifyVolumeStatus } from '../models/V1ModifyVolumeStatus'; +import { V1PersistentVolumeClaimCondition } from '../models/V1PersistentVolumeClaimCondition'; + + +/** +* PersistentVolumeClaimStatus is the current status of a persistent volume claim. +*/ +export class V1PersistentVolumeClaimStatus { + /** + * accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + */ + 'accessModes'?: Array; + /** + * allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. ClaimResourceStatus can be in any of following states: - ControllerResizeInProgress: State set when resize controller starts resizing the volume in control-plane. - ControllerResizeFailed: State set when resize has failed in resize controller with a terminal error. - NodeResizePending: State set when resize controller has finished resizing the volume but further resizing of volume is needed on the node. - NodeResizeInProgress: State set when kubelet starts resizing the volume. - NodeResizeFailed: State set when resizing has failed in kubelet with a terminal error. Transient errors don\'t set NodeResizeFailed. For example: if expanding a PVC for more capacity - this field can be one of the following states: - pvc.status.allocatedResourceStatus[\'storage\'] = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus[\'storage\'] = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus[\'storage\'] = \"NodeResizePending\" - pvc.status.allocatedResourceStatus[\'storage\'] = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus[\'storage\'] = \"NodeResizeFailed\" When this field is not set, it means that no resize operation is in progress for the given PVC. A controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. + */ + 'allocatedResourceStatuses'?: { [key: string]: string; }; + /** + * allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. Capacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. A controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. + */ + 'allocatedResources'?: { [key: string]: string; }; + /** + * capacity represents the actual resources of the underlying volume. + */ + 'capacity'?: { [key: string]: string; }; + /** + * conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to \'Resizing\'. + */ + 'conditions'?: Array; + /** + * currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is a beta field and requires enabling VolumeAttributesClass feature (off by default). + */ + 'currentVolumeAttributesClassName'?: string; + 'modifyVolumeStatus'?: V1ModifyVolumeStatus; + /** + * phase represents the current phase of PersistentVolumeClaim. Possible enum values: - `\"Bound\"` used for PersistentVolumeClaims that are bound - `\"Lost\"` used for PersistentVolumeClaims that lost their underlying PersistentVolume. The claim was bound to a PersistentVolume and this volume does not exist any longer and all data on it was lost. - `\"Pending\"` used for PersistentVolumeClaims that are not yet bound + */ + 'phase'?: V1PersistentVolumeClaimStatusPhaseEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "accessModes", + "baseName": "accessModes", + "type": "Array", + "format": "" + }, + { + "name": "allocatedResourceStatuses", + "baseName": "allocatedResourceStatuses", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "allocatedResources", + "baseName": "allocatedResources", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "capacity", + "baseName": "capacity", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "conditions", + "baseName": "conditions", + "type": "Array", + "format": "" + }, + { + "name": "currentVolumeAttributesClassName", + "baseName": "currentVolumeAttributesClassName", + "type": "string", + "format": "" + }, + { + "name": "modifyVolumeStatus", + "baseName": "modifyVolumeStatus", + "type": "V1ModifyVolumeStatus", + "format": "" + }, + { + "name": "phase", + "baseName": "phase", + "type": "V1PersistentVolumeClaimStatusPhaseEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PersistentVolumeClaimStatus.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum V1PersistentVolumeClaimStatusAccessModesEnum { + ReadOnlyMany = 'ReadOnlyMany', + ReadWriteMany = 'ReadWriteMany', + ReadWriteOnce = 'ReadWriteOnce', + ReadWriteOncePod = 'ReadWriteOncePod' +} +export enum V1PersistentVolumeClaimStatusAllocatedResourceStatusesEnum { + ControllerResizeInProgress = 'ControllerResizeInProgress', + ControllerResizeInfeasible = 'ControllerResizeInfeasible', + NodeResizeInProgress = 'NodeResizeInProgress', + NodeResizeInfeasible = 'NodeResizeInfeasible', + NodeResizePending = 'NodeResizePending' +} +export enum V1PersistentVolumeClaimStatusPhaseEnum { + Bound = 'Bound', + Lost = 'Lost', + Pending = 'Pending' +} + diff --git a/gen/models/V1Pod.ts b/gen/models/V1Pod.ts new file mode 100644 index 0000000..a1f8f01 --- /dev/null +++ b/gen/models/V1Pod.ts @@ -0,0 +1,75 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { V1ObjectMeta } from '../models/V1ObjectMeta'; +import { V1PodSpec } from '../models/V1PodSpec'; +import { V1PodStatus } from '../models/V1PodStatus'; + + +/** +* Pod is a collection of containers that can run on a host. This resource is created by clients and scheduled onto hosts. +*/ +export class V1Pod { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + 'apiVersion'?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + 'kind'?: string; + 'metadata'?: V1ObjectMeta; + 'spec'?: V1PodSpec; + 'status'?: V1PodStatus; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string", + "format": "" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta", + "format": "" + }, + { + "name": "spec", + "baseName": "spec", + "type": "V1PodSpec", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "V1PodStatus", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1Pod.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodCondition.ts b/gen/models/V1PodCondition.ts new file mode 100644 index 0000000..d648338 --- /dev/null +++ b/gen/models/V1PodCondition.ts @@ -0,0 +1,91 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* PodCondition contains details for the current condition of this pod. +*/ +export class V1PodCondition { + /** + * Last time we probed the condition. + */ + 'lastProbeTime'?: Date; + /** + * Last time the condition transitioned from one status to another. + */ + 'lastTransitionTime'?: Date; + /** + * Human-readable message indicating details about last transition. + */ + 'message'?: string; + /** + * Unique, one-word, CamelCase reason for the condition\'s last transition. + */ + 'reason'?: string; + /** + * Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions + */ + 'status': string; + /** + * Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions + */ + 'type': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "lastProbeTime", + "baseName": "lastProbeTime", + "type": "Date", + "format": "date-time" + }, + { + "name": "lastTransitionTime", + "baseName": "lastTransitionTime", + "type": "Date", + "format": "date-time" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "string", + "format": "" + }, + { + "name": "type", + "baseName": "type", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodCondition.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodDNSConfig.ts b/gen/models/V1PodDNSConfig.ts new file mode 100644 index 0000000..782cbd8 --- /dev/null +++ b/gen/models/V1PodDNSConfig.ts @@ -0,0 +1,62 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { V1PodDNSConfigOption } from '../models/V1PodDNSConfigOption'; + + +/** +* PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy. +*/ +export class V1PodDNSConfig { + /** + * A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. + */ + 'nameservers'?: Array; + /** + * A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. + */ + 'options'?: Array; + /** + * A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + */ + 'searches'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "nameservers", + "baseName": "nameservers", + "type": "Array", + "format": "" + }, + { + "name": "options", + "baseName": "options", + "type": "Array", + "format": "" + }, + { + "name": "searches", + "baseName": "searches", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodDNSConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodDNSConfigOption.ts b/gen/models/V1PodDNSConfigOption.ts new file mode 100644 index 0000000..bab910a --- /dev/null +++ b/gen/models/V1PodDNSConfigOption.ts @@ -0,0 +1,48 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* PodDNSConfigOption defines DNS resolver options of a pod. +*/ +export class V1PodDNSConfigOption { + /** + * Required. + */ + 'name'?: string; + 'value'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "value", + "baseName": "value", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodDNSConfigOption.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodIP.ts b/gen/models/V1PodIP.ts new file mode 100644 index 0000000..d735733 --- /dev/null +++ b/gen/models/V1PodIP.ts @@ -0,0 +1,41 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* PodIP represents a single IP address allocated to the pod. +*/ +export class V1PodIP { + /** + * IP is the IP address assigned to the pod + */ + 'ip': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "ip", + "baseName": "ip", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodIP.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodOS.ts b/gen/models/V1PodOS.ts new file mode 100644 index 0000000..9f24960 --- /dev/null +++ b/gen/models/V1PodOS.ts @@ -0,0 +1,41 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* PodOS defines the OS parameters of a pod. +*/ +export class V1PodOS { + /** + * Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodOS.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodReadinessGate.ts b/gen/models/V1PodReadinessGate.ts new file mode 100644 index 0000000..2ad1bb8 --- /dev/null +++ b/gen/models/V1PodReadinessGate.ts @@ -0,0 +1,41 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* PodReadinessGate contains the reference to a pod condition +*/ +export class V1PodReadinessGate { + /** + * ConditionType refers to a condition in the pod\'s condition list with matching type. + */ + 'conditionType': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "conditionType", + "baseName": "conditionType", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodReadinessGate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodResourceClaim.ts b/gen/models/V1PodResourceClaim.ts new file mode 100644 index 0000000..8f6bab3 --- /dev/null +++ b/gen/models/V1PodResourceClaim.ts @@ -0,0 +1,61 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* PodResourceClaim references exactly one ResourceClaim, either directly or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim for the pod. It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. Containers that need access to the ResourceClaim reference it with this name. +*/ +export class V1PodResourceClaim { + /** + * Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL. + */ + 'name': string; + /** + * ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod. Exactly one of ResourceClaimName and ResourceClaimTemplateName must be set. + */ + 'resourceClaimName'?: string; + /** + * ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. Exactly one of ResourceClaimName and ResourceClaimTemplateName must be set. + */ + 'resourceClaimTemplateName'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "resourceClaimName", + "baseName": "resourceClaimName", + "type": "string", + "format": "" + }, + { + "name": "resourceClaimTemplateName", + "baseName": "resourceClaimTemplateName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodResourceClaim.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodResourceClaimStatus.ts b/gen/models/V1PodResourceClaimStatus.ts new file mode 100644 index 0000000..772d339 --- /dev/null +++ b/gen/models/V1PodResourceClaimStatus.ts @@ -0,0 +1,51 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* PodResourceClaimStatus is stored in the PodStatus for each PodResourceClaim which references a ResourceClaimTemplate. It stores the generated name for the corresponding ResourceClaim. +*/ +export class V1PodResourceClaimStatus { + /** + * Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL. + */ + 'name': string; + /** + * ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. If this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case. + */ + 'resourceClaimName'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "resourceClaimName", + "baseName": "resourceClaimName", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodResourceClaimStatus.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodSchedulingGate.ts b/gen/models/V1PodSchedulingGate.ts new file mode 100644 index 0000000..5725772 --- /dev/null +++ b/gen/models/V1PodSchedulingGate.ts @@ -0,0 +1,41 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +/** +* PodSchedulingGate is associated to a Pod to guard its scheduling. +*/ +export class V1PodSchedulingGate { + /** + * Name of the scheduling gate. Each scheduling gate must have a unique name field. + */ + 'name': string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodSchedulingGate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/V1PodSpec.ts b/gen/models/V1PodSpec.ts new file mode 100644 index 0000000..ca0b048 --- /dev/null +++ b/gen/models/V1PodSpec.ts @@ -0,0 +1,440 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { V1Affinity } from '../models/V1Affinity'; +import { V1Container } from '../models/V1Container'; +import { V1EphemeralContainer } from '../models/V1EphemeralContainer'; +import { V1HostAlias } from '../models/V1HostAlias'; +import { V1LocalObjectReference } from '../models/V1LocalObjectReference'; +import { V1PodDNSConfig } from '../models/V1PodDNSConfig'; +import { V1PodOS } from '../models/V1PodOS'; +import { V1PodReadinessGate } from '../models/V1PodReadinessGate'; +import { V1PodResourceClaim } from '../models/V1PodResourceClaim'; +import { V1PodSchedulingGate } from '../models/V1PodSchedulingGate'; +import { V1PodSecurityContext } from '../models/V1PodSecurityContext'; +import { V1Toleration } from '../models/V1Toleration'; +import { V1TopologySpreadConstraint } from '../models/V1TopologySpreadConstraint'; +import { V1Volume } from '../models/V1Volume'; + + +/** +* PodSpec is a description of a pod. +*/ +export class V1PodSpec { + /** + * Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. + */ + 'activeDeadlineSeconds'?: number; + 'affinity'?: V1Affinity; + /** + * AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + */ + 'automountServiceAccountToken'?: boolean; + /** + * List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. + */ + 'containers': Array; + 'dnsConfig'?: V1PodDNSConfig; + /** + * Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are \'ClusterFirstWithHostNet\', \'ClusterFirst\', \'Default\' or \'None\'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to \'ClusterFirstWithHostNet\'. Possible enum values: - `\"ClusterFirst\"` indicates that the pod should use cluster DNS first unless hostNetwork is true, if it is available, then fall back on the default (as determined by kubelet) DNS settings. - `\"ClusterFirstWithHostNet\"` indicates that the pod should use cluster DNS first, if it is available, then fall back on the default (as determined by kubelet) DNS settings. - `\"Default\"` indicates that the pod should use the default (as determined by kubelet) DNS settings. - `\"None\"` indicates that the pod should use empty DNS settings. DNS parameters such as nameservers and search paths should be defined via DNSConfig. + */ + 'dnsPolicy'?: V1PodSpecDnsPolicyEnum; + /** + * EnableServiceLinks indicates whether information about services should be injected into pod\'s environment variables, matching the syntax of Docker links. Optional: Defaults to true. + */ + 'enableServiceLinks'?: boolean; + /** + * List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod\'s ephemeralcontainers subresource. + */ + 'ephemeralContainers'?: Array; + /** + * HostAliases is an optional list of hosts and IPs that will be injected into the pod\'s hosts file if specified. + */ + 'hostAliases'?: Array; + /** + * Use the host\'s ipc namespace. Optional: Default to false. + */ + 'hostIPC'?: boolean; + /** + * Host networking requested for this pod. Use the host\'s network namespace. If this option is set, the ports that will be used must be specified. Default to false. + */ + 'hostNetwork'?: boolean; + /** + * Use the host\'s pid namespace. Optional: Default to false. + */ + 'hostPID'?: boolean; + /** + * Use the host\'s user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature. + */ + 'hostUsers'?: boolean; + /** + * Specifies the hostname of the Pod If not specified, the pod\'s hostname will be set to a system-defined value. + */ + 'hostname'?: string; + /** + * ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + */ + 'imagePullSecrets'?: Array; + /** + * List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + */ + 'initContainers'?: Array; + /** + * NodeName indicates in which node this pod is scheduled. If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. This field should not be used to express a desire for the pod to be scheduled on a specific node. https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + */ + 'nodeName'?: string; + /** + * NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node\'s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + */ + 'nodeSelector'?: { [key: string]: string; }; + 'os'?: V1PodOS; + /** + * Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + */ + 'overhead'?: { [key: string]: string; }; + /** + * PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. Possible enum values: - `\"Never\"` means that pod never preempts other pods with lower priority. - `\"PreemptLowerPriority\"` means that pod can preempt other pods with lower priority. + */ + 'preemptionPolicy'?: V1PodSpecPreemptionPolicyEnum; + /** + * The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. + */ + 'priority'?: number; + /** + * If specified, indicates the pod\'s priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. + */ + 'priorityClassName'?: string; + /** + * If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + */ + 'readinessGates'?: Array; + /** + * ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. + */ + 'resourceClaims'?: Array; + /** + * Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy Possible enum values: - `\"Always\"` - `\"Never\"` - `\"OnFailure\"` + */ + 'restartPolicy'?: V1PodSpecRestartPolicyEnum; + /** + * RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + */ + 'runtimeClassName'?: string; + /** + * If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. + */ + 'schedulerName'?: string; + /** + * SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod. SchedulingGates can only be set at pod creation time, and be removed only afterwards. + */ + 'schedulingGates'?: Array; + 'securityContext'?: V1PodSecurityContext; + /** + * DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. + */ + 'serviceAccount'?: string; + /** + * ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + */ + 'serviceAccountName'?: string; + /** + * If true the pod\'s hostname will be configured as the pod\'s FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Tcpip\\\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false. + */ + 'setHostnameAsFQDN'?: boolean; + /** + * Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. + */ + 'shareProcessNamespace'?: boolean; + /** + * If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all. + */ + 'subdomain'?: string; + /** + * Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + */ + 'terminationGracePeriodSeconds'?: number; + /** + * If specified, the pod\'s tolerations. + */ + 'tolerations'?: Array; + /** + * TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed. + */ + 'topologySpreadConstraints'?: Array; + /** + * List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes + */ + 'volumes'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "activeDeadlineSeconds", + "baseName": "activeDeadlineSeconds", + "type": "number", + "format": "int64" + }, + { + "name": "affinity", + "baseName": "affinity", + "type": "V1Affinity", + "format": "" + }, + { + "name": "automountServiceAccountToken", + "baseName": "automountServiceAccountToken", + "type": "boolean", + "format": "" + }, + { + "name": "containers", + "baseName": "containers", + "type": "Array", + "format": "" + }, + { + "name": "dnsConfig", + "baseName": "dnsConfig", + "type": "V1PodDNSConfig", + "format": "" + }, + { + "name": "dnsPolicy", + "baseName": "dnsPolicy", + "type": "V1PodSpecDnsPolicyEnum", + "format": "" + }, + { + "name": "enableServiceLinks", + "baseName": "enableServiceLinks", + "type": "boolean", + "format": "" + }, + { + "name": "ephemeralContainers", + "baseName": "ephemeralContainers", + "type": "Array", + "format": "" + }, + { + "name": "hostAliases", + "baseName": "hostAliases", + "type": "Array", + "format": "" + }, + { + "name": "hostIPC", + "baseName": "hostIPC", + "type": "boolean", + "format": "" + }, + { + "name": "hostNetwork", + "baseName": "hostNetwork", + "type": "boolean", + "format": "" + }, + { + "name": "hostPID", + "baseName": "hostPID", + "type": "boolean", + "format": "" + }, + { + "name": "hostUsers", + "baseName": "hostUsers", + "type": "boolean", + "format": "" + }, + { + "name": "hostname", + "baseName": "hostname", + "type": "string", + "format": "" + }, + { + "name": "imagePullSecrets", + "baseName": "imagePullSecrets", + "type": "Array", + "format": "" + }, + { + "name": "initContainers", + "baseName": "initContainers", + "type": "Array", + "format": "" + }, + { + "name": "nodeName", + "baseName": "nodeName", + "type": "string", + "format": "" + }, + { + "name": "nodeSelector", + "baseName": "nodeSelector", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "os", + "baseName": "os", + "type": "V1PodOS", + "format": "" + }, + { + "name": "overhead", + "baseName": "overhead", + "type": "{ [key: string]: string; }", + "format": "" + }, + { + "name": "preemptionPolicy", + "baseName": "preemptionPolicy", + "type": "V1PodSpecPreemptionPolicyEnum", + "format": "" + }, + { + "name": "priority", + "baseName": "priority", + "type": "number", + "format": "int32" + }, + { + "name": "priorityClassName", + "baseName": "priorityClassName", + "type": "string", + "format": "" + }, + { + "name": "readinessGates", + "baseName": "readinessGates", + "type": "Array", + "format": "" + }, + { + "name": "resourceClaims", + "baseName": "resourceClaims", + "type": "Array", + "format": "" + }, + { + "name": "restartPolicy", + "baseName": "restartPolicy", + "type": "V1PodSpecRestartPolicyEnum", + "format": "" + }, + { + "name": "runtimeClassName", + "baseName": "runtimeClassName", + "type": "string", + "format": "" + }, + { + "name": "schedulerName", + "baseName": "schedulerName", + "type": "string", + "format": "" + }, + { + "name": "schedulingGates", + "baseName": "schedulingGates", + "type": "Array", + "format": "" + }, + { + "name": "securityContext", + "baseName": "securityContext", + "type": "V1PodSecurityContext", + "format": "" + }, + { + "name": "serviceAccount", + "baseName": "serviceAccount", + "type": "string", + "format": "" + }, + { + "name": "serviceAccountName", + "baseName": "serviceAccountName", + "type": "string", + "format": "" + }, + { + "name": "setHostnameAsFQDN", + "baseName": "setHostnameAsFQDN", + "type": "boolean", + "format": "" + }, + { + "name": "shareProcessNamespace", + "baseName": "shareProcessNamespace", + "type": "boolean", + "format": "" + }, + { + "name": "subdomain", + "baseName": "subdomain", + "type": "string", + "format": "" + }, + { + "name": "terminationGracePeriodSeconds", + "baseName": "terminationGracePeriodSeconds", + "type": "number", + "format": "int64" + }, + { + "name": "tolerations", + "baseName": "tolerations", + "type": "Array", + "format": "" + }, + { + "name": "topologySpreadConstraints", + "baseName": "topologySpreadConstraints", + "type": "Array", + "format": "" + }, + { + "name": "volumes", + "baseName": "volumes", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1PodSpec.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum V1PodSpecDnsPolicyEnum { + ClusterFirst = 'ClusterFirst', + ClusterFirstWithHostNet = 'ClusterFirstWithHostNet', + Default = 'Default', + None = 'None' +} +export enum V1PodSpecPreemptionPolicyEnum { + Never = 'Never', + PreemptLowerPriority = 'PreemptLowerPriority' +} +export enum V1PodSpecRestartPolicyEnum { + Always = 'Always', + Never = 'Never', + OnFailure = 'OnFailure' +} + diff --git a/gen/models/V1PodStatus.ts b/gen/models/V1PodStatus.ts new file mode 100644 index 0000000..faf123d --- /dev/null +++ b/gen/models/V1PodStatus.ts @@ -0,0 +1,210 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { V1ContainerStatus } from '../models/V1ContainerStatus'; +import { V1HostIP } from '../models/V1HostIP'; +import { V1PodCondition } from '../models/V1PodCondition'; +import { V1PodIP } from '../models/V1PodIP'; +import { V1PodResourceClaimStatus } from '../models/V1PodResourceClaimStatus'; + + +/** +* PodStatus represents information about the status of a pod. Status may trail the actual state of a system, especially if the node that hosts the pod cannot contact the control plane. +*/ +export class V1PodStatus { + /** + * Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions + */ + 'conditions'?: Array; + /** + * The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + */ + 'containerStatuses'?: Array; + /** + * Status for any ephemeral containers that have run in this pod. + */ + 'ephemeralContainerStatuses'?: Array; + /** + * hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod + */ + 'hostIP'?: string; + /** + * hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod. + */ + 'hostIPs'?: Array; + /** + * The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + */ + 'initContainerStatuses'?: Array; + /** + * A human readable message indicating details about why the pod is in this condition. + */ + 'message'?: string; + /** + * nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled. + */ + 'nominatedNodeName'?: string; + /** + * The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod\'s status. There are five possible phase values: Pending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase Possible enum values: - `\"Failed\"` means that all containers in the pod have terminated, and at least one container has terminated in a failure (exited with a non-zero exit code or was stopped by the system). - `\"Pending\"` means the pod has been accepted by the system, but one or more of the containers has not been started. This includes time before being bound to a node, as well as time spent pulling images onto the host. - `\"Running\"` means the pod has been bound to a node and all of the containers have been started. At least one container is still running or is in the process of being restarted. - `\"Succeeded\"` means that all containers in the pod have voluntarily terminated with a container exit code of 0, and the system is not going to restart any of these containers. - `\"Unknown\"` means that for some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. Deprecated: It isn\'t being set since 2015 (74da3b14b0c0f658b3bb8d2def5094686d0e9095) + */ + 'phase'?: V1PodStatusPhaseEnum; + /** + * podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. + */ + 'podIP'?: string; + /** + * podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet. + */ + 'podIPs'?: Array; + /** + * The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes Possible enum values: - `\"BestEffort\"` is the BestEffort qos class. - `\"Burstable\"` is the Burstable qos class. - `\"Guaranteed\"` is the Guaranteed qos class. + */ + 'qosClass'?: V1PodStatusQosClassEnum; + /** + * A brief CamelCase message indicating details about why the pod is in this state. e.g. \'Evicted\' + */ + 'reason'?: string; + /** + * Status of resources resize desired for pod\'s containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\" + */ + 'resize'?: string; + /** + * Status of resource claims. + */ + 'resourceClaimStatuses'?: Array; + /** + * RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod. + */ + 'startTime'?: Date; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array", + "format": "" + }, + { + "name": "containerStatuses", + "baseName": "containerStatuses", + "type": "Array", + "format": "" + }, + { + "name": "ephemeralContainerStatuses", + "baseName": "ephemeralContainerStatuses", + "type": "Array", + "format": "" + }, + { + "name": "hostIP", + "baseName": "hostIP", + "type": "string", + "format": "" + }, + { + "name": "hostIPs", + "baseName": "hostIPs", + "type": "Array", + "format": "" + }, + { + "name": "initContainerStatuses", + "baseName": "initContainerStatuses", + "type": "Array", + "format": "" + }, + { + "name": "message", + "baseName": "message", + "type": "string", + "format": "" + }, + { + "name": "nominatedNodeName", + "baseName": "nominatedNodeName", + "type": "string", + "format": "" + }, + { + "name": "phase", + "baseName": "phase", + "type": "V1PodStatusPhaseEnum", + "format": "" + }, + { + "name": "podIP", + "baseName": "podIP", + "type": "string", + "format": "" + }, + { + "name": "podIPs", + "baseName": "podIPs", + "type": "Array", + "format": "" + }, + { + "name": "qosClass", + "baseName": "qosClass", + "type": "V1PodStatusQosClassEnum", + "format": "" + }, + { + "name": "reason", + "baseName": "reason", + "type": "string", + "format": "" + }, + { + "name": "resize", + "baseName": "resize", + "type": "string", + "format": "" + }, + { + "name": "resourceClaimStatuses", + "baseName": "resourceClaimStatuses", + "type": "Array", + "format": "" + }, + { + "name": "startTime", + "baseName": "startTime", + "type": "Date", + "format": "date-time" + } ]; + + static getAttributeTypeMap() { + return V1PodStatus.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum V1PodStatusPhaseEnum { + Failed = 'Failed', + Pending = 'Pending', + Running = 'Running', + Succeeded = 'Succeeded', + Unknown = 'Unknown' +} +export enum V1PodStatusQosClassEnum { + BestEffort = 'BestEffort', + Burstable = 'Burstable', + Guaranteed = 'Guaranteed' +} + diff --git a/gen/models/V1TopologySpreadConstraint.ts b/gen/models/V1TopologySpreadConstraint.ts new file mode 100644 index 0000000..fbdfcd5 --- /dev/null +++ b/gen/models/V1TopologySpreadConstraint.ts @@ -0,0 +1,123 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { V1LabelSelector } from '../models/V1LabelSelector'; + + +/** +* TopologySpreadConstraint specifies how to spread matching pods among the given topology. +*/ +export class V1TopologySpreadConstraint { + 'labelSelector'?: V1LabelSelector; + /** + * MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn\'t set. Keys that don\'t exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + */ + 'matchLabelKeys'?: Array; + /** + * MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It\'s a required field. Default value is 1 and 0 is not allowed. + */ + 'maxSkew': number; + /** + * MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won\'t schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so \"global minimum\" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. + */ + 'minDomains'?: number; + /** + * NodeAffinityPolicy indicates how we will treat Pod\'s nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. Possible enum values: - `\"Honor\"` means use this scheduling directive when calculating pod topology spread skew. - `\"Ignore\"` means ignore this scheduling directive when calculating pod topology spread skew. + */ + 'nodeAffinityPolicy'?: V1TopologySpreadConstraintNodeAffinityPolicyEnum; + /** + * NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. Possible enum values: - `\"Honor\"` means use this scheduling directive when calculating pod topology spread skew. - `\"Ignore\"` means ignore this scheduling directive when calculating pod topology spread skew. + */ + 'nodeTaintsPolicy'?: V1TopologySpreadConstraintNodeTaintsPolicyEnum; + /** + * TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a \"bucket\", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is \"kubernetes.io/hostname\", each Node is a domain of that topology. And, if TopologyKey is \"topology.kubernetes.io/zone\", each zone is a domain of that topology. It\'s a required field. + */ + 'topologyKey': string; + /** + * WhenUnsatisfiable indicates how to deal with a pod if it doesn\'t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won\'t make it *more* imbalanced. It\'s a required field. Possible enum values: - `\"DoNotSchedule\"` instructs the scheduler not to schedule the pod when constraints are not satisfied. - `\"ScheduleAnyway\"` instructs the scheduler to schedule the pod even if constraints are not satisfied. + */ + 'whenUnsatisfiable': V1TopologySpreadConstraintWhenUnsatisfiableEnum; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "labelSelector", + "baseName": "labelSelector", + "type": "V1LabelSelector", + "format": "" + }, + { + "name": "matchLabelKeys", + "baseName": "matchLabelKeys", + "type": "Array", + "format": "" + }, + { + "name": "maxSkew", + "baseName": "maxSkew", + "type": "number", + "format": "int32" + }, + { + "name": "minDomains", + "baseName": "minDomains", + "type": "number", + "format": "int32" + }, + { + "name": "nodeAffinityPolicy", + "baseName": "nodeAffinityPolicy", + "type": "V1TopologySpreadConstraintNodeAffinityPolicyEnum", + "format": "" + }, + { + "name": "nodeTaintsPolicy", + "baseName": "nodeTaintsPolicy", + "type": "V1TopologySpreadConstraintNodeTaintsPolicyEnum", + "format": "" + }, + { + "name": "topologyKey", + "baseName": "topologyKey", + "type": "string", + "format": "" + }, + { + "name": "whenUnsatisfiable", + "baseName": "whenUnsatisfiable", + "type": "V1TopologySpreadConstraintWhenUnsatisfiableEnum", + "format": "" + } ]; + + static getAttributeTypeMap() { + return V1TopologySpreadConstraint.attributeTypeMap; + } + + public constructor() { + } +} + + +export enum V1TopologySpreadConstraintNodeAffinityPolicyEnum { + Honor = 'Honor', + Ignore = 'Ignore' +} +export enum V1TopologySpreadConstraintNodeTaintsPolicyEnum { + Honor = 'Honor', + Ignore = 'Ignore' +} +export enum V1TopologySpreadConstraintWhenUnsatisfiableEnum { + DoNotSchedule = 'DoNotSchedule', + ScheduleAnyway = 'ScheduleAnyway' +} + diff --git a/gen/models/managementV1Cloud.ts b/gen/models/managementV1Cloud.ts new file mode 100644 index 0000000..27e6f28 --- /dev/null +++ b/gen/models/managementV1Cloud.ts @@ -0,0 +1,46 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ManagementV1MaintenanceWindow } from '../models/managementV1MaintenanceWindow'; + + +export class ManagementV1Cloud { + 'maintenanceWindow'?: ManagementV1MaintenanceWindow; + /** + * ReleaseChannel specifies the release channel for the cloud configuration. This can be used to determine which updates or versions are applied. + */ + 'releaseChannel'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "maintenanceWindow", + "baseName": "maintenanceWindow", + "type": "ManagementV1MaintenanceWindow", + "format": "" + }, + { + "name": "releaseChannel", + "baseName": "releaseChannel", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1Cloud.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1ClusterSpec.ts b/gen/models/managementV1ClusterSpec.ts index 8d79416..4c2f0ea 100644 --- a/gen/models/managementV1ClusterSpec.ts +++ b/gen/models/managementV1ClusterSpec.ts @@ -11,6 +11,8 @@ */ import { StorageV1Access } from '../models/storageV1Access'; +import { StorageV1Metrics } from '../models/storageV1Metrics'; +import { StorageV1OpenCost } from '../models/storageV1OpenCost'; import { StorageV1SecretRef } from '../models/storageV1SecretRef'; import { StorageV1UserOrTeam } from '../models/storageV1UserOrTeam'; @@ -40,10 +42,12 @@ export class ManagementV1ClusterSpec { * The namespace where the cluster components will be installed in */ 'managementNamespace'?: string; + 'metrics'?: StorageV1Metrics; /** * NetworkPeer specifies if the cluster is connected via tailscale, when this is specified, config is optional */ 'networkPeer'?: boolean; + 'opencost'?: StorageV1OpenCost; 'owner'?: StorageV1UserOrTeam; /** * If unusable is true, no spaces or virtual clusters can be scheduled on this cluster. @@ -89,12 +93,24 @@ export class ManagementV1ClusterSpec { "type": "string", "format": "" }, + { + "name": "metrics", + "baseName": "metrics", + "type": "StorageV1Metrics", + "format": "" + }, { "name": "networkPeer", "baseName": "networkPeer", "type": "boolean", "format": "" }, + { + "name": "opencost", + "baseName": "opencost", + "type": "StorageV1OpenCost", + "format": "" + }, { "name": "owner", "baseName": "owner", diff --git a/gen/models/managementV1ClusterStatus.ts b/gen/models/managementV1ClusterStatus.ts index 472a219..ecc71b0 100644 --- a/gen/models/managementV1ClusterStatus.ts +++ b/gen/models/managementV1ClusterStatus.ts @@ -10,12 +10,17 @@ * Do not edit the class manually. */ +import { StorageV1Condition } from '../models/agentstorageV1Condition'; /** * ClusterStatus holds the status */ export class ManagementV1ClusterStatus { + /** + * Conditions holds several conditions the cluster might be in + */ + 'conditions'?: Array; 'message'?: string; /** * Online is whether the cluster is currently connected to the coordination server. @@ -27,6 +32,12 @@ export class ManagementV1ClusterStatus { static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array", + "format": "" + }, { "name": "message", "baseName": "message", diff --git a/gen/models/managementV1ConfigList.ts b/gen/models/managementV1ConfigList.ts new file mode 100644 index 0000000..63d3305 --- /dev/null +++ b/gen/models/managementV1ConfigList.ts @@ -0,0 +1,64 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ManagementV1Config } from '../models/managementV1Config'; +import { V1ListMeta } from '../models/V1ListMeta'; + + +export class ManagementV1ConfigList { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + 'apiVersion'?: string; + 'items': Array; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + 'kind'?: string; + 'metadata'?: V1ListMeta; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string", + "format": "" + }, + { + "name": "items", + "baseName": "items", + "type": "Array", + "format": "" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1ConfigList.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1ConfigStatus.ts b/gen/models/managementV1ConfigStatus.ts index e3aaa53..193bb49 100644 --- a/gen/models/managementV1ConfigStatus.ts +++ b/gen/models/managementV1ConfigStatus.ts @@ -13,6 +13,8 @@ import { ManagementV1Apps } from '../models/managementV1Apps'; import { ManagementV1Audit } from '../models/managementV1Audit'; import { ManagementV1Authentication } from '../models/managementV1Authentication'; +import { ManagementV1Cloud } from '../models/managementV1Cloud'; +import { ManagementV1CostControl } from '../models/managementV1CostControl'; import { ManagementV1OIDC } from '../models/managementV1OIDC'; import { StorageV1VaultIntegrationSpec } from '../models/storageV1VaultIntegrationSpec'; import { UiV1UISettingsConfig } from '../models/uiV1UISettingsConfig'; @@ -25,6 +27,8 @@ export class ManagementV1ConfigStatus { 'apps'?: ManagementV1Apps; 'audit'?: ManagementV1Audit; 'auth'?: ManagementV1Authentication; + 'cloud'?: ManagementV1Cloud; + 'costControl'?: ManagementV1CostControl; /** * DevPodSubDomain holds a subdomain in the following form *.workspace.my-domain.com */ @@ -66,6 +70,18 @@ export class ManagementV1ConfigStatus { "type": "ManagementV1Authentication", "format": "" }, + { + "name": "cloud", + "baseName": "cloud", + "type": "ManagementV1Cloud", + "format": "" + }, + { + "name": "costControl", + "baseName": "costControl", + "type": "ManagementV1CostControl", + "format": "" + }, { "name": "devPodSubDomain", "baseName": "devPodSubDomain", diff --git a/gen/models/managementV1CostControl.ts b/gen/models/managementV1CostControl.ts new file mode 100644 index 0000000..817e7b4 --- /dev/null +++ b/gen/models/managementV1CostControl.ts @@ -0,0 +1,62 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ManagementV1CostControlClusterConfig } from '../models/managementV1CostControlClusterConfig'; +import { ManagementV1CostControlGlobalConfig } from '../models/managementV1CostControlGlobalConfig'; +import { ManagementV1CostControlSettings } from '../models/managementV1CostControlSettings'; + + +export class ManagementV1CostControl { + 'cluster'?: ManagementV1CostControlClusterConfig; + /** + * Enabled specifies whether the ROI dashboard should be available in the UI, and if the metrics infrastructure that provides dashboard data is deployed + */ + 'enabled'?: boolean; + 'global'?: ManagementV1CostControlGlobalConfig; + 'settings'?: ManagementV1CostControlSettings; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "cluster", + "baseName": "cluster", + "type": "ManagementV1CostControlClusterConfig", + "format": "" + }, + { + "name": "enabled", + "baseName": "enabled", + "type": "boolean", + "format": "" + }, + { + "name": "global", + "baseName": "global", + "type": "ManagementV1CostControlGlobalConfig", + "format": "" + }, + { + "name": "settings", + "baseName": "settings", + "type": "ManagementV1CostControlSettings", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1CostControl.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1CostControlClusterConfig.ts b/gen/models/managementV1CostControlClusterConfig.ts new file mode 100644 index 0000000..1d58352 --- /dev/null +++ b/gen/models/managementV1CostControlClusterConfig.ts @@ -0,0 +1,44 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageV1Metrics } from '../models/storageV1Metrics'; +import { StorageV1OpenCost } from '../models/storageV1OpenCost'; + + +export class ManagementV1CostControlClusterConfig { + 'metrics'?: StorageV1Metrics; + 'opencost'?: StorageV1OpenCost; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metrics", + "baseName": "metrics", + "type": "StorageV1Metrics", + "format": "" + }, + { + "name": "opencost", + "baseName": "opencost", + "type": "StorageV1OpenCost", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1CostControlClusterConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1CostControlGlobalConfig.ts b/gen/models/managementV1CostControlGlobalConfig.ts new file mode 100644 index 0000000..17cd60f --- /dev/null +++ b/gen/models/managementV1CostControlGlobalConfig.ts @@ -0,0 +1,36 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageV1Metrics } from '../models/storageV1Metrics'; + + +export class ManagementV1CostControlGlobalConfig { + 'metrics'?: StorageV1Metrics; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "metrics", + "baseName": "metrics", + "type": "StorageV1Metrics", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1CostControlGlobalConfig.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1CostControlResourcePrice.ts b/gen/models/managementV1CostControlResourcePrice.ts new file mode 100644 index 0000000..aeca18b --- /dev/null +++ b/gen/models/managementV1CostControlResourcePrice.ts @@ -0,0 +1,48 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export class ManagementV1CostControlResourcePrice { + /** + * Price specifies the price. + */ + 'price'?: number; + /** + * TimePeriod specifies the time period for the price. + */ + 'timePeriod'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "price", + "baseName": "price", + "type": "number", + "format": "double" + }, + { + "name": "timePeriod", + "baseName": "timePeriod", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1CostControlResourcePrice.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1CostControlSettings.ts b/gen/models/managementV1CostControlSettings.ts new file mode 100644 index 0000000..7f1ca25 --- /dev/null +++ b/gen/models/managementV1CostControlSettings.ts @@ -0,0 +1,60 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ManagementV1CostControlResourcePrice } from '../models/managementV1CostControlResourcePrice'; + + +export class ManagementV1CostControlSettings { + 'averageCPUPricePerNode'?: ManagementV1CostControlResourcePrice; + 'averageRAMPricePerNode'?: ManagementV1CostControlResourcePrice; + 'controlPlanePricePerCluster'?: ManagementV1CostControlResourcePrice; + /** + * PriceCurrency specifies the currency. + */ + 'priceCurrency'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "averageCPUPricePerNode", + "baseName": "averageCPUPricePerNode", + "type": "ManagementV1CostControlResourcePrice", + "format": "" + }, + { + "name": "averageRAMPricePerNode", + "baseName": "averageRAMPricePerNode", + "type": "ManagementV1CostControlResourcePrice", + "format": "" + }, + { + "name": "controlPlanePricePerCluster", + "baseName": "controlPlanePricePerCluster", + "type": "ManagementV1CostControlResourcePrice", + "format": "" + }, + { + "name": "priceCurrency", + "baseName": "priceCurrency", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1CostControlSettings.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1DevPodEnvironmentTemplateSpec.ts b/gen/models/managementV1DevPodEnvironmentTemplateSpec.ts index 89adc9c..eb276b7 100644 --- a/gen/models/managementV1DevPodEnvironmentTemplateSpec.ts +++ b/gen/models/managementV1DevPodEnvironmentTemplateSpec.ts @@ -11,8 +11,8 @@ */ import { StorageV1Access } from '../models/storageV1Access'; +import { StorageV1DevPodEnvironmentTemplateDefinition } from '../models/storageV1DevPodEnvironmentTemplateDefinition'; import { StorageV1DevPodEnvironmentTemplateVersion } from '../models/storageV1DevPodEnvironmentTemplateVersion'; -import { StorageV1GitEnvironmentTemplate } from '../models/storageV1GitEnvironmentTemplate'; import { StorageV1UserOrTeam } from '../models/storageV1UserOrTeam'; @@ -25,11 +25,15 @@ export class ManagementV1DevPodEnvironmentTemplateSpec { */ 'access'?: Array; /** + * Description describes the environment template + */ + 'description'?: string; + /** * DisplayName is the name that should be displayed in the UI */ 'displayName'?: string; - 'git'?: StorageV1GitEnvironmentTemplate; 'owner'?: StorageV1UserOrTeam; + 'template'?: StorageV1DevPodEnvironmentTemplateDefinition; /** * Versions are different versions of the template that can be referenced as well */ @@ -45,15 +49,15 @@ export class ManagementV1DevPodEnvironmentTemplateSpec { "format": "" }, { - "name": "displayName", - "baseName": "displayName", + "name": "description", + "baseName": "description", "type": "string", "format": "" }, { - "name": "git", - "baseName": "git", - "type": "StorageV1GitEnvironmentTemplate", + "name": "displayName", + "baseName": "displayName", + "type": "string", "format": "" }, { @@ -62,6 +66,12 @@ export class ManagementV1DevPodEnvironmentTemplateSpec { "type": "StorageV1UserOrTeam", "format": "" }, + { + "name": "template", + "baseName": "template", + "type": "StorageV1DevPodEnvironmentTemplateDefinition", + "format": "" + }, { "name": "versions", "baseName": "versions", diff --git a/gen/models/managementV1DevPodWorkspaceInstanceSpec.ts b/gen/models/managementV1DevPodWorkspaceInstanceSpec.ts index 88b01df..def5f04 100644 --- a/gen/models/managementV1DevPodWorkspaceInstanceSpec.ts +++ b/gen/models/managementV1DevPodWorkspaceInstanceSpec.ts @@ -13,6 +13,7 @@ import { StorageV1Access } from '../models/storageV1Access'; import { StorageV1DevPodWorkspaceTemplateDefinition } from '../models/storageV1DevPodWorkspaceTemplateDefinition'; import { StorageV1EnvironmentRef } from '../models/storageV1EnvironmentRef'; +import { StorageV1PresetRef } from '../models/storageV1PresetRef'; import { StorageV1RunnerRef } from '../models/storageV1RunnerRef'; import { StorageV1TemplateRef } from '../models/storageV1TemplateRef'; import { StorageV1UserOrTeam } from '../models/storageV1UserOrTeam'; @@ -40,6 +41,7 @@ export class ManagementV1DevPodWorkspaceInstanceSpec { * Parameters are values to pass to the template. The values should be encoded as YAML string where each parameter is represented as a top-level field key. */ 'parameters'?: string; + 'presetRef'?: StorageV1PresetRef; /** * PreventWakeUpOnConnection is used to prevent workspace that uses sleep mode from waking up on incomming ssh connection. */ @@ -87,6 +89,12 @@ export class ManagementV1DevPodWorkspaceInstanceSpec { "type": "string", "format": "" }, + { + "name": "presetRef", + "baseName": "presetRef", + "type": "StorageV1PresetRef", + "format": "" + }, { "name": "preventWakeUpOnConnection", "baseName": "preventWakeUpOnConnection", diff --git a/gen/models/managementV1DevPodWorkspaceInstanceTroubleshoot.ts b/gen/models/managementV1DevPodWorkspaceInstanceTroubleshoot.ts new file mode 100644 index 0000000..31ebb11 --- /dev/null +++ b/gen/models/managementV1DevPodWorkspaceInstanceTroubleshoot.ts @@ -0,0 +1,114 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ManagementV1DevPodWorkspaceInstance } from '../models/managementV1DevPodWorkspaceInstance'; +import { StorageV1DevPodWorkspaceTemplate } from '../models/storageV1DevPodWorkspaceTemplate'; +import { V1ObjectMeta } from '../models/V1ObjectMeta'; +import { V1PersistentVolumeClaim } from '../models/V1PersistentVolumeClaim'; +import { V1Pod } from '../models/V1Pod'; + + +export class ManagementV1DevPodWorkspaceInstanceTroubleshoot { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + 'apiVersion'?: string; + /** + * Errors is a list of errors that occurred while trying to collect informations for troubleshooting. + */ + 'errors'?: Array; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + 'kind'?: string; + 'metadata'?: V1ObjectMeta; + /** + * Pods is a list of pod objects that are linked to the workspace. + */ + 'pods'?: Array; + /** + * PVCs is a list of PVC objects that are linked to the workspace. + */ + 'pvcs'?: Array; + /** + * State holds the workspaces state as given by \'devpod export\' + */ + 'state'?: string; + 'template'?: StorageV1DevPodWorkspaceTemplate; + 'workspace'?: ManagementV1DevPodWorkspaceInstance; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string", + "format": "" + }, + { + "name": "errors", + "baseName": "errors", + "type": "Array", + "format": "" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta", + "format": "" + }, + { + "name": "pods", + "baseName": "pods", + "type": "Array", + "format": "" + }, + { + "name": "pvcs", + "baseName": "pvcs", + "type": "Array", + "format": "" + }, + { + "name": "state", + "baseName": "state", + "type": "string", + "format": "" + }, + { + "name": "template", + "baseName": "template", + "type": "StorageV1DevPodWorkspaceTemplate", + "format": "" + }, + { + "name": "workspace", + "baseName": "workspace", + "type": "ManagementV1DevPodWorkspaceInstance", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1DevPodWorkspaceInstanceTroubleshoot.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1DevPodWorkspacePreset.ts b/gen/models/managementV1DevPodWorkspacePreset.ts new file mode 100644 index 0000000..220a36a --- /dev/null +++ b/gen/models/managementV1DevPodWorkspacePreset.ts @@ -0,0 +1,77 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ManagementV1DevPodWorkspacePresetSpec } from '../models/managementV1DevPodWorkspacePresetSpec'; +import { V1ObjectMeta } from '../models/V1ObjectMeta'; + + +/** +* DevPodWorkspacePreset +*/ +export class ManagementV1DevPodWorkspacePreset { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + 'apiVersion'?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + 'kind'?: string; + 'metadata'?: V1ObjectMeta; + 'spec'?: ManagementV1DevPodWorkspacePresetSpec; + /** + * DevPodWorkspacePresetStatus holds the status + */ + 'status'?: any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string", + "format": "" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta", + "format": "" + }, + { + "name": "spec", + "baseName": "spec", + "type": "ManagementV1DevPodWorkspacePresetSpec", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1DevPodWorkspacePreset.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1DevPodWorkspacePresetList.ts b/gen/models/managementV1DevPodWorkspacePresetList.ts new file mode 100644 index 0000000..10a0101 --- /dev/null +++ b/gen/models/managementV1DevPodWorkspacePresetList.ts @@ -0,0 +1,64 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ManagementV1DevPodWorkspacePreset } from '../models/managementV1DevPodWorkspacePreset'; +import { V1ListMeta } from '../models/V1ListMeta'; + + +export class ManagementV1DevPodWorkspacePresetList { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + 'apiVersion'?: string; + 'items': Array; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + 'kind'?: string; + 'metadata'?: V1ListMeta; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string", + "format": "" + }, + { + "name": "items", + "baseName": "items", + "type": "Array", + "format": "" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ListMeta", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1DevPodWorkspacePresetList.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1DevPodWorkspacePresetSpec.ts b/gen/models/managementV1DevPodWorkspacePresetSpec.ts new file mode 100644 index 0000000..88afa70 --- /dev/null +++ b/gen/models/managementV1DevPodWorkspacePresetSpec.ts @@ -0,0 +1,105 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageV1Access } from '../models/storageV1Access'; +import { StorageV1DevPodWorkspacePresetSource } from '../models/storageV1DevPodWorkspacePresetSource'; +import { StorageV1DevPodWorkspacePresetVersion } from '../models/storageV1DevPodWorkspacePresetVersion'; +import { StorageV1EnvironmentRef } from '../models/storageV1EnvironmentRef'; +import { StorageV1TemplateRef } from '../models/storageV1TemplateRef'; +import { StorageV1UserOrTeam } from '../models/storageV1UserOrTeam'; + + +/** +* DevPodWorkspacePresetSpec holds the specification +*/ +export class ManagementV1DevPodWorkspacePresetSpec { + /** + * Access to the DevPod machine instance object itself + */ + 'access'?: Array; + /** + * DisplayName is the name that should be displayed in the UI + */ + 'displayName'?: string; + 'environmentRef'?: StorageV1EnvironmentRef; + 'infrastructureRef': StorageV1TemplateRef; + 'owner'?: StorageV1UserOrTeam; + 'source': StorageV1DevPodWorkspacePresetSource; + /** + * UseProjectGitCredentials specifies if the project git credentials should be used instead of local ones for this environment + */ + 'useProjectGitCredentials'?: boolean; + /** + * Versions are different versions of the template that can be referenced as well + */ + 'versions'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "access", + "baseName": "access", + "type": "Array", + "format": "" + }, + { + "name": "displayName", + "baseName": "displayName", + "type": "string", + "format": "" + }, + { + "name": "environmentRef", + "baseName": "environmentRef", + "type": "StorageV1EnvironmentRef", + "format": "" + }, + { + "name": "infrastructureRef", + "baseName": "infrastructureRef", + "type": "StorageV1TemplateRef", + "format": "" + }, + { + "name": "owner", + "baseName": "owner", + "type": "StorageV1UserOrTeam", + "format": "" + }, + { + "name": "source", + "baseName": "source", + "type": "StorageV1DevPodWorkspacePresetSource", + "format": "" + }, + { + "name": "useProjectGitCredentials", + "baseName": "useProjectGitCredentials", + "type": "boolean", + "format": "" + }, + { + "name": "versions", + "baseName": "versions", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1DevPodWorkspacePresetSpec.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1MaintenanceWindow.ts b/gen/models/managementV1MaintenanceWindow.ts new file mode 100644 index 0000000..51c5cd8 --- /dev/null +++ b/gen/models/managementV1MaintenanceWindow.ts @@ -0,0 +1,48 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export class ManagementV1MaintenanceWindow { + /** + * DayOfWeek specifies the day of the week for the maintenance window. It should be a string representing the day, e.g., \"Monday\", \"Tuesday\", etc. + */ + 'dayOfWeek'?: string; + /** + * TimeWindow specifies the time window for the maintenance. It should be a string representing the time range in 24-hour format, in UTC, e.g., \"02:00-03:00\". + */ + 'timeWindow'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "dayOfWeek", + "baseName": "dayOfWeek", + "type": "string", + "format": "" + }, + { + "name": "timeWindow", + "baseName": "timeWindow", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1MaintenanceWindow.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1ProjectSpec.ts b/gen/models/managementV1ProjectSpec.ts index 15af19c..5fcd525 100644 --- a/gen/models/managementV1ProjectSpec.ts +++ b/gen/models/managementV1ProjectSpec.ts @@ -20,6 +20,7 @@ import { StorageV1Member } from '../models/storageV1Member'; import { StorageV1NamespacePattern } from '../models/storageV1NamespacePattern'; import { StorageV1Quotas } from '../models/storageV1Quotas'; import { StorageV1RancherIntegrationSpec } from '../models/storageV1RancherIntegrationSpec'; +import { StorageV1RequirePreset } from '../models/storageV1RequirePreset'; import { StorageV1RequireTemplate } from '../models/storageV1RequireTemplate'; import { StorageV1UserOrTeam } from '../models/storageV1UserOrTeam'; import { StorageV1VaultIntegrationSpec } from '../models/storageV1VaultIntegrationSpec'; @@ -63,6 +64,7 @@ export class ManagementV1ProjectSpec { 'owner'?: StorageV1UserOrTeam; 'quotas'?: StorageV1Quotas; 'rancher'?: StorageV1RancherIntegrationSpec; + 'requirePreset'?: StorageV1RequirePreset; 'requireTemplate'?: StorageV1RequireTemplate; 'vault'?: StorageV1VaultIntegrationSpec; @@ -147,6 +149,12 @@ export class ManagementV1ProjectSpec { "type": "StorageV1RancherIntegrationSpec", "format": "" }, + { + "name": "requirePreset", + "baseName": "requirePreset", + "type": "StorageV1RequirePreset", + "format": "" + }, { "name": "requireTemplate", "baseName": "requireTemplate", diff --git a/gen/models/managementV1ProjectTemplates.ts b/gen/models/managementV1ProjectTemplates.ts index be5ec13..11d9f2b 100644 --- a/gen/models/managementV1ProjectTemplates.ts +++ b/gen/models/managementV1ProjectTemplates.ts @@ -11,6 +11,7 @@ */ import { ManagementV1DevPodEnvironmentTemplate } from '../models/managementV1DevPodEnvironmentTemplate'; +import { ManagementV1DevPodWorkspacePreset } from '../models/managementV1DevPodWorkspacePreset'; import { ManagementV1DevPodWorkspaceTemplate } from '../models/managementV1DevPodWorkspaceTemplate'; import { ManagementV1SpaceTemplate } from '../models/managementV1SpaceTemplate'; import { ManagementV1VirtualClusterTemplate } from '../models/managementV1VirtualClusterTemplate'; @@ -43,6 +44,10 @@ export class ManagementV1ProjectTemplates { */ 'devPodEnvironmentTemplates'?: Array; /** + * DevPodWorkspacePresets holds all the allowed workspace presets + */ + 'devPodWorkspacePresets'?: Array; + /** * DevPodWorkspaceTemplates holds all the allowed space templates */ 'devPodWorkspaceTemplates'?: Array; @@ -99,6 +104,12 @@ export class ManagementV1ProjectTemplates { "type": "Array", "format": "" }, + { + "name": "devPodWorkspacePresets", + "baseName": "devPodWorkspacePresets", + "type": "Array", + "format": "" + }, { "name": "devPodWorkspaceTemplates", "baseName": "devPodWorkspaceTemplates", diff --git a/gen/models/managementV1VirtualClusterExternalDatabase.ts b/gen/models/managementV1VirtualClusterExternalDatabase.ts new file mode 100644 index 0000000..4fbc230 --- /dev/null +++ b/gen/models/managementV1VirtualClusterExternalDatabase.ts @@ -0,0 +1,75 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { ManagementV1VirtualClusterExternalDatabaseSpec } from '../models/managementV1VirtualClusterExternalDatabaseSpec'; +import { ManagementV1VirtualClusterExternalDatabaseStatus } from '../models/managementV1VirtualClusterExternalDatabaseStatus'; +import { V1ObjectMeta } from '../models/V1ObjectMeta'; + + +/** +* VirtualClusterExternalDatabase holds kube config request and response data for virtual clusters +*/ +export class ManagementV1VirtualClusterExternalDatabase { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + 'apiVersion'?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + 'kind'?: string; + 'metadata'?: V1ObjectMeta; + 'spec'?: ManagementV1VirtualClusterExternalDatabaseSpec; + 'status'?: ManagementV1VirtualClusterExternalDatabaseStatus; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string", + "format": "" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta", + "format": "" + }, + { + "name": "spec", + "baseName": "spec", + "type": "ManagementV1VirtualClusterExternalDatabaseSpec", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "ManagementV1VirtualClusterExternalDatabaseStatus", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1VirtualClusterExternalDatabase.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1VirtualClusterExternalDatabaseSpec.ts b/gen/models/managementV1VirtualClusterExternalDatabaseSpec.ts new file mode 100644 index 0000000..99547b4 --- /dev/null +++ b/gen/models/managementV1VirtualClusterExternalDatabaseSpec.ts @@ -0,0 +1,38 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export class ManagementV1VirtualClusterExternalDatabaseSpec { + /** + * Connector specifies the secret that should be used to connect to an external database server. The connection is used to manage a user and database for the vCluster. A data source endpoint constructed from the created user and database is returned on status. The secret specified by connector should contain the following fields: endpoint - the endpoint where the database server can be accessed user - the database username password - the password for the database username port - the port to be used in conjunction with the endpoint to connect to the databse server. This is commonly 3306 + */ + 'connector'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "connector", + "baseName": "connector", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1VirtualClusterExternalDatabaseSpec.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/managementV1VirtualClusterExternalDatabaseStatus.ts b/gen/models/managementV1VirtualClusterExternalDatabaseStatus.ts new file mode 100644 index 0000000..9cdfc92 --- /dev/null +++ b/gen/models/managementV1VirtualClusterExternalDatabaseStatus.ts @@ -0,0 +1,38 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export class ManagementV1VirtualClusterExternalDatabaseStatus { + /** + * DataSource holds a datasource endpoint constructed from the vCluster\'s designated user and database. The user and database are created from the given connector. + */ + 'dataSource'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "dataSource", + "baseName": "dataSource", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return ManagementV1VirtualClusterExternalDatabaseStatus.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1ClusterSpec.ts b/gen/models/storageV1ClusterSpec.ts index ff6ded1..3741631 100644 --- a/gen/models/storageV1ClusterSpec.ts +++ b/gen/models/storageV1ClusterSpec.ts @@ -11,6 +11,8 @@ */ import { StorageV1Access } from '../models/storageV1Access'; +import { StorageV1Metrics } from '../models/storageV1Metrics'; +import { StorageV1OpenCost } from '../models/storageV1OpenCost'; import { StorageV1SecretRef } from '../models/storageV1SecretRef'; import { StorageV1UserOrTeam } from '../models/storageV1UserOrTeam'; @@ -40,10 +42,12 @@ export class StorageV1ClusterSpec { * The namespace where the cluster components will be installed in */ 'managementNamespace'?: string; + 'metrics'?: StorageV1Metrics; /** * NetworkPeer specifies if the cluster is connected via tailscale, when this is specified, config is optional */ 'networkPeer'?: boolean; + 'opencost'?: StorageV1OpenCost; 'owner'?: StorageV1UserOrTeam; /** * If unusable is true, no spaces or virtual clusters can be scheduled on this cluster. @@ -89,12 +93,24 @@ export class StorageV1ClusterSpec { "type": "string", "format": "" }, + { + "name": "metrics", + "baseName": "metrics", + "type": "StorageV1Metrics", + "format": "" + }, { "name": "networkPeer", "baseName": "networkPeer", "type": "boolean", "format": "" }, + { + "name": "opencost", + "baseName": "opencost", + "type": "StorageV1OpenCost", + "format": "" + }, { "name": "owner", "baseName": "owner", diff --git a/gen/models/storageV1ClusterStatus.ts b/gen/models/storageV1ClusterStatus.ts index 7120e35..abb3556 100644 --- a/gen/models/storageV1ClusterStatus.ts +++ b/gen/models/storageV1ClusterStatus.ts @@ -10,12 +10,17 @@ * Do not edit the class manually. */ +import { StorageV1Condition } from '../models/agentstorageV1Condition'; /** * ClusterStatus holds the user status */ export class StorageV1ClusterStatus { + /** + * Conditions holds several conditions the cluster might be in + */ + 'conditions'?: Array; 'message'?: string; 'phase'?: string; 'reason'?: string; @@ -23,6 +28,12 @@ export class StorageV1ClusterStatus { static readonly discriminator: string | undefined = undefined; static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "conditions", + "baseName": "conditions", + "type": "Array", + "format": "" + }, { "name": "message", "baseName": "message", diff --git a/gen/models/storageV1DevPodEnvironmentTemplateDefinition.ts b/gen/models/storageV1DevPodEnvironmentTemplateDefinition.ts new file mode 100644 index 0000000..98b1328 --- /dev/null +++ b/gen/models/storageV1DevPodEnvironmentTemplateDefinition.ts @@ -0,0 +1,46 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageV1GitEnvironmentTemplate } from '../models/storageV1GitEnvironmentTemplate'; + + +export class StorageV1DevPodEnvironmentTemplateDefinition { + 'git'?: StorageV1GitEnvironmentTemplate; + /** + * Inline holds an inline devcontainer.json definition + */ + 'inline'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "git", + "baseName": "git", + "type": "StorageV1GitEnvironmentTemplate", + "format": "" + }, + { + "name": "inline", + "baseName": "inline", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1DevPodEnvironmentTemplateDefinition.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1DevPodEnvironmentTemplateVersion.ts b/gen/models/storageV1DevPodEnvironmentTemplateVersion.ts index 0620e24..58f2a5d 100644 --- a/gen/models/storageV1DevPodEnvironmentTemplateVersion.ts +++ b/gen/models/storageV1DevPodEnvironmentTemplateVersion.ts @@ -10,11 +10,11 @@ * Do not edit the class manually. */ -import { StorageV1GitEnvironmentTemplate } from '../models/storageV1GitEnvironmentTemplate'; +import { StorageV1DevPodEnvironmentTemplateDefinition } from '../models/storageV1DevPodEnvironmentTemplateDefinition'; export class StorageV1DevPodEnvironmentTemplateVersion { - 'git'?: StorageV1GitEnvironmentTemplate; + 'template'?: StorageV1DevPodEnvironmentTemplateDefinition; /** * Version is the version. Needs to be in X.X.X format. */ @@ -24,9 +24,9 @@ export class StorageV1DevPodEnvironmentTemplateVersion { static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ { - "name": "git", - "baseName": "git", - "type": "StorageV1GitEnvironmentTemplate", + "name": "template", + "baseName": "template", + "type": "StorageV1DevPodEnvironmentTemplateDefinition", "format": "" }, { diff --git a/gen/models/storageV1DevPodWorkspacePresetSource.ts b/gen/models/storageV1DevPodWorkspacePresetSource.ts new file mode 100644 index 0000000..dd7c9c2 --- /dev/null +++ b/gen/models/storageV1DevPodWorkspacePresetSource.ts @@ -0,0 +1,48 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export class StorageV1DevPodWorkspacePresetSource { + /** + * Git stores path to git repo to use as workspace source + */ + 'git'?: string; + /** + * Image stores container image to use as workspace source + */ + 'image'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "git", + "baseName": "git", + "type": "string", + "format": "" + }, + { + "name": "image", + "baseName": "image", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1DevPodWorkspacePresetSource.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1DevPodWorkspacePresetVersion.ts b/gen/models/storageV1DevPodWorkspacePresetVersion.ts new file mode 100644 index 0000000..ce5c33c --- /dev/null +++ b/gen/models/storageV1DevPodWorkspacePresetVersion.ts @@ -0,0 +1,72 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageV1DevPodWorkspacePresetSource } from '../models/storageV1DevPodWorkspacePresetSource'; +import { StorageV1EnvironmentRef } from '../models/storageV1EnvironmentRef'; +import { StorageV1TemplateRef } from '../models/storageV1TemplateRef'; + + +export class StorageV1DevPodWorkspacePresetVersion { + 'environmentRef'?: StorageV1EnvironmentRef; + 'infrastructureRef'?: StorageV1TemplateRef; + 'source'?: StorageV1DevPodWorkspacePresetSource; + /** + * UseProjectGitCredentials specifies if the project git credentials should be used instead of local ones for this environment + */ + 'useProjectGitCredentials'?: boolean; + /** + * Version is the version. Needs to be in X.X.X format. + */ + 'version'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "environmentRef", + "baseName": "environmentRef", + "type": "StorageV1EnvironmentRef", + "format": "" + }, + { + "name": "infrastructureRef", + "baseName": "infrastructureRef", + "type": "StorageV1TemplateRef", + "format": "" + }, + { + "name": "source", + "baseName": "source", + "type": "StorageV1DevPodWorkspacePresetSource", + "format": "" + }, + { + "name": "useProjectGitCredentials", + "baseName": "useProjectGitCredentials", + "type": "boolean", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1DevPodWorkspacePresetVersion.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1DevPodWorkspaceTemplate.ts b/gen/models/storageV1DevPodWorkspaceTemplate.ts new file mode 100644 index 0000000..a93212a --- /dev/null +++ b/gen/models/storageV1DevPodWorkspaceTemplate.ts @@ -0,0 +1,77 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageV1DevPodWorkspaceTemplateSpec } from '../models/storageV1DevPodWorkspaceTemplateSpec'; +import { V1ObjectMeta } from '../models/V1ObjectMeta'; + + +/** +* DevPodWorkspaceTemplate holds the DevPodWorkspaceTemplate information +*/ +export class StorageV1DevPodWorkspaceTemplate { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + 'apiVersion'?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + 'kind'?: string; + 'metadata'?: V1ObjectMeta; + 'spec'?: StorageV1DevPodWorkspaceTemplateSpec; + /** + * DevPodWorkspaceTemplateStatus holds the status + */ + 'status'?: any; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "apiVersion", + "baseName": "apiVersion", + "type": "string", + "format": "" + }, + { + "name": "kind", + "baseName": "kind", + "type": "string", + "format": "" + }, + { + "name": "metadata", + "baseName": "metadata", + "type": "V1ObjectMeta", + "format": "" + }, + { + "name": "spec", + "baseName": "spec", + "type": "StorageV1DevPodWorkspaceTemplateSpec", + "format": "" + }, + { + "name": "status", + "baseName": "status", + "type": "any", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1DevPodWorkspaceTemplate.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1DevPodWorkspaceTemplateSpec.ts b/gen/models/storageV1DevPodWorkspaceTemplateSpec.ts new file mode 100644 index 0000000..b54bc84 --- /dev/null +++ b/gen/models/storageV1DevPodWorkspaceTemplateSpec.ts @@ -0,0 +1,100 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageV1Access } from '../models/storageV1Access'; +import { StorageV1AppParameter } from '../models/storageV1AppParameter'; +import { StorageV1DevPodWorkspaceTemplateDefinition } from '../models/storageV1DevPodWorkspaceTemplateDefinition'; +import { StorageV1DevPodWorkspaceTemplateVersion } from '../models/storageV1DevPodWorkspaceTemplateVersion'; +import { StorageV1UserOrTeam } from '../models/storageV1UserOrTeam'; + + +/** +* DevPodWorkspaceTemplateSpec holds the specification +*/ +export class StorageV1DevPodWorkspaceTemplateSpec { + /** + * Access holds the access rights for users and teams + */ + 'access'?: Array; + /** + * Description describes the virtual cluster template + */ + 'description'?: string; + /** + * DisplayName is the name that is shown in the UI + */ + 'displayName'?: string; + 'owner'?: StorageV1UserOrTeam; + /** + * Parameters define additional app parameters that will set provider values + */ + 'parameters'?: Array; + 'template'?: StorageV1DevPodWorkspaceTemplateDefinition; + /** + * Versions are different versions of the template that can be referenced as well + */ + 'versions'?: Array; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "access", + "baseName": "access", + "type": "Array", + "format": "" + }, + { + "name": "description", + "baseName": "description", + "type": "string", + "format": "" + }, + { + "name": "displayName", + "baseName": "displayName", + "type": "string", + "format": "" + }, + { + "name": "owner", + "baseName": "owner", + "type": "StorageV1UserOrTeam", + "format": "" + }, + { + "name": "parameters", + "baseName": "parameters", + "type": "Array", + "format": "" + }, + { + "name": "template", + "baseName": "template", + "type": "StorageV1DevPodWorkspaceTemplateDefinition", + "format": "" + }, + { + "name": "versions", + "baseName": "versions", + "type": "Array", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1DevPodWorkspaceTemplateSpec.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1EnvironmentRef.ts b/gen/models/storageV1EnvironmentRef.ts index be53f63..9238fac 100644 --- a/gen/models/storageV1EnvironmentRef.ts +++ b/gen/models/storageV1EnvironmentRef.ts @@ -17,6 +17,10 @@ export class StorageV1EnvironmentRef { * Name is the name of DevPodEnvironmentTemplate this references */ 'name': string; + /** + * Version is the version of DevPodEnvironmentTemplate this references + */ + 'version'?: string; static readonly discriminator: string | undefined = undefined; @@ -26,6 +30,12 @@ export class StorageV1EnvironmentRef { "baseName": "name", "type": "string", "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "string", + "format": "" } ]; static getAttributeTypeMap() { diff --git a/gen/models/storageV1Metrics.ts b/gen/models/storageV1Metrics.ts new file mode 100644 index 0000000..1406cf9 --- /dev/null +++ b/gen/models/storageV1Metrics.ts @@ -0,0 +1,64 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { StorageV1Storage } from '../models/storageV1Storage'; +import { V1ResourceRequirements } from '../models/V1ResourceRequirements'; + + +export class StorageV1Metrics { + /** + * Replicas is the number of desired replicas. + */ + 'replicas'?: number; + 'resources'?: V1ResourceRequirements; + /** + * Retention is the metrics data retention period. Default is 1y + */ + 'retention'?: string; + 'storage'?: StorageV1Storage; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "replicas", + "baseName": "replicas", + "type": "number", + "format": "int32" + }, + { + "name": "resources", + "baseName": "resources", + "type": "V1ResourceRequirements", + "format": "" + }, + { + "name": "retention", + "baseName": "retention", + "type": "string", + "format": "" + }, + { + "name": "storage", + "baseName": "storage", + "type": "StorageV1Storage", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1Metrics.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1OpenCost.ts b/gen/models/storageV1OpenCost.ts new file mode 100644 index 0000000..fd432b8 --- /dev/null +++ b/gen/models/storageV1OpenCost.ts @@ -0,0 +1,46 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { V1ResourceRequirements } from '../models/V1ResourceRequirements'; + + +export class StorageV1OpenCost { + /** + * Replicas is the number of desired replicas. + */ + 'replicas'?: number; + 'resources'?: V1ResourceRequirements; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "replicas", + "baseName": "replicas", + "type": "number", + "format": "int32" + }, + { + "name": "resources", + "baseName": "resources", + "type": "V1ResourceRequirements", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1OpenCost.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1PresetRef.ts b/gen/models/storageV1PresetRef.ts new file mode 100644 index 0000000..d565090 --- /dev/null +++ b/gen/models/storageV1PresetRef.ts @@ -0,0 +1,48 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export class StorageV1PresetRef { + /** + * Name is the name of DevPodWorkspacePreset + */ + 'name': string; + /** + * Version holds the preset version to use. Version is expected to be in semantic versioning format. Alternatively, you can also exchange major, minor or patch with an \'x\' to tell Loft to automatically select the latest major, minor or patch version. + */ + 'version'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "name", + "baseName": "name", + "type": "string", + "format": "" + }, + { + "name": "version", + "baseName": "version", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1PresetRef.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1RequirePreset.ts b/gen/models/storageV1RequirePreset.ts new file mode 100644 index 0000000..a490471 --- /dev/null +++ b/gen/models/storageV1RequirePreset.ts @@ -0,0 +1,38 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export class StorageV1RequirePreset { + /** + * If true, all users within the project will not be allowed to create a new instance without a preset. By default, all users are allowed to create a new instance without a preset. + */ + 'disabled'?: boolean; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "disabled", + "baseName": "disabled", + "type": "boolean", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1RequirePreset.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/storageV1Storage.ts b/gen/models/storageV1Storage.ts new file mode 100644 index 0000000..02d9b23 --- /dev/null +++ b/gen/models/storageV1Storage.ts @@ -0,0 +1,48 @@ +/** + * Api + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * OpenAPI spec version: master + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + + +export class StorageV1Storage { + /** + * Size the size of the metrics backend\'s persistent volume + */ + 'size'?: string; + /** + * StorageClass the storage class to use when provisioning the metrics backend\'s persistent volume If set to \"-\" or \"\" dynamic provisioning is disabled If set to undefined or null (the default), the cluster\'s default storage class is used for provisioning + */ + 'storageClass'?: string; + + static readonly discriminator: string | undefined = undefined; + + static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [ + { + "name": "size", + "baseName": "size", + "type": "string", + "format": "" + }, + { + "name": "storageClass", + "baseName": "storageClass", + "type": "string", + "format": "" + } ]; + + static getAttributeTypeMap() { + return StorageV1Storage.attributeTypeMap; + } + + public constructor() { + } +} + diff --git a/gen/models/uiV1UISettingsSpec.ts b/gen/models/uiV1UISettingsSpec.ts index f02e15e..86c078f 100644 --- a/gen/models/uiV1UISettingsSpec.ts +++ b/gen/models/uiV1UISettingsSpec.ts @@ -34,7 +34,7 @@ export class UiV1UISettingsSpec { */ 'defaultVClusterVersion'?: string; /** - * HasHelmRelease indicates whether loft has been installed via Helm + * HasHelmRelease indicates whether the vCluster Platform instance has been installed via Helm */ 'hasHelmRelease'?: boolean; /** @@ -42,6 +42,10 @@ export class UiV1UISettingsSpec { */ 'legalTemplate'?: string; /** + * LoftHosted indicates whether the vCluster Platform instance is hosted and operated by Loft Labs Inc. + */ + 'loftHosted'?: boolean; + /** * LoftVersion holds the current loft version */ 'loftVersion'?: string; @@ -113,6 +117,12 @@ export class UiV1UISettingsSpec { "type": "string", "format": "" }, + { + "name": "loftHosted", + "baseName": "loftHosted", + "type": "boolean", + "format": "" + }, { "name": "loftVersion", "baseName": "loftVersion", diff --git a/gen/resources.ts b/gen/resources.ts index a887689..a7d5d07 100644 --- a/gen/resources.ts +++ b/gen/resources.ts @@ -21,7 +21,9 @@ import {ManagementV1Config} from "./models/managementV1Config" import {ManagementV1ConvertVirtualClusterConfig} from "./models/managementV1ConvertVirtualClusterConfig" import {ManagementV1DevPodEnvironmentTemplate} from "./models/managementV1DevPodEnvironmentTemplate" import {ManagementV1DevPodWorkspaceInstanceState} from "./models/managementV1DevPodWorkspaceInstanceState" +import {ManagementV1DevPodWorkspaceInstanceTroubleshoot} from "./models/managementV1DevPodWorkspaceInstanceTroubleshoot" import {ManagementV1DevPodWorkspaceInstance} from "./models/managementV1DevPodWorkspaceInstance" +import {ManagementV1DevPodWorkspacePreset} from "./models/managementV1DevPodWorkspacePreset" import {ManagementV1DevPodWorkspaceTemplate} from "./models/managementV1DevPodWorkspaceTemplate" import {ManagementV1DirectClusterEndpointToken} from "./models/managementV1DirectClusterEndpointToken" import {ManagementV1Event} from "./models/managementV1Event" @@ -69,6 +71,7 @@ import {ManagementV1UserPermissions} from "./models/managementV1UserPermissions" import {ManagementV1UserProfile} from "./models/managementV1UserProfile" import {ManagementV1User} from "./models/managementV1User" import {ManagementV1VirtualClusterAccessKey} from "./models/managementV1VirtualClusterAccessKey" +import {ManagementV1VirtualClusterExternalDatabase} from "./models/managementV1VirtualClusterExternalDatabase" import {ManagementV1VirtualClusterInstanceKubeConfig} from "./models/managementV1VirtualClusterInstanceKubeConfig" import {ManagementV1VirtualClusterInstanceLog} from "./models/managementV1VirtualClusterInstanceLog" import {ManagementV1VirtualClusterInstance} from "./models/managementV1VirtualClusterInstance" @@ -97,6 +100,8 @@ export type TGenResources = { ManagementV1DevPodEnvironmentTemplate: GroupVersionResource ManagementV1DevPodWorkspaceInstance: GroupVersionResource ManagementV1DevPodWorkspaceInstanceState: GroupVersionResource + ManagementV1DevPodWorkspaceInstanceTroubleshoot: GroupVersionResource + ManagementV1DevPodWorkspacePreset: GroupVersionResource ManagementV1DevPodWorkspaceTemplate: GroupVersionResource ManagementV1DirectClusterEndpointToken: GroupVersionResource ManagementV1Event: GroupVersionResource @@ -144,6 +149,7 @@ export type TGenResources = { ManagementV1UserPermissions: GroupVersionResource ManagementV1UserProfile: GroupVersionResource ManagementV1VirtualClusterAccessKey: GroupVersionResource + ManagementV1VirtualClusterExternalDatabase: GroupVersionResource ManagementV1VirtualClusterInstance: GroupVersionResource ManagementV1VirtualClusterInstanceKubeConfig: GroupVersionResource ManagementV1VirtualClusterInstanceLog: GroupVersionResource @@ -327,6 +333,22 @@ export const GenResources: TGenResources = { namespaced: true, kind: "DevPodWorkspaceInstanceState", }, + ManagementV1DevPodWorkspaceInstanceTroubleshoot: { + group: "management.loft.sh", + version: "v1", + resource: "devpodworkspaceinstances", + subResource: "troubleshoot", + namespaced: true, + kind: "DevPodWorkspaceInstanceTroubleshoot", + }, + ManagementV1DevPodWorkspacePreset: { + group: "management.loft.sh", + version: "v1", + resource: "devpodworkspacepresets", + subResource: "", + namespaced: false, + kind: "DevPodWorkspacePreset", + }, ManagementV1DevPodWorkspaceTemplate: { group: "management.loft.sh", version: "v1", @@ -703,6 +725,14 @@ export const GenResources: TGenResources = { namespaced: true, kind: "VirtualClusterAccessKey", }, + ManagementV1VirtualClusterExternalDatabase: { + group: "management.loft.sh", + version: "v1", + resource: "virtualclusterinstances", + subResource: "externaldatabase", + namespaced: true, + kind: "VirtualClusterExternalDatabase", + }, ManagementV1VirtualClusterInstance: { group: "management.loft.sh", version: "v1", diff --git a/lib/index.d.ts b/lib/index.d.ts index 3695f56..ad58ab7 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -540,7 +540,7 @@ export declare const ManagementBasePath = "/kubernetes/management"; export declare const ClusterBasePath = "/kubernetes/cluster/"; export declare const VClusterBasePath = "/kubernetes/virtualcluster/"; export declare const ProjectBasePath = "/kubernetes/project/"; -export declare function getProjectNamespace(name: string | undefined, prefix?: string | undefined): string; +export declare const getProjectNamespace: (name?: string, prefix?: string) => string; export declare function getProjectFromNamespace(namespace: string | undefined, prefix?: string): string | undefined; export declare class Client { static getAccessKey(): string | null; @@ -4322,6 +4322,133 @@ declare class ManagementV1ClusterVirtualClusterDefaults { }[]; constructor(); } +declare class StorageV1Storage { + /** + * Size the size of the metrics backend\'s persistent volume + */ + "size"?: string; + /** + * StorageClass the storage class to use when provisioning the metrics backend\'s persistent volume If set to \"-\" or \"\" dynamic provisioning is disabled If set to undefined or null (the default), the cluster\'s default storage class is used for provisioning + */ + "storageClass"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1ResourceClaim { + /** + * Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request. + */ + "request"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1ResourceRequirements { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. + */ + "claims"?: Array; + /** + * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: string; + }; + /** + * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: string; + }; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class StorageV1Metrics { + /** + * Replicas is the number of desired replicas. + */ + "replicas"?: number; + "resources"?: V1ResourceRequirements; + /** + * Retention is the metrics data retention period. Default is 1y + */ + "retention"?: string; + "storage"?: StorageV1Storage; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class StorageV1OpenCost { + /** + * Replicas is the number of desired replicas. + */ + "replicas"?: number; + "resources"?: V1ResourceRequirements; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} declare class StorageV1SecretRef { "key"?: string; "secretName"?: string; @@ -4363,10 +4490,12 @@ declare class ManagementV1ClusterSpec { * The namespace where the cluster components will be installed in */ "managementNamespace"?: string; + "metrics"?: StorageV1Metrics; /** * NetworkPeer specifies if the cluster is connected via tailscale, when this is specified, config is optional */ "networkPeer"?: boolean; + "opencost"?: StorageV1OpenCost; "owner"?: StorageV1UserOrTeam; /** * If unusable is true, no spaces or virtual clusters can be scheduled on this cluster. @@ -4387,7 +4516,51 @@ declare class ManagementV1ClusterSpec { }[]; constructor(); } +declare class StorageV1Condition { + /** + * Last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + */ + "lastTransitionTime": Date; + /** + * A human readable message indicating details about the transition. This field may be empty. + */ + "message"?: string; + /** + * The reason for the condition\'s last transition in CamelCase. The specific API may choose whether this field is considered a guaranteed API. This field may not be empty. + */ + "reason"?: string; + /** + * Severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. + */ + "severity"?: string; + /** + * Status of the condition, one of True, False, Unknown. + */ + "status": string; + /** + * Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. + */ + "type": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} declare class ManagementV1ClusterStatus { + /** + * Conditions holds several conditions the cluster might be in + */ + "conditions"?: Array; "message"?: string; /** * Online is whether the cluster is currently connected to the coordination server. @@ -5070,23 +5243,15 @@ declare class ManagementV1Authentication { }[]; constructor(); } -declare class ManagementV1OIDCClientSpec { - /** - * The client id of the client - */ - "clientId"?: string; - /** - * The client secret of the client - */ - "clientSecret"?: string; +declare class ManagementV1MaintenanceWindow { /** - * The client name + * DayOfWeek specifies the day of the week for the maintenance window. It should be a string representing the day, e.g., \"Monday\", \"Tuesday\", etc. */ - "name"?: string; + "dayOfWeek"?: string; /** - * A registered set of redirect URIs. When redirecting from dex to the client, the URI requested to redirect to MUST match one of these values, unless the client is \"public\". + * TimeWindow specifies the time window for the maintenance. It should be a string representing the time range in 24-hour format, in UTC, e.g., \"02:00-03:00\". */ - "redirectURIs": Array; + "timeWindow"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5102,19 +5267,12 @@ declare class ManagementV1OIDCClientSpec { }[]; constructor(); } -declare class ManagementV1OIDC { - /** - * The clients that are allowed to request loft tokens - */ - "clients"?: Array; - /** - * If true indicates that loft will act as an OIDC server - */ - "enabled"?: boolean; +declare class ManagementV1Cloud { + "maintenanceWindow"?: ManagementV1MaintenanceWindow; /** - * If true indicates that loft will allow wildcard \'*\' in client redirectURIs + * ReleaseChannel specifies the release channel for the cloud configuration. This can be used to determine which updates or versions are applied. */ - "wildcardRedirect"?: boolean; + "releaseChannel"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5130,19 +5288,9 @@ declare class ManagementV1OIDC { }[]; constructor(); } -declare class V1SecretKeySelector { - /** - * The key of the secret to select from. Must be a valid secret key. - */ - "key": string; - /** - * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - */ - "name"?: string; - /** - * Specify whether the Secret or its key must be defined - */ - "optional"?: boolean; +declare class ManagementV1CostControlClusterConfig { + "metrics"?: StorageV1Metrics; + "opencost"?: StorageV1OpenCost; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5158,12 +5306,8 @@ declare class V1SecretKeySelector { }[]; constructor(); } -declare class StorageV1VaultAuthSpec { - /** - * Token defines the token to use for authentication. - */ - "token"?: string; - "tokenSecretRef"?: V1SecretKeySelector; +declare class ManagementV1CostControlGlobalConfig { + "metrics"?: StorageV1Metrics; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5179,28 +5323,15 @@ declare class StorageV1VaultAuthSpec { }[]; constructor(); } -declare class StorageV1VaultIntegrationSpec { - /** - * Address defines the address of the Vault instance to use for this project. Will default to the `VAULT_ADDR` environment variable if not provided. - */ - "address"?: string; - "auth"?: StorageV1VaultAuthSpec; - /** - * Enabled indicates if the Vault Integration is enabled for the project -- this knob only enables the syncing of secrets to or from Vault, but does not setup Kubernetes authentication methods or Kubernetes secrets engines for vclusters. - */ - "enabled"?: boolean; - /** - * Namespace defines the namespace to use when storing secrets in Vault. - */ - "namespace"?: string; +declare class ManagementV1CostControlResourcePrice { /** - * SkipTLSVerify defines if TLS verification should be skipped when connecting to Vault. + * Price specifies the price. */ - "skipTLSVerify"?: boolean; + "price"?: number; /** - * SyncInterval defines the interval at which to sync secrets from Vault. Defaults to `1m.` See https://pkg.go.dev/time#ParseDuration for supported formats. + * TimePeriod specifies the time period for the price. */ - "syncInterval"?: string; + "timePeriod"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5216,23 +5347,37 @@ declare class StorageV1VaultIntegrationSpec { }[]; constructor(); } -declare class UiV1NavBarButton { - /** - * Icon holds the url of the icon to display - */ - "icon"?: string; - /** - * Link holds the link of the navbar button - */ - "link"?: string; +declare class ManagementV1CostControlSettings { + "averageCPUPricePerNode"?: ManagementV1CostControlResourcePrice; + "averageRAMPricePerNode"?: ManagementV1CostControlResourcePrice; + "controlPlanePricePerCluster"?: ManagementV1CostControlResourcePrice; /** - * Position holds the position of the button, can be one of: TopStart, TopEnd, BottomStart, BottomEnd. Defaults to BottomEnd + * PriceCurrency specifies the currency. */ - "position"?: string; + "priceCurrency"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class ManagementV1CostControl { + "cluster"?: ManagementV1CostControlClusterConfig; /** - * Text holds text for the button + * Enabled specifies whether the ROI dashboard should be available in the UI, and if the metrics infrastructure that provides dashboard data is deployed */ - "text"?: string; + "enabled"?: boolean; + "global"?: ManagementV1CostControlGlobalConfig; + "settings"?: ManagementV1CostControlSettings; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5248,15 +5393,193 @@ declare class UiV1NavBarButton { }[]; constructor(); } -declare class UiV1UISettingsConfig { +declare class ManagementV1OIDCClientSpec { /** - * AccentColor is the color value (ex: \"#12345\") to use for the accent + * The client id of the client */ - "accentColor"?: string; + "clientId"?: string; /** - * CustomCSS holds URLs with custom css files that should be included when loading the UI + * The client secret of the client */ - "customCss"?: Array; + "clientSecret"?: string; + /** + * The client name + */ + "name"?: string; + /** + * A registered set of redirect URIs. When redirecting from dex to the client, the URI requested to redirect to MUST match one of these values, unless the client is \"public\". + */ + "redirectURIs": Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class ManagementV1OIDC { + /** + * The clients that are allowed to request loft tokens + */ + "clients"?: Array; + /** + * If true indicates that loft will act as an OIDC server + */ + "enabled"?: boolean; + /** + * If true indicates that loft will allow wildcard \'*\' in client redirectURIs + */ + "wildcardRedirect"?: boolean; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1SecretKeySelector { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class StorageV1VaultAuthSpec { + /** + * Token defines the token to use for authentication. + */ + "token"?: string; + "tokenSecretRef"?: V1SecretKeySelector; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class StorageV1VaultIntegrationSpec { + /** + * Address defines the address of the Vault instance to use for this project. Will default to the `VAULT_ADDR` environment variable if not provided. + */ + "address"?: string; + "auth"?: StorageV1VaultAuthSpec; + /** + * Enabled indicates if the Vault Integration is enabled for the project -- this knob only enables the syncing of secrets to or from Vault, but does not setup Kubernetes authentication methods or Kubernetes secrets engines for vclusters. + */ + "enabled"?: boolean; + /** + * Namespace defines the namespace to use when storing secrets in Vault. + */ + "namespace"?: string; + /** + * SkipTLSVerify defines if TLS verification should be skipped when connecting to Vault. + */ + "skipTLSVerify"?: boolean; + /** + * SyncInterval defines the interval at which to sync secrets from Vault. Defaults to `1m.` See https://pkg.go.dev/time#ParseDuration for supported formats. + */ + "syncInterval"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class UiV1NavBarButton { + /** + * Icon holds the url of the icon to display + */ + "icon"?: string; + /** + * Link holds the link of the navbar button + */ + "link"?: string; + /** + * Position holds the position of the button, can be one of: TopStart, TopEnd, BottomStart, BottomEnd. Defaults to BottomEnd + */ + "position"?: string; + /** + * Text holds text for the button + */ + "text"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class UiV1UISettingsConfig { + /** + * AccentColor is the color value (ex: \"#12345\") to use for the accent + */ + "accentColor"?: string; + /** + * CustomCSS holds URLs with custom css files that should be included when loading the UI + */ + "customCss"?: Array; /** * CustomJavaScript holds URLs with custom js files that should be included when loading the UI */ @@ -5308,6 +5631,8 @@ declare class ManagementV1ConfigStatus { "apps"?: ManagementV1Apps; "audit"?: ManagementV1Audit; "auth"?: ManagementV1Authentication; + "cloud"?: ManagementV1Cloud; + "costControl"?: ManagementV1CostControl; /** * DevPodSubDomain holds a subdomain in the following form *.workspace.my-domain.com */ @@ -5482,9 +5807,30 @@ declare class StorageV1GitEnvironmentTemplate { }[]; constructor(); } -declare class StorageV1DevPodEnvironmentTemplateVersion { +declare class StorageV1DevPodEnvironmentTemplateDefinition { "git"?: StorageV1GitEnvironmentTemplate; /** + * Inline holds an inline devcontainer.json definition + */ + "inline"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class StorageV1DevPodEnvironmentTemplateVersion { + "template"?: StorageV1DevPodEnvironmentTemplateDefinition; + /** * Version is the version. Needs to be in X.X.X format. */ "version"?: string; @@ -5509,11 +5855,15 @@ declare class ManagementV1DevPodEnvironmentTemplateSpec { */ "access"?: Array; /** + * Description describes the environment template + */ + "description"?: string; + /** * DisplayName is the name that should be displayed in the UI */ "displayName"?: string; - "git"?: StorageV1GitEnvironmentTemplate; "owner"?: StorageV1UserOrTeam; + "template"?: StorageV1DevPodEnvironmentTemplateDefinition; /** * Versions are different versions of the template that can be referenced as well */ @@ -5876,6 +6226,34 @@ declare class StorageV1EnvironmentRef { * Name is the name of DevPodEnvironmentTemplate this references */ "name": string; + /** + * Version is the version of DevPodEnvironmentTemplate this references + */ + "version"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class StorageV1PresetRef { + /** + * Name is the name of DevPodWorkspacePreset + */ + "name": string; + /** + * Version holds the preset version to use. Version is expected to be in semantic versioning format. Alternatively, you can also exchange major, minor or patch with an \'x\' to tell Loft to automatically select the latest major, minor or patch version. + */ + "version"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5930,6 +6308,7 @@ declare class ManagementV1DevPodWorkspaceInstanceSpec { * Parameters are values to pass to the template. The values should be encoded as YAML string where each parameter is represented as a top-level field key. */ "parameters"?: string; + "presetRef"?: StorageV1PresetRef; /** * PreventWakeUpOnConnection is used to prevent workspace that uses sleep mode from waking up on incomming ssh connection. */ @@ -5952,31 +6331,15 @@ declare class ManagementV1DevPodWorkspaceInstanceSpec { }[]; constructor(); } -declare class StorageV1Condition { - /** - * Last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - */ - "lastTransitionTime": Date; - /** - * A human readable message indicating details about the transition. This field may be empty. - */ - "message"?: string; - /** - * The reason for the condition\'s last transition in CamelCase. The specific API may choose whether this field is considered a guaranteed API. This field may not be empty. - */ - "reason"?: string; - /** - * Severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False. - */ - "severity"?: string; +declare class StorageV1ClusterRef { /** - * Status of the condition, one of True, False, Unknown. + * Cluster is the connected cluster the space will be created in */ - "status": string; + "cluster"?: string; /** - * Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. + * Namespace is the namespace inside the connected cluster holding the space */ - "type": string; + "namespace"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -5992,34 +6355,10 @@ declare class StorageV1Condition { }[]; constructor(); } -declare class StorageV1ClusterRef { +declare class ManagementV1DevPodWorkspaceInstanceStatus { + "clusterRef"?: StorageV1ClusterRef; /** - * Cluster is the connected cluster the space will be created in - */ - "cluster"?: string; - /** - * Namespace is the namespace inside the connected cluster holding the space - */ - "namespace"?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare class ManagementV1DevPodWorkspaceInstanceStatus { - "clusterRef"?: StorageV1ClusterRef; - /** - * Conditions holds several conditions the DevPod machine might be in + * Conditions holds several conditions the DevPod machine might be in */ "conditions"?: Array; /** @@ -6111,7 +6450,7 @@ declare class StorageV1DevPodWorkspaceTemplateVersion { }[]; constructor(); } -declare class ManagementV1DevPodWorkspaceTemplateSpec { +declare class StorageV1DevPodWorkspaceTemplateSpec { /** * Access holds the access rights for users and teams */ @@ -6149,7 +6488,7 @@ declare class ManagementV1DevPodWorkspaceTemplateSpec { }[]; constructor(); } -declare class ManagementV1DevPodWorkspaceTemplate { +declare class StorageV1DevPodWorkspaceTemplate { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ @@ -6159,7 +6498,7 @@ declare class ManagementV1DevPodWorkspaceTemplate { */ "kind"?: string; "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1DevPodWorkspaceTemplateSpec; + "spec"?: StorageV1DevPodWorkspaceTemplateSpec; /** * DevPodWorkspaceTemplateStatus holds the status */ @@ -6179,11 +6518,19 @@ declare class ManagementV1DevPodWorkspaceTemplate { }[]; constructor(); } -declare class StorageV1AccessKeyScopeCluster { +declare class V1TypedLocalObjectReference { /** - * Cluster is the name of the cluster to access. You can specify * to select all clusters. + * APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. */ - "cluster"?: string; + "apiGroup"?: string; + /** + * Kind is the type of resource being referenced + */ + "kind": string; + /** + * Name is the name of resource being referenced + */ + "name": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6199,11 +6546,23 @@ declare class StorageV1AccessKeyScopeCluster { }[]; constructor(); } -declare class StorageV1AccessKeyScopeProject { +declare class V1TypedObjectReference { /** - * Project is the name of the project. You can specify * to select all projects. + * APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. */ - "project"?: string; + "apiGroup"?: string; + /** + * Kind is the type of resource being referenced + */ + "kind": string; + /** + * Name is the name of resource being referenced + */ + "name": string; + /** + * Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace\'s owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + */ + "namespace"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6219,19 +6578,59 @@ declare class StorageV1AccessKeyScopeProject { }[]; constructor(); } -declare class StorageV1AccessKeyScopeRole { +declare class V1VolumeResourceRequirements { /** - * Projects specifies the projects the access key should have access to. + * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ - "projects"?: Array; + "limits"?: { + [key: string]: string; + }; /** - * Role is the name of the role to apply to the access key scope. Possible enum values: - `\"agent\"` - `\"loft-cli\"` - `\"network-peer\"` - `\"runner\"` - `\"vcluster\"` + * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ */ - "role"?: StorageV1AccessKeyScopeRoleRoleEnum; + "requests"?: { + [key: string]: string; + }; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1PersistentVolumeClaimSpec { /** - * VirtualClusters specifies the virtual clusters the access key is allowed to access. + * accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 */ - "virtualClusters"?: Array; + "accessModes"?: Array; + "dataSource"?: V1TypedLocalObjectReference; + "dataSourceRef"?: V1TypedObjectReference; + "resources"?: V1VolumeResourceRequirements; + "selector"?: V1LabelSelector; + /** + * storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + */ + "storageClassName"?: string; + /** + * volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it\'s not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). + */ + "volumeAttributesClassName"?: string; + /** + * volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. Possible enum values: - `\"Block\"` means the volume will not be formatted with a filesystem and will remain a raw block device. - `\"Filesystem\"` means the volume will be or is formatted with a filesystem. + */ + "volumeMode"?: V1PersistentVolumeClaimSpecVolumeModeEnum; + /** + * volumeName is the binding reference to the PersistentVolume backing this claim. + */ + "volumeName"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6247,22 +6646,25 @@ declare class StorageV1AccessKeyScopeRole { }[]; constructor(); } -declare enum StorageV1AccessKeyScopeRoleRoleEnum { - Agent = "agent", - LoftCli = "loft-cli", - NetworkPeer = "network-peer", - Runner = "runner", - Vcluster = "vcluster" +declare enum V1PersistentVolumeClaimSpecAccessModesEnum { + ReadOnlyMany = "ReadOnlyMany", + ReadWriteMany = "ReadWriteMany", + ReadWriteOnce = "ReadWriteOnce", + ReadWriteOncePod = "ReadWriteOncePod" } -declare class StorageV1AccessKeyVirtualCluster { +declare enum V1PersistentVolumeClaimSpecVolumeModeEnum { + Block = "Block", + Filesystem = "Filesystem" +} +declare class V1ModifyVolumeStatus { /** - * Name of the virtual cluster. Empty means all virtual clusters. + * status is the status of the ControllerModifyVolume operation. It can be in any of following states: - Pending Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as the specified VolumeAttributesClass not existing. - InProgress InProgress indicates that the volume is being modified. - Infeasible Infeasible indicates that the request has been rejected as invalid by the CSI driver. To resolve the error, a valid VolumeAttributesClass needs to be specified. Note: New statuses can be added in the future. Consumers should check for unknown statuses and fail appropriately. Possible enum values: - `\"InProgress\"` InProgress indicates that the volume is being modified - `\"Infeasible\"` Infeasible indicates that the request has been rejected as invalid by the CSI driver. To resolve the error, a valid VolumeAttributesClass needs to be specified - `\"Pending\"` Pending indicates that the PersistentVolumeClaim cannot be modified due to unmet requirements, such as the specified VolumeAttributesClass not existing */ - "name"?: string; + "status": V1ModifyVolumeStatusStatusEnum; /** - * Namespace of the virtual cluster. Empty means all namespaces. + * targetVolumeAttributesClassName is the name of the VolumeAttributesClass the PVC currently being reconciled */ - "namespace"?: string; + "targetVolumeAttributesClassName"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6278,19 +6680,30 @@ declare class StorageV1AccessKeyVirtualCluster { }[]; constructor(); } -declare class StorageV1GroupResources { +declare enum V1ModifyVolumeStatusStatusEnum { + InProgress = "InProgress", + Infeasible = "Infeasible", + Pending = "Pending" +} +declare class V1PersistentVolumeClaimCondition { /** - * Group is the name of the API group that contains the resources. The empty string represents the core API group. + * lastProbeTime is the time we probed the condition. */ - "group"?: string; + "lastProbeTime"?: Date; /** - * ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched. + * lastTransitionTime is the time the condition transitioned from one status to another. */ - "resourceNames"?: Array; + "lastTransitionTime"?: Date; /** - * Resources is a list of resources this rule applies to. For example: \'pods\' matches pods. \'pods/log\' matches the log subresource of pods. \'*\' matches all resources and their subresources. \'pods/_*\' matches all subresources of pods. \'*_/scale\' matches all scale subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. An empty list implies all resources and subresources in this API groups apply. + * message is the human-readable message indicating details about last transition. */ - "resources"?: Array; + "message"?: string; + /** + * reason is a unique, this should be a short, machine understandable string that gives the reason for condition\'s last transition. If it reports \"Resizing\" that means the underlying persistent volume is being resized. + */ + "reason"?: string; + "status": string; + "type": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6306,35 +6719,42 @@ declare class StorageV1GroupResources { }[]; constructor(); } -declare class StorageV1AccessKeyScopeRule { +declare class V1PersistentVolumeClaimStatus { /** - * Cluster that this rule matches. Only applies to cluster requests. If this is set, no requests for non cluster requests are allowed. An empty cluster means no restrictions will apply. + * accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 */ - "cluster"?: string; + "accessModes"?: Array; /** - * Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace. + * allocatedResourceStatuses stores status of resource being resized for the given PVC. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. ClaimResourceStatus can be in any of following states: - ControllerResizeInProgress: State set when resize controller starts resizing the volume in control-plane. - ControllerResizeFailed: State set when resize has failed in resize controller with a terminal error. - NodeResizePending: State set when resize controller has finished resizing the volume but further resizing of volume is needed on the node. - NodeResizeInProgress: State set when kubelet starts resizing the volume. - NodeResizeFailed: State set when resizing has failed in kubelet with a terminal error. Transient errors don\'t set NodeResizeFailed. For example: if expanding a PVC for more capacity - this field can be one of the following states: - pvc.status.allocatedResourceStatus[\'storage\'] = \"ControllerResizeInProgress\" - pvc.status.allocatedResourceStatus[\'storage\'] = \"ControllerResizeFailed\" - pvc.status.allocatedResourceStatus[\'storage\'] = \"NodeResizePending\" - pvc.status.allocatedResourceStatus[\'storage\'] = \"NodeResizeInProgress\" - pvc.status.allocatedResourceStatus[\'storage\'] = \"NodeResizeFailed\" When this field is not set, it means that no resize operation is in progress for the given PVC. A controller that receives PVC update with previously unknown resourceName or ClaimResourceStatus should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. */ - "namespaces"?: Array; + "allocatedResourceStatuses"?: { + [key: string]: string; + }; /** - * NonResourceURLs is a set of URL paths that should be checked. *s are allowed, but only as the full, final step in the path. Examples: \"/metrics\" - Log requests for apiserver metrics \"/healthz*\" - Log all health checks + * allocatedResources tracks the resources allocated to a PVC including its capacity. Key names follow standard Kubernetes label syntax. Valid values are either: * Un-prefixed keys: - storage - the capacity of the volume. * Custom resources must use implementation-defined prefixed names such as \"example.com/my-custom-resource\" Apart from above values - keys that are unprefixed or have kubernetes.io prefix are considered reserved and hence may not be used. Capacity reported here may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. A controller that receives PVC update with previously unknown resourceName should ignore the update for the purpose it was designed. For example - a controller that only is responsible for resizing capacity of the volume, should ignore PVC updates that change other valid resources associated with PVC. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. */ - "nonResourceURLs"?: Array; + "allocatedResources"?: { + [key: string]: string; + }; /** - * RequestTargets is a list of request targets that are allowed. An empty list implies every request. + * capacity represents the actual resources of the underlying volume. */ - "requestTargets"?: Array; + "capacity"?: { + [key: string]: string; + }; /** - * Resources that this rule matches. An empty list implies all kinds in all API groups. + * conditions is the current Condition of persistent volume claim. If underlying persistent volume is being resized then the Condition will be set to \'Resizing\'. */ - "resources"?: Array; + "conditions"?: Array; /** - * The verbs that match this rule. An empty list implies every verb. + * currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim This is a beta field and requires enabling VolumeAttributesClass feature (off by default). */ - "verbs"?: Array; + "currentVolumeAttributesClassName"?: string; + "modifyVolumeStatus"?: V1ModifyVolumeStatus; /** - * VirtualClusters that this rule matches. Only applies to virtual cluster requests. An empty list means no restrictions will apply. + * phase represents the current phase of PersistentVolumeClaim. Possible enum values: - `\"Bound\"` used for PersistentVolumeClaims that are bound - `\"Lost\"` used for PersistentVolumeClaims that lost their underlying PersistentVolume. The claim was bound to a PersistentVolume and this volume does not exist any longer and all data on it was lost. - `\"Pending\"` used for PersistentVolumeClaims that are not yet bound */ - "virtualClusters"?: Array; + "phase"?: V1PersistentVolumeClaimStatusPhaseEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6350,15 +6770,29 @@ declare class StorageV1AccessKeyScopeRule { }[]; constructor(); } -declare class StorageV1AccessKeyScopeSpace { +declare enum V1PersistentVolumeClaimStatusAccessModesEnum { + ReadOnlyMany = "ReadOnlyMany", + ReadWriteMany = "ReadWriteMany", + ReadWriteOnce = "ReadWriteOnce", + ReadWriteOncePod = "ReadWriteOncePod" +} +declare enum V1PersistentVolumeClaimStatusPhaseEnum { + Bound = "Bound", + Lost = "Lost", + Pending = "Pending" +} +declare class V1PersistentVolumeClaim { /** - * Project is the name of the project. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "project"?: string; + "apiVersion"?: string; /** - * Space is the name of the space. You can specify * to select all spaces. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "space"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: V1PersistentVolumeClaimSpec; + "status"?: V1PersistentVolumeClaimStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6374,15 +6808,19 @@ declare class StorageV1AccessKeyScopeSpace { }[]; constructor(); } -declare class StorageV1AccessKeyScopeVirtualCluster { +declare class V1NodeSelectorRequirement { /** - * Project is the name of the project. + * The label key that the selector applies to. */ - "project"?: string; + "key": string; /** - * VirtualCluster is the name of the virtual cluster to access. You can specify * to select all virtual clusters. + * Represents a key\'s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. Possible enum values: - `\"DoesNotExist\"` - `\"Exists\"` - `\"Gt\"` - `\"In\"` - `\"Lt\"` - `\"NotIn\"` */ - "virtualCluster"?: string; + "operator": V1NodeSelectorRequirementOperatorEnum; + /** + * An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + */ + "values"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6398,35 +6836,23 @@ declare class StorageV1AccessKeyScopeVirtualCluster { }[]; constructor(); } -declare class StorageV1AccessKeyScope { - /** - * AllowLoftCLI allows certain read-only management requests to make sure loft cli works correctly with this specific access key. Deprecated: Use the `roles` field instead ```yaml # Example: roles: - role: loftCLI ``` - */ - "allowLoftCli"?: boolean; - /** - * Clusters specifies the project cluster the access key is allowed to access. - */ - "clusters"?: Array; - /** - * Projects specifies the projects the access key should have access to. - */ - "projects"?: Array; - /** - * Roles is a set of managed permissions to apply to the access key. - */ - "roles"?: Array; - /** - * DEPRECATED: Use Projects, Spaces and VirtualClusters instead Rules specifies the rules that should apply to the access key. - */ - "rules"?: Array; +declare enum V1NodeSelectorRequirementOperatorEnum { + DoesNotExist = "DoesNotExist", + Exists = "Exists", + Gt = "Gt", + In = "In", + Lt = "Lt", + NotIn = "NotIn" +} +declare class V1NodeSelectorTerm { /** - * Spaces specifies the spaces the access key is allowed to access. + * A list of node selector requirements by node\'s labels. */ - "spaces"?: Array; + "matchExpressions"?: Array; /** - * VirtualClusters specifies the virtual clusters the access key is allowed to access. + * A list of node selector requirements by node\'s fields. */ - "virtualClusters"?: Array; + "matchFields"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6442,12 +6868,11 @@ declare class StorageV1AccessKeyScope { }[]; constructor(); } -declare class ManagementV1DirectClusterEndpointTokenSpec { - "scope"?: StorageV1AccessKeyScope; +declare class V1NodeSelector { /** - * The time to life for this access token in seconds + * Required. A list of node selector terms. The terms are ORed. */ - "ttl"?: number; + "nodeSelectorTerms": Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6463,8 +6888,12 @@ declare class ManagementV1DirectClusterEndpointTokenSpec { }[]; constructor(); } -declare class ManagementV1DirectClusterEndpointTokenStatus { - "token"?: string; +declare class V1PreferredSchedulingTerm { + "preference": V1NodeSelectorTerm; + /** + * Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + */ + "weight": number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6480,18 +6909,12 @@ declare class ManagementV1DirectClusterEndpointTokenStatus { }[]; constructor(); } -declare class ManagementV1DirectClusterEndpointToken { +declare class V1NodeAffinity { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1DirectClusterEndpointTokenSpec; - "status"?: ManagementV1DirectClusterEndpointTokenStatus; + "preferredDuringSchedulingIgnoredDuringExecution"?: Array; + "requiredDuringSchedulingIgnoredDuringExecution"?: V1NodeSelector; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6507,63 +6930,25 @@ declare class ManagementV1DirectClusterEndpointToken { }[]; constructor(); } -declare class ManagementV1EventStatus { - /** - * Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level. - */ - "annotations"?: { - [key: string]: string; - }; - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * Unique audit ID, generated for each request. - */ - "auditID": string; - "impersonatedUser"?: V1UserInfo; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - "kind"?: string; - /** - * AuditLevel at which event was generated - */ - "level": string; - "objectRef"?: AuditV1ObjectReference; - "requestObject"?: RuntimeUnknown; - /** - * MicroTime is version of Time with microsecond level precision. - */ - "requestReceivedTimestamp"?: Date; - /** - * RequestURI is the request URI as sent by the client to a server. - */ - "requestURI": string; - "responseObject"?: RuntimeUnknown; - "responseStatus"?: V1Status; - /** - * Source IPs, from where the request originated and intermediate proxies. - */ - "sourceIPs"?: Array; +declare class V1PodAffinityTerm { + "labelSelector"?: V1LabelSelector; /** - * Stage of the request handling when this event instance was generated. + * MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod\'s pod (anti) affinity. Keys that don\'t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn\'t set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). */ - "stage": string; + "matchLabelKeys"?: Array; /** - * MicroTime is version of Time with microsecond level precision. + * MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod\'s pod (anti) affinity. Keys that don\'t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn\'t set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). */ - "stageTimestamp"?: Date; - "user": V1UserInfo; + "mismatchLabelKeys"?: Array; + "namespaceSelector"?: V1LabelSelector; /** - * UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted. + * namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod\'s namespace\". */ - "userAgent"?: string; + "namespaces"?: Array; /** - * Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method. + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. */ - "verb": string; + "topologyKey": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6579,21 +6964,12 @@ declare class ManagementV1EventStatus { }[]; constructor(); } -declare class ManagementV1Event { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - "kind"?: string; - "metadata"?: V1ObjectMeta; +declare class V1WeightedPodAffinityTerm { + "podAffinityTerm": V1PodAffinityTerm; /** - * EventSpec holds the specification + * weight associated with matching the corresponding podAffinityTerm, in the range 1-100. */ - "spec"?: any; - "status"?: ManagementV1EventStatus; + "weight": number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6609,33 +6985,15 @@ declare class ManagementV1Event { }[]; constructor(); } -declare class ManagementV1FeatureStatus { - /** - * Compatibility contains a series of semver compatibility constraints - */ - "compatibility"?: string; - "description"?: string; - "displayName"?: string; - /** - * Internal marks internal features that should not be shown on the license view - */ - "internal"?: boolean; - /** - * Labels contains a list of labels to be displayed for this feature (e.g. alpha, beta) - */ - "labels"?: Array; - /** - * Name is the name of the feature (FeatureName) This cannot be FeatureName because it needs to be downward compatible e.g. older Loft version doesn\'t know a newer feature but it will still be received and still needs to be rendered in the license view - */ - "name": string; +declare class V1PodAffinity { /** - * Status shows the status of the feature (see type FeatureStatus) + * The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. */ - "status"?: string; + "preferredDuringSchedulingIgnoredDuringExecution"?: Array; /** - * Used marks features that are currently used in the product + * If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. */ - "used"?: boolean; + "requiredDuringSchedulingIgnoredDuringExecution"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6651,21 +7009,15 @@ declare class ManagementV1FeatureStatus { }[]; constructor(); } -declare class ManagementV1Feature { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; +declare class V1PodAntiAffinity { /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; + "preferredDuringSchedulingIgnoredDuringExecution"?: Array; /** - * FeatureSpec holds the specification + * If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. */ - "spec"?: any; - "status"?: ManagementV1FeatureStatus; + "requiredDuringSchedulingIgnoredDuringExecution"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6681,15 +7033,10 @@ declare class ManagementV1Feature { }[]; constructor(); } -declare class ManagementV1IngressAuthTokenSpec { - /** - * Host is the host where the UI should get redirected - */ - "host"?: string; - /** - * Signature is the signature of the agent for the host - */ - "signature"?: string; +declare class V1Affinity { + "nodeAffinity"?: V1NodeAffinity; + "podAffinity"?: V1PodAffinity; + "podAntiAffinity"?: V1PodAntiAffinity; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6705,8 +7052,27 @@ declare class ManagementV1IngressAuthTokenSpec { }[]; constructor(); } -declare class ManagementV1IngressAuthTokenStatus { - "token"?: string; +declare class V1ContainerPort { + /** + * Number of port to expose on the pod\'s IP address. This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\". Possible enum values: - `\"SCTP\"` is the SCTP protocol. - `\"TCP\"` is the TCP protocol. - `\"UDP\"` is the UDP protocol. + */ + "protocol"?: V1ContainerPortProtocolEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6722,18 +7088,20 @@ declare class ManagementV1IngressAuthTokenStatus { }[]; constructor(); } -declare class ManagementV1IngressAuthToken { +declare enum V1ContainerPortProtocolEnum { + Sctp = "SCTP", + Tcp = "TCP", + Udp = "UDP" +} +declare class V1ContainerResizePolicy { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * Name of the resource to which this resource resize policy applies. Supported values: cpu, memory. */ - "apiVersion"?: string; + "resourceName": string; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1IngressAuthTokenSpec; - "status"?: ManagementV1IngressAuthTokenStatus; + "restartPolicy": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6749,19 +7117,15 @@ declare class ManagementV1IngressAuthToken { }[]; constructor(); } -declare class LicenseApiRequest { - /** - * Group is the api group. - */ - "group"?: string; +declare class V1ConfigMapEnvSource { /** - * Resource is the resource name for the request. + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ - "resource"?: string; + "name"?: string; /** - * Verbs is the list of verbs for the request. + * Specify whether the ConfigMap must be defined */ - "verbs"?: Array; + "optional"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6777,15 +7141,15 @@ declare class LicenseApiRequest { }[]; constructor(); } -declare class LicenseApiAnalytics { +declare class V1SecretEnvSource { /** - * Endpoint is the endpoint for the analytics server. + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ - "endpoint"?: string; + "name"?: string; /** - * Requests is a slice of requested resources to return analytics for. + * Specify whether the Secret must be defined */ - "requests"?: Array; + "optional"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6801,19 +7165,13 @@ declare class LicenseApiAnalytics { }[]; constructor(); } -declare class LicenseApiResourceCount { - /** - * Active specifies the number of currently active resource (non-sleeping). - */ - "active"?: number; - /** - * TotalCreated is a continuous counter of the amount of resources ever created. - */ - "created"?: number; +declare class V1EnvFromSource { + "configMapRef"?: V1ConfigMapEnvSource; /** - * Total specifies the number of currently existing resources. + * An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. */ - "total"?: number; + "prefix"?: string; + "secretRef"?: V1SecretEnvSource; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6829,20 +7187,19 @@ declare class LicenseApiResourceCount { }[]; constructor(); } -declare class LicenseApiBlockRequest { +declare class V1ConfigMapKeySelector { /** - * Group is the api group. + * The key to select. */ - "group"?: string; - "overage"?: LicenseApiResourceCount; + "key": string; /** - * Resource is the resource name for the request. + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ - "resource"?: string; + "name"?: string; /** - * Verbs is the list of verbs for the request. + * Specify whether the ConfigMap or its key must be defined */ - "verbs"?: Array; + "optional"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6858,13 +7215,15 @@ declare class LicenseApiBlockRequest { }[]; constructor(); } -declare class LicenseApiLicenseAPIRoute { +declare class V1ObjectFieldSelector { /** - * Tells the frontend whether to make a direct request or to make it via the backend (via generic license api request) + * Version of the schema the FieldPath is written in terms of, defaults to \"v1\". */ - "direct"?: boolean; - "method"?: string; - "url"?: string; + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6880,15 +7239,19 @@ declare class LicenseApiLicenseAPIRoute { }[]; constructor(); } -declare class LicenseApiLicenseAPIRoutes { - "chatAuth"?: LicenseApiLicenseAPIRoute; - "checkout"?: LicenseApiLicenseAPIRoute; - "featureDetails"?: LicenseApiLicenseAPIRoute; - "featurePreview"?: LicenseApiLicenseAPIRoute; - "featureSetup"?: LicenseApiLicenseAPIRoute; - "moduleActivation"?: LicenseApiLicenseAPIRoute; - "modulePreview"?: LicenseApiLicenseAPIRoute; - "portal"?: LicenseApiLicenseAPIRoute; +declare class V1ResourceFieldSelector { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to \"1\" + */ + "divisor"?: string; + /** + * Required: resource to select + */ + "resource": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6904,25 +7267,11 @@ declare class LicenseApiLicenseAPIRoutes { }[]; constructor(); } -declare class LicenseApiFeature { - /** - * Compatibility contains a series of semver compatibility constraints - */ - "compatibility"?: string; - "description"?: string; - "displayName"?: string; - /** - * Labels contains a list of labels to be displayed for this feature (e.g. alpha, beta) - */ - "labels"?: Array; - /** - * Name is the name of the feature (FeatureName) This cannot be FeatureName because it needs to be downward compatible e.g. older Loft version doesn\'t know a newer feature but it will still be received and still needs to be rendered in the license view - */ - "name": string; - /** - * Status shows the status of the feature (see type FeatureStatus) - */ - "status"?: string; +declare class V1EnvVarSource { + "configMapKeyRef"?: V1ConfigMapKeySelector; + "fieldRef"?: V1ObjectFieldSelector; + "resourceFieldRef"?: V1ResourceFieldSelector; + "secretKeyRef"?: V1SecretKeySelector; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6938,16 +7287,16 @@ declare class LicenseApiFeature { }[]; constructor(); } -declare class LicenseApiLimit { +declare class V1EnvVar { /** - * DisplayName is for display purposes. + * Name of the environment variable. Must be a C_IDENTIFIER. */ - "displayName"?: string; + "name": string; /** - * Name is the name of the resource (ResourceName) + * Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\". */ - "name"?: string; - "quantity"?: LicenseApiResourceCount; + "value"?: string; + "valueFrom"?: V1EnvVarSource; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6963,15 +7312,11 @@ declare class LicenseApiLimit { }[]; constructor(); } -declare class LicenseApiModule { - "displayName"?: string; - "features"?: Array; - "limits"?: Array; +declare class V1ExecAction { /** - * Name of the module (ModuleName) + * Command is the command line to execute inside the container, the working directory for the command is root (\'/\') in the container\'s filesystem. The command is simply exec\'d, it is not run inside a shell, so traditional shell instructions (\'|\', etc) won\'t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. */ - "name": string; - "status"?: string; + "command"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -6987,19 +7332,16 @@ declare class LicenseApiModule { }[]; constructor(); } -declare class LicenseApiInvoice { - /** - * Currency specifies the currency of Total in 3-character ISO 4217 code Default is: \"\" (representing USD) - */ - "currency"?: string; +export type IntOrString = number | string; +declare class V1HTTPHeader { /** - * Date contains the unix timestamp marking the date this invoices was or will be created + * The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. */ - "date"?: number; + "name": string; /** - * Total is the total of the invoice + * The header field value */ - "total"?: number; + "value": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7015,15 +7357,27 @@ declare class LicenseApiInvoice { }[]; constructor(); } -declare class LicenseApiPlanPeriod { +declare class V1HTTPGetAction { /** - * CurrentPeriodEnd contains the unix timestamp marking the end of the current period + * Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead. */ - "end"?: number; + "host"?: string; /** - * CurrentPeriodStart contains the unix timestamp marking the start of the current period + * Custom headers to set in the request. HTTP allows repeated headers. */ - "start"?: number; + "httpHeaders"?: Array; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number. + */ + "port": IntOrString; + /** + * Scheme to use for connecting to the host. Defaults to HTTP. Possible enum values: - `\"HTTP\"` means that the scheme used will be http:// - `\"HTTPS\"` means that the scheme used will be https:// + */ + "scheme"?: V1HTTPGetActionSchemeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7039,15 +7393,15 @@ declare class LicenseApiPlanPeriod { }[]; constructor(); } -declare class LicenseApiPlanExpiration { - /** - * ExpiresAt is the unix timestamp of when the plan expires - */ - "expiresAt"?: number; +declare enum V1HTTPGetActionSchemeEnum { + Http = "HTTP", + Https = "HTTPS" +} +declare class V1SleepAction { /** - * UpgradesTo states the name of the plan that is replacing the current one upon its expiration If this is nil, then this plan just expires (i.e. the subscription may be canceled, paused, etc.) + * Seconds is the number of seconds to sleep. */ - "upgradesTo"?: string; + "seconds": number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7063,27 +7417,15 @@ declare class LicenseApiPlanExpiration { }[]; constructor(); } -declare class LicenseApiPriceTier { - /** - * Currency specifies the currency of UnitPrice and FlatFee in 3-character ISO 4217 code Default is: \"\" (representing USD) - */ - "currency"?: string; - /** - * FlatFee is the flat fee for this tier - */ - "flatFee"?: number; - /** - * MaxQuantity is the max quantity that can be purchased - */ - "max"?: number; +declare class V1TCPSocketAction { /** - * MinQuantity is the quantity included in this plan + * Optional: Host name to connect to, defaults to the pod IP. */ - "min"?: number; + "host"?: string; /** - * UnitPrice is the price per unit in this tier + * IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number. */ - "unitPrice"?: number; + "port": IntOrString; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7099,15 +7441,11 @@ declare class LicenseApiPriceTier { }[]; constructor(); } -declare class LicenseApiTierResource { - /** - * Name of the resource (ResourceName) - */ - "name"?: string; - /** - * Status defines which resources will be counted towards the limit (e.g. active, total, total created etc.) - */ - "status"?: string; +declare class V1LifecycleHandler { + "exec"?: V1ExecAction; + "httpGet"?: V1HTTPGetAction; + "sleep"?: V1SleepAction; + "tcpSocket"?: V1TCPSocketAction; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7123,37 +7461,9 @@ declare class LicenseApiTierResource { }[]; constructor(); } -declare class LicenseApiPlanPrice { - "exp"?: LicenseApiPlanExpiration; - /** - * ID of the price - */ - "id"?: string; - /** - * Interval contains the time span of each period (e.g. month, year) - */ - "interval"?: string; - /** - * IntervalCount specifies if the number of intervals (e.g. 3 [months]) - */ - "intervalCount"?: number; - /** - * Quantity sets the quantity the TierResource is supposed to be at If this is the active price, then this is the subscription quantity (currently purchased quantity) - */ - "quantity"?: number; - "resource"?: LicenseApiTierResource; - /** - * Status is the status of the price (PlanStatus) If the plan is active, one of its prices must be active as well - */ - "status"?: string; - /** - * TierMode defines how tiers should be used - */ - "tierMode"?: string; - /** - * Tiers is a list of tiers in this plan - */ - "tiers"?: Array; +declare class V1Lifecycle { + "postStart"?: V1LifecycleHandler; + "preStop"?: V1LifecycleHandler; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7169,31 +7479,15 @@ declare class LicenseApiPlanPrice { }[]; constructor(); } -declare class LicenseApiTrial { - /** - * DisplayName is a display name for the trial - */ - "displayName"?: string; - /** - * DowngradesTo states the name of the plan that is replacing the current one once the trial expires If this is nil, then this plan just expires (i.e. the subscription may be canceled, paused, etc.) - */ - "downgradesTo"?: string; - /** - * End is the unix timestamp stating when the trial will end or ended - */ - "end"?: number; - /** - * ID is the unique id of this trial - */ - "id"?: string; +declare class V1GRPCAction { /** - * Start is the unix timestamp stating when the trial was started + * Port number of the gRPC service. Number must be in the range 1 to 65535. */ - "start"?: number; + "port": number; /** - * Status is the status of this trial (TrialStatus) + * Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC. */ - "status"?: string; + "service"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7209,38 +7503,35 @@ declare class LicenseApiTrial { }[]; constructor(); } -declare class LicenseApiPlan { - /** - * AddOns are plans that can be added to this plan - */ - "addons"?: Array; +declare class V1Probe { + "exec"?: V1ExecAction; /** - * DisplayName is the display name of the plan + * Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. */ - "displayName"?: string; + "failureThreshold"?: number; + "grpc"?: V1GRPCAction; + "httpGet"?: V1HTTPGetAction; /** - * Features is a list of features included in the plan + * Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes */ - "features"?: Array; + "initialDelaySeconds"?: number; /** - * ID of the plan + * How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. */ - "id"?: string; - "invoice"?: LicenseApiInvoice; + "periodSeconds"?: number; /** - * Limits is a list of resources included in the plan and their limits + * Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. */ - "limits"?: Array; - "period"?: LicenseApiPlanPeriod; + "successThreshold"?: number; + "tcpSocket"?: V1TCPSocketAction; /** - * Prices provides details about the available prices (depending on the interval, for example) + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod\'s terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. */ - "prices"?: Array; + "terminationGracePeriodSeconds"?: number; /** - * Status is the status of the plan There should only be 1 active plan at the top-level (not including AddOns) The respective price in Prices will have the active status as well + * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes */ - "status"?: string; - "trial"?: LicenseApiTrial; + "timeoutSeconds"?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7256,45 +7547,973 @@ declare class LicenseApiPlan { }[]; constructor(); } -declare class LicenseApiLicense { - "analytics"?: LicenseApiAnalytics; +declare class V1VolumeDevice { /** - * Announcements is a map string/string such that we can easily add any additional data without needing to change types. For now, we will use the keys \"name\" and \"content\". + * devicePath is the path inside of the container that the device will be mapped to. */ - "announcement"?: Array; + "devicePath": string; /** - * BlockRequests specifies which requests the product should block when a limit is exceeded. + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1VolumeMount { + /** + * Path within the container at which the volume should be mounted. Must not contain \':\'. + */ + "mountPath": string; + /** + * mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified (which defaults to None). Possible enum values: - `\"Bidirectional\"` means that the volume in a container will receive new mounts from the host or other containers, and its own mounts will be propagated from the container to the host or other containers. Note that this mode is recursively applied to all mounts in the volume (\"rshared\" in Linux terminology). - `\"HostToContainer\"` means that the volume in a container will receive new mounts from the host or other containers, but filesystems mounted inside the container won\'t be propagated to the host or other containers. Note that this mode is recursively applied to all mounts in the volume (\"rslave\" in Linux terminology). - `\"None\"` means that the volume in a container will not receive new mounts from the host or other containers, and filesystems mounted inside the container won\'t be propagated to the host or other containers. Note that this mode corresponds to \"private\" in Linux terminology. + */ + "mountPropagation"?: V1VolumeMountMountPropagationEnum; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled recursively. If ReadOnly is false, this field has no meaning and must be unspecified. If ReadOnly is true, and this field is set to Disabled, the mount is not made recursively read-only. If this field is set to IfPossible, the mount is made recursively read-only, if it is supported by the container runtime. If this field is set to Enabled, the mount is made recursively read-only if it is supported by the container runtime, otherwise the pod will not be started and an error will be generated to indicate the reason. If this field is set to IfPossible or Enabled, MountPropagation must be set to None (or be unspecified, which defaults to None). If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container\'s volume should be mounted. Defaults to \"\" (volume\'s root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container\'s volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container\'s environment. Defaults to \"\" (volume\'s root). SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare enum V1VolumeMountMountPropagationEnum { + Bidirectional = "Bidirectional", + HostToContainer = "HostToContainer", + None = "None" +} +declare class V1Container { + /** + * Arguments to the entrypoint. The container image\'s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * Entrypoint array. Not executed within a shell. The container image\'s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. Cannot be updated. + */ + "env"?: Array; + /** + * List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. + */ + "envFrom"?: Array; + /** + * Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. + */ + "image"?: string; + /** + * Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn\'t present on disk. Container will fail if the image isn\'t present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn\'t present + */ + "imagePullPolicy"?: V1ContainerImagePullPolicyEnum; + "lifecycle"?: V1Lifecycle; + "livenessProbe"?: V1Probe; + /** + * Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. + */ + "name": string; + /** + * List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated. + */ + "ports"?: Array; + "readinessProbe"?: V1Probe; + /** + * Resources resize policy for the container. + */ + "resizePolicy"?: Array; + "resources"?: V1ResourceRequirements; + /** + * RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod\'s restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. + */ + "restartPolicy"?: string; + "securityContext"?: V1SecurityContext; + "startupProbe"?: V1Probe; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false + */ + "stdinOnce"?: boolean; + /** + * Optional: Path at which the file to which the container\'s termination message will be written is mounted into the container\'s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. Possible enum values: - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents. - `\"File\"` is the default behavior and will set the container status message to the contents of the container\'s terminationMessagePath when the container exits. + */ + "terminationMessagePolicy"?: V1ContainerTerminationMessagePolicyEnum; + /** + * Whether this container should allocate a TTY for itself, also requires \'stdin\' to be true. Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array; + /** + * Pod volumes to mount into the container\'s filesystem. Cannot be updated. + */ + "volumeMounts"?: Array; + /** + * Container\'s working directory. If not specified, the container runtime\'s default will be used, which might be configured in the container image. Cannot be updated. + */ + "workingDir"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare enum V1ContainerImagePullPolicyEnum { + Always = "Always", + IfNotPresent = "IfNotPresent", + Never = "Never" +} +declare enum V1ContainerTerminationMessagePolicyEnum { + FallbackToLogsOnError = "FallbackToLogsOnError", + File = "File" +} +declare class V1EphemeralContainer { + /** + * Arguments to the entrypoint. The image\'s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * Entrypoint array. Not executed within a shell. The image\'s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. Cannot be updated. + */ + "env"?: Array; + /** + * List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. + */ + "envFrom"?: Array; + /** + * Container image name. More info: https://kubernetes.io/docs/concepts/containers/images + */ + "image"?: string; + /** + * Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn\'t present on disk. Container will fail if the image isn\'t present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn\'t present + */ + "imagePullPolicy"?: V1EphemeralContainerImagePullPolicyEnum; + "lifecycle"?: V1Lifecycle; + "livenessProbe"?: V1Probe; + /** + * Name of the ephemeral container specified as a DNS_LABEL. This name must be unique among all containers, init containers and ephemeral containers. + */ + "name": string; + /** + * Ports are not allowed for ephemeral containers. + */ + "ports"?: Array; + "readinessProbe"?: V1Probe; + /** + * Resources resize policy for the container. + */ + "resizePolicy"?: Array; + "resources"?: V1ResourceRequirements; + /** + * Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers. + */ + "restartPolicy"?: string; + "securityContext"?: V1SecurityContext; + "startupProbe"?: V1Probe; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false + */ + "stdinOnce"?: boolean; + /** + * If set, the name of the container from PodSpec that this ephemeral container targets. The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. If not set then the ephemeral container uses the namespaces configured in the Pod spec. The container runtime must implement support for this feature. If the runtime does not support namespace targeting then the result of setting this field is undefined. + */ + "targetContainerName"?: string; + /** + * Optional: Path at which the file to which the container\'s termination message will be written is mounted into the container\'s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. Possible enum values: - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents. - `\"File\"` is the default behavior and will set the container status message to the contents of the container\'s terminationMessagePath when the container exits. + */ + "terminationMessagePolicy"?: V1EphemeralContainerTerminationMessagePolicyEnum; + /** + * Whether this container should allocate a TTY for itself, also requires \'stdin\' to be true. Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array; + /** + * Pod volumes to mount into the container\'s filesystem. Subpath mounts are not allowed for ephemeral containers. Cannot be updated. + */ + "volumeMounts"?: Array; + /** + * Container\'s working directory. If not specified, the container runtime\'s default will be used, which might be configured in the container image. Cannot be updated. + */ + "workingDir"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare enum V1EphemeralContainerImagePullPolicyEnum { + Always = "Always", + IfNotPresent = "IfNotPresent", + Never = "Never" +} +declare enum V1EphemeralContainerTerminationMessagePolicyEnum { + FallbackToLogsOnError = "FallbackToLogsOnError", + File = "File" +} +declare class V1HostAlias { + /** + * Hostnames for the above IP address. + */ + "hostnames"?: Array; + /** + * IP address of the host file entry. + */ + "ip": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1LocalObjectReference { + /** + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + */ + "name"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1PodDNSConfigOption { + /** + * Required. + */ + "name"?: string; + "value"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1PodDNSConfig { + /** + * A list of DNS name server IP addresses. This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed. + */ + "nameservers"?: Array; + /** + * A list of DNS resolver options. This will be merged with the base options generated from DNSPolicy. Duplicated entries will be removed. Resolution options given in Options will override those that appear in the base DNSPolicy. + */ + "options"?: Array; + /** + * A list of DNS search domains for host-name lookup. This will be appended to the base search paths generated from DNSPolicy. Duplicated search paths will be removed. + */ + "searches"?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1PodOS { + /** + * Name is the name of the operating system. The currently supported values are linux and windows. Additional value may be defined in future and can be one of: https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration Clients should expect to handle additional values and treat unrecognized values in this field as os: null + */ + "name": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1PodReadinessGate { + /** + * ConditionType refers to a condition in the pod\'s condition list with matching type. + */ + "conditionType": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1PodResourceClaim { + /** + * Name uniquely identifies this resource claim inside the pod. This must be a DNS_LABEL. + */ + "name": string; + /** + * ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod. Exactly one of ResourceClaimName and ResourceClaimTemplateName must be set. + */ + "resourceClaimName"?: string; + /** + * ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. Exactly one of ResourceClaimName and ResourceClaimTemplateName must be set. + */ + "resourceClaimTemplateName"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1PodSchedulingGate { + /** + * Name of the scheduling gate. Each scheduling gate must have a unique name field. + */ + "name": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1Toleration { + /** + * Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. Possible enum values: - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController. - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler. - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler. + */ + "effect"?: V1TolerationEffectEnum; + /** + * Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. + */ + "key"?: string; + /** + * Operator represents a key\'s relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. Possible enum values: - `\"Equal\"` - `\"Exists\"` + */ + "operator"?: V1TolerationOperatorEnum; + /** + * TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. + */ + "tolerationSeconds"?: number; + /** + * Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + */ + "value"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare enum V1TolerationEffectEnum { + NoExecute = "NoExecute", + NoSchedule = "NoSchedule", + PreferNoSchedule = "PreferNoSchedule" +} +declare enum V1TolerationOperatorEnum { + Equal = "Equal", + Exists = "Exists" +} +declare class V1TopologySpreadConstraint { + "labelSelector"?: V1LabelSelector; + /** + * MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn\'t set. Keys that don\'t exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector. This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + */ + "matchLabelKeys"?: Array; + /** + * MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It\'s a required field. Default value is 1 and 0 is not allowed. + */ + "maxSkew": number; + /** + * MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats \"global minimum\" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won\'t schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule. For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so \"global minimum\" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew. + */ + "minDomains"?: number; + /** + * NodeAffinityPolicy indicates how we will treat Pod\'s nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. Possible enum values: - `\"Honor\"` means use this scheduling directive when calculating pod topology spread skew. - `\"Ignore\"` means ignore this scheduling directive when calculating pod topology spread skew. + */ + "nodeAffinityPolicy"?: V1TopologySpreadConstraintNodeAffinityPolicyEnum; + /** + * NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included. If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag. Possible enum values: - `\"Honor\"` means use this scheduling directive when calculating pod topology spread skew. - `\"Ignore\"` means ignore this scheduling directive when calculating pod topology spread skew. + */ + "nodeTaintsPolicy"?: V1TopologySpreadConstraintNodeTaintsPolicyEnum; + /** + * TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each as a \"bucket\", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is \"kubernetes.io/hostname\", each Node is a domain of that topology. And, if TopologyKey is \"topology.kubernetes.io/zone\", each zone is a domain of that topology. It\'s a required field. + */ + "topologyKey": string; + /** + * WhenUnsatisfiable indicates how to deal with a pod if it doesn\'t satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered \"Unsatisfiable\" for an incoming pod if and only if every possible node assignment for that pod would violate \"MaxSkew\" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won\'t make it *more* imbalanced. It\'s a required field. Possible enum values: - `\"DoNotSchedule\"` instructs the scheduler not to schedule the pod when constraints are not satisfied. - `\"ScheduleAnyway\"` instructs the scheduler to schedule the pod even if constraints are not satisfied. + */ + "whenUnsatisfiable": V1TopologySpreadConstraintWhenUnsatisfiableEnum; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare enum V1TopologySpreadConstraintNodeAffinityPolicyEnum { + Honor = "Honor", + Ignore = "Ignore" +} +declare enum V1TopologySpreadConstraintNodeTaintsPolicyEnum { + Honor = "Honor", + Ignore = "Ignore" +} +declare enum V1TopologySpreadConstraintWhenUnsatisfiableEnum { + DoNotSchedule = "DoNotSchedule", + ScheduleAnyway = "ScheduleAnyway" +} +declare class V1AWSElasticBlockStoreVolumeSource { + /** + * fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "fsType"?: string; + /** + * partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). + */ + "partition"?: number; + /** + * readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "readOnly"?: boolean; + /** + * volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "volumeID": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1AzureDiskVolumeSource { + /** + * cachingMode is the Host Caching mode: None, Read Only, Read Write. Possible enum values: - `\"None\"` - `\"ReadOnly\"` - `\"ReadWrite\"` + */ + "cachingMode"?: V1AzureDiskVolumeSourceCachingModeEnum; + /** + * diskName is the Name of the data disk in the blob storage + */ + "diskName": string; + /** + * diskURI is the URI of data disk in the blob storage + */ + "diskURI": string; + /** + * fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + */ + "fsType"?: string; + /** + * kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared Possible enum values: - `\"Dedicated\"` - `\"Managed\"` - `\"Shared\"` + */ + "kind"?: V1AzureDiskVolumeSourceKindEnum; + /** + * readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare enum V1AzureDiskVolumeSourceCachingModeEnum { + None = "None", + ReadOnly = "ReadOnly", + ReadWrite = "ReadWrite" +} +declare enum V1AzureDiskVolumeSourceKindEnum { + Dedicated = "Dedicated", + Managed = "Managed", + Shared = "Shared" +} +declare class V1AzureFileVolumeSource { + /** + * readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretName is the name of secret that contains Azure Storage Account Name and Key + */ + "secretName": string; + /** + * shareName is the azure share Name + */ + "shareName": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1CSIVolumeSource { + /** + * driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. + */ + "driver": string; + /** + * fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. + */ + "fsType"?: string; + "nodePublishSecretRef"?: V1LocalObjectReference; + /** + * readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). + */ + "readOnly"?: boolean; + /** + * volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver\'s documentation for supported values. */ - "block"?: Array; + "volumeAttributes"?: { + [key: string]: string; + }; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1CephFSVolumeSource { /** - * Buttons is a slice of license server endpoints (buttons) that the Loft instance may need to hit. Each Button contains the display text and link for the front end to work with. + * monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it */ - "buttons"?: Array; + "monitors": Array; /** - * DomainToken holds the JWT with the URL that the Loft instance is publicly available on. (via Loft router) + * path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / */ - "domainToken"?: string; + "path"?: string; + /** + * readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + */ + "readOnly"?: boolean; + /** + * secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + */ + "secretFile"?: string; + "secretRef"?: V1LocalObjectReference; + /** + * user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + */ + "user"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1CinderVolumeSource { + /** + * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ + "fsType"?: string; + /** + * readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ + "readOnly"?: boolean; + "secretRef"?: V1LocalObjectReference; + /** + * volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ + "volumeID": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1KeyToPath { + /** + * key is the key to project. + */ + "key": string; + /** + * mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + */ + "mode"?: number; + /** + * path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element \'..\'. May not start with the string \'..\'. + */ + "path": string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1ConfigMapVolumeSource { + /** + * defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + */ + "defaultMode"?: number; + /** + * items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. + */ + "items"?: Array; + /** + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + */ + "name"?: string; + /** + * optional specify whether the ConfigMap or its keys must be defined + */ + "optional"?: boolean; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1DownwardAPIVolumeFile { + "fieldRef"?: V1ObjectFieldSelector; + /** + * Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + */ + "mode"?: number; + /** + * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the \'..\' path. Must be utf-8 encoded. The first item of the relative path must not start with \'..\' + */ + "path": string; + "resourceFieldRef"?: V1ResourceFieldSelector; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1DownwardAPIVolumeSource { + /** + * Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + */ + "defaultMode"?: number; + /** + * Items is a list of downward API volume file + */ + "items"?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1EmptyDirVolumeSource { + /** + * medium represents what type of storage medium should back this directory. The default is \"\" which means to use the node\'s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + */ + "medium"?: string; + /** + * sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + */ + "sizeLimit"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1PersistentVolumeClaimTemplate { + "metadata"?: V1ObjectMeta; + "spec": V1PersistentVolumeClaimSpec; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1EphemeralVolumeSource { + "volumeClaimTemplate"?: V1PersistentVolumeClaimTemplate; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1FCVolumeSource { /** - * Entity holds a name for an organization, person or entity this product is licensed for. This will be displayed to the user. + * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. */ - "entity"?: string; + "fsType"?: string; /** - * InstanceID contains the instance id of the Loft instance + * lun is Optional: FC target lun number */ - "instance"?: string; + "lun"?: number; /** - * IsOffline indicates if the license is an offline license or not. + * readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. */ - "isOffline"?: boolean; + "readOnly"?: boolean; /** - * Modules is a list of modules. + * targetWWNs is Optional: FC target worldwide names (WWNs) */ - "modules"?: Array; + "targetWWNs"?: Array; /** - * Plans contains a list of plans + * wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. */ - "plans"?: Array; - "routes"?: LicenseApiLicenseAPIRoutes; + "wwids"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7310,14 +8529,26 @@ declare class LicenseApiLicense { }[]; constructor(); } -declare class ManagementV1LicenseStatus { - "license"?: LicenseApiLicense; +declare class V1FlexVolumeSource { /** - * ResourceUsage shows the current usage of license limit. + * driver is the name of the driver to use for this volume. */ - "resourceUsage"?: { - [key: string]: LicenseApiResourceCount; + "driver": string; + /** + * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script. + */ + "fsType"?: string; + /** + * options is Optional: this field holds extra command options if any. + */ + "options"?: { + [key: string]: string; }; + /** + * readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + "secretRef"?: V1LocalObjectReference; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7333,18 +8564,15 @@ declare class ManagementV1LicenseStatus { }[]; constructor(); } -declare class ManagementV1License { +declare class V1FlockerVolumeSource { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated */ - "apiVersion"?: string; + "datasetName"?: string; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: any; - "status"?: ManagementV1LicenseStatus; + "datasetUUID"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7360,63 +8588,51 @@ declare class ManagementV1License { }[]; constructor(); } -declare class UiV1UISettingsSpec { - /** - * AccentColor is the color value (ex: \"#12345\") to use for the accent - */ - "accentColor"?: string; - /** - * CustomCSS holds URLs with custom css files that should be included when loading the UI - */ - "customCss"?: Array; - /** - * CustomJavaScript holds URLs with custom js files that should be included when loading the UI - */ - "customJavaScript"?: Array; - /** - * DefaultVClusterVersion is the default version of vClusters - */ - "defaultVClusterVersion"?: string; - /** - * HasHelmRelease indicates whether loft has been installed via Helm - */ - "hasHelmRelease"?: boolean; - /** - * LegalTemplate is a text (html) string containing the legal template to prompt to users when authenticating to Loft - */ - "legalTemplate"?: string; - /** - * LoftVersion holds the current loft version - */ - "loftVersion"?: string; +declare class V1GCEPersistentDiskVolumeSource { /** - * LogoBackgroundColor is the color value (ex: \"#12345\") to use as the background color for the logo + * fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk */ - "logoBackgroundColor"?: string; + "fsType"?: string; /** - * LogoURL is url pointing to the logo to use in the Loft UI. This path must be accessible for clients accessing the Loft UI! + * partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk */ - "logoURL"?: string; + "partition"?: number; /** - * NavBarButtons holds extra nav bar buttons + * pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk */ - "navBarButtons"?: Array; + "pdName": string; /** - * Offline is true if loft is running in an airgapped environment + * readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk */ - "offline"?: boolean; + "readOnly"?: boolean; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1GitRepoVolumeSource { /** - * PrimaryColor is the color value (ex: \"#12345\") to use as the primary color + * directory is the target directory name. Must not contain or start with \'..\'. If \'.\' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. */ - "primaryColor"?: string; + "directory"?: string; /** - * Name is the name of the product + * repository is the URL */ - "productName"?: string; + "repository": string; /** - * SidebarColor is the color value (ex: \"#12345\") to use for the sidebar + * revision is the commit hash for the specified revision. */ - "sidebarColor"?: string; + "revision"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7432,21 +8648,19 @@ declare class UiV1UISettingsSpec { }[]; constructor(); } -declare class UiV1UISettings { +declare class V1GlusterfsVolumeSource { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod */ - "apiVersion"?: string; + "endpoints": string; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: UiV1UISettingsSpec; + "path": string; /** - * UISettingsStatus holds the status + * readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod */ - "status"?: any; + "readOnly"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7462,13 +8676,15 @@ declare class UiV1UISettings { }[]; constructor(); } -declare class ManagementV1KioskSpec { - "UISettings"?: UiV1UISettings; - "chartInfo"?: ClusterV1ChartInfo; - "helmRelease"?: ClusterV1HelmRelease; - "license"?: ManagementV1License; - "sleepModeConfig"?: ClusterV1SleepModeConfig; - "storageClusterQuota"?: StorageV1ClusterQuota; +declare class V1HostPathVolumeSource { + /** + * path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + */ + "path": string; + /** + * type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath Possible enum values: - `\"\"` For backwards compatible, leave it empty if unset - `\"BlockDevice\"` A block device must exist at the given path - `\"CharDevice\"` A character device must exist at the given path - `\"Directory\"` A directory must exist at the given path - `\"DirectoryOrCreate\"` If nothing exists at the given path, an empty directory will be created there as needed with file mode 0755, having the same group and ownership with Kubelet. - `\"File\"` A file must exist at the given path - `\"FileOrCreate\"` If nothing exists at the given path, an empty file will be created there as needed with file mode 0644, having the same group and ownership with Kubelet. - `\"Socket\"` A UNIX socket must exist at the given path + */ + "type"?: V1HostPathVolumeSourceTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7484,18 +8700,58 @@ declare class ManagementV1KioskSpec { }[]; constructor(); } -declare class ManagementV1Kiosk { +declare enum V1HostPathVolumeSourceTypeEnum { + Empty = "", + BlockDevice = "BlockDevice", + CharDevice = "CharDevice", + Directory = "Directory", + DirectoryOrCreate = "DirectoryOrCreate", + File = "File", + FileOrCreate = "FileOrCreate", + Socket = "Socket" +} +declare class V1ISCSIVolumeSource { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication */ - "apiVersion"?: string; + "chapAuthDiscovery"?: boolean; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * chapAuthSession defines whether support iSCSI Session CHAP authentication */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1KioskSpec; - "status"?: any; + "chapAuthSession"?: boolean; + /** + * fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + */ + "fsType"?: string; + /** + * initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + */ + "initiatorName"?: string; + /** + * iqn is the target iSCSI Qualified Name. + */ + "iqn": string; + /** + * iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to \'default\' (tcp). + */ + "iscsiInterface"?: string; + /** + * lun represents iSCSI Target Lun number. + */ + "lun": number; + /** + * portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + */ + "portals"?: Array; + /** + * readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + */ + "readOnly"?: boolean; + "secretRef"?: V1LocalObjectReference; + /** + * targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + */ + "targetPortal": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7511,15 +8767,15 @@ declare class ManagementV1Kiosk { }[]; constructor(); } -declare class LicenseApiGenericRequestInput { +declare class V1ImageVolumeSource { /** - * Payload provides the json encoded payload + * Policy for pulling OCI objects. Possible values are: Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn\'t present. IfNotPresent: the kubelet pulls if the reference isn\'t already present on disk. Container creation will fail if the reference isn\'t present and the pull fails. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn\'t present on disk. Container will fail if the image isn\'t present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn\'t present */ - "payload"?: string; + "pullPolicy"?: V1ImageVolumeSourcePullPolicyEnum; /** - * ReturnURL is the url from which the request is initiated + * Required: Image or artifact reference to be used. Behaves in the same way as pod.spec.containers[*].image. Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. */ - "returnURL"?: string; + "reference"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7535,12 +8791,24 @@ declare class LicenseApiGenericRequestInput { }[]; constructor(); } -declare class ManagementV1LicenseRequestSpec { - "input"?: LicenseApiGenericRequestInput; +declare enum V1ImageVolumeSourcePullPolicyEnum { + Always = "Always", + IfNotPresent = "IfNotPresent", + Never = "Never" +} +declare class V1NFSVolumeSource { /** - * URL is the url for the request. + * path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs */ - "url"?: string; + "path": string; + /** + * readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "readOnly"?: boolean; + /** + * server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "server": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7556,19 +8824,15 @@ declare class ManagementV1LicenseRequestSpec { }[]; constructor(); } -declare class LicenseApiGenericRequestOutput { - /** - * Buttons to be shown to the user alongside other content (e.g. HTML). - */ - "buttons"?: Array; +declare class V1PersistentVolumeClaimVolumeSource { /** - * HTML to display to the user. + * claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims */ - "html"?: string; + "claimName": string; /** - * RedirectURL to redirect the user to. + * readOnly Will force the ReadOnly setting in VolumeMounts. Default false. */ - "redirectURL"?: string; + "readOnly"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7584,8 +8848,15 @@ declare class LicenseApiGenericRequestOutput { }[]; constructor(); } -declare class ManagementV1LicenseRequestStatus { - "output"?: LicenseApiGenericRequestOutput; +declare class V1PhotonPersistentDiskVolumeSource { + /** + * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + */ + "fsType"?: string; + /** + * pdID is the ID that identifies Photon Controller persistent disk + */ + "pdID": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7601,18 +8872,19 @@ declare class ManagementV1LicenseRequestStatus { }[]; constructor(); } -declare class ManagementV1LicenseRequest { +declare class V1PortworxVolumeSource { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified. */ - "apiVersion"?: string; + "fsType"?: string; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1LicenseRequestSpec; - "status"?: ManagementV1LicenseRequestStatus; + "readOnly"?: boolean; + /** + * volumeID uniquely identifies a Portworx volume + */ + "volumeID": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7628,9 +8900,24 @@ declare class ManagementV1LicenseRequest { }[]; constructor(); } -declare class ManagementV1LicenseTokenSpec { - "payload"?: string; - "url"?: string; +declare class V1ClusterTrustBundleProjection { + "labelSelector"?: V1LabelSelector; + /** + * Select a single ClusterTrustBundle by object name. Mutually-exclusive with signerName and labelSelector. + */ + "name"?: string; + /** + * If true, don\'t block pod startup if the referenced ClusterTrustBundle(s) aren\'t available. If using name, then the named ClusterTrustBundle is allowed not to exist. If using signerName, then the combination of signerName and labelSelector is allowed to match zero ClusterTrustBundles. + */ + "optional"?: boolean; + /** + * Relative path from the volume root to write the bundle. + */ + "path": string; + /** + * Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated. + */ + "signerName"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7646,15 +8933,19 @@ declare class ManagementV1LicenseTokenSpec { }[]; constructor(); } -declare class LicenseApiInstanceTokenAuth { +declare class V1ConfigMapProjection { /** - * Certificate is the signing certificate for the token. + * items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. */ - "certificate": string; + "items"?: Array; /** - * Token is the jwt token identifying the loft instance. + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ - "token": string; + "name"?: string; + /** + * optional specify whether the ConfigMap or its keys must be defined + */ + "optional"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7670,8 +8961,11 @@ declare class LicenseApiInstanceTokenAuth { }[]; constructor(); } -declare class ManagementV1LicenseTokenStatus { - "token"?: LicenseApiInstanceTokenAuth; +declare class V1DownwardAPIProjection { + /** + * Items is a list of DownwardAPIVolume file + */ + "items"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7687,18 +8981,19 @@ declare class ManagementV1LicenseTokenStatus { }[]; constructor(); } -declare class ManagementV1LicenseToken { +declare class V1SecretProjection { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. */ - "apiVersion"?: string; + "items"?: Array; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1LicenseTokenSpec; - "status"?: ManagementV1LicenseTokenStatus; + "name"?: string; + /** + * optional field specify whether the Secret or its key must be defined + */ + "optional"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7714,16 +9009,19 @@ declare class ManagementV1LicenseToken { }[]; constructor(); } -declare class ManagementV1LoftUpgradeSpec { +declare class V1ServiceAccountTokenProjection { /** - * If specified, updated the release in the given namespace + * audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. */ - "namespace"?: string; + "audience"?: string; /** - * If specified, uses this as release name + * expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. */ - "release"?: string; - "version"?: string; + "expirationSeconds"?: number; + /** + * path is the path relative to the mount point of the file to project the token into. + */ + "path": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7739,18 +9037,12 @@ declare class ManagementV1LoftUpgradeSpec { }[]; constructor(); } -declare class ManagementV1LoftUpgrade { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1LoftUpgradeSpec; - "status"?: any; +declare class V1VolumeProjection { + "clusterTrustBundle"?: V1ClusterTrustBundleProjection; + "configMap"?: V1ConfigMapProjection; + "downwardAPI"?: V1DownwardAPIProjection; + "secret"?: V1SecretProjection; + "serviceAccountToken"?: V1ServiceAccountTokenProjection; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7766,21 +9058,15 @@ declare class ManagementV1LoftUpgrade { }[]; constructor(); } -declare class ManagementV1OIDCClient { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; +declare class V1ProjectedVolumeSource { /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1OIDCClientSpec; + "defaultMode"?: number; /** - * OIDCClientStatus holds the status + * sources is the list of volume projections. Each entry in this list handles one source. */ - "status"?: any; + "sources"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7796,39 +9082,31 @@ declare class ManagementV1OIDCClient { }[]; constructor(); } -declare class StorageV1AccessKeyIdentity { - /** - * Connector is the name of the connector this access key was created from - */ - "connector"?: string; - /** - * ConnectorData holds data used by the connector for subsequent requests after initial authentication, such as access tokens for upstream providers. This data is never shared with end users, OAuth clients, or through the API. - */ - "connectorData"?: string; +declare class V1QuobyteVolumeSource { /** - * The user email + * group to map volume access to Default is no group */ - "email"?: string; + "group"?: string; /** - * If the user email was verified + * readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. */ - "emailVerified"?: boolean; + "readOnly"?: boolean; /** - * The groups from the identity provider + * registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes */ - "groups"?: Array; + "registry": string; /** - * The preferred username / display name + * tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin */ - "preferredUsername"?: string; + "tenant"?: string; /** - * The subject of the user + * user to map volume access to Defaults to serivceaccount user */ - "userId"?: string; + "user"?: string; /** - * The username + * volume is a string that references an already created Quobyte volume by name. */ - "username"?: string; + "volume": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7844,55 +9122,36 @@ declare class StorageV1AccessKeyIdentity { }[]; constructor(); } -declare class StorageV1AccessKeyOIDC { - /** - * The current access token that was created during login - */ - "accessToken"?: string; +declare class V1RBDVolumeSource { /** - * The current id token that was created during login + * fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd */ - "idToken"?: string; + "fsType"?: string; /** - * The last time the id token was refreshed + * image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it */ - "lastRefresh"?: Date; + "image": string; /** - * The current refresh token that was created during login + * keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it */ - "refreshToken"?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare class StorageV1AccessKeyOIDCProvider { + "keyring"?: string; /** - * ClientId the token was generated for + * monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it */ - "clientId"?: string; + "monitors": Array; /** - * Nonce to use + * pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it */ - "nonce"?: string; + "pool"?: string; /** - * RedirectUri to use + * readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it */ - "redirectUri"?: string; + "readOnly"?: boolean; + "secretRef"?: V1LocalObjectReference; /** - * Scopes to use + * user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it */ - "scopes"?: string; + "user"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7908,63 +9167,76 @@ declare class StorageV1AccessKeyOIDCProvider { }[]; constructor(); } -declare class ManagementV1OwnedAccessKeySpec { +declare class V1ScaleIOVolumeSource { /** - * Description describes an app + * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\". */ - "description"?: string; + "fsType"?: string; /** - * If this field is true, the access key is still allowed to exist, however will not work to access the api + * gateway is the host address of the ScaleIO API Gateway. */ - "disabled"?: boolean; + "gateway": string; /** - * The display name shown in the UI + * protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. */ - "displayName"?: string; + "protectionDomain"?: string; /** - * Groups specifies extra groups to apply when using this access key + * readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. */ - "groups"?: Array; - "identity"?: StorageV1AccessKeyIdentity; + "readOnly"?: boolean; + "secretRef": V1LocalObjectReference; /** - * The last time the identity was refreshed + * sslEnabled Flag enable/disable SSL communication with Gateway, default false */ - "identityRefresh"?: Date; + "sslEnabled"?: boolean; /** - * The actual access key that will be used as a bearer token + * storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. */ - "key"?: string; - "oidcLogin"?: StorageV1AccessKeyOIDC; - "oidcProvider"?: StorageV1AccessKeyOIDCProvider; + "storageMode"?: string; /** - * DEPRECATED: do not use anymore Parent is used to share OIDC and external token information with multiple access keys. Since copying an OIDC refresh token would result in the other access keys becoming invalid after a refresh parent allows access keys to share that information. The use case for this is primarily user generated access keys, which will have the users current access key as parent if it contains an OIDC token. + * storagePool is the ScaleIO Storage Pool associated with the protection domain. */ - "parent"?: string; - "scope"?: StorageV1AccessKeyScope; + "storagePool"?: string; /** - * Subject is a generic subject that can be used instead of user or team + * system is the name of the storage system as configured in ScaleIO. */ - "subject"?: string; + "system": string; /** - * The team this access key refers to + * volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. */ - "team"?: string; + "volumeName"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class V1SecretVolumeSource { /** - * The time to life for this access key + * defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. */ - "ttl"?: number; + "defaultMode"?: number; /** - * If this is specified, the time to life for this access key will start after the lastActivity instead of creation timestamp + * items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. */ - "ttlAfterLastActivity"?: boolean; + "items"?: Array; /** - * The type of an access key, which basically describes if the access key is user managed or managed by loft itself. + * optional field specify whether the Secret or its keys must be defined */ - "type"?: string; + "optional"?: boolean; /** - * The user this access key refers to + * secretName is the name of the secret in the pod\'s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret */ - "user"?: string; + "secretName"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -7980,11 +9252,24 @@ declare class ManagementV1OwnedAccessKeySpec { }[]; constructor(); } -declare class ManagementV1OwnedAccessKeyStatus { +declare class V1StorageOSVolumeSource { /** - * The last time this access key was used to access the api + * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. */ - "lastActivity"?: Date; + "fsType"?: string; + /** + * readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + "secretRef"?: V1LocalObjectReference; + /** + * volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + */ + "volumeName"?: string; + /** + * volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod\'s namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + */ + "volumeNamespace"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8000,18 +9285,23 @@ declare class ManagementV1OwnedAccessKeyStatus { }[]; constructor(); } -declare class ManagementV1OwnedAccessKey { +declare class V1VsphereVirtualDiskVolumeSource { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. */ - "apiVersion"?: string; + "fsType"?: string; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1OwnedAccessKeySpec; - "status"?: ManagementV1OwnedAccessKeyStatus; + "storagePolicyID"?: string; + /** + * storagePolicyName is the storage Policy Based Management (SPBM) profile name. + */ + "storagePolicyName"?: string; + /** + * volumePath is the path that identifies vSphere volume vmdk + */ + "volumePath": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8027,8 +9317,41 @@ declare class ManagementV1OwnedAccessKey { }[]; constructor(); } -declare class ManagementV1ProjectChartInfoSpec { - "chart"?: ClusterV1Chart; +declare class V1Volume { + "awsElasticBlockStore"?: V1AWSElasticBlockStoreVolumeSource; + "azureDisk"?: V1AzureDiskVolumeSource; + "azureFile"?: V1AzureFileVolumeSource; + "cephfs"?: V1CephFSVolumeSource; + "cinder"?: V1CinderVolumeSource; + "configMap"?: V1ConfigMapVolumeSource; + "csi"?: V1CSIVolumeSource; + "downwardAPI"?: V1DownwardAPIVolumeSource; + "emptyDir"?: V1EmptyDirVolumeSource; + "ephemeral"?: V1EphemeralVolumeSource; + "fc"?: V1FCVolumeSource; + "flexVolume"?: V1FlexVolumeSource; + "flocker"?: V1FlockerVolumeSource; + "gcePersistentDisk"?: V1GCEPersistentDiskVolumeSource; + "gitRepo"?: V1GitRepoVolumeSource; + "glusterfs"?: V1GlusterfsVolumeSource; + "hostPath"?: V1HostPathVolumeSource; + "image"?: V1ImageVolumeSource; + "iscsi"?: V1ISCSIVolumeSource; + /** + * name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + */ + "name": string; + "nfs"?: V1NFSVolumeSource; + "persistentVolumeClaim"?: V1PersistentVolumeClaimVolumeSource; + "photonPersistentDisk"?: V1PhotonPersistentDiskVolumeSource; + "portworxVolume"?: V1PortworxVolumeSource; + "projected"?: V1ProjectedVolumeSource; + "quobyte"?: V1QuobyteVolumeSource; + "rbd"?: V1RBDVolumeSource; + "scaleIO"?: V1ScaleIOVolumeSource; + "secret"?: V1SecretVolumeSource; + "storageos"?: V1StorageOSVolumeSource; + "vsphereVolume"?: V1VsphereVirtualDiskVolumeSource; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8044,16 +9367,155 @@ declare class ManagementV1ProjectChartInfoSpec { }[]; constructor(); } -declare class ManagementV1ProjectChartInfoStatus { - "metadata"?: ClusterV1Metadata; +declare class V1PodSpec { /** - * Readme is the readme of the chart + * Optional duration in seconds the pod may be active on the node relative to StartTime before the system will actively try to mark it failed and kill associated containers. Value must be a positive integer. */ - "readme"?: string; + "activeDeadlineSeconds"?: number; + "affinity"?: V1Affinity; /** - * Values are the default values of the chart + * AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. */ - "values"?: string; + "automountServiceAccountToken"?: boolean; + /** + * List of containers belonging to the pod. Containers cannot currently be added or removed. There must be at least one container in a Pod. Cannot be updated. + */ + "containers": Array; + "dnsConfig"?: V1PodDNSConfig; + /** + * Set DNS policy for the pod. Defaults to \"ClusterFirst\". Valid values are \'ClusterFirstWithHostNet\', \'ClusterFirst\', \'Default\' or \'None\'. DNS parameters given in DNSConfig will be merged with the policy selected with DNSPolicy. To have DNS options set along with hostNetwork, you have to specify DNS policy explicitly to \'ClusterFirstWithHostNet\'. Possible enum values: - `\"ClusterFirst\"` indicates that the pod should use cluster DNS first unless hostNetwork is true, if it is available, then fall back on the default (as determined by kubelet) DNS settings. - `\"ClusterFirstWithHostNet\"` indicates that the pod should use cluster DNS first, if it is available, then fall back on the default (as determined by kubelet) DNS settings. - `\"Default\"` indicates that the pod should use the default (as determined by kubelet) DNS settings. - `\"None\"` indicates that the pod should use empty DNS settings. DNS parameters such as nameservers and search paths should be defined via DNSConfig. + */ + "dnsPolicy"?: V1PodSpecDnsPolicyEnum; + /** + * EnableServiceLinks indicates whether information about services should be injected into pod\'s environment variables, matching the syntax of Docker links. Optional: Defaults to true. + */ + "enableServiceLinks"?: boolean; + /** + * List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing pod to perform user-initiated actions such as debugging. This list cannot be specified when creating a pod, and it cannot be modified by updating the pod spec. In order to add an ephemeral container to an existing pod, use the pod\'s ephemeralcontainers subresource. + */ + "ephemeralContainers"?: Array; + /** + * HostAliases is an optional list of hosts and IPs that will be injected into the pod\'s hosts file if specified. + */ + "hostAliases"?: Array; + /** + * Use the host\'s ipc namespace. Optional: Default to false. + */ + "hostIPC"?: boolean; + /** + * Host networking requested for this pod. Use the host\'s network namespace. If this option is set, the ports that will be used must be specified. Default to false. + */ + "hostNetwork"?: boolean; + /** + * Use the host\'s pid namespace. Optional: Default to false. + */ + "hostPID"?: boolean; + /** + * Use the host\'s user namespace. Optional: Default to true. If set to true or not present, the pod will be run in the host user namespace, useful for when the pod needs a feature only available to the host user namespace, such as loading a kernel module with CAP_SYS_MODULE. When set to false, a new userns is created for the pod. Setting false is useful for mitigating container breakout vulnerabilities even allowing users to run their containers as root without actually having root privileges on the host. This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature. + */ + "hostUsers"?: boolean; + /** + * Specifies the hostname of the Pod If not specified, the pod\'s hostname will be set to a system-defined value. + */ + "hostname"?: string; + /** + * ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + */ + "imagePullSecrets"?: Array; + /** + * List of initialization containers belonging to the pod. Init containers are executed in order prior to containers being started. If any init container fails, the pod is considered to have failed and is handled according to its restartPolicy. The name for an init container or normal container must be unique among all containers. Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. The resourceRequirements of an init container are taken into account during scheduling by finding the highest request/limit for each resource type, and then using the max of of that value or the sum of the normal containers. Limits are applied to init containers in a similar fashion. Init containers cannot currently be added or removed. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + */ + "initContainers"?: Array; + /** + * NodeName indicates in which node this pod is scheduled. If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. This field should not be used to express a desire for the pod to be scheduled on a specific node. https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + */ + "nodeName"?: string; + /** + * NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node\'s labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + */ + "nodeSelector"?: { + [key: string]: string; + }; + "os"?: V1PodOS; + /** + * Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. This field will be autopopulated at admission time by the RuntimeClass admission controller. If the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. The RuntimeClass admission controller will reject Pod create requests which have the overhead already set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + */ + "overhead"?: { + [key: string]: string; + }; + /** + * PreemptionPolicy is the Policy for preempting pods with lower priority. One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset. Possible enum values: - `\"Never\"` means that pod never preempts other pods with lower priority. - `\"PreemptLowerPriority\"` means that pod can preempt other pods with lower priority. + */ + "preemptionPolicy"?: V1PodSpecPreemptionPolicyEnum; + /** + * The priority value. Various system components use this field to find the priority of the pod. When Priority Admission Controller is enabled, it prevents users from setting this field. The admission controller populates this field from PriorityClassName. The higher the value, the higher the priority. + */ + "priority"?: number; + /** + * If specified, indicates the pod\'s priority. \"system-node-critical\" and \"system-cluster-critical\" are two special keywords which indicate the highest priorities with the former being the highest priority. Any other name must be defined by creating a PriorityClass object with that name. If not specified, the pod priority will be default or zero if there is no default. + */ + "priorityClassName"?: string; + /** + * If specified, all readiness gates will be evaluated for pod readiness. A pod is ready when all its containers are ready AND all conditions specified in the readiness gates have status equal to \"True\" More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + */ + "readinessGates"?: Array; + /** + * ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. The resources will be made available to those containers which consume them by name. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. + */ + "resourceClaims"?: Array; + /** + * Restart policy for all containers within the pod. One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. Default to Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy Possible enum values: - `\"Always\"` - `\"Never\"` - `\"OnFailure\"` + */ + "restartPolicy"?: V1PodSpecRestartPolicyEnum; + /** + * RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. If unset or empty, the \"legacy\" RuntimeClass will be used, which is an implicit class with an empty definition that uses the default runtime handler. More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + */ + "runtimeClassName"?: string; + /** + * If specified, the pod will be dispatched by specified scheduler. If not specified, the pod will be dispatched by default scheduler. + */ + "schedulerName"?: string; + /** + * SchedulingGates is an opaque list of values that if specified will block scheduling the pod. If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the scheduler will not attempt to schedule the pod. SchedulingGates can only be set at pod creation time, and be removed only afterwards. + */ + "schedulingGates"?: Array; + "securityContext"?: V1PodSecurityContext; + /** + * DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. Deprecated: Use serviceAccountName instead. + */ + "serviceAccount"?: string; + /** + * ServiceAccountName is the name of the ServiceAccount to use to run this pod. More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + */ + "serviceAccountName"?: string; + /** + * If true the pod\'s hostname will be configured as the pod\'s FQDN, rather than the leaf name (the default). In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\\\SYSTEM\\\\CurrentControlSet\\\\Services\\\\Tcpip\\\\Parameters to FQDN. If a pod does not have FQDN, this has no effect. Default to false. + */ + "setHostnameAsFQDN"?: boolean; + /** + * Share a single process namespace between all of the containers in a pod. When this is set containers will be able to view and signal processes from other containers in the same pod, and the first process in each container will not be assigned PID 1. HostPID and ShareProcessNamespace cannot both be set. Optional: Default to false. + */ + "shareProcessNamespace"?: boolean; + /** + * If specified, the fully qualified Pod hostname will be \"...svc.\". If not specified, the pod will not have a domainname at all. + */ + "subdomain"?: string; + /** + * Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. + */ + "terminationGracePeriodSeconds"?: number; + /** + * If specified, the pod\'s tolerations. + */ + "tolerations"?: Array; + /** + * TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed. + */ + "topologySpreadConstraints"?: Array; + /** + * List of volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes + */ + "volumes"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8069,18 +9531,26 @@ declare class ManagementV1ProjectChartInfoStatus { }[]; constructor(); } -declare class ManagementV1ProjectChartInfo { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; +declare enum V1PodSpecDnsPolicyEnum { + ClusterFirst = "ClusterFirst", + ClusterFirstWithHostNet = "ClusterFirstWithHostNet", + Default = "Default", + None = "None" +} +declare enum V1PodSpecPreemptionPolicyEnum { + Never = "Never", + PreemptLowerPriority = "PreemptLowerPriority" +} +declare enum V1PodSpecRestartPolicyEnum { + Always = "Always", + Never = "Never", + OnFailure = "OnFailure" +} +declare class V1ContainerStateRunning { /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * Time at which the container was last (re-)started */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1ProjectChartInfoSpec; - "status"?: ManagementV1ProjectChartInfoStatus; + "startedAt"?: Date; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8096,24 +9566,35 @@ declare class ManagementV1ProjectChartInfo { }[]; constructor(); } -declare class ManagementV1ProjectCharts { +declare class V1ContainerStateTerminated { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * Container\'s ID in the format \'://\' */ - "apiVersion"?: string; + "containerID"?: string; /** - * Busy will indicate if the chart parsing is still in progress. + * Exit status from the last termination of the container */ - "busy"?: boolean; + "exitCode": number; /** - * Holds the available helm charts for this cluster + * Time at which the container last terminated */ - "charts": Array; + "finishedAt"?: Date; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * Message regarding the last termination of the container */ - "kind"?: string; - "metadata"?: V1ObjectMeta; + "message"?: string; + /** + * (brief) reason from the last termination of the container + */ + "reason"?: string; + /** + * Signal from the last termination of the container + */ + "signal"?: number; + /** + * Time at which previous execution of the container started + */ + "startedAt"?: Date; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8129,19 +9610,15 @@ declare class ManagementV1ProjectCharts { }[]; constructor(); } -declare class StorageV1RunnerPersistentVolumeClaimTemplateSpec { - /** - * accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - */ - "accessModes"?: Array; +declare class V1ContainerStateWaiting { /** - * storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + * Message regarding why the container is not yet running. */ - "storageClassName"?: string; + "message"?: string; /** - * storageSize is the size of the storage to reserve for the pvc + * (brief) reason the container is not yet running. */ - "storageSize"?: string; + "reason"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8157,15 +9634,10 @@ declare class StorageV1RunnerPersistentVolumeClaimTemplateSpec { }[]; constructor(); } -declare enum StorageV1RunnerPersistentVolumeClaimTemplateSpecAccessModesEnum { - ReadOnlyMany = "ReadOnlyMany", - ReadWriteMany = "ReadWriteMany", - ReadWriteOnce = "ReadWriteOnce", - ReadWriteOncePod = "ReadWriteOncePod" -} -declare class StorageV1RunnerPersistentVolumeClaimTemplate { - "metadata"?: StorageV1TemplateMetadata; - "spec"?: StorageV1RunnerPersistentVolumeClaimTemplateSpec; +declare class V1ContainerState { + "running"?: V1ContainerStateRunning; + "terminated"?: V1ContainerStateTerminated; + "waiting"?: V1ContainerStateWaiting; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8181,19 +9653,19 @@ declare class StorageV1RunnerPersistentVolumeClaimTemplate { }[]; constructor(); } -declare class V1NodeSelectorRequirement { +declare class V1LinuxContainerUser { /** - * The label key that the selector applies to. + * GID is the primary gid initially attached to the first process in the container */ - "key": string; + "gid": number; /** - * Represents a key\'s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. Possible enum values: - `\"DoesNotExist\"` - `\"Exists\"` - `\"Gt\"` - `\"In\"` - `\"Lt\"` - `\"NotIn\"` + * SupplementalGroups are the supplemental groups initially attached to the first process in the container */ - "operator": V1NodeSelectorRequirementOperatorEnum; + "supplementalGroups"?: Array; /** - * An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch. + * UID is the primary uid initially attached to the first process in the container */ - "values"?: Array; + "uid": number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8209,23 +9681,8 @@ declare class V1NodeSelectorRequirement { }[]; constructor(); } -declare enum V1NodeSelectorRequirementOperatorEnum { - DoesNotExist = "DoesNotExist", - Exists = "Exists", - Gt = "Gt", - In = "In", - Lt = "Lt", - NotIn = "NotIn" -} -declare class V1NodeSelectorTerm { - /** - * A list of node selector requirements by node\'s labels. - */ - "matchExpressions"?: Array; - /** - * A list of node selector requirements by node\'s fields. - */ - "matchFields"?: Array; +declare class V1ContainerUser { + "linux"?: V1LinuxContainerUser; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8241,11 +9698,15 @@ declare class V1NodeSelectorTerm { }[]; constructor(); } -declare class V1NodeSelector { +declare class V1ResourceHealth { /** - * Required. A list of node selector terms. The terms are ORed. + * Health of the resource. can be one of: - Healthy: operates as normal - Unhealthy: reported unhealthy. We consider this a temporary health issue since we do not have a mechanism today to distinguish temporary and permanent issues. - Unknown: The status cannot be determined. For example, Device Plugin got unregistered and hasn\'t been re-registered since. In future we may want to introduce the PermanentlyUnhealthy Status. */ - "nodeSelectorTerms": Array; + "health"?: string; + /** + * ResourceID is the unique identifier of the resource. See the ResourceID type for more information. + */ + "resourceID": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8261,12 +9722,15 @@ declare class V1NodeSelector { }[]; constructor(); } -declare class V1PreferredSchedulingTerm { - "preference": V1NodeSelectorTerm; +declare class V1ResourceStatus { /** - * Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + * Name of the resource. Must be unique within the pod and match one of the resources from the pod spec. */ - "weight": number; + "name": string; + /** + * List of unique Resources health. Each element in the list contains an unique resource ID and resource health. At a minimum, ResourceID must uniquely identify the Resource allocated to the Pod on the Node for the lifetime of a Pod. See ResourceID type for it\'s definition. + */ + "resources"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8282,12 +9746,23 @@ declare class V1PreferredSchedulingTerm { }[]; constructor(); } -declare class V1NodeAffinity { +declare class V1VolumeMountStatus { /** - * The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred. + * MountPath corresponds to the original VolumeMount. */ - "preferredDuringSchedulingIgnoredDuringExecution"?: Array; - "requiredDuringSchedulingIgnoredDuringExecution"?: V1NodeSelector; + "mountPath": string; + /** + * Name corresponds to the name of the original VolumeMount. + */ + "name": string; + /** + * ReadOnly corresponds to the original VolumeMount. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, depending on the mount result. + */ + "recursiveReadOnly"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8303,25 +9778,53 @@ declare class V1NodeAffinity { }[]; constructor(); } -declare class V1PodAffinityTerm { - "labelSelector"?: V1LabelSelector; +declare class V1ContainerStatus { /** - * MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod\'s pod (anti) affinity. Keys that don\'t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn\'t set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + * AllocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize. */ - "matchLabelKeys"?: Array; + "allocatedResources"?: { + [key: string]: string; + }; /** - * MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod\'s pod (anti) affinity. Keys that don\'t exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn\'t set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default). + * AllocatedResourcesStatus represents the status of various resources allocated for this Pod. */ - "mismatchLabelKeys"?: Array; - "namespaceSelector"?: V1LabelSelector; + "allocatedResourcesStatus"?: Array; /** - * namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means \"this pod\'s namespace\". + * ContainerID is the ID of the container in the format \'://\'. Where type is a container runtime identifier, returned from Version call of CRI API (for example \"containerd\"). */ - "namespaces"?: Array; + "containerID"?: string; /** - * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed. + * Image is the name of container image that the container is running. The container image may not match the image used in the PodSpec, as it may have been resolved by the runtime. More info: https://kubernetes.io/docs/concepts/containers/images. */ - "topologyKey": string; + "image": string; + /** + * ImageID is the image ID of the container\'s image. The image ID may not match the image ID of the image used in the PodSpec, as it may have been resolved by the runtime. + */ + "imageID": string; + "lastState"?: V1ContainerState; + /** + * Name is a DNS_LABEL representing the unique name of the container. Each container in a pod must have a unique name across all container types. Cannot be updated. + */ + "name": string; + /** + * Ready specifies whether the container is currently passing its readiness check. The value will change as readiness probes keep executing. If no readiness probes are specified, this field defaults to true once the container is fully started (see Started field). The value is typically used to determine whether a container is ready to accept traffic. + */ + "ready": boolean; + "resources"?: V1ResourceRequirements; + /** + * RestartCount holds the number of times the container has been restarted. Kubelet makes an effort to always increment the value, but there are cases when the state may be lost due to node restarts and then the value may be reset to 0. The value is never negative. + */ + "restartCount": number; + /** + * Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. In both cases, startup probes will run again. Is always true when no startupProbe is defined and container is running and has passed the postStart lifecycle hook. The null value must be treated the same as false. + */ + "started"?: boolean; + "state"?: V1ContainerState; + "user"?: V1ContainerUser; + /** + * Status of volume mounts. + */ + "volumeMounts"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8337,12 +9840,11 @@ declare class V1PodAffinityTerm { }[]; constructor(); } -declare class V1WeightedPodAffinityTerm { - "podAffinityTerm": V1PodAffinityTerm; +declare class V1HostIP { /** - * weight associated with matching the corresponding podAffinityTerm, in the range 1-100. + * IP is the IP address assigned to the host */ - "weight": number; + "ip": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8358,15 +9860,31 @@ declare class V1WeightedPodAffinityTerm { }[]; constructor(); } -declare class V1PodAffinity { +declare class V1PodCondition { /** - * The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. + * Last time we probed the condition. */ - "preferredDuringSchedulingIgnoredDuringExecution"?: Array; + "lastProbeTime"?: Date; /** - * If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. + * Last time the condition transitioned from one status to another. */ - "requiredDuringSchedulingIgnoredDuringExecution"?: Array; + "lastTransitionTime"?: Date; + /** + * Human-readable message indicating details about last transition. + */ + "message"?: string; + /** + * Unique, one-word, CamelCase reason for the condition\'s last transition. + */ + "reason"?: string; + /** + * Status is the status of the condition. Can be True, False, Unknown. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions + */ + "status": string; + /** + * Type is the type of the condition. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions + */ + "type": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8382,15 +9900,11 @@ declare class V1PodAffinity { }[]; constructor(); } -declare class V1PodAntiAffinity { - /** - * The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding \"weight\" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred. - */ - "preferredDuringSchedulingIgnoredDuringExecution"?: Array; +declare class V1PodIP { /** - * If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied. + * IP is the IP address assigned to the pod */ - "requiredDuringSchedulingIgnoredDuringExecution"?: Array; + "ip": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8406,10 +9920,15 @@ declare class V1PodAntiAffinity { }[]; constructor(); } -declare class V1Affinity { - "nodeAffinity"?: V1NodeAffinity; - "podAffinity"?: V1PodAffinity; - "podAntiAffinity"?: V1PodAntiAffinity; +declare class V1PodResourceClaimStatus { + /** + * Name uniquely identifies this resource claim inside the pod. This must match the name of an entry in pod.spec.resourceClaims, which implies that the string must be a DNS_LABEL. + */ + "name": string; + /** + * ResourceClaimName is the name of the ResourceClaim that was generated for the Pod in the namespace of the Pod. If this is unset, then generating a ResourceClaim was not necessary. The pod.spec.resourceClaims entry can be ignored in this case. + */ + "resourceClaimName"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8425,80 +9944,71 @@ declare class V1Affinity { }[]; constructor(); } -declare class V1ContainerPort { +declare class V1PodStatus { /** - * Number of port to expose on the pod\'s IP address. This must be a valid port number, 0 < x < 65536. + * Current service state of pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-conditions */ - "containerPort": number; + "conditions"?: Array; /** - * What host IP to bind the external port to. + * The list has one entry per container in the manifest. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status + */ + "containerStatuses"?: Array; + /** + * Status for any ephemeral containers that have run in this pod. + */ + "ephemeralContainerStatuses"?: Array; + /** + * hostIP holds the IP address of the host to which the pod is assigned. Empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns mean that HostIP will not be updated even if there is a node is assigned to pod */ "hostIP"?: string; /** - * Number of port to expose on the host. If specified, this must be a valid port number, 0 < x < 65536. If HostNetwork is specified, this must match ContainerPort. Most containers do not need this. + * hostIPs holds the IP addresses allocated to the host. If this field is specified, the first entry must match the hostIP field. This list is empty if the pod has not started yet. A pod can be assigned to a node that has a problem in kubelet which in turns means that HostIPs will not be updated even if there is a node is assigned to this pod. */ - "hostPort"?: number; + "hostIPs"?: Array; /** - * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each named port in a pod must have a unique name. Name for the port that can be referred to by services. + * The list has one entry per init container in the manifest. The most recent successful init container will have ready = true, the most recently started container will have startTime set. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-and-container-status */ - "name"?: string; + "initContainerStatuses"?: Array; /** - * Protocol for port. Must be UDP, TCP, or SCTP. Defaults to \"TCP\". Possible enum values: - `\"SCTP\"` is the SCTP protocol. - `\"TCP\"` is the TCP protocol. - `\"UDP\"` is the UDP protocol. + * A human readable message indicating details about why the pod is in this condition. */ - "protocol"?: V1ContainerPortProtocolEnum; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare enum V1ContainerPortProtocolEnum { - Sctp = "SCTP", - Tcp = "TCP", - Udp = "UDP" -} -declare class V1ContainerResizePolicy { + "message"?: string; /** - * Name of the resource to which this resource resize policy applies. Supported values: cpu, memory. + * nominatedNodeName is set only when this pod preempts other pods on the node, but it cannot be scheduled right away as preemption victims receive their graceful termination periods. This field does not guarantee that the pod will be scheduled on this node. Scheduler may decide to place the pod elsewhere if other nodes become available sooner. Scheduler may also decide to give the resources on this node to a higher priority pod that is created after preemption. As a result, this field may be different than PodSpec.nodeName when the pod is scheduled. */ - "resourceName": string; + "nominatedNodeName"?: string; /** - * Restart policy to apply when specified resource is resized. If not specified, it defaults to NotRequired. + * The phase of a Pod is a simple, high-level summary of where the Pod is in its lifecycle. The conditions array, the reason and message fields, and the individual container status arrays contain more detail about the pod\'s status. There are five possible phase values: Pending: The pod has been accepted by the Kubernetes system, but one or more of the container images has not been created. This includes time before being scheduled as well as time spent downloading images over the network, which could take a while. Running: The pod has been bound to a node, and all of the containers have been created. At least one container is still running, or is in the process of starting or restarting. Succeeded: All containers in the pod have terminated in success, and will not be restarted. Failed: All containers in the pod have terminated, and at least one container has terminated in failure. The container either exited with non-zero status or was terminated by the system. Unknown: For some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#pod-phase Possible enum values: - `\"Failed\"` means that all containers in the pod have terminated, and at least one container has terminated in a failure (exited with a non-zero exit code or was stopped by the system). - `\"Pending\"` means the pod has been accepted by the system, but one or more of the containers has not been started. This includes time before being bound to a node, as well as time spent pulling images onto the host. - `\"Running\"` means the pod has been bound to a node and all of the containers have been started. At least one container is still running or is in the process of being restarted. - `\"Succeeded\"` means that all containers in the pod have voluntarily terminated with a container exit code of 0, and the system is not going to restart any of these containers. - `\"Unknown\"` means that for some reason the state of the pod could not be obtained, typically due to an error in communicating with the host of the pod. Deprecated: It isn\'t being set since 2015 (74da3b14b0c0f658b3bb8d2def5094686d0e9095) */ - "restartPolicy": string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare class V1ConfigMapEnvSource { + "phase"?: V1PodStatusPhaseEnum; + /** + * podIP address allocated to the pod. Routable at least within the cluster. Empty if not yet allocated. + */ + "podIP"?: string; + /** + * podIPs holds the IP addresses allocated to the pod. If this field is specified, the 0th entry must match the podIP field. Pods may be allocated at most 1 value for each of IPv4 and IPv6. This list is empty if no IPs have been allocated yet. + */ + "podIPs"?: Array; + /** + * The Quality of Service (QOS) classification assigned to the pod based on resource requirements See PodQOSClass type for available QOS classes More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-qos/#quality-of-service-classes Possible enum values: - `\"BestEffort\"` is the BestEffort qos class. - `\"Burstable\"` is the Burstable qos class. - `\"Guaranteed\"` is the Guaranteed qos class. + */ + "qosClass"?: V1PodStatusQosClassEnum; + /** + * A brief CamelCase message indicating details about why the pod is in this state. e.g. \'Evicted\' + */ + "reason"?: string; + /** + * Status of resources resize desired for pod\'s containers. It is empty if no resources resize is pending. Any changes to container resources will automatically set this to \"Proposed\" + */ + "resize"?: string; /** - * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Status of resource claims. */ - "name"?: string; + "resourceClaimStatuses"?: Array; /** - * Specify whether the ConfigMap must be defined + * RFC 3339 date and time at which the object was acknowledged by the Kubelet. This is before the Kubelet pulled the container image(s) for the pod. */ - "optional"?: boolean; + "startTime"?: Date; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8514,15 +10024,30 @@ declare class V1ConfigMapEnvSource { }[]; constructor(); } -declare class V1SecretEnvSource { +declare enum V1PodStatusPhaseEnum { + Failed = "Failed", + Pending = "Pending", + Running = "Running", + Succeeded = "Succeeded", + Unknown = "Unknown" +} +declare enum V1PodStatusQosClassEnum { + BestEffort = "BestEffort", + Burstable = "Burstable", + Guaranteed = "Guaranteed" +} +declare class V1Pod { /** - * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "name"?: string; + "apiVersion"?: string; /** - * Specify whether the Secret must be defined + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "optional"?: boolean; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: V1PodSpec; + "status"?: V1PodStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8538,13 +10063,34 @@ declare class V1SecretEnvSource { }[]; constructor(); } -declare class V1EnvFromSource { - "configMapRef"?: V1ConfigMapEnvSource; +declare class ManagementV1DevPodWorkspaceInstanceTroubleshoot { /** - * An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "prefix"?: string; - "secretRef"?: V1SecretEnvSource; + "apiVersion"?: string; + /** + * Errors is a list of errors that occurred while trying to collect informations for troubleshooting. + */ + "errors"?: Array; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind"?: string; + "metadata"?: V1ObjectMeta; + /** + * Pods is a list of pod objects that are linked to the workspace. + */ + "pods"?: Array; + /** + * PVCs is a list of PVC objects that are linked to the workspace. + */ + "pvcs"?: Array; + /** + * State holds the workspaces state as given by \'devpod export\' + */ + "state"?: string; + "template"?: StorageV1DevPodWorkspaceTemplate; + "workspace"?: ManagementV1DevPodWorkspaceInstance; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8560,19 +10106,15 @@ declare class V1EnvFromSource { }[]; constructor(); } -declare class V1ConfigMapKeySelector { - /** - * The key to select. - */ - "key": string; +declare class StorageV1DevPodWorkspacePresetSource { /** - * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Git stores path to git repo to use as workspace source */ - "name"?: string; + "git"?: string; /** - * Specify whether the ConfigMap or its key must be defined + * Image stores container image to use as workspace source */ - "optional"?: boolean; + "image"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8588,15 +10130,18 @@ declare class V1ConfigMapKeySelector { }[]; constructor(); } -declare class V1ObjectFieldSelector { +declare class StorageV1DevPodWorkspacePresetVersion { + "environmentRef"?: StorageV1EnvironmentRef; + "infrastructureRef"?: StorageV1TemplateRef; + "source"?: StorageV1DevPodWorkspacePresetSource; /** - * Version of the schema the FieldPath is written in terms of, defaults to \"v1\". + * UseProjectGitCredentials specifies if the project git credentials should be used instead of local ones for this environment */ - "apiVersion"?: string; + "useProjectGitCredentials"?: boolean; /** - * Path of the field to select in the specified API version. + * Version is the version. Needs to be in X.X.X format. */ - "fieldPath": string; + "version"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8612,19 +10157,27 @@ declare class V1ObjectFieldSelector { }[]; constructor(); } -declare class V1ResourceFieldSelector { +declare class ManagementV1DevPodWorkspacePresetSpec { /** - * Container name: required for volumes, optional for env vars + * Access to the DevPod machine instance object itself */ - "containerName"?: string; + "access"?: Array; /** - * Specifies the output format of the exposed resources, defaults to \"1\" + * DisplayName is the name that should be displayed in the UI */ - "divisor"?: string; + "displayName"?: string; + "environmentRef"?: StorageV1EnvironmentRef; + "infrastructureRef": StorageV1TemplateRef; + "owner"?: StorageV1UserOrTeam; + "source": StorageV1DevPodWorkspacePresetSource; /** - * Required: resource to select + * UseProjectGitCredentials specifies if the project git credentials should be used instead of local ones for this environment */ - "resource": string; + "useProjectGitCredentials"?: boolean; + /** + * Versions are different versions of the template that can be referenced as well + */ + "versions"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8640,11 +10193,21 @@ declare class V1ResourceFieldSelector { }[]; constructor(); } -declare class V1EnvVarSource { - "configMapKeyRef"?: V1ConfigMapKeySelector; - "fieldRef"?: V1ObjectFieldSelector; - "resourceFieldRef"?: V1ResourceFieldSelector; - "secretKeyRef"?: V1SecretKeySelector; +declare class ManagementV1DevPodWorkspacePreset { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion"?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1DevPodWorkspacePresetSpec; + /** + * DevPodWorkspacePresetStatus holds the status + */ + "status"?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8660,16 +10223,29 @@ declare class V1EnvVarSource { }[]; constructor(); } -declare class V1EnvVar { +declare class ManagementV1DevPodWorkspaceTemplateSpec { /** - * Name of the environment variable. Must be a C_IDENTIFIER. + * Access holds the access rights for users and teams */ - "name": string; + "access"?: Array; /** - * Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\". + * Description describes the virtual cluster template */ - "value"?: string; - "valueFrom"?: V1EnvVarSource; + "description"?: string; + /** + * DisplayName is the name that is shown in the UI + */ + "displayName"?: string; + "owner"?: StorageV1UserOrTeam; + /** + * Parameters define additional app parameters that will set provider values + */ + "parameters"?: Array; + "template"?: StorageV1DevPodWorkspaceTemplateDefinition; + /** + * Versions are different versions of the template that can be referenced as well + */ + "versions"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8685,11 +10261,21 @@ declare class V1EnvVar { }[]; constructor(); } -declare class V1ExecAction { +declare class ManagementV1DevPodWorkspaceTemplate { /** - * Command is the command line to execute inside the container, the working directory for the command is root (\'/\') in the container\'s filesystem. The command is simply exec\'d, it is not run inside a shell, so traditional shell instructions (\'|\', etc) won\'t work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "command"?: Array; + "apiVersion"?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1DevPodWorkspaceTemplateSpec; + /** + * DevPodWorkspaceTemplateStatus holds the status + */ + "status"?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8705,16 +10291,11 @@ declare class V1ExecAction { }[]; constructor(); } -export type IntOrString = number | string; -declare class V1HTTPHeader { - /** - * The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. - */ - "name": string; +declare class StorageV1AccessKeyScopeCluster { /** - * The header field value + * Cluster is the name of the cluster to access. You can specify * to select all clusters. */ - "value": string; + "cluster"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8730,27 +10311,11 @@ declare class V1HTTPHeader { }[]; constructor(); } -declare class V1HTTPGetAction { - /** - * Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead. - */ - "host"?: string; - /** - * Custom headers to set in the request. HTTP allows repeated headers. - */ - "httpHeaders"?: Array; - /** - * Path to access on the HTTP server. - */ - "path"?: string; - /** - * IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number. - */ - "port": IntOrString; +declare class StorageV1AccessKeyScopeProject { /** - * Scheme to use for connecting to the host. Defaults to HTTP. Possible enum values: - `\"HTTP\"` means that the scheme used will be http:// - `\"HTTPS\"` means that the scheme used will be https:// + * Project is the name of the project. You can specify * to select all projects. */ - "scheme"?: V1HTTPGetActionSchemeEnum; + "project"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8766,15 +10331,19 @@ declare class V1HTTPGetAction { }[]; constructor(); } -declare enum V1HTTPGetActionSchemeEnum { - Http = "HTTP", - Https = "HTTPS" -} -declare class V1SleepAction { +declare class StorageV1AccessKeyScopeRole { /** - * Seconds is the number of seconds to sleep. + * Projects specifies the projects the access key should have access to. */ - "seconds": number; + "projects"?: Array; + /** + * Role is the name of the role to apply to the access key scope. Possible enum values: - `\"agent\"` - `\"loft-cli\"` - `\"network-peer\"` - `\"runner\"` - `\"vcluster\"` + */ + "role"?: StorageV1AccessKeyScopeRoleRoleEnum; + /** + * VirtualClusters specifies the virtual clusters the access key is allowed to access. + */ + "virtualClusters"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8790,15 +10359,22 @@ declare class V1SleepAction { }[]; constructor(); } -declare class V1TCPSocketAction { +declare enum StorageV1AccessKeyScopeRoleRoleEnum { + Agent = "agent", + LoftCli = "loft-cli", + NetworkPeer = "network-peer", + Runner = "runner", + Vcluster = "vcluster" +} +declare class StorageV1AccessKeyVirtualCluster { /** - * Optional: Host name to connect to, defaults to the pod IP. + * Name of the virtual cluster. Empty means all virtual clusters. */ - "host"?: string; + "name"?: string; /** - * IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number. + * Namespace of the virtual cluster. Empty means all namespaces. */ - "port": IntOrString; + "namespace"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8814,11 +10390,19 @@ declare class V1TCPSocketAction { }[]; constructor(); } -declare class V1LifecycleHandler { - "exec"?: V1ExecAction; - "httpGet"?: V1HTTPGetAction; - "sleep"?: V1SleepAction; - "tcpSocket"?: V1TCPSocketAction; +declare class StorageV1GroupResources { + /** + * Group is the name of the API group that contains the resources. The empty string represents the core API group. + */ + "group"?: string; + /** + * ResourceNames is a list of resource instance names that the policy matches. Using this field requires Resources to be specified. An empty list implies that every instance of the resource is matched. + */ + "resourceNames"?: Array; + /** + * Resources is a list of resources this rule applies to. For example: \'pods\' matches pods. \'pods/log\' matches the log subresource of pods. \'*\' matches all resources and their subresources. \'pods/_*\' matches all subresources of pods. \'*_/scale\' matches all scale subresources. If wildcard is present, the validation rule will ensure resources do not overlap with each other. An empty list implies all resources and subresources in this API groups apply. + */ + "resources"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8834,9 +10418,35 @@ declare class V1LifecycleHandler { }[]; constructor(); } -declare class V1Lifecycle { - "postStart"?: V1LifecycleHandler; - "preStop"?: V1LifecycleHandler; +declare class StorageV1AccessKeyScopeRule { + /** + * Cluster that this rule matches. Only applies to cluster requests. If this is set, no requests for non cluster requests are allowed. An empty cluster means no restrictions will apply. + */ + "cluster"?: string; + /** + * Namespaces that this rule matches. The empty string \"\" matches non-namespaced resources. An empty list implies every namespace. + */ + "namespaces"?: Array; + /** + * NonResourceURLs is a set of URL paths that should be checked. *s are allowed, but only as the full, final step in the path. Examples: \"/metrics\" - Log requests for apiserver metrics \"/healthz*\" - Log all health checks + */ + "nonResourceURLs"?: Array; + /** + * RequestTargets is a list of request targets that are allowed. An empty list implies every request. + */ + "requestTargets"?: Array; + /** + * Resources that this rule matches. An empty list implies all kinds in all API groups. + */ + "resources"?: Array; + /** + * The verbs that match this rule. An empty list implies every verb. + */ + "verbs"?: Array; + /** + * VirtualClusters that this rule matches. Only applies to virtual cluster requests. An empty list means no restrictions will apply. + */ + "virtualClusters"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8852,15 +10462,15 @@ declare class V1Lifecycle { }[]; constructor(); } -declare class V1GRPCAction { +declare class StorageV1AccessKeyScopeSpace { /** - * Port number of the gRPC service. Number must be in the range 1 to 65535. + * Project is the name of the project. */ - "port": number; + "project"?: string; /** - * Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC. + * Space is the name of the space. You can specify * to select all spaces. */ - "service"?: string; + "space"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8876,35 +10486,15 @@ declare class V1GRPCAction { }[]; constructor(); } -declare class V1Probe { - "exec"?: V1ExecAction; - /** - * Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. - */ - "failureThreshold"?: number; - "grpc"?: V1GRPCAction; - "httpGet"?: V1HTTPGetAction; - /** - * Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - */ - "initialDelaySeconds"?: number; - /** - * How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. - */ - "periodSeconds"?: number; - /** - * Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - */ - "successThreshold"?: number; - "tcpSocket"?: V1TCPSocketAction; +declare class StorageV1AccessKeyScopeVirtualCluster { /** - * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod\'s terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + * Project is the name of the project. */ - "terminationGracePeriodSeconds"?: number; + "project"?: string; /** - * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + * VirtualCluster is the name of the virtual cluster to access. You can specify * to select all virtual clusters. */ - "timeoutSeconds"?: number; + "virtualCluster"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8920,15 +10510,35 @@ declare class V1Probe { }[]; constructor(); } -declare class V1ResourceClaim { +declare class StorageV1AccessKeyScope { /** - * Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. + * AllowLoftCLI allows certain read-only management requests to make sure loft cli works correctly with this specific access key. Deprecated: Use the `roles` field instead ```yaml # Example: roles: - role: loftCLI ``` */ - "name": string; + "allowLoftCli"?: boolean; /** - * Request is the name chosen for a request in the referenced claim. If empty, everything from the claim is made available, otherwise only the result of this request. + * Clusters specifies the project cluster the access key is allowed to access. */ - "request"?: string; + "clusters"?: Array; + /** + * Projects specifies the projects the access key should have access to. + */ + "projects"?: Array; + /** + * Roles is a set of managed permissions to apply to the access key. + */ + "roles"?: Array; + /** + * DEPRECATED: Use Projects, Spaces and VirtualClusters instead Rules specifies the rules that should apply to the access key. + */ + "rules"?: Array; + /** + * Spaces specifies the spaces the access key is allowed to access. + */ + "spaces"?: Array; + /** + * VirtualClusters specifies the virtual clusters the access key is allowed to access. + */ + "virtualClusters"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8944,23 +10554,12 @@ declare class V1ResourceClaim { }[]; constructor(); } -declare class V1ResourceRequirements { - /** - * Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. This field is immutable. It can only be set for containers. - */ - "claims"?: Array; - /** - * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - */ - "limits"?: { - [key: string]: string; - }; +declare class ManagementV1DirectClusterEndpointTokenSpec { + "scope"?: StorageV1AccessKeyScope; /** - * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + * The time to life for this access token in seconds */ - "requests"?: { - [key: string]: string; - }; + "ttl"?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -8976,15 +10575,8 @@ declare class V1ResourceRequirements { }[]; constructor(); } -declare class V1VolumeDevice { - /** - * devicePath is the path inside of the container that the device will be mapped to. - */ - "devicePath": string; - /** - * name must match the name of a persistentVolumeClaim in the pod - */ - "name": string; +declare class ManagementV1DirectClusterEndpointTokenStatus { + "token"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9000,35 +10592,18 @@ declare class V1VolumeDevice { }[]; constructor(); } -declare class V1VolumeMount { - /** - * Path within the container at which the volume should be mounted. Must not contain \':\'. - */ - "mountPath": string; - /** - * mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10. When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified (which defaults to None). Possible enum values: - `\"Bidirectional\"` means that the volume in a container will receive new mounts from the host or other containers, and its own mounts will be propagated from the container to the host or other containers. Note that this mode is recursively applied to all mounts in the volume (\"rshared\" in Linux terminology). - `\"HostToContainer\"` means that the volume in a container will receive new mounts from the host or other containers, but filesystems mounted inside the container won\'t be propagated to the host or other containers. Note that this mode is recursively applied to all mounts in the volume (\"rslave\" in Linux terminology). - `\"None\"` means that the volume in a container will not receive new mounts from the host or other containers, and filesystems mounted inside the container won\'t be propagated to the host or other containers. Note that this mode corresponds to \"private\" in Linux terminology. - */ - "mountPropagation"?: V1VolumeMountMountPropagationEnum; - /** - * This must match the Name of a Volume. - */ - "name": string; - /** - * Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false. - */ - "readOnly"?: boolean; - /** - * RecursiveReadOnly specifies whether read-only mounts should be handled recursively. If ReadOnly is false, this field has no meaning and must be unspecified. If ReadOnly is true, and this field is set to Disabled, the mount is not made recursively read-only. If this field is set to IfPossible, the mount is made recursively read-only, if it is supported by the container runtime. If this field is set to Enabled, the mount is made recursively read-only if it is supported by the container runtime, otherwise the pod will not be started and an error will be generated to indicate the reason. If this field is set to IfPossible or Enabled, MountPropagation must be set to None (or be unspecified, which defaults to None). If this field is not specified, it is treated as an equivalent of Disabled. - */ - "recursiveReadOnly"?: string; +declare class ManagementV1DirectClusterEndpointToken { /** - * Path within the volume from which the container\'s volume should be mounted. Defaults to \"\" (volume\'s root). + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "subPath"?: string; + "apiVersion"?: string; /** - * Expanded path within the volume from which the container\'s volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container\'s environment. Defaults to \"\" (volume\'s root). SubPathExpr and SubPath are mutually exclusive. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "subPathExpr"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1DirectClusterEndpointTokenSpec; + "status"?: ManagementV1DirectClusterEndpointTokenStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9044,123 +10619,63 @@ declare class V1VolumeMount { }[]; constructor(); } -declare enum V1VolumeMountMountPropagationEnum { - Bidirectional = "Bidirectional", - HostToContainer = "HostToContainer", - None = "None" -} -declare class V1Container { - /** - * Arguments to the entrypoint. The container image\'s CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - */ - "args"?: Array; - /** - * Entrypoint array. Not executed within a shell. The container image\'s ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container\'s environment. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - */ - "command"?: Array; - /** - * List of environment variables to set in the container. Cannot be updated. - */ - "env"?: Array; - /** - * List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. - */ - "envFrom"?: Array; - /** - * Container image name. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. - */ - "image"?: string; - /** - * Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn\'t present on disk. Container will fail if the image isn\'t present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn\'t present - */ - "imagePullPolicy"?: V1ContainerImagePullPolicyEnum; - "lifecycle"?: V1Lifecycle; - "livenessProbe"?: V1Probe; - /** - * Name of the container specified as a DNS_LABEL. Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated. - */ - "name": string; - /** - * List of ports to expose from the container. Not specifying a port here DOES NOT prevent that port from being exposed. Any port which is listening on the default \"0.0.0.0\" address inside a container will be accessible from the network. Modifying this array with strategic merge patch may corrupt the data. For more information See https://github.com/kubernetes/kubernetes/issues/108255. Cannot be updated. - */ - "ports"?: Array; - "readinessProbe"?: V1Probe; +declare class ManagementV1EventStatus { /** - * Resources resize policy for the container. + * Annotations is an unstructured key value map stored with an audit event that may be set by plugins invoked in the request serving chain, including authentication, authorization and admission plugins. Note that these annotations are for the audit event, and do not correspond to the metadata.annotations of the submitted object. Keys should uniquely identify the informing component to avoid name collisions (e.g. podsecuritypolicy.admission.k8s.io/policy). Values should be short. Annotations are included in the Metadata level. */ - "resizePolicy"?: Array; - "resources"?: V1ResourceRequirements; + "annotations"?: { + [key: string]: string; + }; /** - * RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is \"Always\". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod\'s restart policy and the container type. Setting the RestartPolicy as \"Always\" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy \"Always\" will be shut down. This lifecycle differs from normal init containers and is often referred to as a \"sidecar\" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "restartPolicy"?: string; - "securityContext"?: V1SecurityContext; - "startupProbe"?: V1Probe; + "apiVersion"?: string; /** - * Whether this container should allocate a buffer for stdin in the container runtime. If this is not set, reads from stdin in the container will always result in EOF. Default is false. + * Unique audit ID, generated for each request. */ - "stdin"?: boolean; + "auditID": string; + "impersonatedUser"?: V1UserInfo; /** - * Whether the container runtime should close the stdin channel after it has been opened by a single attach. When stdin is true the stdin stream will remain open across multiple attach sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the first client attaches to stdin, and then remains open and accepts data until the client disconnects, at which time stdin is closed and remains closed until the container is restarted. If this flag is false, a container processes that reads from stdin will never receive an EOF. Default is false + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "stdinOnce"?: boolean; + "kind"?: string; /** - * Optional: Path at which the file to which the container\'s termination message will be written is mounted into the container\'s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log. Cannot be updated. + * AuditLevel at which event was generated */ - "terminationMessagePath"?: string; + "level": string; + "objectRef"?: AuditV1ObjectReference; + "requestObject"?: RuntimeUnknown; /** - * Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated. Possible enum values: - `\"FallbackToLogsOnError\"` will read the most recent contents of the container logs for the container status message when the container exits with an error and the terminationMessagePath has no contents. - `\"File\"` is the default behavior and will set the container status message to the contents of the container\'s terminationMessagePath when the container exits. + * MicroTime is version of Time with microsecond level precision. */ - "terminationMessagePolicy"?: V1ContainerTerminationMessagePolicyEnum; + "requestReceivedTimestamp"?: Date; /** - * Whether this container should allocate a TTY for itself, also requires \'stdin\' to be true. Default is false. + * RequestURI is the request URI as sent by the client to a server. */ - "tty"?: boolean; + "requestURI": string; + "responseObject"?: RuntimeUnknown; + "responseStatus"?: V1Status; /** - * volumeDevices is the list of block devices to be used by the container. + * Source IPs, from where the request originated and intermediate proxies. */ - "volumeDevices"?: Array; + "sourceIPs"?: Array; /** - * Pod volumes to mount into the container\'s filesystem. Cannot be updated. + * Stage of the request handling when this event instance was generated. */ - "volumeMounts"?: Array; + "stage": string; /** - * Container\'s working directory. If not specified, the container runtime\'s default will be used, which might be configured in the container image. Cannot be updated. + * MicroTime is version of Time with microsecond level precision. */ - "workingDir"?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare enum V1ContainerImagePullPolicyEnum { - Always = "Always", - IfNotPresent = "IfNotPresent", - Never = "Never" -} -declare enum V1ContainerTerminationMessagePolicyEnum { - FallbackToLogsOnError = "FallbackToLogsOnError", - File = "File" -} -declare class V1HostAlias { + "stageTimestamp"?: Date; + "user": V1UserInfo; /** - * Hostnames for the above IP address. + * UserAgent records the user agent string reported by the client. Note that the UserAgent is provided by the client, and must not be trusted. */ - "hostnames"?: Array; + "userAgent"?: string; /** - * IP address of the host file entry. + * Verb is the kubernetes verb associated with the request. For non-resource requests, this is the lower-cased HTTP method. */ - "ip": string; + "verb": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9176,27 +10691,21 @@ declare class V1HostAlias { }[]; constructor(); } -declare class V1Toleration { - /** - * Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. Possible enum values: - `\"NoExecute\"` Evict any already-running pods that do not tolerate the taint. Currently enforced by NodeController. - `\"NoSchedule\"` Do not allow new pods to schedule onto the node unless they tolerate the taint, but allow all pods submitted to Kubelet without going through the scheduler to start, and allow all already-running pods to continue running. Enforced by the scheduler. - `\"PreferNoSchedule\"` Like TaintEffectNoSchedule, but the scheduler tries not to schedule new pods onto the node, rather than prohibiting new pods from scheduling onto the node entirely. Enforced by the scheduler. - */ - "effect"?: V1TolerationEffectEnum; - /** - * Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. - */ - "key"?: string; +declare class ManagementV1Event { /** - * Operator represents a key\'s relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category. Possible enum values: - `\"Equal\"` - `\"Exists\"` + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "operator"?: V1TolerationOperatorEnum; + "apiVersion"?: string; /** - * TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "tolerationSeconds"?: number; + "kind"?: string; + "metadata"?: V1ObjectMeta; /** - * Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string. + * EventSpec holds the specification */ - "value"?: string; + "spec"?: any; + "status"?: ManagementV1EventStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9212,32 +10721,33 @@ declare class V1Toleration { }[]; constructor(); } -declare enum V1TolerationEffectEnum { - NoExecute = "NoExecute", - NoSchedule = "NoSchedule", - PreferNoSchedule = "PreferNoSchedule" -} -declare enum V1TolerationOperatorEnum { - Equal = "Equal", - Exists = "Exists" -} -declare class V1AWSElasticBlockStoreVolumeSource { +declare class ManagementV1FeatureStatus { /** - * fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + * Compatibility contains a series of semver compatibility constraints */ - "fsType"?: string; + "compatibility"?: string; + "description"?: string; + "displayName"?: string; /** - * partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). + * Internal marks internal features that should not be shown on the license view */ - "partition"?: number; + "internal"?: boolean; /** - * readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + * Labels contains a list of labels to be displayed for this feature (e.g. alpha, beta) */ - "readOnly"?: boolean; + "labels"?: Array; /** - * volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + * Name is the name of the feature (FeatureName) This cannot be FeatureName because it needs to be downward compatible e.g. older Loft version doesn\'t know a newer feature but it will still be received and still needs to be rendered in the license view */ - "volumeID": string; + "name": string; + /** + * Status shows the status of the feature (see type FeatureStatus) + */ + "status"?: string; + /** + * Used marks features that are currently used in the product + */ + "used"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9253,31 +10763,21 @@ declare class V1AWSElasticBlockStoreVolumeSource { }[]; constructor(); } -declare class V1AzureDiskVolumeSource { - /** - * cachingMode is the Host Caching mode: None, Read Only, Read Write. Possible enum values: - `\"None\"` - `\"ReadOnly\"` - `\"ReadWrite\"` - */ - "cachingMode"?: V1AzureDiskVolumeSourceCachingModeEnum; - /** - * diskName is the Name of the data disk in the blob storage - */ - "diskName": string; - /** - * diskURI is the URI of data disk in the blob storage - */ - "diskURI": string; +declare class ManagementV1Feature { /** - * fsType is Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "fsType"?: string; + "apiVersion"?: string; /** - * kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared Possible enum values: - `\"Dedicated\"` - `\"Managed\"` - `\"Shared\"` + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "kind"?: V1AzureDiskVolumeSourceKindEnum; + "kind"?: string; + "metadata"?: V1ObjectMeta; /** - * readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * FeatureSpec holds the specification */ - "readOnly"?: boolean; + "spec"?: any; + "status"?: ManagementV1FeatureStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9293,29 +10793,15 @@ declare class V1AzureDiskVolumeSource { }[]; constructor(); } -declare enum V1AzureDiskVolumeSourceCachingModeEnum { - None = "None", - ReadOnly = "ReadOnly", - ReadWrite = "ReadWrite" -} -declare enum V1AzureDiskVolumeSourceKindEnum { - Dedicated = "Dedicated", - Managed = "Managed", - Shared = "Shared" -} -declare class V1AzureFileVolumeSource { - /** - * readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - */ - "readOnly"?: boolean; +declare class ManagementV1IngressAuthTokenSpec { /** - * secretName is the name of secret that contains Azure Storage Account Name and Key + * Host is the host where the UI should get redirected */ - "secretName": string; + "host"?: string; /** - * shareName is the azure share Name + * Signature is the signature of the agent for the host */ - "shareName": string; + "signature"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9331,11 +10817,8 @@ declare class V1AzureFileVolumeSource { }[]; constructor(); } -declare class V1LocalObjectReference { - /** - * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - */ - "name"?: string; +declare class ManagementV1IngressAuthTokenStatus { + "token"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9351,26 +10834,18 @@ declare class V1LocalObjectReference { }[]; constructor(); } -declare class V1CSIVolumeSource { - /** - * driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. - */ - "driver": string; - /** - * fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. - */ - "fsType"?: string; - "nodePublishSecretRef"?: V1LocalObjectReference; +declare class ManagementV1IngressAuthToken { /** - * readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "readOnly"?: boolean; + "apiVersion"?: string; /** - * volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver\'s documentation for supported values. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "volumeAttributes"?: { - [key: string]: string; - }; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1IngressAuthTokenSpec; + "status"?: ManagementV1IngressAuthTokenStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9386,28 +10861,19 @@ declare class V1CSIVolumeSource { }[]; constructor(); } -declare class V1CephFSVolumeSource { - /** - * monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - */ - "monitors": Array; - /** - * path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / - */ - "path"?: string; +declare class LicenseApiRequest { /** - * readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + * Group is the api group. */ - "readOnly"?: boolean; + "group"?: string; /** - * secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + * Resource is the resource name for the request. */ - "secretFile"?: string; - "secretRef"?: V1LocalObjectReference; + "resource"?: string; /** - * user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + * Verbs is the list of verbs for the request. */ - "user"?: string; + "verbs"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9423,20 +10889,15 @@ declare class V1CephFSVolumeSource { }[]; constructor(); } -declare class V1CinderVolumeSource { - /** - * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md - */ - "fsType"?: string; +declare class LicenseApiAnalytics { /** - * readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + * Endpoint is the endpoint for the analytics server. */ - "readOnly"?: boolean; - "secretRef"?: V1LocalObjectReference; + "endpoint"?: string; /** - * volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md + * Requests is a slice of requested resources to return analytics for. */ - "volumeID": string; + "requests"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9452,19 +10913,19 @@ declare class V1CinderVolumeSource { }[]; constructor(); } -declare class V1KeyToPath { +declare class LicenseApiResourceCount { /** - * key is the key to project. + * Active specifies the number of currently active resource (non-sleeping). */ - "key": string; + "active"?: number; /** - * mode is Optional: mode bits used to set permissions on this file. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * TotalCreated is a continuous counter of the amount of resources ever created. */ - "mode"?: number; + "created"?: number; /** - * path is the relative path of the file to map the key to. May not be an absolute path. May not contain the path element \'..\'. May not start with the string \'..\'. + * Total specifies the number of currently existing resources. */ - "path": string; + "total"?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9480,23 +10941,66 @@ declare class V1KeyToPath { }[]; constructor(); } -declare class V1ConfigMapVolumeSource { +declare class LicenseApiBlockRequest { /** - * defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * Group is the api group. */ - "defaultMode"?: number; + "group"?: string; + "overage"?: LicenseApiResourceCount; /** - * items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. + * Resource is the resource name for the request. */ - "items"?: Array; + "resource"?: string; /** - * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * Verbs is the list of verbs for the request. */ - "name"?: string; + "verbs"?: Array; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class LicenseApiLicenseAPIRoute { /** - * optional specify whether the ConfigMap or its keys must be defined + * Tells the frontend whether to make a direct request or to make it via the backend (via generic license api request) */ - "optional"?: boolean; + "direct"?: boolean; + "method"?: string; + "url"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class LicenseApiLicenseAPIRoutes { + "chatAuth"?: LicenseApiLicenseAPIRoute; + "checkout"?: LicenseApiLicenseAPIRoute; + "featureDetails"?: LicenseApiLicenseAPIRoute; + "featurePreview"?: LicenseApiLicenseAPIRoute; + "featureSetup"?: LicenseApiLicenseAPIRoute; + "moduleActivation"?: LicenseApiLicenseAPIRoute; + "modulePreview"?: LicenseApiLicenseAPIRoute; + "portal"?: LicenseApiLicenseAPIRoute; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9512,17 +11016,25 @@ declare class V1ConfigMapVolumeSource { }[]; constructor(); } -declare class V1DownwardAPIVolumeFile { - "fieldRef"?: V1ObjectFieldSelector; +declare class LicenseApiFeature { /** - * Optional: mode bits used to set permissions on this file, must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. If not specified, the volume defaultMode will be used. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * Compatibility contains a series of semver compatibility constraints */ - "mode"?: number; + "compatibility"?: string; + "description"?: string; + "displayName"?: string; /** - * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the \'..\' path. Must be utf-8 encoded. The first item of the relative path must not start with \'..\' + * Labels contains a list of labels to be displayed for this feature (e.g. alpha, beta) */ - "path": string; - "resourceFieldRef"?: V1ResourceFieldSelector; + "labels"?: Array; + /** + * Name is the name of the feature (FeatureName) This cannot be FeatureName because it needs to be downward compatible e.g. older Loft version doesn\'t know a newer feature but it will still be received and still needs to be rendered in the license view + */ + "name": string; + /** + * Status shows the status of the feature (see type FeatureStatus) + */ + "status"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9538,15 +11050,16 @@ declare class V1DownwardAPIVolumeFile { }[]; constructor(); } -declare class V1DownwardAPIVolumeSource { +declare class LicenseApiLimit { /** - * Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. + * DisplayName is for display purposes. */ - "defaultMode"?: number; + "displayName"?: string; /** - * Items is a list of downward API volume file + * Name is the name of the resource (ResourceName) */ - "items"?: Array; + "name"?: string; + "quantity"?: LicenseApiResourceCount; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9562,15 +11075,15 @@ declare class V1DownwardAPIVolumeSource { }[]; constructor(); } -declare class V1EmptyDirVolumeSource { - /** - * medium represents what type of storage medium should back this directory. The default is \"\" which means to use the node\'s default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - */ - "medium"?: string; +declare class LicenseApiModule { + "displayName"?: string; + "features"?: Array; + "limits"?: Array; /** - * sizeLimit is the total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + * Name of the module (ModuleName) */ - "sizeLimit"?: string; + "name": string; + "status"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9586,19 +11099,19 @@ declare class V1EmptyDirVolumeSource { }[]; constructor(); } -declare class V1TypedLocalObjectReference { +declare class LicenseApiInvoice { /** - * APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. + * Currency specifies the currency of Total in 3-character ISO 4217 code Default is: \"\" (representing USD) */ - "apiGroup"?: string; + "currency"?: string; /** - * Kind is the type of resource being referenced + * Date contains the unix timestamp marking the date this invoices was or will be created */ - "kind": string; + "date"?: number; /** - * Name is the name of resource being referenced + * Total is the total of the invoice */ - "name": string; + "total"?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9614,23 +11127,15 @@ declare class V1TypedLocalObjectReference { }[]; constructor(); } -declare class V1TypedObjectReference { - /** - * APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required. - */ - "apiGroup"?: string; - /** - * Kind is the type of resource being referenced - */ - "kind": string; +declare class LicenseApiPlanPeriod { /** - * Name is the name of resource being referenced + * CurrentPeriodEnd contains the unix timestamp marking the end of the current period */ - "name": string; + "end"?: number; /** - * Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace\'s owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + * CurrentPeriodStart contains the unix timestamp marking the start of the current period */ - "namespace"?: string; + "start"?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9646,19 +11151,15 @@ declare class V1TypedObjectReference { }[]; constructor(); } -declare class V1VolumeResourceRequirements { +declare class LicenseApiPlanExpiration { /** - * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + * ExpiresAt is the unix timestamp of when the plan expires */ - "limits"?: { - [key: string]: string; - }; + "expiresAt"?: number; /** - * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + * UpgradesTo states the name of the plan that is replacing the current one upon its expiration If this is nil, then this plan just expires (i.e. the subscription may be canceled, paused, etc.) */ - "requests"?: { - [key: string]: string; - }; + "upgradesTo"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9674,59 +11175,27 @@ declare class V1VolumeResourceRequirements { }[]; constructor(); } -declare class V1PersistentVolumeClaimSpec { +declare class LicenseApiPriceTier { /** - * accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + * Currency specifies the currency of UnitPrice and FlatFee in 3-character ISO 4217 code Default is: \"\" (representing USD) */ - "accessModes"?: Array; - "dataSource"?: V1TypedLocalObjectReference; - "dataSourceRef"?: V1TypedObjectReference; - "resources"?: V1VolumeResourceRequirements; - "selector"?: V1LabelSelector; + "currency"?: string; /** - * storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + * FlatFee is the flat fee for this tier */ - "storageClassName"?: string; + "flatFee"?: number; /** - * volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it\'s not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default). + * MaxQuantity is the max quantity that can be purchased */ - "volumeAttributesClassName"?: string; + "max"?: number; /** - * volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. Possible enum values: - `\"Block\"` means the volume will not be formatted with a filesystem and will remain a raw block device. - `\"Filesystem\"` means the volume will be or is formatted with a filesystem. + * MinQuantity is the quantity included in this plan */ - "volumeMode"?: V1PersistentVolumeClaimSpecVolumeModeEnum; + "min"?: number; /** - * volumeName is the binding reference to the PersistentVolume backing this claim. + * UnitPrice is the price per unit in this tier */ - "volumeName"?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare enum V1PersistentVolumeClaimSpecAccessModesEnum { - ReadOnlyMany = "ReadOnlyMany", - ReadWriteMany = "ReadWriteMany", - ReadWriteOnce = "ReadWriteOnce", - ReadWriteOncePod = "ReadWriteOncePod" -} -declare enum V1PersistentVolumeClaimSpecVolumeModeEnum { - Block = "Block", - Filesystem = "Filesystem" -} -declare class V1PersistentVolumeClaimTemplate { - "metadata"?: V1ObjectMeta; - "spec": V1PersistentVolumeClaimSpec; + "unitPrice"?: number; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9742,8 +11211,15 @@ declare class V1PersistentVolumeClaimTemplate { }[]; constructor(); } -declare class V1EphemeralVolumeSource { - "volumeClaimTemplate"?: V1PersistentVolumeClaimTemplate; +declare class LicenseApiTierResource { + /** + * Name of the resource (ResourceName) + */ + "name"?: string; + /** + * Status defines which resources will be counted towards the limit (e.g. active, total, total created etc.) + */ + "status"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9759,27 +11235,37 @@ declare class V1EphemeralVolumeSource { }[]; constructor(); } -declare class V1FCVolumeSource { +declare class LicenseApiPlanPrice { + "exp"?: LicenseApiPlanExpiration; /** - * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * ID of the price */ - "fsType"?: string; + "id"?: string; /** - * lun is Optional: FC target lun number + * Interval contains the time span of each period (e.g. month, year) */ - "lun"?: number; + "interval"?: string; /** - * readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * IntervalCount specifies if the number of intervals (e.g. 3 [months]) */ - "readOnly"?: boolean; + "intervalCount"?: number; /** - * targetWWNs is Optional: FC target worldwide names (WWNs) + * Quantity sets the quantity the TierResource is supposed to be at If this is the active price, then this is the subscription quantity (currently purchased quantity) */ - "targetWWNs"?: Array; + "quantity"?: number; + "resource"?: LicenseApiTierResource; /** - * wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + * Status is the status of the price (PlanStatus) If the plan is active, one of its prices must be active as well */ - "wwids"?: Array; + "status"?: string; + /** + * TierMode defines how tiers should be used + */ + "tierMode"?: string; + /** + * Tiers is a list of tiers in this plan + */ + "tiers"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9795,26 +11281,31 @@ declare class V1FCVolumeSource { }[]; constructor(); } -declare class V1FlexVolumeSource { +declare class LicenseApiTrial { /** - * driver is the name of the driver to use for this volume. + * DisplayName is a display name for the trial */ - "driver": string; + "displayName"?: string; /** - * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script. + * DowngradesTo states the name of the plan that is replacing the current one once the trial expires If this is nil, then this plan just expires (i.e. the subscription may be canceled, paused, etc.) */ - "fsType"?: string; + "downgradesTo"?: string; /** - * options is Optional: this field holds extra command options if any. + * End is the unix timestamp stating when the trial will end or ended */ - "options"?: { - [key: string]: string; - }; + "end"?: number; /** - * readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * ID is the unique id of this trial */ - "readOnly"?: boolean; - "secretRef"?: V1LocalObjectReference; + "id"?: string; + /** + * Start is the unix timestamp stating when the trial was started + */ + "start"?: number; + /** + * Status is the status of this trial (TrialStatus) + */ + "status"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9830,15 +11321,38 @@ declare class V1FlexVolumeSource { }[]; constructor(); } -declare class V1FlockerVolumeSource { +declare class LicenseApiPlan { /** - * datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated + * AddOns are plans that can be added to this plan */ - "datasetName"?: string; + "addons"?: Array; /** - * datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset + * DisplayName is the display name of the plan + */ + "displayName"?: string; + /** + * Features is a list of features included in the plan + */ + "features"?: Array; + /** + * ID of the plan + */ + "id"?: string; + "invoice"?: LicenseApiInvoice; + /** + * Limits is a list of resources included in the plan and their limits + */ + "limits"?: Array; + "period"?: LicenseApiPlanPeriod; + /** + * Prices provides details about the available prices (depending on the interval, for example) + */ + "prices"?: Array; + /** + * Status is the status of the plan There should only be 1 active plan at the top-level (not including AddOns) The respective price in Prices will have the active status as well */ - "datasetUUID"?: string; + "status"?: string; + "trial"?: LicenseApiTrial; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9854,51 +11368,45 @@ declare class V1FlockerVolumeSource { }[]; constructor(); } -declare class V1GCEPersistentDiskVolumeSource { +declare class LicenseApiLicense { + "analytics"?: LicenseApiAnalytics; /** - * fsType is filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + * Announcements is a map string/string such that we can easily add any additional data without needing to change types. For now, we will use the keys \"name\" and \"content\". */ - "fsType"?: string; + "announcement"?: Array; /** - * partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + * BlockRequests specifies which requests the product should block when a limit is exceeded. */ - "partition"?: number; + "block"?: Array; /** - * pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + * Buttons is a slice of license server endpoints (buttons) that the Loft instance may need to hit. Each Button contains the display text and link for the front end to work with. */ - "pdName": string; + "buttons"?: Array; /** - * readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + * DomainToken holds the JWT with the URL that the Loft instance is publicly available on. (via Loft router) */ - "readOnly"?: boolean; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare class V1GitRepoVolumeSource { + "domainToken"?: string; /** - * directory is the target directory name. Must not contain or start with \'..\'. If \'.\' is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name. + * Entity holds a name for an organization, person or entity this product is licensed for. This will be displayed to the user. */ - "directory"?: string; + "entity"?: string; /** - * repository is the URL + * InstanceID contains the instance id of the Loft instance */ - "repository": string; + "instance"?: string; /** - * revision is the commit hash for the specified revision. + * IsOffline indicates if the license is an offline license or not. */ - "revision"?: string; + "isOffline"?: boolean; + /** + * Modules is a list of modules. + */ + "modules"?: Array; + /** + * Plans contains a list of plans + */ + "plans"?: Array; + "routes"?: LicenseApiLicenseAPIRoutes; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9914,19 +11422,14 @@ declare class V1GitRepoVolumeSource { }[]; constructor(); } -declare class V1GlusterfsVolumeSource { - /** - * endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - */ - "endpoints": string; - /** - * path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod - */ - "path": string; +declare class ManagementV1LicenseStatus { + "license"?: LicenseApiLicense; /** - * readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + * ResourceUsage shows the current usage of license limit. */ - "readOnly"?: boolean; + "resourceUsage"?: { + [key: string]: LicenseApiResourceCount; + }; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9942,15 +11445,18 @@ declare class V1GlusterfsVolumeSource { }[]; constructor(); } -declare class V1HostPathVolumeSource { +declare class ManagementV1License { /** - * path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "path": string; + "apiVersion"?: string; /** - * type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath Possible enum values: - `\"\"` For backwards compatible, leave it empty if unset - `\"BlockDevice\"` A block device must exist at the given path - `\"CharDevice\"` A character device must exist at the given path - `\"Directory\"` A directory must exist at the given path - `\"DirectoryOrCreate\"` If nothing exists at the given path, an empty directory will be created there as needed with file mode 0755, having the same group and ownership with Kubelet. - `\"File\"` A file must exist at the given path - `\"FileOrCreate\"` If nothing exists at the given path, an empty file will be created there as needed with file mode 0644, having the same group and ownership with Kubelet. - `\"Socket\"` A UNIX socket must exist at the given path + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "type"?: V1HostPathVolumeSourceTypeEnum; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: any; + "status"?: ManagementV1LicenseStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -9966,82 +11472,67 @@ declare class V1HostPathVolumeSource { }[]; constructor(); } -declare enum V1HostPathVolumeSourceTypeEnum { - Empty = "", - BlockDevice = "BlockDevice", - CharDevice = "CharDevice", - Directory = "Directory", - DirectoryOrCreate = "DirectoryOrCreate", - File = "File", - FileOrCreate = "FileOrCreate", - Socket = "Socket" -} -declare class V1ISCSIVolumeSource { +declare class UiV1UISettingsSpec { /** - * chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + * AccentColor is the color value (ex: \"#12345\") to use for the accent */ - "chapAuthDiscovery"?: boolean; + "accentColor"?: string; /** - * chapAuthSession defines whether support iSCSI Session CHAP authentication + * CustomCSS holds URLs with custom css files that should be included when loading the UI */ - "chapAuthSession"?: boolean; + "customCss"?: Array; /** - * fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + * CustomJavaScript holds URLs with custom js files that should be included when loading the UI */ - "fsType"?: string; + "customJavaScript"?: Array; /** - * initiatorName is the custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection. + * DefaultVClusterVersion is the default version of vClusters */ - "initiatorName"?: string; + "defaultVClusterVersion"?: string; /** - * iqn is the target iSCSI Qualified Name. + * HasHelmRelease indicates whether the vCluster Platform instance has been installed via Helm */ - "iqn": string; + "hasHelmRelease"?: boolean; /** - * iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to \'default\' (tcp). + * LegalTemplate is a text (html) string containing the legal template to prompt to users when authenticating to Loft */ - "iscsiInterface"?: string; + "legalTemplate"?: string; /** - * lun represents iSCSI Target Lun number. + * LoftHosted indicates whether the vCluster Platform instance is hosted and operated by Loft Labs Inc. */ - "lun": number; + "loftHosted"?: boolean; /** - * portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + * LoftVersion holds the current loft version */ - "portals"?: Array; + "loftVersion"?: string; /** - * readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. + * LogoBackgroundColor is the color value (ex: \"#12345\") to use as the background color for the logo */ - "readOnly"?: boolean; - "secretRef"?: V1LocalObjectReference; + "logoBackgroundColor"?: string; /** - * targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260). + * LogoURL is url pointing to the logo to use in the Loft UI. This path must be accessible for clients accessing the Loft UI! */ - "targetPortal": string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare class V1ImageVolumeSource { + "logoURL"?: string; /** - * Policy for pulling OCI objects. Possible values are: Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn\'t present. IfNotPresent: the kubelet pulls if the reference isn\'t already present on disk. Container creation will fail if the reference isn\'t present and the pull fails. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. Possible enum values: - `\"Always\"` means that kubelet always attempts to pull the latest image. Container will fail If the pull fails. - `\"IfNotPresent\"` means that kubelet pulls if the image isn\'t present on disk. Container will fail if the image isn\'t present and the pull fails. - `\"Never\"` means that kubelet never pulls an image, but only uses a local image. Container will fail if the image isn\'t present + * NavBarButtons holds extra nav bar buttons */ - "pullPolicy"?: V1ImageVolumeSourcePullPolicyEnum; + "navBarButtons"?: Array; /** - * Required: Image or artifact reference to be used. Behaves in the same way as pod.spec.containers[*].image. Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. More info: https://kubernetes.io/docs/concepts/containers/images This field is optional to allow higher level config management to default or override container images in workload controllers like Deployments and StatefulSets. + * Offline is true if loft is running in an airgapped environment */ - "reference"?: string; + "offline"?: boolean; + /** + * PrimaryColor is the color value (ex: \"#12345\") to use as the primary color + */ + "primaryColor"?: string; + /** + * Name is the name of the product + */ + "productName"?: string; + /** + * SidebarColor is the color value (ex: \"#12345\") to use for the sidebar + */ + "sidebarColor"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10057,24 +11548,21 @@ declare class V1ImageVolumeSource { }[]; constructor(); } -declare enum V1ImageVolumeSourcePullPolicyEnum { - Always = "Always", - IfNotPresent = "IfNotPresent", - Never = "Never" -} -declare class V1NFSVolumeSource { +declare class UiV1UISettings { /** - * path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "path": string; + "apiVersion"?: string; /** - * readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "readOnly"?: boolean; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: UiV1UISettingsSpec; /** - * server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + * UISettingsStatus holds the status */ - "server": string; + "status"?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10090,15 +11578,13 @@ declare class V1NFSVolumeSource { }[]; constructor(); } -declare class V1PersistentVolumeClaimVolumeSource { - /** - * claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - */ - "claimName": string; - /** - * readOnly Will force the ReadOnly setting in VolumeMounts. Default false. - */ - "readOnly"?: boolean; +declare class ManagementV1KioskSpec { + "UISettings"?: UiV1UISettings; + "chartInfo"?: ClusterV1ChartInfo; + "helmRelease"?: ClusterV1HelmRelease; + "license"?: ManagementV1License; + "sleepModeConfig"?: ClusterV1SleepModeConfig; + "storageClusterQuota"?: StorageV1ClusterQuota; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10114,15 +11600,18 @@ declare class V1PersistentVolumeClaimVolumeSource { }[]; constructor(); } -declare class V1PhotonPersistentDiskVolumeSource { +declare class ManagementV1Kiosk { /** - * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "fsType"?: string; + "apiVersion"?: string; /** - * pdID is the ID that identifies Photon Controller persistent disk + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "pdID": string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1KioskSpec; + "status"?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10138,19 +11627,15 @@ declare class V1PhotonPersistentDiskVolumeSource { }[]; constructor(); } -declare class V1PortworxVolumeSource { - /** - * fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\". Implicitly inferred to be \"ext4\" if unspecified. - */ - "fsType"?: string; +declare class LicenseApiGenericRequestInput { /** - * readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * Payload provides the json encoded payload */ - "readOnly"?: boolean; + "payload"?: string; /** - * volumeID uniquely identifies a Portworx volume + * ReturnURL is the url from which the request is initiated */ - "volumeID": string; + "returnURL"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10163,27 +11648,15 @@ declare class V1PortworxVolumeSource { baseName: string; type: string; format: string; - }[]; - constructor(); -} -declare class V1ClusterTrustBundleProjection { - "labelSelector"?: V1LabelSelector; - /** - * Select a single ClusterTrustBundle by object name. Mutually-exclusive with signerName and labelSelector. - */ - "name"?: string; - /** - * If true, don\'t block pod startup if the referenced ClusterTrustBundle(s) aren\'t available. If using name, then the named ClusterTrustBundle is allowed not to exist. If using signerName, then the combination of signerName and labelSelector is allowed to match zero ClusterTrustBundles. - */ - "optional"?: boolean; - /** - * Relative path from the volume root to write the bundle. - */ - "path": string; + }[]; + constructor(); +} +declare class ManagementV1LicenseRequestSpec { + "input"?: LicenseApiGenericRequestInput; /** - * Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated. + * URL is the url for the request. */ - "signerName"?: string; + "url"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10199,19 +11672,19 @@ declare class V1ClusterTrustBundleProjection { }[]; constructor(); } -declare class V1ConfigMapProjection { +declare class LicenseApiGenericRequestOutput { /** - * items if unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. + * Buttons to be shown to the user alongside other content (e.g. HTML). */ - "items"?: Array; + "buttons"?: Array; /** - * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * HTML to display to the user. */ - "name"?: string; + "html"?: string; /** - * optional specify whether the ConfigMap or its keys must be defined + * RedirectURL to redirect the user to. */ - "optional"?: boolean; + "redirectURL"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10227,11 +11700,8 @@ declare class V1ConfigMapProjection { }[]; constructor(); } -declare class V1DownwardAPIProjection { - /** - * Items is a list of DownwardAPIVolume file - */ - "items"?: Array; +declare class ManagementV1LicenseRequestStatus { + "output"?: LicenseApiGenericRequestOutput; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10247,19 +11717,18 @@ declare class V1DownwardAPIProjection { }[]; constructor(); } -declare class V1SecretProjection { - /** - * items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. - */ - "items"?: Array; +declare class ManagementV1LicenseRequest { /** - * Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "name"?: string; + "apiVersion"?: string; /** - * optional field specify whether the Secret or its key must be defined + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "optional"?: boolean; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1LicenseRequestSpec; + "status"?: ManagementV1LicenseRequestStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10275,19 +11744,9 @@ declare class V1SecretProjection { }[]; constructor(); } -declare class V1ServiceAccountTokenProjection { - /** - * audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver. - */ - "audience"?: string; - /** - * expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes. - */ - "expirationSeconds"?: number; - /** - * path is the path relative to the mount point of the file to project the token into. - */ - "path": string; +declare class ManagementV1LicenseTokenSpec { + "payload"?: string; + "url"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10303,12 +11762,15 @@ declare class V1ServiceAccountTokenProjection { }[]; constructor(); } -declare class V1VolumeProjection { - "clusterTrustBundle"?: V1ClusterTrustBundleProjection; - "configMap"?: V1ConfigMapProjection; - "downwardAPI"?: V1DownwardAPIProjection; - "secret"?: V1SecretProjection; - "serviceAccountToken"?: V1ServiceAccountTokenProjection; +declare class LicenseApiInstanceTokenAuth { + /** + * Certificate is the signing certificate for the token. + */ + "certificate": string; + /** + * Token is the jwt token identifying the loft instance. + */ + "token": string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10324,15 +11786,8 @@ declare class V1VolumeProjection { }[]; constructor(); } -declare class V1ProjectedVolumeSource { - /** - * defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. - */ - "defaultMode"?: number; - /** - * sources is the list of volume projections. Each entry in this list handles one source. - */ - "sources"?: Array; +declare class ManagementV1LicenseTokenStatus { + "token"?: LicenseApiInstanceTokenAuth; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10348,31 +11803,18 @@ declare class V1ProjectedVolumeSource { }[]; constructor(); } -declare class V1QuobyteVolumeSource { - /** - * group to map volume access to Default is no group - */ - "group"?: string; - /** - * readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. - */ - "readOnly"?: boolean; - /** - * registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes - */ - "registry": string; - /** - * tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin - */ - "tenant"?: string; +declare class ManagementV1LicenseToken { /** - * user to map volume access to Defaults to serivceaccount user + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "user"?: string; + "apiVersion"?: string; /** - * volume is a string that references an already created Quobyte volume by name. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "volume": string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1LicenseTokenSpec; + "status"?: ManagementV1LicenseTokenStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10388,36 +11830,16 @@ declare class V1QuobyteVolumeSource { }[]; constructor(); } -declare class V1RBDVolumeSource { - /** - * fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd - */ - "fsType"?: string; - /** - * image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - */ - "image": string; - /** - * keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - */ - "keyring"?: string; - /** - * monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - */ - "monitors": Array; - /** - * pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - */ - "pool"?: string; +declare class ManagementV1LoftUpgradeSpec { /** - * readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * If specified, updated the release in the given namespace */ - "readOnly"?: boolean; - "secretRef"?: V1LocalObjectReference; + "namespace"?: string; /** - * user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + * If specified, uses this as release name */ - "user"?: string; + "release"?: string; + "version"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10433,44 +11855,18 @@ declare class V1RBDVolumeSource { }[]; constructor(); } -declare class V1ScaleIOVolumeSource { - /** - * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\". - */ - "fsType"?: string; - /** - * gateway is the host address of the ScaleIO API Gateway. - */ - "gateway": string; - /** - * protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. - */ - "protectionDomain"?: string; - /** - * readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. - */ - "readOnly"?: boolean; - "secretRef": V1LocalObjectReference; - /** - * sslEnabled Flag enable/disable SSL communication with Gateway, default false - */ - "sslEnabled"?: boolean; - /** - * storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. - */ - "storageMode"?: string; - /** - * storagePool is the ScaleIO Storage Pool associated with the protection domain. - */ - "storagePool"?: string; +declare class ManagementV1LoftUpgrade { /** - * system is the name of the storage system as configured in ScaleIO. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "system": string; + "apiVersion"?: string; /** - * volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "volumeName"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1LoftUpgradeSpec; + "status"?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10486,23 +11882,21 @@ declare class V1ScaleIOVolumeSource { }[]; constructor(); } -declare class V1SecretVolumeSource { - /** - * defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. - */ - "defaultMode"?: number; +declare class ManagementV1OIDCClient { /** - * items If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the \'..\' path or start with \'..\'. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "items"?: Array; + "apiVersion"?: string; /** - * optional field specify whether the Secret or its keys must be defined + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "optional"?: boolean; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1OIDCClientSpec; /** - * secretName is the name of the secret in the pod\'s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + * OIDCClientStatus holds the status */ - "secretName"?: string; + "status"?: any; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10518,24 +11912,39 @@ declare class V1SecretVolumeSource { }[]; constructor(); } -declare class V1StorageOSVolumeSource { +declare class StorageV1AccessKeyIdentity { /** - * fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * Connector is the name of the connector this access key was created from */ - "fsType"?: string; + "connector"?: string; /** - * readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. + * ConnectorData holds data used by the connector for subsequent requests after initial authentication, such as access tokens for upstream providers. This data is never shared with end users, OAuth clients, or through the API. */ - "readOnly"?: boolean; - "secretRef"?: V1LocalObjectReference; + "connectorData"?: string; /** - * volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. + * The user email */ - "volumeName"?: string; + "email"?: string; /** - * volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod\'s namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to \"default\" if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created. + * If the user email was verified */ - "volumeNamespace"?: string; + "emailVerified"?: boolean; + /** + * The groups from the identity provider + */ + "groups"?: Array; + /** + * The preferred username / display name + */ + "preferredUsername"?: string; + /** + * The subject of the user + */ + "userId"?: string; + /** + * The username + */ + "username"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10551,23 +11960,23 @@ declare class V1StorageOSVolumeSource { }[]; constructor(); } -declare class V1VsphereVirtualDiskVolumeSource { +declare class StorageV1AccessKeyOIDC { /** - * fsType is filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. + * The current access token that was created during login */ - "fsType"?: string; + "accessToken"?: string; /** - * storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + * The current id token that was created during login */ - "storagePolicyID"?: string; + "idToken"?: string; /** - * storagePolicyName is the storage Policy Based Management (SPBM) profile name. + * The last time the id token was refreshed */ - "storagePolicyName"?: string; + "lastRefresh"?: Date; /** - * volumePath is the path that identifies vSphere volume vmdk + * The current refresh token that was created during login */ - "volumePath": string; + "refreshToken"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10583,41 +11992,23 @@ declare class V1VsphereVirtualDiskVolumeSource { }[]; constructor(); } -declare class V1Volume { - "awsElasticBlockStore"?: V1AWSElasticBlockStoreVolumeSource; - "azureDisk"?: V1AzureDiskVolumeSource; - "azureFile"?: V1AzureFileVolumeSource; - "cephfs"?: V1CephFSVolumeSource; - "cinder"?: V1CinderVolumeSource; - "configMap"?: V1ConfigMapVolumeSource; - "csi"?: V1CSIVolumeSource; - "downwardAPI"?: V1DownwardAPIVolumeSource; - "emptyDir"?: V1EmptyDirVolumeSource; - "ephemeral"?: V1EphemeralVolumeSource; - "fc"?: V1FCVolumeSource; - "flexVolume"?: V1FlexVolumeSource; - "flocker"?: V1FlockerVolumeSource; - "gcePersistentDisk"?: V1GCEPersistentDiskVolumeSource; - "gitRepo"?: V1GitRepoVolumeSource; - "glusterfs"?: V1GlusterfsVolumeSource; - "hostPath"?: V1HostPathVolumeSource; - "image"?: V1ImageVolumeSource; - "iscsi"?: V1ISCSIVolumeSource; +declare class StorageV1AccessKeyOIDCProvider { /** - * name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + * ClientId the token was generated for */ - "name": string; - "nfs"?: V1NFSVolumeSource; - "persistentVolumeClaim"?: V1PersistentVolumeClaimVolumeSource; - "photonPersistentDisk"?: V1PhotonPersistentDiskVolumeSource; - "portworxVolume"?: V1PortworxVolumeSource; - "projected"?: V1ProjectedVolumeSource; - "quobyte"?: V1QuobyteVolumeSource; - "rbd"?: V1RBDVolumeSource; - "scaleIO"?: V1ScaleIOVolumeSource; - "secret"?: V1SecretVolumeSource; - "storageos"?: V1StorageOSVolumeSource; - "vsphereVolume"?: V1VsphereVirtualDiskVolumeSource; + "clientId"?: string; + /** + * Nonce to use + */ + "nonce"?: string; + /** + * RedirectUri to use + */ + "redirectUri"?: string; + /** + * Scopes to use + */ + "scopes"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10633,47 +12024,63 @@ declare class V1Volume { }[]; constructor(); } -declare class StorageV1RunnerPodTemplateSpec { - "affinity"?: V1Affinity; +declare class ManagementV1OwnedAccessKeySpec { /** - * List of environment variables to set in the container. Cannot be updated. + * Description describes an app */ - "env"?: Array; + "description"?: string; /** - * List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. + * If this field is true, the access key is still allowed to exist, however will not work to access the api */ - "envFrom"?: Array; + "disabled"?: boolean; /** - * Set host aliases for the Runner Pod + * The display name shown in the UI */ - "hostAliases"?: Array; + "displayName"?: string; /** - * Runner pod image to use other than default + * Groups specifies extra groups to apply when using this access key */ - "image"?: string; + "groups"?: Array; + "identity"?: StorageV1AccessKeyIdentity; /** - * Set up Init Containers for the Runner + * The last time the identity was refreshed */ - "initContainers"?: Array; + "identityRefresh"?: Date; /** - * Set the NodeSelector for the Runner Pod + * The actual access key that will be used as a bearer token */ - "nodeSelector"?: { - [key: string]: string; - }; - "resource"?: V1ResourceRequirements; + "key"?: string; + "oidcLogin"?: StorageV1AccessKeyOIDC; + "oidcProvider"?: StorageV1AccessKeyOIDCProvider; /** - * Set the Tolerations for the Runner Pod + * DEPRECATED: do not use anymore Parent is used to share OIDC and external token information with multiple access keys. Since copying an OIDC refresh token would result in the other access keys becoming invalid after a refresh parent allows access keys to share that information. The use case for this is primarily user generated access keys, which will have the users current access key as parent if it contains an OIDC token. */ - "tolerations"?: Array; + "parent"?: string; + "scope"?: StorageV1AccessKeyScope; /** - * Set Volume Mounts for the Runner Pod + * Subject is a generic subject that can be used instead of user or team */ - "volumeMounts"?: Array; + "subject"?: string; /** - * Set Volumes for the Runner Pod + * The team this access key refers to */ - "volumes"?: Array; + "team"?: string; + /** + * The time to life for this access key + */ + "ttl"?: number; + /** + * If this is specified, the time to life for this access key will start after the lastActivity instead of creation timestamp + */ + "ttlAfterLastActivity"?: boolean; + /** + * The type of an access key, which basically describes if the access key is user managed or managed by loft itself. + */ + "type"?: string; + /** + * The user this access key refers to + */ + "user"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10689,9 +12096,11 @@ declare class StorageV1RunnerPodTemplateSpec { }[]; constructor(); } -declare class StorageV1RunnerPodTemplate { - "metadata"?: StorageV1TemplateMetadata; - "spec"?: StorageV1RunnerPodTemplateSpec; +declare class ManagementV1OwnedAccessKeyStatus { + /** + * The last time this access key was used to access the api + */ + "lastActivity"?: Date; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10707,11 +12116,18 @@ declare class StorageV1RunnerPodTemplate { }[]; constructor(); } -declare class StorageV1RunnerServiceTemplateSpec { +declare class ManagementV1OwnedAccessKey { /** - * type determines how the Service is exposed. Defaults to ClusterIP Possible enum values: - `\"ClusterIP\"` means a service will only be accessible inside the cluster, via the cluster IP. - `\"ExternalName\"` means a service consists of only a reference to an external name that kubedns or equivalent will return as a CNAME record, with no exposing or proxying of any pods involved. - `\"LoadBalancer\"` means a service will be exposed via an external load balancer (if the cloud provider supports it), in addition to \'NodePort\' type. - `\"NodePort\"` means a service will be exposed on one port of every node, in addition to \'ClusterIP\' type. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "type"?: StorageV1RunnerServiceTemplateSpecTypeEnum; + "apiVersion"?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1OwnedAccessKeySpec; + "status"?: ManagementV1OwnedAccessKeyStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10727,15 +12143,8 @@ declare class StorageV1RunnerServiceTemplateSpec { }[]; constructor(); } -declare enum StorageV1RunnerServiceTemplateSpecTypeEnum { - ClusterIp = "ClusterIP", - ExternalName = "ExternalName", - LoadBalancer = "LoadBalancer", - NodePort = "NodePort" -} -declare class StorageV1RunnerServiceTemplate { - "metadata"?: StorageV1TemplateMetadata; - "spec"?: StorageV1RunnerServiceTemplateSpec; +declare class ManagementV1ProjectChartInfoSpec { + "chart"?: ClusterV1Chart; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10751,18 +12160,16 @@ declare class StorageV1RunnerServiceTemplate { }[]; constructor(); } -declare class StorageV1RunnerClusterRef { +declare class ManagementV1ProjectChartInfoStatus { + "metadata"?: ClusterV1Metadata; /** - * Cluster is the connected cluster the space will be created in + * Readme is the readme of the chart */ - "cluster"?: string; + "readme"?: string; /** - * Namespace is the namespace inside the connected cluster holding the space + * Values are the default values of the chart */ - "namespace"?: string; - "persistentVolumeClaimTemplate"?: StorageV1RunnerPersistentVolumeClaimTemplate; - "podTemplate"?: StorageV1RunnerPodTemplate; - "serviceTemplate"?: StorageV1RunnerServiceTemplate; + "values"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10778,33 +12185,18 @@ declare class StorageV1RunnerClusterRef { }[]; constructor(); } -declare class ManagementV1RunnerSpec { - /** - * Access holds the access rights for users and teams - */ - "access"?: Array; - "clusterRef"?: StorageV1RunnerClusterRef; - /** - * Description describes a cluster access object - */ - "description"?: string; - /** - * The display name shown in the UI - */ - "displayName"?: string; - /** - * Endpoint is the hostname used to connect directly to the runner - */ - "endpoint"?: string; +declare class ManagementV1ProjectChartInfo { /** - * NetworkPeerName is the network peer name used to connect directly to the runner + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "networkPeerName"?: string; - "owner"?: StorageV1UserOrTeam; + "apiVersion"?: string; /** - * If unusable is true, no DevPod workspaces can be scheduled on this runner. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "unusable"?: boolean; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1ProjectChartInfoSpec; + "status"?: ManagementV1ProjectChartInfoStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10820,23 +12212,24 @@ declare class ManagementV1RunnerSpec { }[]; constructor(); } -declare class ManagementV1RunnerStatus { +declare class ManagementV1ProjectCharts { /** - * Conditions holds several conditions the virtual cluster might be in + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "conditions"?: Array; + "apiVersion"?: string; /** - * Message describes the reason in human-readable form + * Busy will indicate if the chart parsing is still in progress. */ - "message"?: string; + "busy"?: boolean; /** - * Phase describes the current phase the space instance is in + * Holds the available helm charts for this cluster */ - "phase"?: string; + "charts": Array; /** - * Reason describes the reason in machine-readable form + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "reason"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10852,18 +12245,19 @@ declare class ManagementV1RunnerStatus { }[]; constructor(); } -declare class ManagementV1Runner { +declare class StorageV1RunnerPersistentVolumeClaimTemplateSpec { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 */ - "apiVersion"?: string; + "accessModes"?: Array; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1RunnerSpec; - "status"?: ManagementV1RunnerStatus; + "storageClassName"?: string; + /** + * storageSize is the size of the storage to reserve for the pvc + */ + "storageSize"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10879,24 +12273,15 @@ declare class ManagementV1Runner { }[]; constructor(); } -declare class ManagementV1ProjectClusters { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * Clusters holds all the allowed clusters - */ - "clusters"?: Array; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - /** - * Runners holds all the allowed runners - */ - "runners"?: Array; +declare enum StorageV1RunnerPersistentVolumeClaimTemplateSpecAccessModesEnum { + ReadOnlyMany = "ReadOnlyMany", + ReadWriteMany = "ReadWriteMany", + ReadWriteOnce = "ReadWriteOnce", + ReadWriteOncePod = "ReadWriteOncePod" +} +declare class StorageV1RunnerPersistentVolumeClaimTemplate { + "metadata"?: StorageV1TemplateMetadata; + "spec"?: StorageV1RunnerPersistentVolumeClaimTemplateSpec; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10912,19 +12297,47 @@ declare class ManagementV1ProjectClusters { }[]; constructor(); } -declare class ManagementV1ProjectImportSpaceSource { +declare class StorageV1RunnerPodTemplateSpec { + "affinity"?: V1Affinity; /** - * Cluster name of the cluster the space is running on + * List of environment variables to set in the container. Cannot be updated. */ - "cluster"?: string; + "env"?: Array; /** - * ImportName is an optional name to use as the spaceinstance name, if not provided the space name will be used + * List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated. */ - "importName"?: string; + "envFrom"?: Array; /** - * Name of the space to import + * Set host aliases for the Runner Pod */ - "name"?: string; + "hostAliases"?: Array; + /** + * Runner pod image to use other than default + */ + "image"?: string; + /** + * Set up Init Containers for the Runner + */ + "initContainers"?: Array; + /** + * Set the NodeSelector for the Runner Pod + */ + "nodeSelector"?: { + [key: string]: string; + }; + "resource"?: V1ResourceRequirements; + /** + * Set the Tolerations for the Runner Pod + */ + "tolerations"?: Array; + /** + * Set Volume Mounts for the Runner Pod + */ + "volumeMounts"?: Array; + /** + * Set Volumes for the Runner Pod + */ + "volumes"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10940,17 +12353,9 @@ declare class ManagementV1ProjectImportSpaceSource { }[]; constructor(); } -declare class ManagementV1ProjectImportSpace { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "sourceSpace": ManagementV1ProjectImportSpaceSource; +declare class StorageV1RunnerPodTemplate { + "metadata"?: StorageV1TemplateMetadata; + "spec"?: StorageV1RunnerPodTemplateSpec; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10966,8 +12371,11 @@ declare class ManagementV1ProjectImportSpace { }[]; constructor(); } -declare class ManagementV1ProjectMember { - "info"?: StorageV1EntityInfo; +declare class StorageV1RunnerServiceTemplateSpec { + /** + * type determines how the Service is exposed. Defaults to ClusterIP Possible enum values: - `\"ClusterIP\"` means a service will only be accessible inside the cluster, via the cluster IP. - `\"ExternalName\"` means a service consists of only a reference to an external name that kubedns or equivalent will return as a CNAME record, with no exposing or proxying of any pods involved. - `\"LoadBalancer\"` means a service will be exposed via an external load balancer (if the cloud provider supports it), in addition to \'NodePort\' type. - `\"NodePort\"` means a service will be exposed on one port of every node, in addition to \'ClusterIP\' type. + */ + "type"?: StorageV1RunnerServiceTemplateSpecTypeEnum; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -10983,24 +12391,15 @@ declare class ManagementV1ProjectMember { }[]; constructor(); } -declare class ManagementV1ProjectMembers { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - /** - * Teams holds all the teams that have access to the cluster - */ - "teams"?: Array; - /** - * Users holds all the users that have access to the cluster - */ - "users"?: Array; +declare enum StorageV1RunnerServiceTemplateSpecTypeEnum { + ClusterIp = "ClusterIP", + ExternalName = "ExternalName", + LoadBalancer = "LoadBalancer", + NodePort = "NodePort" +} +declare class StorageV1RunnerServiceTemplate { + "metadata"?: StorageV1TemplateMetadata; + "spec"?: StorageV1RunnerServiceTemplateSpec; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11016,15 +12415,18 @@ declare class ManagementV1ProjectMembers { }[]; constructor(); } -declare class ManagementV1ProjectMigrateSpaceInstanceSource { +declare class StorageV1RunnerClusterRef { /** - * Name of the spaceinstance to migrate + * Cluster is the connected cluster the space will be created in */ - "name"?: string; + "cluster"?: string; /** - * Namespace of the spaceinstance to migrate + * Namespace is the namespace inside the connected cluster holding the space */ "namespace"?: string; + "persistentVolumeClaimTemplate"?: StorageV1RunnerPersistentVolumeClaimTemplate; + "podTemplate"?: StorageV1RunnerPodTemplate; + "serviceTemplate"?: StorageV1RunnerServiceTemplate; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11040,17 +12442,33 @@ declare class ManagementV1ProjectMigrateSpaceInstanceSource { }[]; constructor(); } -declare class ManagementV1ProjectMigrateSpaceInstance { +declare class ManagementV1RunnerSpec { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * Access holds the access rights for users and teams */ - "apiVersion"?: string; + "access"?: Array; + "clusterRef"?: StorageV1RunnerClusterRef; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * Description describes a cluster access object */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "sourceSpaceInstance": ManagementV1ProjectMigrateSpaceInstanceSource; + "description"?: string; + /** + * The display name shown in the UI + */ + "displayName"?: string; + /** + * Endpoint is the hostname used to connect directly to the runner + */ + "endpoint"?: string; + /** + * NetworkPeerName is the network peer name used to connect directly to the runner + */ + "networkPeerName"?: string; + "owner"?: StorageV1UserOrTeam; + /** + * If unusable is true, no DevPod workspaces can be scheduled on this runner. + */ + "unusable"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11066,15 +12484,23 @@ declare class ManagementV1ProjectMigrateSpaceInstance { }[]; constructor(); } -declare class ManagementV1ProjectMigrateVirtualClusterInstanceSource { +declare class ManagementV1RunnerStatus { /** - * Name of the virtual cluster instance to migrate + * Conditions holds several conditions the virtual cluster might be in */ - "name"?: string; + "conditions"?: Array; /** - * Namespace of the virtual cluster instance to migrate + * Message describes the reason in human-readable form */ - "namespace"?: string; + "message"?: string; + /** + * Phase describes the current phase the space instance is in + */ + "phase"?: string; + /** + * Reason describes the reason in machine-readable form + */ + "reason"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11090,7 +12516,7 @@ declare class ManagementV1ProjectMigrateVirtualClusterInstanceSource { }[]; constructor(); } -declare class ManagementV1ProjectMigrateVirtualClusterInstance { +declare class ManagementV1Runner { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ @@ -11100,7 +12526,8 @@ declare class ManagementV1ProjectMigrateVirtualClusterInstance { */ "kind"?: string; "metadata"?: V1ObjectMeta; - "sourceVirtualClusterInstance": ManagementV1ProjectMigrateVirtualClusterInstanceSource; + "spec"?: ManagementV1RunnerSpec; + "status"?: ManagementV1RunnerStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11116,12 +12543,16 @@ declare class ManagementV1ProjectMigrateVirtualClusterInstance { }[]; constructor(); } -declare class ManagementV1ProjectRunners { +declare class ManagementV1ProjectClusters { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ "apiVersion"?: string; /** + * Clusters holds all the allowed clusters + */ + "clusters"?: Array; + /** * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ "kind"?: string; @@ -11145,46 +12576,19 @@ declare class ManagementV1ProjectRunners { }[]; constructor(); } -declare class ManagementV1ProjectSecretSpec { - /** - * Access holds the access rights for users and teams - */ - "access"?: Array; - /** - * Data contains the secret data. Each key must consist of alphanumeric characters, \'-\', \'_\' or \'.\'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 - */ - "data"?: { - [key: string]: string; - }; +declare class ManagementV1ProjectImportSpaceSource { /** - * Description describes a Project secret + * Cluster name of the cluster the space is running on */ - "description"?: string; + "cluster"?: string; /** - * DisplayName is the name that should be displayed in the UI + * ImportName is an optional name to use as the spaceinstance name, if not provided the space name will be used */ - "displayName"?: string; - "owner"?: StorageV1UserOrTeam; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare class ManagementV1ProjectSecretStatus { + "importName"?: string; /** - * Conditions holds several conditions the project might be in + * Name of the space to import */ - "conditions"?: Array; + "name"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11200,7 +12604,7 @@ declare class ManagementV1ProjectSecretStatus { }[]; constructor(); } -declare class ManagementV1ProjectSecret { +declare class ManagementV1ProjectImportSpace { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ @@ -11210,8 +12614,7 @@ declare class ManagementV1ProjectSecret { */ "kind"?: string; "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1ProjectSecretSpec; - "status"?: ManagementV1ProjectSecretStatus; + "sourceSpace": ManagementV1ProjectImportSpaceSource; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11227,16 +12630,8 @@ declare class ManagementV1ProjectSecret { }[]; constructor(); } -declare class StorageV1SpaceTemplateVersion { - /** - * Parameters define additional app parameters that will set helm values - */ - "parameters"?: Array; - "template"?: StorageV1SpaceTemplateDefinition; - /** - * Version is the version. Needs to be in X.X.X format. - */ - "version"?: string; +declare class ManagementV1ProjectMember { + "info"?: StorageV1EntityInfo; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11252,29 +12647,24 @@ declare class StorageV1SpaceTemplateVersion { }[]; constructor(); } -declare class ManagementV1SpaceTemplateSpec { - /** - * Access holds the access rights for users and teams - */ - "access"?: Array; +declare class ManagementV1ProjectMembers { /** - * Description describes the space template + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "description"?: string; + "apiVersion"?: string; /** - * DisplayName is the name that is shown in the UI + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "displayName"?: string; - "owner"?: StorageV1UserOrTeam; + "kind"?: string; + "metadata"?: V1ObjectMeta; /** - * Parameters define additional app parameters that will set helm values + * Teams holds all the teams that have access to the cluster */ - "parameters"?: Array; - "template"?: StorageV1SpaceTemplateDefinition; + "teams"?: Array; /** - * Versions are different space template versions that can be referenced as well + * Users holds all the users that have access to the cluster */ - "versions"?: Array; + "users"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11290,8 +12680,15 @@ declare class ManagementV1SpaceTemplateSpec { }[]; constructor(); } -declare class ManagementV1SpaceTemplateStatus { - "apps"?: Array; +declare class ManagementV1ProjectMigrateSpaceInstanceSource { + /** + * Name of the spaceinstance to migrate + */ + "name"?: string; + /** + * Namespace of the spaceinstance to migrate + */ + "namespace"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11307,7 +12704,7 @@ declare class ManagementV1SpaceTemplateStatus { }[]; constructor(); } -declare class ManagementV1SpaceTemplate { +declare class ManagementV1ProjectMigrateSpaceInstance { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ @@ -11317,8 +12714,7 @@ declare class ManagementV1SpaceTemplate { */ "kind"?: string; "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1SpaceTemplateSpec; - "status"?: ManagementV1SpaceTemplateStatus; + "sourceSpaceInstance": ManagementV1ProjectMigrateSpaceInstanceSource; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11334,30 +12730,15 @@ declare class ManagementV1SpaceTemplate { }[]; constructor(); } -declare class ManagementV1VirtualClusterTemplateSpec { - /** - * Access holds the access rights for users and teams - */ - "access"?: Array; - /** - * Description describes the virtual cluster template - */ - "description"?: string; - /** - * DisplayName is the name that is shown in the UI - */ - "displayName"?: string; - "owner"?: StorageV1UserOrTeam; +declare class ManagementV1ProjectMigrateVirtualClusterInstanceSource { /** - * Parameters define additional app parameters that will set helm values + * Name of the virtual cluster instance to migrate */ - "parameters"?: Array; - "spaceTemplateRef"?: StorageV1VirtualClusterTemplateSpaceTemplateRef; - "template"?: StorageV1VirtualClusterTemplateDefinition; + "name"?: string; /** - * Versions are different versions of the template that can be referenced as well + * Namespace of the virtual cluster instance to migrate */ - "versions"?: Array; + "namespace"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11373,8 +12754,17 @@ declare class ManagementV1VirtualClusterTemplateSpec { }[]; constructor(); } -declare class ManagementV1VirtualClusterTemplateStatus { - "apps"?: Array; +declare class ManagementV1ProjectMigrateVirtualClusterInstance { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion"?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind"?: string; + "metadata"?: V1ObjectMeta; + "sourceVirtualClusterInstance": ManagementV1ProjectMigrateVirtualClusterInstanceSource; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11390,7 +12780,7 @@ declare class ManagementV1VirtualClusterTemplateStatus { }[]; constructor(); } -declare class ManagementV1VirtualClusterTemplate { +declare class ManagementV1ProjectRunners { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ @@ -11400,8 +12790,10 @@ declare class ManagementV1VirtualClusterTemplate { */ "kind"?: string; "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1VirtualClusterTemplateSpec; - "status"?: ManagementV1VirtualClusterTemplateStatus; + /** + * Runners holds all the allowed runners + */ + "runners"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11417,48 +12809,26 @@ declare class ManagementV1VirtualClusterTemplate { }[]; constructor(); } -declare class ManagementV1ProjectTemplates { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * DefaultDevPodEnvironmentTemplate - */ - "defaultDevPodEnvironmentTemplate"?: string; - /** - * DefaultDevPodWorkspaceTemplate - */ - "defaultDevPodWorkspaceTemplate"?: string; - /** - * DefaultSpaceTemplate - */ - "defaultSpaceTemplate"?: string; - /** - * DefaultVirtualClusterTemplate is the default template for the project - */ - "defaultVirtualClusterTemplate"?: string; - /** - * DevPodEnvironmentTemplates holds all the allowed environment templates - */ - "devPodEnvironmentTemplates"?: Array; +declare class ManagementV1ProjectSecretSpec { /** - * DevPodWorkspaceTemplates holds all the allowed space templates + * Access holds the access rights for users and teams */ - "devPodWorkspaceTemplates"?: Array; + "access"?: Array; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * Data contains the secret data. Each key must consist of alphanumeric characters, \'-\', \'_\' or \'.\'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 */ - "kind"?: string; - "metadata"?: V1ObjectMeta; + "data"?: { + [key: string]: string; + }; /** - * SpaceTemplates holds all the allowed space templates + * Description describes a Project secret */ - "spaceTemplates"?: Array; + "description"?: string; /** - * VirtualClusterTemplates holds all the allowed virtual cluster templates + * DisplayName is the name that should be displayed in the UI */ - "virtualClusterTemplates"?: Array; + "displayName"?: string; + "owner"?: StorageV1UserOrTeam; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11474,11 +12844,11 @@ declare class ManagementV1ProjectTemplates { }[]; constructor(); } -declare class StorageV1AllowedCluster { +declare class ManagementV1ProjectSecretStatus { /** - * Name is the name of the cluster that is allowed to create an environment in. + * Conditions holds several conditions the project might be in */ - "name"?: string; + "conditions"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11494,11 +12864,18 @@ declare class StorageV1AllowedCluster { }[]; constructor(); } -declare class StorageV1AllowedRunner { +declare class ManagementV1ProjectSecret { /** - * Name is the name of the runner that is allowed to create an environment in. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "name"?: string; + "apiVersion"?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1ProjectSecretSpec; + "status"?: ManagementV1ProjectSecretStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11514,23 +12891,16 @@ declare class StorageV1AllowedRunner { }[]; constructor(); } -declare class StorageV1AllowedTemplate { - /** - * Group of the template that is allowed. Currently only supports storage.loft.sh - */ - "group"?: string; - /** - * IsDefault specifies if the template should be used as a default - */ - "isDefault"?: boolean; +declare class StorageV1SpaceTemplateVersion { /** - * Kind of the template that is allowed. Currently only supports DevPodWorkspaceTemplate, VirtualClusterTemplate & SpaceTemplate + * Parameters define additional app parameters that will set helm values */ - "kind"?: string; + "parameters"?: Array; + "template"?: StorageV1SpaceTemplateDefinition; /** - * Name of the template + * Version is the version. Needs to be in X.X.X format. */ - "name"?: string; + "version"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11546,19 +12916,29 @@ declare class StorageV1AllowedTemplate { }[]; constructor(); } -declare class StorageV1ArgoProjectPolicyRule { +declare class ManagementV1SpaceTemplateSpec { /** - * Action is one of \"*\", \"get\", \"create\", \"update\", \"delete\", \"sync\", or \"override\". + * Access holds the access rights for users and teams */ - "action"?: string; + "access"?: Array; /** - * Application is the ArgoCD project/repository to apply the rule to. + * Description describes the space template */ - "application"?: string; + "description"?: string; /** - * Allow applies the \"allow\" permission to the rule, if allow is not set, the permission will always be set to \"deny\". + * DisplayName is the name that is shown in the UI */ - "permission"?: boolean; + "displayName"?: string; + "owner"?: StorageV1UserOrTeam; + /** + * Parameters define additional app parameters that will set helm values + */ + "parameters"?: Array; + "template"?: StorageV1SpaceTemplateDefinition; + /** + * Versions are different space template versions that can be referenced as well + */ + "versions"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11574,23 +12954,8 @@ declare class StorageV1ArgoProjectPolicyRule { }[]; constructor(); } -declare class StorageV1ArgoProjectRole { - /** - * Description to add to the ArgoCD project. - */ - "description"?: string; - /** - * Groups is a list of OIDC group names to bind to the role. - */ - "groups"?: Array; - /** - * Name of the ArgoCD role to attach to the project. - */ - "name"?: string; - /** - * Rules ist a list of policy rules to attach to the role. - */ - "rules"?: Array; +declare class ManagementV1SpaceTemplateStatus { + "apps"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11606,23 +12971,18 @@ declare class StorageV1ArgoProjectRole { }[]; constructor(); } -declare class StorageV1ArgoProjectSpecMetadata { - /** - * Description to add to the ArgoCD project. - */ - "description"?: string; +declare class ManagementV1SpaceTemplate { /** - * ExtraAnnotations are optional annotations that can be attached to the project in ArgoCD. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "extraAnnotations"?: { - [key: string]: string; - }; + "apiVersion"?: string; /** - * ExtraLabels are optional labels that can be attached to the project in ArgoCD. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "extraLabels"?: { - [key: string]: string; - }; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1SpaceTemplateSpec; + "status"?: ManagementV1SpaceTemplateStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11638,20 +12998,30 @@ declare class StorageV1ArgoProjectSpecMetadata { }[]; constructor(); } -declare class StorageV1ArgoProjectSpec { +declare class ManagementV1VirtualClusterTemplateSpec { /** - * Enabled indicates if the ArgoCD Project Integration is enabled for this project. Enabling this will cause Loft to create an appProject in ArgoCD that is associated with the Loft Project. When Project integration is enabled Loft will override the default assigned role set in the SSO integration spec. + * Access holds the access rights for users and teams */ - "enabled"?: boolean; - "metadata"?: StorageV1ArgoProjectSpecMetadata; + "access"?: Array; /** - * Roles is a list of roles that should be attached to the ArgoCD project. If roles are provided no loft default roles will be set. If no roles are provided *and* SSO is enabled, loft will configure sane default values. + * Description describes the virtual cluster template */ - "roles"?: Array; + "description"?: string; /** - * SourceRepos is a list of source repositories to attach/allow on the project, if not specified will be \"*\" indicating all source repositories. + * DisplayName is the name that is shown in the UI */ - "sourceRepos"?: Array; + "displayName"?: string; + "owner"?: StorageV1UserOrTeam; + /** + * Parameters define additional app parameters that will set helm values + */ + "parameters"?: Array; + "spaceTemplateRef"?: StorageV1VirtualClusterTemplateSpaceTemplateRef; + "template"?: StorageV1VirtualClusterTemplateDefinition; + /** + * Versions are different versions of the template that can be referenced as well + */ + "versions"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11667,19 +13037,8 @@ declare class StorageV1ArgoProjectSpec { }[]; constructor(); } -declare class StorageV1ArgoSSOSpec { - /** - * AssignedRoles is a list of roles to assign for users who authenticate via Loft -- by default this will be the `read-only` role. If any roles are provided this will override the default setting. - */ - "assignedRoles"?: Array; - /** - * Enabled indicates if the ArgoCD SSO Integration is enabled for this project. Enabling this will cause Loft to configure SSO authentication via Loft in ArgoCD. If Projects are *not* enabled, all users associated with this Project will be assigned either the \'read-only\' (default) role, *or* the roles set under the AssignedRoles field. - */ - "enabled"?: boolean; - /** - * Host defines the ArgoCD host address that will be used for OIDC authentication between loft and ArgoCD. If not specified OIDC integration will be skipped, but vclusters/spaces will still be synced to ArgoCD. - */ - "host"?: string; +declare class ManagementV1VirtualClusterTemplateStatus { + "apps"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11695,25 +13054,18 @@ declare class StorageV1ArgoSSOSpec { }[]; constructor(); } -declare class StorageV1ArgoIntegrationSpec { - /** - * Cluster defines the name of the cluster that ArgoCD is deployed into -- if not provided this will default to \'loft-cluster\'. - */ - "cluster"?: string; - /** - * Enabled indicates if the ArgoCD Integration is enabled for the project -- this knob only enables the syncing of virtualclusters, but does not enable SSO integration or project creation (see subsequent spec sections!). - */ - "enabled"?: boolean; +declare class ManagementV1VirtualClusterTemplate { /** - * Namespace defines the namespace in which ArgoCD is running in the cluster. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "namespace"?: string; - "project"?: StorageV1ArgoProjectSpec; - "sso"?: StorageV1ArgoSSOSpec; + "apiVersion"?: string; /** - * VirtualClusterInstance defines the name of *virtual cluster* (instance) that ArgoCD is deployed into. If provided, Cluster will be ignored and Loft will assume that ArgoCD is running in the specified virtual cluster. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "virtualClusterInstance"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1VirtualClusterTemplateSpec; + "status"?: ManagementV1VirtualClusterTemplateStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11729,12 +13081,52 @@ declare class StorageV1ArgoIntegrationSpec { }[]; constructor(); } -declare class StorageV1GitProjectSpec { +declare class ManagementV1ProjectTemplates { /** - * Token defines the token to use for authentication. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "token"?: string; - "tokenSecretRef"?: V1SecretKeySelector; + "apiVersion"?: string; + /** + * DefaultDevPodEnvironmentTemplate + */ + "defaultDevPodEnvironmentTemplate"?: string; + /** + * DefaultDevPodWorkspaceTemplate + */ + "defaultDevPodWorkspaceTemplate"?: string; + /** + * DefaultSpaceTemplate + */ + "defaultSpaceTemplate"?: string; + /** + * DefaultVirtualClusterTemplate is the default template for the project + */ + "defaultVirtualClusterTemplate"?: string; + /** + * DevPodEnvironmentTemplates holds all the allowed environment templates + */ + "devPodEnvironmentTemplates"?: Array; + /** + * DevPodWorkspacePresets holds all the allowed workspace presets + */ + "devPodWorkspacePresets"?: Array; + /** + * DevPodWorkspaceTemplates holds all the allowed space templates + */ + "devPodWorkspaceTemplates"?: Array; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind"?: string; + "metadata"?: V1ObjectMeta; + /** + * SpaceTemplates holds all the allowed space templates + */ + "spaceTemplates"?: Array; + /** + * VirtualClusterTemplates holds all the allowed virtual cluster templates + */ + "virtualClusterTemplates"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11750,12 +13142,11 @@ declare class StorageV1GitProjectSpec { }[]; constructor(); } -declare class StorageV1SSHProjectSpec { +declare class StorageV1AllowedCluster { /** - * Token defines the private ssh key to use for authentication, this is a base64 encoded string. + * Name is the name of the cluster that is allowed to create an environment in. */ - "token"?: string; - "tokenSecretRef"?: V1SecretKeySelector; + "name"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11771,13 +13162,11 @@ declare class StorageV1SSHProjectSpec { }[]; constructor(); } -declare class StorageV1DevPodProjectSpec { +declare class StorageV1AllowedRunner { /** - * FallbackImage defines an image all workspace will fall back to if no devcontainer.json could be detected + * Name is the name of the runner that is allowed to create an environment in. */ - "fallbackImage"?: string; - "git"?: StorageV1GitProjectSpec; - "ssh"?: StorageV1SSHProjectSpec; + "name"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11793,21 +13182,21 @@ declare class StorageV1DevPodProjectSpec { }[]; constructor(); } -declare class StorageV1Member { +declare class StorageV1AllowedTemplate { /** - * ClusterRole is the assigned role for the above member + * Group of the template that is allowed. Currently only supports storage.loft.sh */ - "clusterRole"?: string; + "group"?: string; /** - * Group of the member. Currently only supports storage.loft.sh + * IsDefault specifies if the template should be used as a default */ - "group"?: string; + "isDefault"?: boolean; /** - * Kind is the kind of the member. Currently either User or Team + * Kind of the template that is allowed. Currently only supports DevPodWorkspaceTemplate, VirtualClusterTemplate & SpaceTemplate */ "kind"?: string; /** - * Name of the member + * Name of the template */ "name"?: string; static readonly discriminator: string | undefined; @@ -11825,15 +13214,19 @@ declare class StorageV1Member { }[]; constructor(); } -declare class StorageV1NamespacePattern { +declare class StorageV1ArgoProjectPolicyRule { /** - * Space holds the namespace pattern to use for space instances + * Action is one of \"*\", \"get\", \"create\", \"update\", \"delete\", \"sync\", or \"override\". */ - "space"?: string; + "action"?: string; /** - * VirtualCluster holds the namespace pattern to use for virtual cluster instances + * Application is the ArgoCD project/repository to apply the rule to. */ - "virtualCluster"?: string; + "application"?: string; + /** + * Allow applies the \"allow\" permission to the rule, if allow is not set, the permission will always be set to \"deny\". + */ + "permission"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11849,19 +13242,23 @@ declare class StorageV1NamespacePattern { }[]; constructor(); } -declare class StorageV1Quotas { +declare class StorageV1ArgoProjectRole { /** - * Project holds the quotas for the whole project + * Description to add to the ArgoCD project. */ - "project"?: { - [key: string]: string; - }; + "description"?: string; /** - * User holds the quotas per user / team + * Groups is a list of OIDC group names to bind to the role. */ - "user"?: { - [key: string]: string; - }; + "groups"?: Array; + /** + * Name of the ArgoCD role to attach to the project. + */ + "name"?: string; + /** + * Rules ist a list of policy rules to attach to the role. + */ + "rules"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11877,11 +13274,21 @@ declare class StorageV1Quotas { }[]; constructor(); } -declare class StorageV1ImportVirtualClustersSpec { +declare class StorageV1ArgoProjectSpecMetadata { /** - * RoleMapping indicates an optional role mapping from a rancher project role to a rancher cluster role. Map to an empty role to exclude users and groups with that role from being synced. + * Description to add to the ArgoCD project. */ - "roleMapping"?: { + "description"?: string; + /** + * ExtraAnnotations are optional annotations that can be attached to the project in ArgoCD. + */ + "extraAnnotations"?: { + [key: string]: string; + }; + /** + * ExtraLabels are optional labels that can be attached to the project in ArgoCD. + */ + "extraLabels"?: { [key: string]: string; }; static readonly discriminator: string | undefined; @@ -11899,15 +13306,20 @@ declare class StorageV1ImportVirtualClustersSpec { }[]; constructor(); } -declare class StorageV1RancherProjectRef { +declare class StorageV1ArgoProjectSpec { /** - * Cluster defines the Rancher cluster ID Needs to be the same id within Loft + * Enabled indicates if the ArgoCD Project Integration is enabled for this project. Enabling this will cause Loft to create an appProject in ArgoCD that is associated with the Loft Project. When Project integration is enabled Loft will override the default assigned role set in the SSO integration spec. */ - "cluster"?: string; + "enabled"?: boolean; + "metadata"?: StorageV1ArgoProjectSpecMetadata; /** - * Project defines the Rancher project ID + * Roles is a list of roles that should be attached to the ArgoCD project. If roles are provided no loft default roles will be set. If no roles are provided *and* SSO is enabled, loft will configure sane default values. */ - "project"?: string; + "roles"?: Array; + /** + * SourceRepos is a list of source repositories to attach/allow on the project, if not specified will be \"*\" indicating all source repositories. + */ + "sourceRepos"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11923,17 +13335,19 @@ declare class StorageV1RancherProjectRef { }[]; constructor(); } -declare class StorageV1SyncMembersSpec { +declare class StorageV1ArgoSSOSpec { /** - * Enabled indicates whether to sync rancher project members to the loft project. + * AssignedRoles is a list of roles to assign for users who authenticate via Loft -- by default this will be the `read-only` role. If any roles are provided this will override the default setting. + */ + "assignedRoles"?: Array; + /** + * Enabled indicates if the ArgoCD SSO Integration is enabled for this project. Enabling this will cause Loft to configure SSO authentication via Loft in ArgoCD. If Projects are *not* enabled, all users associated with this Project will be assigned either the \'read-only\' (default) role, *or* the roles set under the AssignedRoles field. */ "enabled"?: boolean; /** - * RoleMapping indicates an optional role mapping from a rancher role to a loft role. Map to an empty role to exclude users and groups with that role from being synced. + * Host defines the ArgoCD host address that will be used for OIDC authentication between loft and ArgoCD. If not specified OIDC integration will be skipped, but vclusters/spaces will still be synced to ArgoCD. */ - "roleMapping"?: { - [key: string]: string; - }; + "host"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11949,14 +13363,25 @@ declare class StorageV1SyncMembersSpec { }[]; constructor(); } -declare class StorageV1RancherIntegrationSpec { +declare class StorageV1ArgoIntegrationSpec { /** - * Enabled indicates if the Rancher Project Integration is enabled for this project. + * Cluster defines the name of the cluster that ArgoCD is deployed into -- if not provided this will default to \'loft-cluster\'. + */ + "cluster"?: string; + /** + * Enabled indicates if the ArgoCD Integration is enabled for the project -- this knob only enables the syncing of virtualclusters, but does not enable SSO integration or project creation (see subsequent spec sections!). */ "enabled"?: boolean; - "importVirtualClusters"?: StorageV1ImportVirtualClustersSpec; - "projectRef"?: StorageV1RancherProjectRef; - "syncMembers"?: StorageV1SyncMembersSpec; + /** + * Namespace defines the namespace in which ArgoCD is running in the cluster. + */ + "namespace"?: string; + "project"?: StorageV1ArgoProjectSpec; + "sso"?: StorageV1ArgoSSOSpec; + /** + * VirtualClusterInstance defines the name of *virtual cluster* (instance) that ArgoCD is deployed into. If provided, Cluster will be ignored and Loft will assume that ArgoCD is running in the specified virtual cluster. + */ + "virtualClusterInstance"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11972,11 +13397,12 @@ declare class StorageV1RancherIntegrationSpec { }[]; constructor(); } -declare class StorageV1RequireTemplate { +declare class StorageV1GitProjectSpec { /** - * If true, all users within the project will be allowed to create a new instance without a template. By default, only admins are allowed to create a new instance without a template. + * Token defines the token to use for authentication. */ - "disabled"?: boolean; + "token"?: string; + "tokenSecretRef"?: V1SecretKeySelector; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -11992,43 +13418,12 @@ declare class StorageV1RequireTemplate { }[]; constructor(); } -declare class ManagementV1ProjectSpec { - /** - * Access holds the access rights for users and teams - */ - "access"?: Array; - /** - * AllowedClusters are target clusters that are allowed to target with environments. - */ - "allowedClusters"?: Array; - /** - * AllowedRunners are target runners that are allowed to target with DevPod environments. - */ - "allowedRunners"?: Array; - /** - * AllowedTemplates are the templates that are allowed to use in this project. - */ - "allowedTemplates"?: Array; - "argoCD"?: StorageV1ArgoIntegrationSpec; - /** - * Description describes an app - */ - "description"?: string; - "devPod"?: StorageV1DevPodProjectSpec; - /** - * DisplayName is the name that should be displayed in the UI - */ - "displayName"?: string; +declare class StorageV1SSHProjectSpec { /** - * Members are the users and teams that are part of this project + * Token defines the private ssh key to use for authentication, this is a base64 encoded string. */ - "members"?: Array; - "namespacePattern"?: StorageV1NamespacePattern; - "owner"?: StorageV1UserOrTeam; - "quotas"?: StorageV1Quotas; - "rancher"?: StorageV1RancherIntegrationSpec; - "requireTemplate"?: StorageV1RequireTemplate; - "vault"?: StorageV1VaultIntegrationSpec; + "token"?: string; + "tokenSecretRef"?: V1SecretKeySelector; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12044,13 +13439,13 @@ declare class ManagementV1ProjectSpec { }[]; constructor(); } -declare class StorageV1QuotaStatusProjectCluster { +declare class StorageV1DevPodProjectSpec { /** - * Used is the amount currently used. Maps resource name, such as pods, to their used amount. + * FallbackImage defines an image all workspace will fall back to if no devcontainer.json could be detected */ - "used"?: { - [key: string]: string; - }; + "fallbackImage"?: string; + "git"?: StorageV1GitProjectSpec; + "ssh"?: StorageV1SSHProjectSpec; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12066,25 +13461,23 @@ declare class StorageV1QuotaStatusProjectCluster { }[]; constructor(); } -declare class StorageV1QuotaStatusProject { +declare class StorageV1Member { /** - * Clusters holds the used amount per cluster. Maps cluster name to used resources + * ClusterRole is the assigned role for the above member */ - "clusters"?: { - [key: string]: StorageV1QuotaStatusProjectCluster; - }; + "clusterRole"?: string; /** - * Limit is the amount limited, copied from spec.quotas.project + * Group of the member. Currently only supports storage.loft.sh */ - "limit"?: { - [key: string]: string; - }; + "group"?: string; + /** + * Kind is the kind of the member. Currently either User or Team + */ + "kind"?: string; /** - * Used is the amount currently used across all clusters + * Name of the member */ - "used"?: { - [key: string]: string; - }; + "name"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12100,23 +13493,15 @@ declare class StorageV1QuotaStatusProject { }[]; constructor(); } -declare class StorageV1QuotaStatusUserUsed { +declare class StorageV1NamespacePattern { /** - * Teams is a mapping of teams to used resources + * Space holds the namespace pattern to use for space instances */ - "teams"?: { - [key: string]: { - [key: string]: string; - }; - }; + "space"?: string; /** - * Users is a mapping of users to used resources + * VirtualCluster holds the namespace pattern to use for virtual cluster instances */ - "users"?: { - [key: string]: { - [key: string]: string; - }; - }; + "virtualCluster"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12132,20 +13517,19 @@ declare class StorageV1QuotaStatusUserUsed { }[]; constructor(); } -declare class StorageV1QuotaStatusUser { +declare class StorageV1Quotas { /** - * Clusters holds the used amount per cluster. Maps cluster name to used resources + * Project holds the quotas for the whole project */ - "clusters"?: { - [key: string]: StorageV1QuotaStatusUserUsed; + "project"?: { + [key: string]: string; }; /** - * Limit is the amount limited per user / team + * User holds the quotas per user / team */ - "limit"?: { + "user"?: { [key: string]: string; }; - "used"?: StorageV1QuotaStatusUserUsed; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12161,9 +13545,13 @@ declare class StorageV1QuotaStatusUser { }[]; constructor(); } -declare class StorageV1QuotaStatus { - "project"?: StorageV1QuotaStatusProject; - "user"?: StorageV1QuotaStatusUser; +declare class StorageV1ImportVirtualClustersSpec { + /** + * RoleMapping indicates an optional role mapping from a rancher project role to a rancher cluster role. Map to an empty role to exclude users and groups with that role from being synced. + */ + "roleMapping"?: { + [key: string]: string; + }; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12179,12 +13567,15 @@ declare class StorageV1QuotaStatus { }[]; constructor(); } -declare class ManagementV1ProjectStatus { +declare class StorageV1RancherProjectRef { /** - * Conditions holds several conditions the project might be in + * Cluster defines the Rancher cluster ID Needs to be the same id within Loft */ - "conditions"?: Array; - "quotas"?: StorageV1QuotaStatus; + "cluster"?: string; + /** + * Project defines the Rancher project ID + */ + "project"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12200,18 +13591,17 @@ declare class ManagementV1ProjectStatus { }[]; constructor(); } -declare class ManagementV1Project { +declare class StorageV1SyncMembersSpec { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * Enabled indicates whether to sync rancher project members to the loft project. */ - "apiVersion"?: string; + "enabled"?: boolean; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * RoleMapping indicates an optional role mapping from a rancher role to a loft role. Map to an empty role to exclude users and groups with that role from being synced. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1ProjectSpec; - "status"?: ManagementV1ProjectStatus; + "roleMapping"?: { + [key: string]: string; + }; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12227,11 +13617,14 @@ declare class ManagementV1Project { }[]; constructor(); } -declare class ManagementV1RedirectTokenSpec { +declare class StorageV1RancherIntegrationSpec { /** - * Token is the token that includes the redirect request + * Enabled indicates if the Rancher Project Integration is enabled for this project. */ - "token"?: string; + "enabled"?: boolean; + "importVirtualClusters"?: StorageV1ImportVirtualClustersSpec; + "projectRef"?: StorageV1RancherProjectRef; + "syncMembers"?: StorageV1SyncMembersSpec; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12247,8 +13640,11 @@ declare class ManagementV1RedirectTokenSpec { }[]; constructor(); } -declare class ManagementV1RedirectTokenStatus { - "redirectURL"?: string; +declare class StorageV1RequirePreset { + /** + * If true, all users within the project will not be allowed to create a new instance without a preset. By default, all users are allowed to create a new instance without a preset. + */ + "disabled"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12264,18 +13660,11 @@ declare class ManagementV1RedirectTokenStatus { }[]; constructor(); } -declare class ManagementV1RedirectToken { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; +declare class StorageV1RequireTemplate { /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * If true, all users within the project will be allowed to create a new instance without a template. By default, only admins are allowed to create a new instance without a template. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1RedirectTokenSpec; - "status"?: ManagementV1RedirectTokenStatus; + "disabled"?: boolean; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12291,55 +13680,44 @@ declare class ManagementV1RedirectToken { }[]; constructor(); } -declare class ManagementV1RegisterVirtualClusterSpec { - /** - * Chart specifies the vCluster chart. - */ - "chart"?: string; +declare class ManagementV1ProjectSpec { /** - * ForceName specifies if the name should be used or creation will fail. + * Access holds the access rights for users and teams */ - "forceName"?: boolean; + "access"?: Array; /** - * Name is the virtual cluster instance name. If the name is already taken, the platform will construct a name for the vcluster based on the service uid and this name. + * AllowedClusters are target clusters that are allowed to target with environments. */ - "name"?: string; + "allowedClusters"?: Array; /** - * Project is the project name the virtual cluster should be in. + * AllowedRunners are target runners that are allowed to target with DevPod environments. */ - "project"?: string; + "allowedRunners"?: Array; /** - * ServiceUID uniquely identifies the virtual cluster based on the service uid. + * AllowedTemplates are the templates that are allowed to use in this project. */ - "serviceUID"?: string; + "allowedTemplates"?: Array; + "argoCD"?: StorageV1ArgoIntegrationSpec; /** - * Values specifies the vCluster config. + * Description describes an app */ - "values"?: string; + "description"?: string; + "devPod"?: StorageV1DevPodProjectSpec; /** - * Version specifies the vCluster version. + * DisplayName is the name that should be displayed in the UI */ - "version"?: string; - static readonly discriminator: string | undefined; - static readonly attributeTypeMap: Array<{ - name: string; - baseName: string; - type: string; - format: string; - }>; - static getAttributeTypeMap(): { - name: string; - baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare class ManagementV1RegisterVirtualClusterStatus { + "displayName"?: string; /** - * Name is the actual name of the virtual cluster instance. + * Members are the users and teams that are part of this project */ - "name"?: string; + "members"?: Array; + "namespacePattern"?: StorageV1NamespacePattern; + "owner"?: StorageV1UserOrTeam; + "quotas"?: StorageV1Quotas; + "rancher"?: StorageV1RancherIntegrationSpec; + "requirePreset"?: StorageV1RequirePreset; + "requireTemplate"?: StorageV1RequireTemplate; + "vault"?: StorageV1VaultIntegrationSpec; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12355,18 +13733,13 @@ declare class ManagementV1RegisterVirtualClusterStatus { }[]; constructor(); } -declare class ManagementV1RegisterVirtualCluster { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; +declare class StorageV1QuotaStatusProjectCluster { /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * Used is the amount currently used. Maps resource name, such as pods, to their used amount. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1RegisterVirtualClusterSpec; - "status"?: ManagementV1RegisterVirtualClusterStatus; + "used"?: { + [key: string]: string; + }; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12382,63 +13755,25 @@ declare class ManagementV1RegisterVirtualCluster { }[]; constructor(); } -declare class ManagementV1ResetAccessKeySpec { - /** - * Description describes an app - */ - "description"?: string; - /** - * If this field is true, the access key is still allowed to exist, however will not work to access the api - */ - "disabled"?: boolean; - /** - * The display name shown in the UI - */ - "displayName"?: string; - /** - * Groups specifies extra groups to apply when using this access key - */ - "groups"?: Array; - "identity"?: StorageV1AccessKeyIdentity; - /** - * The last time the identity was refreshed - */ - "identityRefresh"?: Date; - /** - * The actual access key that will be used as a bearer token - */ - "key"?: string; - "oidcLogin"?: StorageV1AccessKeyOIDC; - "oidcProvider"?: StorageV1AccessKeyOIDCProvider; - /** - * DEPRECATED: do not use anymore Parent is used to share OIDC and external token information with multiple access keys. Since copying an OIDC refresh token would result in the other access keys becoming invalid after a refresh parent allows access keys to share that information. The use case for this is primarily user generated access keys, which will have the users current access key as parent if it contains an OIDC token. - */ - "parent"?: string; - "scope"?: StorageV1AccessKeyScope; - /** - * Subject is a generic subject that can be used instead of user or team - */ - "subject"?: string; - /** - * The team this access key refers to - */ - "team"?: string; - /** - * The time to life for this access key - */ - "ttl"?: number; +declare class StorageV1QuotaStatusProject { /** - * If this is specified, the time to life for this access key will start after the lastActivity instead of creation timestamp + * Clusters holds the used amount per cluster. Maps cluster name to used resources */ - "ttlAfterLastActivity"?: boolean; + "clusters"?: { + [key: string]: StorageV1QuotaStatusProjectCluster; + }; /** - * The type of an access key, which basically describes if the access key is user managed or managed by loft itself. + * Limit is the amount limited, copied from spec.quotas.project */ - "type"?: string; + "limit"?: { + [key: string]: string; + }; /** - * The user this access key refers to + * Used is the amount currently used across all clusters */ - "user"?: string; + "used"?: { + [key: string]: string; + }; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12454,11 +13789,23 @@ declare class ManagementV1ResetAccessKeySpec { }[]; constructor(); } -declare class ManagementV1ResetAccessKeyStatus { +declare class StorageV1QuotaStatusUserUsed { /** - * The last time this access key was used to access the api + * Teams is a mapping of teams to used resources */ - "lastActivity"?: Date; + "teams"?: { + [key: string]: { + [key: string]: string; + }; + }; + /** + * Users is a mapping of users to used resources + */ + "users"?: { + [key: string]: { + [key: string]: string; + }; + }; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12474,18 +13821,20 @@ declare class ManagementV1ResetAccessKeyStatus { }[]; constructor(); } -declare class ManagementV1ResetAccessKey { +declare class StorageV1QuotaStatusUser { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * Clusters holds the used amount per cluster. Maps cluster name to used resources */ - "apiVersion"?: string; + "clusters"?: { + [key: string]: StorageV1QuotaStatusUserUsed; + }; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * Limit is the amount limited per user / team */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1ResetAccessKeySpec; - "status"?: ManagementV1ResetAccessKeyStatus; + "limit"?: { + [key: string]: string; + }; + "used"?: StorageV1QuotaStatusUserUsed; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12501,20 +13850,9 @@ declare class ManagementV1ResetAccessKey { }[]; constructor(); } -declare class ManagementV1RunnerAccessKey { - /** - * AccessKey is the access key used by the runner - */ - "accessKey"?: string; - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - "kind"?: string; - "metadata"?: V1ObjectMeta; +declare class StorageV1QuotaStatus { + "project"?: StorageV1QuotaStatusProject; + "user"?: StorageV1QuotaStatusUser; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12530,20 +13868,12 @@ declare class ManagementV1RunnerAccessKey { }[]; constructor(); } -declare class ManagementV1RunnerConfig { - /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - */ - "apiVersion"?: string; - /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - */ - "kind"?: string; - "metadata"?: V1ObjectMeta; +declare class ManagementV1ProjectStatus { /** - * TokenCaCert is the certificate authority the Loft tokens will be signed with + * Conditions holds several conditions the project might be in */ - "tokenCaCert"?: string; + "conditions"?: Array; + "quotas"?: StorageV1QuotaStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12559,15 +13889,18 @@ declare class ManagementV1RunnerConfig { }[]; constructor(); } -declare class V1NonResourceAttributes { +declare class ManagementV1Project { /** - * Path is the URL path of the request + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "path"?: string; + "apiVersion"?: string; /** - * Verb is the standard HTTP verb + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "verb"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1ProjectSpec; + "status"?: ManagementV1ProjectStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12583,19 +13916,11 @@ declare class V1NonResourceAttributes { }[]; constructor(); } -declare class V1FieldSelectorRequirement { - /** - * key is the field selector key that the requirement applies to. - */ - "key": string; - /** - * operator represents a key\'s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future. - */ - "operator": string; +declare class ManagementV1RedirectTokenSpec { /** - * values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. + * Token is the token that includes the redirect request */ - "values"?: Array; + "token"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12611,15 +13936,8 @@ declare class V1FieldSelectorRequirement { }[]; constructor(); } -declare class V1FieldSelectorAttributes { - /** - * rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver\'s *SubjectAccessReview will parse the rawSelector as long as the requirements are not present. - */ - "rawSelector"?: string; - /** - * requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. - */ - "requirements"?: Array; +declare class ManagementV1RedirectTokenStatus { + "redirectURL"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12635,15 +13953,18 @@ declare class V1FieldSelectorAttributes { }[]; constructor(); } -declare class V1LabelSelectorAttributes { +declare class ManagementV1RedirectToken { /** - * rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver\'s *SubjectAccessReview will parse the rawSelector as long as the requirements are not present. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "rawSelector"?: string; + "apiVersion"?: string; /** - * requirements is the parsed interpretation of a label selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "requirements"?: Array; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1RedirectTokenSpec; + "status"?: ManagementV1RedirectTokenStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12659,35 +13980,33 @@ declare class V1LabelSelectorAttributes { }[]; constructor(); } -declare class V1ResourceAttributes { - "fieldSelector"?: V1FieldSelectorAttributes; +declare class ManagementV1RegisterVirtualClusterSpec { /** - * Group is the API Group of the Resource. \"*\" means all. + * Chart specifies the vCluster chart. */ - "group"?: string; - "labelSelector"?: V1LabelSelectorAttributes; + "chart"?: string; /** - * Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all. + * ForceName specifies if the name should be used or creation will fail. */ - "name"?: string; + "forceName"?: boolean; /** - * Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview + * Name is the virtual cluster instance name. If the name is already taken, the platform will construct a name for the vcluster based on the service uid and this name. */ - "namespace"?: string; + "name"?: string; /** - * Resource is one of the existing resource types. \"*\" means all. + * Project is the project name the virtual cluster should be in. */ - "resource"?: string; + "project"?: string; /** - * Subresource is one of the existing resource types. \"\" means none. + * ServiceUID uniquely identifies the virtual cluster based on the service uid. */ - "subresource"?: string; + "serviceUID"?: string; /** - * Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all. + * Values specifies the vCluster config. */ - "verb"?: string; + "values"?: string; /** - * Version is the API Version of the Resource. \"*\" means all. + * Version specifies the vCluster version. */ "version"?: string; static readonly discriminator: string | undefined; @@ -12705,9 +14024,11 @@ declare class V1ResourceAttributes { }[]; constructor(); } -declare class ManagementV1SelfSubjectAccessReviewSpec { - "nonResourceAttributes"?: V1NonResourceAttributes; - "resourceAttributes"?: V1ResourceAttributes; +declare class ManagementV1RegisterVirtualClusterStatus { + /** + * Name is the actual name of the virtual cluster instance. + */ + "name"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12723,23 +14044,18 @@ declare class ManagementV1SelfSubjectAccessReviewSpec { }[]; constructor(); } -declare class ManagementV1SelfSubjectAccessReviewStatus { - /** - * Allowed is required. True if the action would be allowed, false otherwise. - */ - "allowed": boolean; - /** - * Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true. - */ - "denied"?: boolean; +declare class ManagementV1RegisterVirtualCluster { /** - * EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "evaluationError"?: string; + "apiVersion"?: string; /** - * Reason is optional. It indicates why a request was allowed or denied. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "reason"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1RegisterVirtualClusterSpec; + "status"?: ManagementV1RegisterVirtualClusterStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12755,18 +14071,63 @@ declare class ManagementV1SelfSubjectAccessReviewStatus { }[]; constructor(); } -declare class ManagementV1SelfSubjectAccessReview { +declare class ManagementV1ResetAccessKeySpec { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * Description describes an app */ - "apiVersion"?: string; + "description"?: string; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * If this field is true, the access key is still allowed to exist, however will not work to access the api */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1SelfSubjectAccessReviewSpec; - "status"?: ManagementV1SelfSubjectAccessReviewStatus; + "disabled"?: boolean; + /** + * The display name shown in the UI + */ + "displayName"?: string; + /** + * Groups specifies extra groups to apply when using this access key + */ + "groups"?: Array; + "identity"?: StorageV1AccessKeyIdentity; + /** + * The last time the identity was refreshed + */ + "identityRefresh"?: Date; + /** + * The actual access key that will be used as a bearer token + */ + "key"?: string; + "oidcLogin"?: StorageV1AccessKeyOIDC; + "oidcProvider"?: StorageV1AccessKeyOIDCProvider; + /** + * DEPRECATED: do not use anymore Parent is used to share OIDC and external token information with multiple access keys. Since copying an OIDC refresh token would result in the other access keys becoming invalid after a refresh parent allows access keys to share that information. The use case for this is primarily user generated access keys, which will have the users current access key as parent if it contains an OIDC token. + */ + "parent"?: string; + "scope"?: StorageV1AccessKeyScope; + /** + * Subject is a generic subject that can be used instead of user or team + */ + "subject"?: string; + /** + * The team this access key refers to + */ + "team"?: string; + /** + * The time to life for this access key + */ + "ttl"?: number; + /** + * If this is specified, the time to life for this access key will start after the lastActivity instead of creation timestamp + */ + "ttlAfterLastActivity"?: boolean; + /** + * The type of an access key, which basically describes if the access key is user managed or managed by loft itself. + */ + "type"?: string; + /** + * The user this access key refers to + */ + "user"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12782,11 +14143,11 @@ declare class ManagementV1SelfSubjectAccessReview { }[]; constructor(); } -declare class ManagementV1SelfSpec { +declare class ManagementV1ResetAccessKeyStatus { /** - * AccessKey is an optional access key to use instead of the provided one + * The last time this access key was used to access the api */ - "accessKey"?: string; + "lastActivity"?: Date; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12797,40 +14158,23 @@ declare class ManagementV1SelfSpec { static getAttributeTypeMap(): { name: string; baseName: string; - type: string; - format: string; - }[]; - constructor(); -} -declare class ManagementV1UserInfo { - /** - * The display name shown in the UI - */ - "displayName"?: string; - /** - * The users email address - */ - "email"?: string; - /** - * Icon is the icon of the user / team - */ - "icon"?: string; - /** - * Name is the kubernetes name of the object - */ - "name"?: string; - /** - * The user subject - */ - "subject"?: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class ManagementV1ResetAccessKey { /** - * Teams are the teams the user is part of + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "teams"?: Array; + "apiVersion"?: string; /** - * The username that is used to login + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "username"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1ResetAccessKeySpec; + "status"?: ManagementV1ResetAccessKeyStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12846,42 +14190,20 @@ declare class ManagementV1UserInfo { }[]; constructor(); } -declare class ManagementV1SelfStatus { +declare class ManagementV1RunnerAccessKey { /** - * The name of the currently used access key + * AccessKey is the access key used by the runner */ "accessKey"?: string; - "accessKeyScope"?: StorageV1AccessKeyScope; - /** - * The type of the currently used access key - */ - "accessKeyType"?: string; - /** - * ChatAuthToken is the token used to authenticate with the in-product chat widget in the UI - */ - "chatAuthToken"?: string; - /** - * The groups of the currently logged in user - */ - "groups"?: Array; - /** - * InstanceID is the loft instance id - */ - "instanceID"?: string; - /** - * ProjectNamespacePrefix is the prefix used to name project namespaces after defaulting has been applied - */ - "projectNamespacePrefix"?: string; /** - * The subject of the currently logged in user + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "subject"?: string; - "team"?: StorageV1EntityInfo; + "apiVersion"?: string; /** - * UID is the user uid + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "uid"?: string; - "user"?: ManagementV1UserInfo; + "kind"?: string; + "metadata"?: V1ObjectMeta; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12897,7 +14219,7 @@ declare class ManagementV1SelfStatus { }[]; constructor(); } -declare class ManagementV1Self { +declare class ManagementV1RunnerConfig { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ @@ -12907,8 +14229,10 @@ declare class ManagementV1Self { */ "kind"?: string; "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1SelfSpec; - "status"?: ManagementV1SelfStatus; + /** + * TokenCaCert is the certificate authority the Loft tokens will be signed with + */ + "tokenCaCert"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12924,26 +14248,15 @@ declare class ManagementV1Self { }[]; constructor(); } -declare class ManagementV1SharedSecretSpec { - /** - * Access holds the access rights for users and teams which will be transformed to Roles and RoleBindings - */ - "access"?: Array; - /** - * Data contains the secret data. Each key must consist of alphanumeric characters, \'-\', \'_\' or \'.\'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 - */ - "data"?: { - [key: string]: string; - }; +declare class V1NonResourceAttributes { /** - * Description describes a shared secret + * Path is the URL path of the request */ - "description"?: string; + "path"?: string; /** - * DisplayName is the name that should be displayed in the UI + * Verb is the standard HTTP verb */ - "displayName"?: string; - "owner"?: StorageV1UserOrTeam; + "verb"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12959,11 +14272,19 @@ declare class ManagementV1SharedSecretSpec { }[]; constructor(); } -declare class ManagementV1SharedSecretStatus { +declare class V1FieldSelectorRequirement { /** - * Conditions holds several conditions the project might be in + * key is the field selector key that the requirement applies to. */ - "conditions"?: Array; + "key": string; + /** + * operator represents a key\'s relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. + */ + "values"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -12979,18 +14300,15 @@ declare class ManagementV1SharedSecretStatus { }[]; constructor(); } -declare class ManagementV1SharedSecret { +declare class V1FieldSelectorAttributes { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver\'s *SubjectAccessReview will parse the rawSelector as long as the requirements are not present. */ - "apiVersion"?: string; + "rawSelector"?: string; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * requirements is the parsed interpretation of a field selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. */ - "kind"?: string; - "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1SharedSecretSpec; - "status"?: ManagementV1SharedSecretStatus; + "requirements"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13006,31 +14324,15 @@ declare class ManagementV1SharedSecret { }[]; constructor(); } -declare class ManagementV1SpaceInstanceSpec { - /** - * Access holds the access rights for users and teams - */ - "access"?: Array; - "clusterRef"?: StorageV1ClusterRef; - /** - * Description describes a space instance - */ - "description"?: string; - /** - * DisplayName is the name that should be displayed in the UI - */ - "displayName"?: string; +declare class V1LabelSelectorAttributes { /** - * ExtraAccessRules defines extra rules which users and teams should have which access to the virtual cluster. + * rawSelector is the serialization of a field selector that would be included in a query parameter. Webhook implementations are encouraged to ignore rawSelector. The kube-apiserver\'s *SubjectAccessReview will parse the rawSelector as long as the requirements are not present. */ - "extraAccessRules"?: Array; - "owner"?: StorageV1UserOrTeam; + "rawSelector"?: string; /** - * Parameters are values to pass to the template. The values should be encoded as YAML string where each parameter is represented as a top-level field key. + * requirements is the parsed interpretation of a label selector. All requirements must be met for a resource instance to match the selector. Webhook implementations should handle requirements, but how to handle them is up to the webhook. Since requirements can only limit the request, it is safe to authorize as unlimited request if the requirements are not understood. */ - "parameters"?: string; - "template"?: StorageV1SpaceTemplateDefinition; - "templateRef"?: StorageV1TemplateRef; + "requirements"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13046,19 +14348,37 @@ declare class ManagementV1SpaceInstanceSpec { }[]; constructor(); } -declare class StorageV1ChartStatus { +declare class V1ResourceAttributes { + "fieldSelector"?: V1FieldSelectorAttributes; /** - * LastAppliedChartConfigHash is the last applied configuration + * Group is the API Group of the Resource. \"*\" means all. */ - "lastAppliedChartConfigHash"?: string; + "group"?: string; + "labelSelector"?: V1LabelSelectorAttributes; /** - * Name of the chart that was applied + * Name is the name of the resource being requested for a \"get\" or deleted for a \"delete\". \"\" (empty) means all. */ "name"?: string; /** - * Namespace of the chart that was applied + * Namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces \"\" (empty) is defaulted for LocalSubjectAccessReviews \"\" (empty) is empty for cluster-scoped resources \"\" (empty) means \"all\" for namespace scoped resources from a SubjectAccessReview or SelfSubjectAccessReview */ "namespace"?: string; + /** + * Resource is one of the existing resource types. \"*\" means all. + */ + "resource"?: string; + /** + * Subresource is one of the existing resource types. \"\" means none. + */ + "subresource"?: string; + /** + * Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. \"*\" means all. + */ + "verb"?: string; + /** + * Version is the API Version of the Resource. \"*\" means all. + */ + "version"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13074,19 +14394,9 @@ declare class StorageV1ChartStatus { }[]; constructor(); } -declare class StorageV1ObjectsStatus { - /** - * Apps are the apps that were applied - */ - "apps"?: Array; - /** - * Charts are the charts that were applied - */ - "charts"?: Array; - /** - * LastAppliedObjects holds the status for the objects that were applied - */ - "lastAppliedObjects"?: string; +declare class ManagementV1SelfSubjectAccessReviewSpec { + "nonResourceAttributes"?: V1NonResourceAttributes; + "resourceAttributes"?: V1ResourceAttributes; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13102,38 +14412,23 @@ declare class StorageV1ObjectsStatus { }[]; constructor(); } -declare class ManagementV1SpaceInstanceStatus { - /** - * CanUpdate specifies if the requester can update the instance - */ - "canUpdate"?: boolean; - /** - * CanUse specifies if the requester can use the instance - */ - "canUse"?: boolean; - /** - * Conditions holds several conditions the virtual cluster might be in - */ - "conditions"?: Array; +declare class ManagementV1SelfSubjectAccessReviewStatus { /** - * IgnoreReconciliation tells the controller to ignore reconciliation for this instance -- this is primarily used when migrating virtual cluster instances from project to project; this prevents a situation where there are two virtual cluster instances representing the same virtual cluster which could cause issues with concurrent reconciliations of the same object. Once the virtual cluster instance has been cloned and placed into the new project, this (the \"old\") virtual cluster instance can safely be deleted. + * Allowed is required. True if the action would be allowed, false otherwise. */ - "ignoreReconciliation"?: boolean; + "allowed": boolean; /** - * Message describes the reason in human-readable form + * Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true. */ - "message"?: string; + "denied"?: boolean; /** - * Phase describes the current phase the space instance is in + * EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. */ - "phase"?: string; + "evaluationError"?: string; /** - * Reason describes the reason in machine-readable form + * Reason is optional. It indicates why a request was allowed or denied. */ "reason"?: string; - "sleepModeConfig"?: ClusterV1SleepModeConfig; - "space"?: StorageV1SpaceTemplateDefinition; - "spaceObjects"?: StorageV1ObjectsStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13149,7 +14444,7 @@ declare class ManagementV1SpaceInstanceStatus { }[]; constructor(); } -declare class ManagementV1SpaceInstance { +declare class ManagementV1SelfSubjectAccessReview { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ @@ -13159,8 +14454,8 @@ declare class ManagementV1SpaceInstance { */ "kind"?: string; "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1SpaceInstanceSpec; - "status"?: ManagementV1SpaceInstanceStatus; + "spec"?: ManagementV1SelfSubjectAccessReviewSpec; + "status"?: ManagementV1SelfSubjectAccessReviewStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13176,27 +14471,55 @@ declare class ManagementV1SpaceInstance { }[]; constructor(); } -declare class ManagementV1SubjectAccessReviewSpec { +declare class ManagementV1SelfSpec { /** - * Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. + * AccessKey is an optional access key to use instead of the provided one */ - "extra"?: { - [key: string]: Array; - }; + "accessKey"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class ManagementV1UserInfo { + /** + * The display name shown in the UI + */ + "displayName"?: string; + /** + * The users email address + */ + "email"?: string; + /** + * Icon is the icon of the user / team + */ + "icon"?: string; + /** + * Name is the kubernetes name of the object + */ + "name"?: string; /** - * Groups is the groups you\'re testing for. + * The user subject */ - "groups"?: Array; - "nonResourceAttributes"?: V1NonResourceAttributes; - "resourceAttributes"?: V1ResourceAttributes; + "subject"?: string; /** - * UID information about the requesting user. + * Teams are the teams the user is part of */ - "uid"?: string; + "teams"?: Array; /** - * User is the user you\'re testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups + * The username that is used to login */ - "user"?: string; + "username"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13212,23 +14535,42 @@ declare class ManagementV1SubjectAccessReviewSpec { }[]; constructor(); } -declare class ManagementV1SubjectAccessReviewStatus { +declare class ManagementV1SelfStatus { /** - * Allowed is required. True if the action would be allowed, false otherwise. + * The name of the currently used access key */ - "allowed": boolean; + "accessKey"?: string; + "accessKeyScope"?: StorageV1AccessKeyScope; /** - * Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true. + * The type of the currently used access key */ - "denied"?: boolean; + "accessKeyType"?: string; /** - * EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. + * ChatAuthToken is the token used to authenticate with the in-product chat widget in the UI */ - "evaluationError"?: string; + "chatAuthToken"?: string; /** - * Reason is optional. It indicates why a request was allowed or denied. + * The groups of the currently logged in user */ - "reason"?: string; + "groups"?: Array; + /** + * InstanceID is the loft instance id + */ + "instanceID"?: string; + /** + * ProjectNamespacePrefix is the prefix used to name project namespaces after defaulting has been applied + */ + "projectNamespacePrefix"?: string; + /** + * The subject of the currently logged in user + */ + "subject"?: string; + "team"?: StorageV1EntityInfo; + /** + * UID is the user uid + */ + "uid"?: string; + "user"?: ManagementV1UserInfo; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13244,7 +14586,7 @@ declare class ManagementV1SubjectAccessReviewStatus { }[]; constructor(); } -declare class ManagementV1SubjectAccessReview { +declare class ManagementV1Self { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ @@ -13254,8 +14596,8 @@ declare class ManagementV1SubjectAccessReview { */ "kind"?: string; "metadata"?: V1ObjectMeta; - "spec"?: ManagementV1SubjectAccessReviewSpec; - "status"?: ManagementV1SubjectAccessReviewStatus; + "spec"?: ManagementV1SelfSpec; + "status"?: ManagementV1SelfStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13271,16 +14613,26 @@ declare class ManagementV1SubjectAccessReview { }[]; constructor(); } -declare class ManagementV1TaskLog { +declare class ManagementV1SharedSecretSpec { /** - * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + * Access holds the access rights for users and teams which will be transformed to Roles and RoleBindings */ - "apiVersion"?: string; + "access"?: Array; /** - * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * Data contains the secret data. Each key must consist of alphanumeric characters, \'-\', \'_\' or \'.\'. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4 */ - "kind"?: string; - "metadata"?: V1ObjectMeta; + "data"?: { + [key: string]: string; + }; + /** + * Description describes a shared secret + */ + "description"?: string; + /** + * DisplayName is the name that should be displayed in the UI + */ + "displayName"?: string; + "owner"?: StorageV1UserOrTeam; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13296,15 +14648,11 @@ declare class ManagementV1TaskLog { }[]; constructor(); } -declare class StorageV1TargetCluster { - /** - * Cluster is the cluster where the task should get executed - */ - "cluster"?: string; +declare class ManagementV1SharedSecretStatus { /** - * Namespace is the namespace where the task should get executed + * Conditions holds several conditions the project might be in */ - "namespace"?: string; + "conditions"?: Array; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13320,15 +14668,18 @@ declare class StorageV1TargetCluster { }[]; constructor(); } -declare class StorageV1TargetInstance { +declare class ManagementV1SharedSecret { /** - * Name is the name of the instance + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "name"?: string; + "apiVersion"?: string; /** - * Project where the instance is in + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "project"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1SharedSecretSpec; + "status"?: ManagementV1SharedSecretStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13344,10 +14695,31 @@ declare class StorageV1TargetInstance { }[]; constructor(); } -declare class StorageV1Target { - "cluster"?: StorageV1TargetCluster; - "spaceInstance"?: StorageV1TargetInstance; - "virtualClusterInstance"?: StorageV1TargetInstance; +declare class ManagementV1SpaceInstanceSpec { + /** + * Access holds the access rights for users and teams + */ + "access"?: Array; + "clusterRef"?: StorageV1ClusterRef; + /** + * Description describes a space instance + */ + "description"?: string; + /** + * DisplayName is the name that should be displayed in the UI + */ + "displayName"?: string; + /** + * ExtraAccessRules defines extra rules which users and teams should have which access to the virtual cluster. + */ + "extraAccessRules"?: Array; + "owner"?: StorageV1UserOrTeam; + /** + * Parameters are values to pass to the template. The values should be encoded as YAML string where each parameter is represented as a top-level field key. + */ + "parameters"?: string; + "template"?: StorageV1SpaceTemplateDefinition; + "templateRef"?: StorageV1TemplateRef; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13363,16 +14735,19 @@ declare class StorageV1Target { }[]; constructor(); } -declare class StorageV1AppTask { - "appReference"?: StorageV1AppReference; +declare class StorageV1ChartStatus { /** - * RollbackRevision is the revision to rollback to + * LastAppliedChartConfigHash is the last applied configuration */ - "rollbackRevision"?: string; + "lastAppliedChartConfigHash"?: string; /** - * Type is the task type. Defaults to Upgrade + * Name of the chart that was applied */ - "type"?: string; + "name"?: string; + /** + * Namespace of the chart that was applied + */ + "namespace"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13388,22 +14763,19 @@ declare class StorageV1AppTask { }[]; constructor(); } -declare class StorageV1HelmTaskRelease { - "config"?: ClusterV1HelmReleaseConfig; +declare class StorageV1ObjectsStatus { /** - * Labels are additional labels for the helm release. + * Apps are the apps that were applied */ - "labels"?: { - [key: string]: string; - }; + "apps"?: Array; /** - * Name is the name of the release + * Charts are the charts that were applied */ - "name"?: string; + "charts"?: Array; /** - * Namespace of the release, if empty will use the target namespace + * LastAppliedObjects holds the status for the objects that were applied */ - "namespace"?: string; + "lastAppliedObjects"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13419,16 +14791,38 @@ declare class StorageV1HelmTaskRelease { }[]; constructor(); } -declare class StorageV1HelmTask { - "release"?: StorageV1HelmTaskRelease; +declare class ManagementV1SpaceInstanceStatus { /** - * RollbackRevision is the revision to rollback to + * CanUpdate specifies if the requester can update the instance */ - "rollbackRevision"?: string; + "canUpdate"?: boolean; /** - * Type is the task type. Defaults to Upgrade + * CanUse specifies if the requester can use the instance */ - "type"?: string; + "canUse"?: boolean; + /** + * Conditions holds several conditions the virtual cluster might be in + */ + "conditions"?: Array; + /** + * IgnoreReconciliation tells the controller to ignore reconciliation for this instance -- this is primarily used when migrating virtual cluster instances from project to project; this prevents a situation where there are two virtual cluster instances representing the same virtual cluster which could cause issues with concurrent reconciliations of the same object. Once the virtual cluster instance has been cloned and placed into the new project, this (the \"old\") virtual cluster instance can safely be deleted. + */ + "ignoreReconciliation"?: boolean; + /** + * Message describes the reason in human-readable form + */ + "message"?: string; + /** + * Phase describes the current phase the space instance is in + */ + "phase"?: string; + /** + * Reason describes the reason in machine-readable form + */ + "reason"?: string; + "sleepModeConfig"?: ClusterV1SleepModeConfig; + "space"?: StorageV1SpaceTemplateDefinition; + "spaceObjects"?: StorageV1ObjectsStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13444,9 +14838,18 @@ declare class StorageV1HelmTask { }[]; constructor(); } -declare class StorageV1TaskDefinition { - "appTask"?: StorageV1AppTask; - "helm"?: StorageV1HelmTask; +declare class ManagementV1SpaceInstance { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion"?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1SpaceInstanceSpec; + "status"?: ManagementV1SpaceInstanceStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13462,19 +14865,27 @@ declare class StorageV1TaskDefinition { }[]; constructor(); } -declare class ManagementV1TaskSpec { +declare class ManagementV1SubjectAccessReviewSpec { /** - * Access holds the access rights for users and teams + * Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. */ - "access"?: Array; + "extra"?: { + [key: string]: Array; + }; /** - * DisplayName is the name that should be displayed in the UI + * Groups is the groups you\'re testing for. */ - "displayName"?: string; - "owner"?: StorageV1UserOrTeam; - "scope"?: StorageV1AccessKeyScope; - "target"?: StorageV1Target; - "task"?: StorageV1TaskDefinition; + "groups"?: Array; + "nonResourceAttributes"?: V1NonResourceAttributes; + "resourceAttributes"?: V1ResourceAttributes; + /** + * UID information about the requesting user. + */ + "uid"?: string; + /** + * User is the user you\'re testing for. If you specify \"User\" but not \"Groups\", then is it interpreted as \"What if User were not a member of any groups + */ + "user"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13490,11 +14901,23 @@ declare class ManagementV1TaskSpec { }[]; constructor(); } -declare class V1ContainerStateRunning { +declare class ManagementV1SubjectAccessReviewStatus { /** - * Time at which the container was last (re-)started + * Allowed is required. True if the action would be allowed, false otherwise. */ - "startedAt"?: Date; + "allowed": boolean; + /** + * Denied is optional. True if the action would be denied, otherwise false. If both allowed is false and denied is false, then the authorizer has no opinion on whether to authorize the action. Denied may not be true if Allowed is true. + */ + "denied"?: boolean; + /** + * EvaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. For instance, RBAC can be missing a role, but enough roles are still present and bound to reason about the request. + */ + "evaluationError"?: string; + /** + * Reason is optional. It indicates why a request was allowed or denied. + */ + "reason"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13510,35 +14933,18 @@ declare class V1ContainerStateRunning { }[]; constructor(); } -declare class V1ContainerStateTerminated { - /** - * Container\'s ID in the format \'://\' - */ - "containerID"?: string; - /** - * Exit status from the last termination of the container - */ - "exitCode": number; - /** - * Time at which the container last terminated - */ - "finishedAt"?: Date; - /** - * Message regarding the last termination of the container - */ - "message"?: string; - /** - * (brief) reason from the last termination of the container - */ - "reason"?: string; +declare class ManagementV1SubjectAccessReview { /** - * Signal from the last termination of the container + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "signal"?: number; + "apiVersion"?: string; /** - * Time at which previous execution of the container started + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "startedAt"?: Date; + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1SubjectAccessReviewSpec; + "status"?: ManagementV1SubjectAccessReviewStatus; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13554,15 +14960,16 @@ declare class V1ContainerStateTerminated { }[]; constructor(); } -declare class V1ContainerStateWaiting { +declare class ManagementV1TaskLog { /** - * Message regarding why the container is not yet running. + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ - "message"?: string; + "apiVersion"?: string; /** - * (brief) reason the container is not yet running. + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ - "reason"?: string; + "kind"?: string; + "metadata"?: V1ObjectMeta; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13578,10 +14985,15 @@ declare class V1ContainerStateWaiting { }[]; constructor(); } -declare class V1ContainerState { - "running"?: V1ContainerStateRunning; - "terminated"?: V1ContainerStateTerminated; - "waiting"?: V1ContainerStateWaiting; +declare class StorageV1TargetCluster { + /** + * Cluster is the cluster where the task should get executed + */ + "cluster"?: string; + /** + * Namespace is the namespace where the task should get executed + */ + "namespace"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13597,19 +15009,15 @@ declare class V1ContainerState { }[]; constructor(); } -declare class V1LinuxContainerUser { - /** - * GID is the primary gid initially attached to the first process in the container - */ - "gid": number; +declare class StorageV1TargetInstance { /** - * SupplementalGroups are the supplemental groups initially attached to the first process in the container + * Name is the name of the instance */ - "supplementalGroups"?: Array; + "name"?: string; /** - * UID is the primary uid initially attached to the first process in the container + * Project where the instance is in */ - "uid": number; + "project"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13625,8 +15033,10 @@ declare class V1LinuxContainerUser { }[]; constructor(); } -declare class V1ContainerUser { - "linux"?: V1LinuxContainerUser; +declare class StorageV1Target { + "cluster"?: StorageV1TargetCluster; + "spaceInstance"?: StorageV1TargetInstance; + "virtualClusterInstance"?: StorageV1TargetInstance; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13642,15 +15052,16 @@ declare class V1ContainerUser { }[]; constructor(); } -declare class V1ResourceHealth { +declare class StorageV1AppTask { + "appReference"?: StorageV1AppReference; /** - * Health of the resource. can be one of: - Healthy: operates as normal - Unhealthy: reported unhealthy. We consider this a temporary health issue since we do not have a mechanism today to distinguish temporary and permanent issues. - Unknown: The status cannot be determined. For example, Device Plugin got unregistered and hasn\'t been re-registered since. In future we may want to introduce the PermanentlyUnhealthy Status. + * RollbackRevision is the revision to rollback to */ - "health"?: string; + "rollbackRevision"?: string; /** - * ResourceID is the unique identifier of the resource. See the ResourceID type for more information. + * Type is the task type. Defaults to Upgrade */ - "resourceID": string; + "type"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13666,15 +15077,22 @@ declare class V1ResourceHealth { }[]; constructor(); } -declare class V1ResourceStatus { +declare class StorageV1HelmTaskRelease { + "config"?: ClusterV1HelmReleaseConfig; /** - * Name of the resource. Must be unique within the pod and match one of the resources from the pod spec. + * Labels are additional labels for the helm release. */ - "name": string; + "labels"?: { + [key: string]: string; + }; /** - * List of unique Resources health. Each element in the list contains an unique resource ID and resource health. At a minimum, ResourceID must uniquely identify the Resource allocated to the Pod on the Node for the lifetime of a Pod. See ResourceID type for it\'s definition. + * Name is the name of the release */ - "resources"?: Array; + "name"?: string; + /** + * Namespace of the release, if empty will use the target namespace + */ + "namespace"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13690,23 +15108,16 @@ declare class V1ResourceStatus { }[]; constructor(); } -declare class V1VolumeMountStatus { - /** - * MountPath corresponds to the original VolumeMount. - */ - "mountPath": string; - /** - * Name corresponds to the name of the original VolumeMount. - */ - "name": string; +declare class StorageV1HelmTask { + "release"?: StorageV1HelmTaskRelease; /** - * ReadOnly corresponds to the original VolumeMount. + * RollbackRevision is the revision to rollback to */ - "readOnly"?: boolean; + "rollbackRevision"?: string; /** - * RecursiveReadOnly must be set to Disabled, Enabled, or unspecified (for non-readonly mounts). An IfPossible value in the original VolumeMount must be translated to Disabled or Enabled, depending on the mount result. + * Type is the task type. Defaults to Upgrade */ - "recursiveReadOnly"?: string; + "type"?: string; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13722,53 +15133,37 @@ declare class V1VolumeMountStatus { }[]; constructor(); } -declare class V1ContainerStatus { - /** - * AllocatedResources represents the compute resources allocated for this container by the node. Kubelet sets this value to Container.Resources.Requests upon successful pod admission and after successfully admitting desired pod resize. - */ - "allocatedResources"?: { - [key: string]: string; - }; - /** - * AllocatedResourcesStatus represents the status of various resources allocated for this Pod. - */ - "allocatedResourcesStatus"?: Array; - /** - * ContainerID is the ID of the container in the format \'://\'. Where type is a container runtime identifier, returned from Version call of CRI API (for example \"containerd\"). - */ - "containerID"?: string; - /** - * Image is the name of container image that the container is running. The container image may not match the image used in the PodSpec, as it may have been resolved by the runtime. More info: https://kubernetes.io/docs/concepts/containers/images. - */ - "image": string; - /** - * ImageID is the image ID of the container\'s image. The image ID may not match the image ID of the image used in the PodSpec, as it may have been resolved by the runtime. - */ - "imageID": string; - "lastState"?: V1ContainerState; - /** - * Name is a DNS_LABEL representing the unique name of the container. Each container in a pod must have a unique name across all container types. Cannot be updated. - */ - "name": string; - /** - * Ready specifies whether the container is currently passing its readiness check. The value will change as readiness probes keep executing. If no readiness probes are specified, this field defaults to true once the container is fully started (see Started field). The value is typically used to determine whether a container is ready to accept traffic. - */ - "ready": boolean; - "resources"?: V1ResourceRequirements; - /** - * RestartCount holds the number of times the container has been restarted. Kubelet makes an effort to always increment the value, but there are cases when the state may be lost due to node restarts and then the value may be reset to 0. The value is never negative. - */ - "restartCount": number; +declare class StorageV1TaskDefinition { + "appTask"?: StorageV1AppTask; + "helm"?: StorageV1HelmTask; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class ManagementV1TaskSpec { /** - * Started indicates whether the container has finished its postStart lifecycle hook and passed its startup probe. Initialized as false, becomes true after startupProbe is considered successful. Resets to false when the container is restarted, or if kubelet loses state temporarily. In both cases, startup probes will run again. Is always true when no startupProbe is defined and container is running and has passed the postStart lifecycle hook. The null value must be treated the same as false. + * Access holds the access rights for users and teams */ - "started"?: boolean; - "state"?: V1ContainerState; - "user"?: V1ContainerUser; + "access"?: Array; /** - * Status of volume mounts. + * DisplayName is the name that should be displayed in the UI */ - "volumeMounts"?: Array; + "displayName"?: string; + "owner"?: StorageV1UserOrTeam; + "scope"?: StorageV1AccessKeyScope; + "target"?: StorageV1Target; + "task"?: StorageV1TaskDefinition; static readonly discriminator: string | undefined; static readonly attributeTypeMap: Array<{ name: string; @@ -13901,10 +15296,12 @@ declare class StorageV1ClusterSpec { * The namespace where the cluster components will be installed in */ "managementNamespace"?: string; + "metrics"?: StorageV1Metrics; /** * NetworkPeer specifies if the cluster is connected via tailscale, when this is specified, config is optional */ "networkPeer"?: boolean; + "opencost"?: StorageV1OpenCost; "owner"?: StorageV1UserOrTeam; /** * If unusable is true, no spaces or virtual clusters can be scheduled on this cluster. @@ -13926,6 +15323,10 @@ declare class StorageV1ClusterSpec { constructor(); } declare class StorageV1ClusterStatus { + /** + * Conditions holds several conditions the cluster might be in + */ + "conditions"?: Array; "message"?: string; "phase"?: string; "reason"?: string; @@ -14513,6 +15914,73 @@ declare class ManagementV1VirtualClusterAccessKey { }[]; constructor(); } +declare class ManagementV1VirtualClusterExternalDatabaseSpec { + /** + * Connector specifies the secret that should be used to connect to an external database server. The connection is used to manage a user and database for the vCluster. A data source endpoint constructed from the created user and database is returned on status. The secret specified by connector should contain the following fields: endpoint - the endpoint where the database server can be accessed user - the database username password - the password for the database username port - the port to be used in conjunction with the endpoint to connect to the databse server. This is commonly 3306 + */ + "connector"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class ManagementV1VirtualClusterExternalDatabaseStatus { + /** + * DataSource holds a datasource endpoint constructed from the vCluster\'s designated user and database. The user and database are created from the given connector. + */ + "dataSource"?: string; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} +declare class ManagementV1VirtualClusterExternalDatabase { + /** + * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion"?: string; + /** + * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind"?: string; + "metadata"?: V1ObjectMeta; + "spec"?: ManagementV1VirtualClusterExternalDatabaseSpec; + "status"?: ManagementV1VirtualClusterExternalDatabaseStatus; + static readonly discriminator: string | undefined; + static readonly attributeTypeMap: Array<{ + name: string; + baseName: string; + type: string; + format: string; + }>; + static getAttributeTypeMap(): { + name: string; + baseName: string; + type: string; + format: string; + }[]; + constructor(); +} declare class ManagementV1VirtualClusterInstanceKubeConfigSpec { /** * CertificateTTL holds the ttl (in seconds) to set for the certificate associated with the returned kubeconfig. This field is optional, if no value is provided, the certificate TTL will be set to one day. If set to zero, this will cause loft to pass nil to the certificate signing request, which will result in the certificate being valid for the clusters `cluster-signing-duration` value which is typically one year. @@ -14791,6 +16259,8 @@ export type TGenResources = { ManagementV1DevPodEnvironmentTemplate: GroupVersionResource; ManagementV1DevPodWorkspaceInstance: GroupVersionResource; ManagementV1DevPodWorkspaceInstanceState: GroupVersionResource; + ManagementV1DevPodWorkspaceInstanceTroubleshoot: GroupVersionResource; + ManagementV1DevPodWorkspacePreset: GroupVersionResource; ManagementV1DevPodWorkspaceTemplate: GroupVersionResource; ManagementV1DirectClusterEndpointToken: GroupVersionResource; ManagementV1Event: GroupVersionResource; @@ -14838,6 +16308,7 @@ export type TGenResources = { ManagementV1UserPermissions: GroupVersionResource; ManagementV1UserProfile: GroupVersionResource; ManagementV1VirtualClusterAccessKey: GroupVersionResource; + ManagementV1VirtualClusterExternalDatabase: GroupVersionResource; ManagementV1VirtualClusterInstance: GroupVersionResource; ManagementV1VirtualClusterInstanceKubeConfig: GroupVersionResource; ManagementV1VirtualClusterInstanceLog: GroupVersionResource; diff --git a/lib/index.esm.js b/lib/index.esm.js index 7a76b71..730de4c 100644 --- a/lib/index.esm.js +++ b/lib/index.esm.js @@ -1 +1 @@ -import p from"js-cookie";import te from"json-merge-patch";var M={loftAccessKeyIdentifier:"loft_access_key",loftImpersonateSubjectIdentifier:"loft_impersonate_subject",loftImpersonateJoinedGroupIdentifier:"loft_impersonate_joined_group",platformAccessKeyNotFound:"platform access key not found. Please login again"};function h(a){return a||[]}var D={ManagementV1AgentAuditEvent:{group:"management.loft.sh",version:"v1",resource:"agentauditevents",subResource:"",namespaced:!1,kind:"AgentAuditEvent"},ManagementV1Announcement:{group:"management.loft.sh",version:"v1",resource:"announcements",subResource:"",namespaced:!1,kind:"Announcement"},ManagementV1App:{group:"management.loft.sh",version:"v1",resource:"apps",subResource:"",namespaced:!1,kind:"App"},ManagementV1AppCredentials:{group:"management.loft.sh",version:"v1",resource:"apps",subResource:"credentials",namespaced:!1,kind:"AppCredentials"},ManagementV1Backup:{group:"management.loft.sh",version:"v1",resource:"backups",subResource:"",namespaced:!1,kind:"Backup"},ManagementV1BackupApply:{group:"management.loft.sh",version:"v1",resource:"backups",subResource:"apply",namespaced:!1,kind:"BackupApply"},ManagementV1Cluster:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"",namespaced:!1,kind:"Cluster"},ManagementV1ClusterAccess:{group:"management.loft.sh",version:"v1",resource:"clusteraccesses",subResource:"",namespaced:!1,kind:"ClusterAccess"},ManagementV1ClusterAccessKey:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"accesskey",namespaced:!1,kind:"ClusterAccessKey"},ManagementV1ClusterAgentConfig:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"agentconfig",namespaced:!1,kind:"ClusterAgentConfig"},ManagementV1ClusterCharts:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"charts",namespaced:!1,kind:"ClusterCharts"},ManagementV1ClusterDomain:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"domain",namespaced:!1,kind:"ClusterDomain"},ManagementV1ClusterMemberAccess:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"memberaccess",namespaced:!1,kind:"ClusterMemberAccess"},ManagementV1ClusterMembers:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"members",namespaced:!1,kind:"ClusterMembers"},ManagementV1ClusterReset:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"reset",namespaced:!1,kind:"ClusterReset"},ManagementV1ClusterRoleTemplate:{group:"management.loft.sh",version:"v1",resource:"clusterroletemplates",subResource:"",namespaced:!1,kind:"ClusterRoleTemplate"},ManagementV1ClusterVirtualClusterDefaults:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"virtualclusterdefaults",namespaced:!1,kind:"ClusterVirtualClusterDefaults"},ManagementV1Config:{group:"management.loft.sh",version:"v1",resource:"configs",subResource:"",namespaced:!1,kind:"Config"},ManagementV1ConvertVirtualClusterConfig:{group:"management.loft.sh",version:"v1",resource:"convertvirtualclusterconfig",subResource:"",namespaced:!1,kind:"ConvertVirtualClusterConfig"},ManagementV1DevPodEnvironmentTemplate:{group:"management.loft.sh",version:"v1",resource:"devpodenvironmenttemplates",subResource:"",namespaced:!1,kind:"DevPodEnvironmentTemplate"},ManagementV1DevPodWorkspaceInstance:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"",namespaced:!0,kind:"DevPodWorkspaceInstance"},ManagementV1DevPodWorkspaceInstanceState:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"state",namespaced:!0,kind:"DevPodWorkspaceInstanceState"},ManagementV1DevPodWorkspaceTemplate:{group:"management.loft.sh",version:"v1",resource:"devpodworkspacetemplates",subResource:"",namespaced:!1,kind:"DevPodWorkspaceTemplate"},ManagementV1DirectClusterEndpointToken:{group:"management.loft.sh",version:"v1",resource:"directclusterendpointtokens",subResource:"",namespaced:!1,kind:"DirectClusterEndpointToken"},ManagementV1Event:{group:"management.loft.sh",version:"v1",resource:"events",subResource:"",namespaced:!1,kind:"Event"},ManagementV1Feature:{group:"management.loft.sh",version:"v1",resource:"features",subResource:"",namespaced:!1,kind:"Feature"},ManagementV1IngressAuthToken:{group:"management.loft.sh",version:"v1",resource:"ingressauthtokens",subResource:"",namespaced:!1,kind:"IngressAuthToken"},ManagementV1Kiosk:{group:"management.loft.sh",version:"v1",resource:"kiosk",subResource:"",namespaced:!1,kind:"Kiosk"},ManagementV1License:{group:"management.loft.sh",version:"v1",resource:"licenses",subResource:"",namespaced:!1,kind:"License"},ManagementV1LicenseRequest:{group:"management.loft.sh",version:"v1",resource:"licenses",subResource:"request",namespaced:!1,kind:"LicenseRequest"},ManagementV1LicenseToken:{group:"management.loft.sh",version:"v1",resource:"licensetokens",subResource:"",namespaced:!1,kind:"LicenseToken"},ManagementV1LoftUpgrade:{group:"management.loft.sh",version:"v1",resource:"loftupgrades",subResource:"",namespaced:!1,kind:"LoftUpgrade"},ManagementV1OIDCClient:{group:"management.loft.sh",version:"v1",resource:"oidcclients",subResource:"",namespaced:!1,kind:"OIDCClient"},ManagementV1OwnedAccessKey:{group:"management.loft.sh",version:"v1",resource:"ownedaccesskeys",subResource:"",namespaced:!1,kind:"OwnedAccessKey"},ManagementV1Project:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"",namespaced:!1,kind:"Project"},ManagementV1ProjectChartInfo:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"chartinfo",namespaced:!1,kind:"ProjectChartInfo"},ManagementV1ProjectCharts:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"charts",namespaced:!1,kind:"ProjectCharts"},ManagementV1ProjectClusters:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"clusters",namespaced:!1,kind:"ProjectClusters"},ManagementV1ProjectImportSpace:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"importspace",namespaced:!1,kind:"ProjectImportSpace"},ManagementV1ProjectMembers:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"members",namespaced:!1,kind:"ProjectMembers"},ManagementV1ProjectMigrateSpaceInstance:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"migratespaceinstance",namespaced:!1,kind:"ProjectMigrateSpaceInstance"},ManagementV1ProjectMigrateVirtualClusterInstance:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"migratevirtualclusterinstance",namespaced:!1,kind:"ProjectMigrateVirtualClusterInstance"},ManagementV1ProjectRunners:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"runners",namespaced:!1,kind:"ProjectRunners"},ManagementV1ProjectSecret:{group:"management.loft.sh",version:"v1",resource:"projectsecrets",subResource:"",namespaced:!0,kind:"ProjectSecret"},ManagementV1ProjectTemplates:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"templates",namespaced:!1,kind:"ProjectTemplates"},ManagementV1RedirectToken:{group:"management.loft.sh",version:"v1",resource:"redirecttokens",subResource:"",namespaced:!1,kind:"RedirectToken"},ManagementV1RegisterVirtualCluster:{group:"management.loft.sh",version:"v1",resource:"registervirtualclusters",subResource:"",namespaced:!1,kind:"RegisterVirtualCluster"},ManagementV1ResetAccessKey:{group:"management.loft.sh",version:"v1",resource:"resetaccesskeys",subResource:"",namespaced:!1,kind:"ResetAccessKey"},ManagementV1Runner:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"",namespaced:!1,kind:"Runner"},ManagementV1RunnerAccessKey:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"accesskey",namespaced:!1,kind:"RunnerAccessKey"},ManagementV1RunnerConfig:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"config",namespaced:!1,kind:"RunnerConfig"},ManagementV1Self:{group:"management.loft.sh",version:"v1",resource:"selves",subResource:"",namespaced:!1,kind:"Self"},ManagementV1SelfSubjectAccessReview:{group:"management.loft.sh",version:"v1",resource:"selfsubjectaccessreviews",subResource:"",namespaced:!1,kind:"SelfSubjectAccessReview"},ManagementV1SharedSecret:{group:"management.loft.sh",version:"v1",resource:"sharedsecrets",subResource:"",namespaced:!0,kind:"SharedSecret"},ManagementV1SpaceInstance:{group:"management.loft.sh",version:"v1",resource:"spaceinstances",subResource:"",namespaced:!0,kind:"SpaceInstance"},ManagementV1SpaceTemplate:{group:"management.loft.sh",version:"v1",resource:"spacetemplates",subResource:"",namespaced:!1,kind:"SpaceTemplate"},ManagementV1SubjectAccessReview:{group:"management.loft.sh",version:"v1",resource:"subjectaccessreviews",subResource:"",namespaced:!1,kind:"SubjectAccessReview"},ManagementV1Task:{group:"management.loft.sh",version:"v1",resource:"tasks",subResource:"",namespaced:!1,kind:"Task"},ManagementV1TaskLog:{group:"management.loft.sh",version:"v1",resource:"tasks",subResource:"log",namespaced:!1,kind:"TaskLog"},ManagementV1Team:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"",namespaced:!1,kind:"Team"},ManagementV1TeamAccessKeys:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"accesskeys",namespaced:!1,kind:"TeamAccessKeys"},ManagementV1TeamClusters:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"clusters",namespaced:!1,kind:"TeamClusters"},ManagementV1TranslateVClusterResourceName:{group:"management.loft.sh",version:"v1",resource:"translatevclusterresourcenames",subResource:"",namespaced:!1,kind:"TranslateVClusterResourceName"},ManagementV1User:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"",namespaced:!1,kind:"User"},ManagementV1UserAccessKeys:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"accesskeys",namespaced:!1,kind:"UserAccessKeys"},ManagementV1UserClusters:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"clusters",namespaced:!1,kind:"UserClusters"},ManagementV1UserPermissions:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"permissions",namespaced:!1,kind:"UserPermissions"},ManagementV1UserProfile:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"profile",namespaced:!1,kind:"UserProfile"},ManagementV1VirtualClusterAccessKey:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"accesskey",namespaced:!0,kind:"VirtualClusterAccessKey"},ManagementV1VirtualClusterInstance:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"",namespaced:!0,kind:"VirtualClusterInstance"},ManagementV1VirtualClusterInstanceKubeConfig:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"kubeconfig",namespaced:!0,kind:"VirtualClusterInstanceKubeConfig"},ManagementV1VirtualClusterInstanceLog:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"log",namespaced:!0,kind:"VirtualClusterInstanceLog"},ManagementV1VirtualClusterTemplate:{group:"management.loft.sh",version:"v1",resource:"virtualclustertemplates",subResource:"",namespaced:!1,kind:"VirtualClusterTemplate"}};var N="virtualcluster.loft.sh",q="v1",me="virtualcluster.loft.sh/v1",S="cluster.loft.sh",P="v1",pe="cluster.loft.sh/v1",ge="management.loft.sh",F="v1",de="management.loft.sh/v1",Ve="storage.loft.sh",fe="v1",he="storage.loft.sh/v1",B="apiextensions.k8s.io",H="v1",Re="apiextensions.k8s.io/v1",U=class{};var c={...D,ClusterV1SleepModeConfig:{group:S,version:P,resource:"sleepmodeconfigs",kind:"SleepModeConfig",namespaced:!0},ClusterV1HelmRelease:{group:S,version:P,resource:"helmreleases",kind:"HelmRelease",namespaced:!0},ClusterV1ChartInfo:{group:S,version:P,resource:"chartinfos",kind:"ChartInfo"},VirtualclusterV1HelmRelease:{group:N,version:q,resource:"helmreleases",kind:"HelmRelease",namespaced:!0},CustomResourceDefinition:{group:B,version:H,resource:"customresourcedefinitions",kind:"CustomResourceDefinition"},StorageV1ClusterQuota:{group:"storage.loft.sh",version:F,resource:"clusterquotas",kind:"ClusterQuota"},NetworkingV1Ingress:{group:"networking.k8s.io",version:"v1",resource:"ingresses",kind:"Ingress",namespaced:!0},V1StatefulSet:{group:"apps",version:"v1",resource:"statefulsets",kind:"StatefulSet",namespaced:!0},V1Deployment:{group:"apps",version:"v1",resource:"deployments",kind:"Deployment",namespaced:!0},V1Event:{group:"",version:"v1",resource:"events",kind:"Event",namespaced:!0},V1Pod:{group:"",version:"v1",resource:"pods",kind:"Pod",namespaced:!0},V1Node:{group:"",version:"v1",resource:"nodes",kind:"Node"},V1Namespace:{group:"",version:"v1",resource:"namespaces",kind:"Namespace"},V1SelfSubjectAccessReview:{group:"authorization.k8s.io",version:"v1",resource:"selfsubjectaccessreviews",kind:"SelfSubjectAccessReview"},V1ClusterRole:{group:"rbac.authorization.k8s.io",version:"v1",resource:"clusterroles",kind:"ClusterRole"},V1ClusterRoleBinding:{group:"rbac.authorization.k8s.io",version:"v1",resource:"clusterrolebindings",kind:"ClusterRoleBinding"},V1Role:{group:"rbac.authorization.k8s.io",version:"v1",resource:"roles",kind:"Role",namespaced:!0},V1RoleBinding:{group:"rbac.authorization.k8s.io",version:"v1",resource:"rolebindings",kind:"RoleBinding",namespaced:!0},V1Secret:{group:"",version:"v1",resource:"secrets",kind:"Secret",namespaced:!0},V1ConfigMap:{group:"",version:"v1",resource:"configmaps",kind:"ConfigMap",namespaced:!0},V1Service:{group:"",version:"v1",resource:"services",kind:"Service",namespaced:!0},V1User:{group:"",version:"v1",resource:"users",kind:"User",namespaced:!1},V1StorageClassList:{group:"storage.k8s.io",version:"v1",resource:"storageclasses",kind:"StorageClass",namespaced:!1},V1Beta1PodMetrics:{group:"metrics.k8s.io",version:"v1beta1",resource:"pods",kind:"PodMetrics",namespaced:!0}};function f(a,e,s){return{apiVersion:a.group?a.group+"/"+a.version:a.version,kind:a.kind,metadata:{name:e},...s}}var T=class{constructor(e,s=void 0){this.val=e;this.extra=s;this.ok=!1;this.err=!0}},w=class{constructor(e,s=void 0){this.val=e;this.extra=s;this.ok=!0;this.err=!1}};function Pe(a){return"ok"in a&&typeof a.ok=="boolean"&&"err"in a&&typeof a.err=="boolean"}var O="",L="Network",Q="Forbidden",X="BadRequest",K="NotFound",A="Unauthorized",Y="AlreadyExists",Z="InternalServerError",ee="NotImplemented",se="BadGateway",I="ServiceUnavailable",re="GatewayTimeout",b=a=>{switch(a){case 400:return X;case 401:return A;case 403:return Q;case 404:return K;case 409:return Y;case 500:return Z;case 501:return ee;case 502:return se;case 503:return I;case 504:return re}return O},o=class{static Ok(){return new w(void 0)}static Value(e){return new w(e)}static Failed(e,s="",r=O,t=void 0){return new T(new x(e,r,s),t)}static Error(e){return new T(e)}static WithExtra(e,s=void 0){return e.extra=s,e}},x=class{constructor(e,s=O,r=""){this.message=e;this.type=s;this.reason=r}};var k={secure:!0,expires:365*10,sameSite:"strict"},d=M.loftAccessKeyIdentifier,R=M.loftImpersonateSubjectIdentifier,y=M.loftImpersonateJoinedGroupIdentifier,ne=["v4.channel.k8s.io","v3.channel.k8s.io","v2.channel.k8s.io","channel.k8s.io"];function oe(){return typeof window<"u"&&window.location.href.startsWith("http://localhost:3000")?"https://localhost:9898":""}function ae(){return typeof window>"u"||window.location.host==="localhost:3000"?"wss://localhost:8080":`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}`}function W(a){return[a.virtualCluster?"loft:vcluster:main":`loft:space:${a.project}:${a.space}`]}var $="/kubernetes/management",j="/kubernetes/cluster/",J="/kubernetes/virtualcluster/",_="/kubernetes/project/";function Le(a,e){return a?e&&e.endsWith("-")?`${e}${a}`:e===""?`${a}`:e?`${e}-${a}`:`p-${a}`:"p-"}function Ke(a,e){if(a)return e?e.endsWith("-")?a.replace(new RegExp(`^${e}`),""):a.replace(new RegExp(`^${e}-`),""):a.replace(/^p-/,"")}var C=class{constructor(e,s,r){this.apiHost="";this.wsHost="";this.accessKey="";this.managementNonResource=()=>new l(this,{basePath:$,headers:this.impersonationHeaders()});this.cluster=(e,s)=>new l(this,{basePath:j+e,groupVersionResource:s,headers:this.impersonationHeaders()});this.clusterNonResource=e=>new l(this,{basePath:j+e,headers:this.impersonationHeaders()});this.project=(e,s)=>new l(this,{basePath:_+e.project+"/"+(e.space?"space/"+e.space:"virtualcluster/"+e.virtualCluster),groupVersionResource:s,project:e,headers:this.impersonationHeaders(W(e))});this.projectNonResource=e=>new l(this,{basePath:_+e.project+"/"+(e.space?"space/"+e.space:"virtualcluster/"+e.virtualCluster),project:e,headers:this.impersonationHeaders(W(e))});this.apiHost=s||oe(),this.wsHost=r||ae(),this.accessKey=e||C.getAccessKey()}static getAccessKey(){return localStorage.getItem(d)}static tryCastToStatus(e){if(e.kind){if(e.kind!=="Status"||e.apiVersion!=="v1")return o.Value(null)}else return o.Value(null);return o.Value(e)}async getUser(){let e=await this.management(c.ManagementV1Self).Create(f(c.ManagementV1Self));return e.err?e:e.val.status?.user?(typeof window<"u"&&(window.loft||(window.loft={}),window.loft.instanceID=e.val.status.instanceID,window.loft.chatAuthToken=e.val.status.chatAuthToken,window.loft.user=e.val.status.user),o.Value(e.val.status.user.name)):o.Failed("no user found")}getAccessKey(){return this.accessKey}async loftVersion(e){try{let s=this.apiHost+"/version";e&&(s+="?refresh=true");let t=await(await fetch(s)).json();return o.Value(t)}catch(s){return console.error(s),o.Failed("error during version retrieval")}}impersonatedUser(){try{let e=localStorage.getItem(R);if(e)return JSON.parse(e)}catch(e){console.error(e)}}impersonate(e,s,r){s?(localStorage.setItem(R,JSON.stringify({name:e,subject:s,groups:r})),s&&p.set(R,s,k),r?.forEach(t=>{let n=p.get(y);n?(n+=", "+t,p.set(y,n,k)):p.set(y,t,k)})):(localStorage.removeItem(R),p.remove(R),p.remove(y))}async login(e,s){let r=await this.request("/auth/password/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:s})});if(r.err)return r;let t=r.val;return this.setAccessKey(t.accessKey),o.Ok()}async loginWithAccessKey(e){this.isLoggedIn()&&await this.logout(),this.accessKey=e;let s=await this.management(c.ManagementV1Self).Create(f(c.ManagementV1Self));return s.err?(this.clearStorage(),s):(this.setAccessKey(e),o.Ok())}isLoggedIn(){return!!this.accessKey}setAccessKey(e){this.accessKey=e,localStorage.setItem(d,e),p.set(d,e,k)}async stream(e,s){try{let r=await fetch(this.apiHost+e,s);return r.status>=400||!r.body?await this.parseResponse(e,r):o.Value(r.body.getReader())}catch(r){return o.Failed(r+"","NetworkError",L)}}async request(e,s){try{let r=await fetch(this.apiHost+e,{...s,credentials:"same-origin"});if(!r.ok){let n=await r.clone().text();if(r.status===401)try{let i=JSON.parse(n);if(i?.message===M.platformAccessKeyNotFound)return window.location.href=`/login?error=${i?.message}&errorType=${i?.reason}`,o.Failed(i.message||"Unauthorized",i.reason,A)}catch{}}return await this.parseResponse(e,r)}catch(r){let t=r;return t.message===M.platformAccessKeyNotFound&&(window.location.href=`/login?error=${t.message}&errorType=${t.reason}`),o.Failed(r+"","NetworkError",L)}}async socket(e,s){return this.refreshCookie(),new Promise((r,t)=>{let n=new WebSocket(`${this.wsHost}${e}`,s),i=!1;n.onopen=()=>{i=!0,r(n)},n.onerror=u=>{if(!i){let m=p.get(d)!="";t(m?u:new Error("Web socket is not authenticated. Please log in again"))}}})}async parseResponse(e,s){let r=await s.text(),t;try{t=JSON.parse(r)}catch{if(s.status===404)return o.Failed("page not found","NotFound",K);if(s.status===503){if(e.includes("kiosk.sh")||e.includes("cluster.loft.sh")){let u=e.split("/");return u.length>=4&&u[0]===""&&u[1]==="kubernetes"&&u[2]==="cluster"?o.Failed(`Agent seems to be currently unavailable, it is maybe just starting up. Click here for more information`,"LoftAgentUnavailable",I):o.Failed("Agent seems to be currently unavailable, it is maybe just starting up","LoftAgentUnavailable",I)}}else if(s.status===200)return o.Value(r);return console.info("Unexpected Server Response",r),o.Failed("Unexpected server response",b(s.status),b(s.status))}let n=C.tryCastToStatus(t);return n.err?n:n.val!==null&&n.val.status==="Failure"?n.val.code===500&&(n.val.message?.indexOf("vcluster secret not found")!==-1||n.val.message.indexOf("no ready pod for virtual cluster")!==-1)?o.Failed("vcluster seems to be not ready. Please refresh in a second",n.val.reason,b(n.val.code)):o.Failed(n.val.message,n.val.reason,b(n.val.code)):s.status>=400?o.Failed("unknown error","Unknown",b(s.status)):o.Value(t)}management(e){return new l(this,{basePath:$,groupVersionResource:e,headers:this.impersonationHeaders()})}vCluster(e,s){return new l(this,{basePath:J+e.cluster+"/"+e.namespace+"/"+e.name,groupVersionResource:s,vCluster:e,headers:this.impersonationHeaders()})}vClusterNonResource(e){return new l(this,{basePath:J+e.cluster+"/"+e.namespace+"/"+e.name,vCluster:e,headers:this.impersonationHeaders()})}auto(e,s,r,t){return r?this.project(r,t):s?this.vCluster(s,t):e?this.cluster(e,t):this.management(t)}autoNonResource(e,s,r){return r?this.projectNonResource(r):s?this.vClusterNonResource(s):e?this.clusterNonResource(e):this.managementNonResource()}async doRawSocket(e,s){try{return o.Value(await this.socket(e,s))}catch(r){return console.error(r),o.Failed(r.message||JSON.stringify(r))}}async doRawStream(e,s,r){return this.doRawInternal(e,s,r,!0)}async doRaw(e,s,r){return this.doRawInternal(e,s,r)}async doRawInternal(e,s,r,t){let n=this.accessKey,i=n?new Headers({...r,Authorization:"bearer "+n,"X-Sleep-Mode-Ignore":"true","X-Platform-Client":"true"}):new Headers({...r,"X-Sleep-Mode-Ignore":"true","X-Platform-Client":"true"}),u=t?await this.stream(e,{...s,headers:i}):await this.request(e,{...s,headers:i});return u.err&&u.val.type===A&&(u.val.message==="Access key not found. Please login again"||u.val.message==="invalid bearer token")&&(this.clearStorage(),typeof window<"u"&&(window.location.href="/"),await new Promise(()=>{})),u}impersonationHeaders(e){let s=this.impersonatedUser(),r={};return s&&(s.subject&&(r["Impersonate-User"]=s.subject),[...h(s.groups),...h(e)].forEach(t=>{r["Impersonate-Joined-Group"]?r["Impersonate-Joined-Group"]+=", "+t:r["Impersonate-Joined-Group"]=t})),r}clearStorage(){this.accessKey=null,localStorage.removeItem(d),localStorage.removeItem(R),p.remove(d,{secure:!0}),p.remove(R,{secure:!0}),p.remove(y,{secure:!0})}refreshCookie(){let e=this.accessKey||localStorage.getItem(d),s=p.get(d);e&&e!=s&&p.set(d,e,k)}async logout(){let e=await this.management(c.ManagementV1Self).Create(f(c.ManagementV1Self));if(e.err)return this.clearStorage(),e;if(!e.val.status?.accessKey)return this.clearStorage(),o.Ok();let s=await this.management(c.ManagementV1OwnedAccessKey).Delete(e.val.status.accessKey);return s.err?(this.clearStorage(),s):(this.clearStorage(),o.Ok())}},l=class{constructor(e,s){this.client=e,this.options=s}Name(e){return new l(this.client,{...this.options,name:e})}Namespace(e){return e?new l(this.client,{...this.options,namespace:e}):new l(this.client,{...this.options})}Resource(e){return new l(this.client,{...this.options,groupVersionResource:e})}buildPath(e){if(this.options.groupVersionResource)if(this.options.basePath){if(!this.options.name&&this.options.groupVersionResource.subResource)return o.Failed("resource name required when subresource is used")}else return o.Failed("basePath is missing");else return o.Failed("groupVersionResource is missing");let s=[this.options.basePath];this.options.groupVersionResource.group?s.push("apis",this.options.groupVersionResource.group):s.push("api"),s.push(this.options.groupVersionResource.version),this.options.namespace&&s.push("namespaces",this.options.namespace),s.push(this.options.groupVersionResource.resource),this.options.name&&s.push(this.options.name),this.options.groupVersionResource.subResource&&s.push(this.options.groupVersionResource.subResource);let r="";if(e){let t=[];for(let n of Object.keys(e))e[n]&&(Array.isArray(e[n])?e[n].forEach(i=>{t.push(n+"="+encodeURIComponent(i))}):t.push(n+"="+encodeURIComponent(e[n])));t.length>0&&(r="?"+t.join("&"))}else r="?timeout=180s";return o.Value(s.join("/")+r)}parseResourceList(e,s,r,t,n,i){for(let u=0;u1||n&&t.find(v=>v.group===e&&v.resource===V)||t.push({resource:V,subResource:g.length>1?g[1]:void 0,group:e,version:s,kind:m.kind,namespaced:m.namespaced,verbs:m.verbs})}}async ApiResources(e,s){let r=[],t=await this.client.doRaw([this.options.basePath,"api"].join("/"));if(t.err)return t;let n=[];for(let u=0;u{let g=t.val.versions[m];if(g===void 0)return;let V=await this.client.doRaw([this.options.basePath,"api",g].join("/"));if(V.err){console.error(V.val.message);return}this.parseResourceList("",g,V.val,r,e,s)})(u)),n.length>20&&(await Promise.all(n),n=[]);n.length>0&&(await Promise.all(n),n=[]);let i=await this.client.doRaw([this.options.basePath,"apis"].join("/"));if(i.err)return i;for(let u=0;u{let G=v.versions[V];if(G===void 0)return;let E=await this.client.doRaw([this.options.basePath,"apis",v.name,G.version].join("/"));if(E.err){console.error(E.val.message);return}this.parseResourceList(v.name,G.version,E.val,r,e,s)})(g,m)),n.length>20&&(await Promise.all(n),n=[])}return n.length>0&&await Promise.all(n),o.Value(r)}async Version(){let e=[this.options.basePath,"version"];return await this.client.doRaw(e.join("/"))}async VirtualClusterInstanceLogs(e,s,r){let t=[this.options.basePath,`apis/management.loft.sh/v1/namespaces/${e}/virtualclusterinstances/${s}/log`].join("/"),n=[];if(r)for(let i of Object.keys(r))n.push(`${i}=${encodeURIComponent(r[i])}`);return n.length>0&&(t+="?"+n.join("&")),await this.client.doRawStream(t,void 0,this.options.headers)}async TaskLogs(e,s){let r=[this.options.basePath,`apis/management.loft.sh/v1/tasks/${e}/log`].join("/"),t=[];if(s)for(let n of Object.keys(s))t.push(`${n}=${encodeURIComponent(s[n])}`);return t.length>0&&(r+="?"+t.join("&")),await this.client.doRawStream(r,void 0,this.options.headers)}async Logs(e,s,r){let t=[this.options.basePath,`api/v1/namespaces/${e}/pods/${s}/log`].join("/"),n=z(r);return n.length>0&&(t+="?"+n),await this.client.doRawStream(t,void 0,this.options.headers)}async Exec(e,s,r){let t=[this.options.basePath,`api/v1/namespaces/${e}/pods/${s}/exec`].join("/"),n=z(r);return n.length>0&&(t+="?"+n),await this.client.doRawSocket(t,ne)}async Path(e,s,r){let t=[this.options.basePath,e];return await this.client.doRaw(t.join("/"),s,{...r,...this.options.headers})}ResolvePath(e){return e&&(this.options.name=e),this.buildPath()}async Get(e,s){this.options.name=e;let r=this.buildPath(s);return r.err?r:o.WithExtra(await this.client.doRaw(r.val,void 0,this.options.headers),this.options)}async List(e){if(this.options.name)return o.Failed("name is set on a list request");let s=this.buildPath(e);return s.err?s:o.WithExtra(await this.client.doRaw(s.val,void 0,this.options.headers),this.options)}async ListTable(e){if(this.options.name)return o.Failed("name is set on a list request");let s=this.buildPath(e);return s.err?s:o.WithExtra(await this.client.doRaw(s.val,void 0,{...this.options.headers,Accept:"application/json;as=Table;v=v1;g=meta.k8s.io,application/json;as=Table;v=v1beta1;g=meta.k8s.io,application/json"}),this.options)}async Create(e,s){let r=this.buildPath(s);return r.err?r:o.WithExtra(await this.client.doRaw(r.val,{method:"POST",body:JSON.stringify(e)},{...this.options.headers,"Content-Type":"application/json"}),this.options)}async PatchObject(e,s,r,t){let n=te.generate(e,s);return this.Patch(s.metadata?.name,n,r,t)}async Patch(e,s,r,t){this.options.name=e;let n=this.buildPath(t);return n.err?n:o.WithExtra(await this.client.doRaw(n.val,{method:"PATCH",body:JSON.stringify(s,function(i,u){return u===void 0?null:u})},{...this.options.headers,"Content-Type":r||"application/merge-patch+json"}),this.options)}async Update(e,s,r){this.options.name=e;let t=this.buildPath(r);return t.err?t:o.WithExtra(await this.client.doRaw(t.val,{method:"PUT",body:JSON.stringify(s)},{...this.options.headers,"Content-Type":"application/json"}),this.options)}async Delete(e,s){this.options.name=e;let r=this.buildPath(s);return r.err?r:o.WithExtra(await this.client.doRaw(r.val,{method:"DELETE"},this.options.headers),this.options)}async CanI(e){let s=this.options.groupVersionResource,r=this.options.basePath?.indexOf(j)===0?this.options.basePath.substring(j.length):void 0,t,n;this.options.project?(t=this.client.project(this.options.project,c.V1SelfSubjectAccessReview),n=f(c.V1SelfSubjectAccessReview)):this.options.vCluster?(t=this.client.vCluster(this.options.vCluster,c.V1SelfSubjectAccessReview),n=f(c.V1SelfSubjectAccessReview)):r?(t=this.client.cluster(r,c.V1SelfSubjectAccessReview),n=f(c.V1SelfSubjectAccessReview)):(t=this.client.management(c.ManagementV1SelfSubjectAccessReview),n=f(c.ManagementV1SelfSubjectAccessReview)),n.spec={resourceAttributes:{verb:e,name:this.options.name,namespace:this.options.namespace,group:s.group,version:s.version,resource:s.resource,subresource:s.subResource}};let i=await t.Create(n);return i.err?i:o.Value(!!(i.val.status?.allowed&&!i.val.status.denied))}};function z(a){let e=new URLSearchParams;for(let[s,r]of Object.entries(a))Array.isArray(r)?r.forEach(t=>{e.append(s,t)}):e.append(s,r);return e.toString()}var ie=C;export{B as APIExtensionsGroup,Re as APIExtensionsGroupVersion,H as APIExtensionsVersion,ie as Client,j as ClusterBasePath,T as Err,Y as ErrorTypeAlreadyExists,se as ErrorTypeBadGateway,X as ErrorTypeBadRequest,Q as ErrorTypeForbidden,re as ErrorTypeGatewayTimeout,Z as ErrorTypeInternalError,L as ErrorTypeNetwork,K as ErrorTypeNotFound,ee as ErrorTypeNotImplemented,I as ErrorTypeServiceUnavailable,A as ErrorTypeUnauthorized,O as ErrorTypeUnknown,x as Failed,U as List,ge as LoftSchemeGroup,S as LoftSchemeGroupCluster,Ve as LoftSchemeGroupStorage,de as LoftSchemeGroupVersion,pe as LoftSchemeGroupVersionCluster,he as LoftSchemeGroupVersionStorage,me as LoftSchemeGroupVersionVirtualCluster,N as LoftSchemeGroupVirtualCluster,F as LoftSchemeVersion,P as LoftSchemeVersionCluster,fe as LoftSchemeVersionStorage,q as LoftSchemeVersionVirtualCluster,$ as ManagementBasePath,b as MapErrorCode,f as NewResource,w as Ok,_ as ProjectBasePath,c as Resources,o as Return,J as VClusterBasePath,oe as getApiHost,Ke as getProjectFromNamespace,Le as getProjectNamespace,Pe as isResult}; +import p from"js-cookie";import te from"json-merge-patch";var M={loftAccessKeyIdentifier:"loft_access_key",loftImpersonateSubjectIdentifier:"loft_impersonate_subject",loftImpersonateJoinedGroupIdentifier:"loft_impersonate_joined_group",platformAccessKeyNotFound:"platform access key not found. Please login again"};function h(a){return a||[]}var K={ManagementV1AgentAuditEvent:{group:"management.loft.sh",version:"v1",resource:"agentauditevents",subResource:"",namespaced:!1,kind:"AgentAuditEvent"},ManagementV1Announcement:{group:"management.loft.sh",version:"v1",resource:"announcements",subResource:"",namespaced:!1,kind:"Announcement"},ManagementV1App:{group:"management.loft.sh",version:"v1",resource:"apps",subResource:"",namespaced:!1,kind:"App"},ManagementV1AppCredentials:{group:"management.loft.sh",version:"v1",resource:"apps",subResource:"credentials",namespaced:!1,kind:"AppCredentials"},ManagementV1Backup:{group:"management.loft.sh",version:"v1",resource:"backups",subResource:"",namespaced:!1,kind:"Backup"},ManagementV1BackupApply:{group:"management.loft.sh",version:"v1",resource:"backups",subResource:"apply",namespaced:!1,kind:"BackupApply"},ManagementV1Cluster:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"",namespaced:!1,kind:"Cluster"},ManagementV1ClusterAccess:{group:"management.loft.sh",version:"v1",resource:"clusteraccesses",subResource:"",namespaced:!1,kind:"ClusterAccess"},ManagementV1ClusterAccessKey:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"accesskey",namespaced:!1,kind:"ClusterAccessKey"},ManagementV1ClusterAgentConfig:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"agentconfig",namespaced:!1,kind:"ClusterAgentConfig"},ManagementV1ClusterCharts:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"charts",namespaced:!1,kind:"ClusterCharts"},ManagementV1ClusterDomain:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"domain",namespaced:!1,kind:"ClusterDomain"},ManagementV1ClusterMemberAccess:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"memberaccess",namespaced:!1,kind:"ClusterMemberAccess"},ManagementV1ClusterMembers:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"members",namespaced:!1,kind:"ClusterMembers"},ManagementV1ClusterReset:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"reset",namespaced:!1,kind:"ClusterReset"},ManagementV1ClusterRoleTemplate:{group:"management.loft.sh",version:"v1",resource:"clusterroletemplates",subResource:"",namespaced:!1,kind:"ClusterRoleTemplate"},ManagementV1ClusterVirtualClusterDefaults:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"virtualclusterdefaults",namespaced:!1,kind:"ClusterVirtualClusterDefaults"},ManagementV1Config:{group:"management.loft.sh",version:"v1",resource:"configs",subResource:"",namespaced:!1,kind:"Config"},ManagementV1ConvertVirtualClusterConfig:{group:"management.loft.sh",version:"v1",resource:"convertvirtualclusterconfig",subResource:"",namespaced:!1,kind:"ConvertVirtualClusterConfig"},ManagementV1DevPodEnvironmentTemplate:{group:"management.loft.sh",version:"v1",resource:"devpodenvironmenttemplates",subResource:"",namespaced:!1,kind:"DevPodEnvironmentTemplate"},ManagementV1DevPodWorkspaceInstance:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"",namespaced:!0,kind:"DevPodWorkspaceInstance"},ManagementV1DevPodWorkspaceInstanceState:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"state",namespaced:!0,kind:"DevPodWorkspaceInstanceState"},ManagementV1DevPodWorkspaceInstanceTroubleshoot:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"troubleshoot",namespaced:!0,kind:"DevPodWorkspaceInstanceTroubleshoot"},ManagementV1DevPodWorkspacePreset:{group:"management.loft.sh",version:"v1",resource:"devpodworkspacepresets",subResource:"",namespaced:!1,kind:"DevPodWorkspacePreset"},ManagementV1DevPodWorkspaceTemplate:{group:"management.loft.sh",version:"v1",resource:"devpodworkspacetemplates",subResource:"",namespaced:!1,kind:"DevPodWorkspaceTemplate"},ManagementV1DirectClusterEndpointToken:{group:"management.loft.sh",version:"v1",resource:"directclusterendpointtokens",subResource:"",namespaced:!1,kind:"DirectClusterEndpointToken"},ManagementV1Event:{group:"management.loft.sh",version:"v1",resource:"events",subResource:"",namespaced:!1,kind:"Event"},ManagementV1Feature:{group:"management.loft.sh",version:"v1",resource:"features",subResource:"",namespaced:!1,kind:"Feature"},ManagementV1IngressAuthToken:{group:"management.loft.sh",version:"v1",resource:"ingressauthtokens",subResource:"",namespaced:!1,kind:"IngressAuthToken"},ManagementV1Kiosk:{group:"management.loft.sh",version:"v1",resource:"kiosk",subResource:"",namespaced:!1,kind:"Kiosk"},ManagementV1License:{group:"management.loft.sh",version:"v1",resource:"licenses",subResource:"",namespaced:!1,kind:"License"},ManagementV1LicenseRequest:{group:"management.loft.sh",version:"v1",resource:"licenses",subResource:"request",namespaced:!1,kind:"LicenseRequest"},ManagementV1LicenseToken:{group:"management.loft.sh",version:"v1",resource:"licensetokens",subResource:"",namespaced:!1,kind:"LicenseToken"},ManagementV1LoftUpgrade:{group:"management.loft.sh",version:"v1",resource:"loftupgrades",subResource:"",namespaced:!1,kind:"LoftUpgrade"},ManagementV1OIDCClient:{group:"management.loft.sh",version:"v1",resource:"oidcclients",subResource:"",namespaced:!1,kind:"OIDCClient"},ManagementV1OwnedAccessKey:{group:"management.loft.sh",version:"v1",resource:"ownedaccesskeys",subResource:"",namespaced:!1,kind:"OwnedAccessKey"},ManagementV1Project:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"",namespaced:!1,kind:"Project"},ManagementV1ProjectChartInfo:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"chartinfo",namespaced:!1,kind:"ProjectChartInfo"},ManagementV1ProjectCharts:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"charts",namespaced:!1,kind:"ProjectCharts"},ManagementV1ProjectClusters:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"clusters",namespaced:!1,kind:"ProjectClusters"},ManagementV1ProjectImportSpace:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"importspace",namespaced:!1,kind:"ProjectImportSpace"},ManagementV1ProjectMembers:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"members",namespaced:!1,kind:"ProjectMembers"},ManagementV1ProjectMigrateSpaceInstance:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"migratespaceinstance",namespaced:!1,kind:"ProjectMigrateSpaceInstance"},ManagementV1ProjectMigrateVirtualClusterInstance:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"migratevirtualclusterinstance",namespaced:!1,kind:"ProjectMigrateVirtualClusterInstance"},ManagementV1ProjectRunners:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"runners",namespaced:!1,kind:"ProjectRunners"},ManagementV1ProjectSecret:{group:"management.loft.sh",version:"v1",resource:"projectsecrets",subResource:"",namespaced:!0,kind:"ProjectSecret"},ManagementV1ProjectTemplates:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"templates",namespaced:!1,kind:"ProjectTemplates"},ManagementV1RedirectToken:{group:"management.loft.sh",version:"v1",resource:"redirecttokens",subResource:"",namespaced:!1,kind:"RedirectToken"},ManagementV1RegisterVirtualCluster:{group:"management.loft.sh",version:"v1",resource:"registervirtualclusters",subResource:"",namespaced:!1,kind:"RegisterVirtualCluster"},ManagementV1ResetAccessKey:{group:"management.loft.sh",version:"v1",resource:"resetaccesskeys",subResource:"",namespaced:!1,kind:"ResetAccessKey"},ManagementV1Runner:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"",namespaced:!1,kind:"Runner"},ManagementV1RunnerAccessKey:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"accesskey",namespaced:!1,kind:"RunnerAccessKey"},ManagementV1RunnerConfig:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"config",namespaced:!1,kind:"RunnerConfig"},ManagementV1Self:{group:"management.loft.sh",version:"v1",resource:"selves",subResource:"",namespaced:!1,kind:"Self"},ManagementV1SelfSubjectAccessReview:{group:"management.loft.sh",version:"v1",resource:"selfsubjectaccessreviews",subResource:"",namespaced:!1,kind:"SelfSubjectAccessReview"},ManagementV1SharedSecret:{group:"management.loft.sh",version:"v1",resource:"sharedsecrets",subResource:"",namespaced:!0,kind:"SharedSecret"},ManagementV1SpaceInstance:{group:"management.loft.sh",version:"v1",resource:"spaceinstances",subResource:"",namespaced:!0,kind:"SpaceInstance"},ManagementV1SpaceTemplate:{group:"management.loft.sh",version:"v1",resource:"spacetemplates",subResource:"",namespaced:!1,kind:"SpaceTemplate"},ManagementV1SubjectAccessReview:{group:"management.loft.sh",version:"v1",resource:"subjectaccessreviews",subResource:"",namespaced:!1,kind:"SubjectAccessReview"},ManagementV1Task:{group:"management.loft.sh",version:"v1",resource:"tasks",subResource:"",namespaced:!1,kind:"Task"},ManagementV1TaskLog:{group:"management.loft.sh",version:"v1",resource:"tasks",subResource:"log",namespaced:!1,kind:"TaskLog"},ManagementV1Team:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"",namespaced:!1,kind:"Team"},ManagementV1TeamAccessKeys:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"accesskeys",namespaced:!1,kind:"TeamAccessKeys"},ManagementV1TeamClusters:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"clusters",namespaced:!1,kind:"TeamClusters"},ManagementV1TranslateVClusterResourceName:{group:"management.loft.sh",version:"v1",resource:"translatevclusterresourcenames",subResource:"",namespaced:!1,kind:"TranslateVClusterResourceName"},ManagementV1User:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"",namespaced:!1,kind:"User"},ManagementV1UserAccessKeys:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"accesskeys",namespaced:!1,kind:"UserAccessKeys"},ManagementV1UserClusters:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"clusters",namespaced:!1,kind:"UserClusters"},ManagementV1UserPermissions:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"permissions",namespaced:!1,kind:"UserPermissions"},ManagementV1UserProfile:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"profile",namespaced:!1,kind:"UserProfile"},ManagementV1VirtualClusterAccessKey:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"accesskey",namespaced:!0,kind:"VirtualClusterAccessKey"},ManagementV1VirtualClusterExternalDatabase:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"externaldatabase",namespaced:!0,kind:"VirtualClusterExternalDatabase"},ManagementV1VirtualClusterInstance:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"",namespaced:!0,kind:"VirtualClusterInstance"},ManagementV1VirtualClusterInstanceKubeConfig:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"kubeconfig",namespaced:!0,kind:"VirtualClusterInstanceKubeConfig"},ManagementV1VirtualClusterInstanceLog:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"log",namespaced:!0,kind:"VirtualClusterInstanceLog"},ManagementV1VirtualClusterTemplate:{group:"management.loft.sh",version:"v1",resource:"virtualclustertemplates",subResource:"",namespaced:!1,kind:"VirtualClusterTemplate"}};var N="virtualcluster.loft.sh",q="v1",me="virtualcluster.loft.sh/v1",P="cluster.loft.sh",S="v1",pe="cluster.loft.sh/v1",ge="management.loft.sh",F="v1",de="management.loft.sh/v1",Ve="storage.loft.sh",fe="v1",he="storage.loft.sh/v1",W="apiextensions.k8s.io",B="v1",Re="apiextensions.k8s.io/v1",U=class{};var c={...K,ClusterV1SleepModeConfig:{group:P,version:S,resource:"sleepmodeconfigs",kind:"SleepModeConfig",namespaced:!0},ClusterV1HelmRelease:{group:P,version:S,resource:"helmreleases",kind:"HelmRelease",namespaced:!0},ClusterV1ChartInfo:{group:P,version:S,resource:"chartinfos",kind:"ChartInfo"},VirtualclusterV1HelmRelease:{group:N,version:q,resource:"helmreleases",kind:"HelmRelease",namespaced:!0},CustomResourceDefinition:{group:W,version:B,resource:"customresourcedefinitions",kind:"CustomResourceDefinition"},StorageV1ClusterQuota:{group:"storage.loft.sh",version:F,resource:"clusterquotas",kind:"ClusterQuota"},NetworkingV1Ingress:{group:"networking.k8s.io",version:"v1",resource:"ingresses",kind:"Ingress",namespaced:!0},V1StatefulSet:{group:"apps",version:"v1",resource:"statefulsets",kind:"StatefulSet",namespaced:!0},V1Deployment:{group:"apps",version:"v1",resource:"deployments",kind:"Deployment",namespaced:!0},V1Event:{group:"",version:"v1",resource:"events",kind:"Event",namespaced:!0},V1Pod:{group:"",version:"v1",resource:"pods",kind:"Pod",namespaced:!0},V1Node:{group:"",version:"v1",resource:"nodes",kind:"Node"},V1Namespace:{group:"",version:"v1",resource:"namespaces",kind:"Namespace"},V1SelfSubjectAccessReview:{group:"authorization.k8s.io",version:"v1",resource:"selfsubjectaccessreviews",kind:"SelfSubjectAccessReview"},V1ClusterRole:{group:"rbac.authorization.k8s.io",version:"v1",resource:"clusterroles",kind:"ClusterRole"},V1ClusterRoleBinding:{group:"rbac.authorization.k8s.io",version:"v1",resource:"clusterrolebindings",kind:"ClusterRoleBinding"},V1Role:{group:"rbac.authorization.k8s.io",version:"v1",resource:"roles",kind:"Role",namespaced:!0},V1RoleBinding:{group:"rbac.authorization.k8s.io",version:"v1",resource:"rolebindings",kind:"RoleBinding",namespaced:!0},V1Secret:{group:"",version:"v1",resource:"secrets",kind:"Secret",namespaced:!0},V1ConfigMap:{group:"",version:"v1",resource:"configmaps",kind:"ConfigMap",namespaced:!0},V1Service:{group:"",version:"v1",resource:"services",kind:"Service",namespaced:!0},V1User:{group:"",version:"v1",resource:"users",kind:"User",namespaced:!1},V1StorageClassList:{group:"storage.k8s.io",version:"v1",resource:"storageclasses",kind:"StorageClass",namespaced:!1},V1Beta1PodMetrics:{group:"metrics.k8s.io",version:"v1beta1",resource:"pods",kind:"PodMetrics",namespaced:!0}};function f(a,e,s){return{apiVersion:a.group?a.group+"/"+a.version:a.version,kind:a.kind,metadata:{name:e},...s}}var T=class{constructor(e,s=void 0){this.val=e;this.extra=s;this.ok=!1;this.err=!0}},w=class{constructor(e,s=void 0){this.val=e;this.extra=s;this.ok=!0;this.err=!1}};function Se(a){return"ok"in a&&typeof a.ok=="boolean"&&"err"in a&&typeof a.err=="boolean"}var O="",D="Network",Q="Forbidden",X="BadRequest",L="NotFound",A="Unauthorized",Y="AlreadyExists",Z="InternalServerError",ee="NotImplemented",se="BadGateway",I="ServiceUnavailable",re="GatewayTimeout",b=a=>{switch(a){case 400:return X;case 401:return A;case 403:return Q;case 404:return L;case 409:return Y;case 500:return Z;case 501:return ee;case 502:return se;case 503:return I;case 504:return re}return O},o=class{static Ok(){return new w(void 0)}static Value(e){return new w(e)}static Failed(e,s="",r=O,t=void 0){return new T(new x(e,r,s),t)}static Error(e){return new T(e)}static WithExtra(e,s=void 0){return e.extra=s,e}},x=class{constructor(e,s=O,r=""){this.message=e;this.type=s;this.reason=r}};var k={secure:!0,expires:365*10,sameSite:"strict"},d=M.loftAccessKeyIdentifier,R=M.loftImpersonateSubjectIdentifier,y=M.loftImpersonateJoinedGroupIdentifier,ne=["v4.channel.k8s.io","v3.channel.k8s.io","v2.channel.k8s.io","channel.k8s.io"];function oe(){return typeof window<"u"&&window.location.href.startsWith("http://localhost:3000")?"https://localhost:9898":""}function ae(){return typeof window>"u"||window.location.host==="localhost:3000"?"wss://localhost:8080":`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}`}function H(a){return[a.virtualCluster?"loft:vcluster:main":`loft:space:${a.project}:${a.space}`]}var $="/kubernetes/management",j="/kubernetes/cluster/",J="/kubernetes/virtualcluster/",_="/kubernetes/project/",De=(a,e)=>a?e?`${e}${a}`:`p-${a}`:"p-";function Le(a,e){if(a)return e?e.endsWith("-")?a.replace(new RegExp(`^${e}`),""):a.replace(new RegExp(`^${e}-`),""):a.replace(/^p-/,"")}var C=class{constructor(e,s,r){this.apiHost="";this.wsHost="";this.accessKey="";this.managementNonResource=()=>new l(this,{basePath:$,headers:this.impersonationHeaders()});this.cluster=(e,s)=>new l(this,{basePath:j+e,groupVersionResource:s,headers:this.impersonationHeaders()});this.clusterNonResource=e=>new l(this,{basePath:j+e,headers:this.impersonationHeaders()});this.project=(e,s)=>new l(this,{basePath:_+e.project+"/"+(e.space?"space/"+e.space:"virtualcluster/"+e.virtualCluster),groupVersionResource:s,project:e,headers:this.impersonationHeaders(H(e))});this.projectNonResource=e=>new l(this,{basePath:_+e.project+"/"+(e.space?"space/"+e.space:"virtualcluster/"+e.virtualCluster),project:e,headers:this.impersonationHeaders(H(e))});this.apiHost=s||oe(),this.wsHost=r||ae(),this.accessKey=e||C.getAccessKey()}static getAccessKey(){return localStorage.getItem(d)}static tryCastToStatus(e){if(e.kind){if(e.kind!=="Status"||e.apiVersion!=="v1")return o.Value(null)}else return o.Value(null);return o.Value(e)}async getUser(){let e=await this.management(c.ManagementV1Self).Create(f(c.ManagementV1Self));return e.err?e:e.val.status?.user?(typeof window<"u"&&(window.loft||(window.loft={}),window.loft.instanceID=e.val.status.instanceID,window.loft.chatAuthToken=e.val.status.chatAuthToken,window.loft.user=e.val.status.user),o.Value(e.val.status.user.name)):o.Failed("no user found")}getAccessKey(){return this.accessKey}async loftVersion(e){try{let s=this.apiHost+"/version";e&&(s+="?refresh=true");let t=await(await fetch(s)).json();return o.Value(t)}catch(s){return console.error(s),o.Failed("error during version retrieval")}}impersonatedUser(){try{let e=localStorage.getItem(R);if(e)return JSON.parse(e)}catch(e){console.error(e)}}impersonate(e,s,r){s?(localStorage.setItem(R,JSON.stringify({name:e,subject:s,groups:r})),s&&p.set(R,s,k),r?.forEach(t=>{let n=p.get(y);n?(n+=", "+t,p.set(y,n,k)):p.set(y,t,k)})):(localStorage.removeItem(R),p.remove(R),p.remove(y))}async login(e,s){let r=await this.request("/auth/password/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:s})});if(r.err)return r;let t=r.val;return this.setAccessKey(t.accessKey),o.Ok()}async loginWithAccessKey(e){this.isLoggedIn()&&await this.logout(),this.accessKey=e;let s=await this.management(c.ManagementV1Self).Create(f(c.ManagementV1Self));return s.err?(this.clearStorage(),s):(this.setAccessKey(e),o.Ok())}isLoggedIn(){return!!this.accessKey}setAccessKey(e){this.accessKey=e,localStorage.setItem(d,e),p.set(d,e,k)}async stream(e,s){try{let r=await fetch(this.apiHost+e,s);return r.status>=400||!r.body?await this.parseResponse(e,r):o.Value(r.body.getReader())}catch(r){return o.Failed(r+"","NetworkError",D)}}async request(e,s){try{let r=await fetch(this.apiHost+e,{...s,credentials:"same-origin"});if(!r.ok){let n=await r.clone().text();if(r.status===401)try{let i=JSON.parse(n);if(i?.message===M.platformAccessKeyNotFound)return window.location.href=`/login?error=${i?.message}&errorType=${i?.reason}`,o.Failed(i.message||"Unauthorized",i.reason,A)}catch{}}return await this.parseResponse(e,r)}catch(r){let t=r;return t.message===M.platformAccessKeyNotFound&&(window.location.href=`/login?error=${t.message}&errorType=${t.reason}`),o.Failed(r+"","NetworkError",D)}}async socket(e,s){return this.refreshCookie(),new Promise((r,t)=>{let n=new WebSocket(`${this.wsHost}${e}`,s),i=!1;n.onopen=()=>{i=!0,r(n)},n.onerror=u=>{if(!i){let m=p.get(d)!="";t(m?u:new Error("Web socket is not authenticated. Please log in again"))}}})}async parseResponse(e,s){let r=await s.text(),t;try{t=JSON.parse(r)}catch{if(s.status===404)return o.Failed("page not found","NotFound",L);if(s.status===503){if(e.includes("kiosk.sh")||e.includes("cluster.loft.sh")){let u=e.split("/");return u.length>=4&&u[0]===""&&u[1]==="kubernetes"&&u[2]==="cluster"?o.Failed(`Agent seems to be currently unavailable, it is maybe just starting up. Click here for more information`,"LoftAgentUnavailable",I):o.Failed("Agent seems to be currently unavailable, it is maybe just starting up","LoftAgentUnavailable",I)}}else if(s.status===200)return o.Value(r);return console.info("Unexpected Server Response",r),o.Failed("Unexpected server response",b(s.status),b(s.status))}let n=C.tryCastToStatus(t);return n.err?n:n.val!==null&&n.val.status==="Failure"?n.val.code===500&&(n.val.message?.indexOf("vcluster secret not found")!==-1||n.val.message.indexOf("no ready pod for virtual cluster")!==-1)?o.Failed("vcluster seems to be not ready. Please refresh in a second",n.val.reason,b(n.val.code)):o.Failed(n.val.message,n.val.reason,b(n.val.code)):s.status>=400?o.Failed("unknown error","Unknown",b(s.status)):o.Value(t)}management(e){return new l(this,{basePath:$,groupVersionResource:e,headers:this.impersonationHeaders()})}vCluster(e,s){return new l(this,{basePath:J+e.cluster+"/"+e.namespace+"/"+e.name,groupVersionResource:s,vCluster:e,headers:this.impersonationHeaders()})}vClusterNonResource(e){return new l(this,{basePath:J+e.cluster+"/"+e.namespace+"/"+e.name,vCluster:e,headers:this.impersonationHeaders()})}auto(e,s,r,t){return r?this.project(r,t):s?this.vCluster(s,t):e?this.cluster(e,t):this.management(t)}autoNonResource(e,s,r){return r?this.projectNonResource(r):s?this.vClusterNonResource(s):e?this.clusterNonResource(e):this.managementNonResource()}async doRawSocket(e,s){try{return o.Value(await this.socket(e,s))}catch(r){return console.error(r),o.Failed(r.message||JSON.stringify(r))}}async doRawStream(e,s,r){return this.doRawInternal(e,s,r,!0)}async doRaw(e,s,r){return this.doRawInternal(e,s,r)}async doRawInternal(e,s,r,t){let n=this.accessKey,i=n?new Headers({...r,Authorization:"bearer "+n,"X-Sleep-Mode-Ignore":"true","X-Platform-Client":"true"}):new Headers({...r,"X-Sleep-Mode-Ignore":"true","X-Platform-Client":"true"}),u=t?await this.stream(e,{...s,headers:i}):await this.request(e,{...s,headers:i});return u.err&&u.val.type===A&&(u.val.message==="Access key not found. Please login again"||u.val.message==="invalid bearer token")&&(this.clearStorage(),typeof window<"u"&&(window.location.href="/"),await new Promise(()=>{})),u}impersonationHeaders(e){let s=this.impersonatedUser(),r={};return s&&(s.subject&&(r["Impersonate-User"]=s.subject),[...h(s.groups),...h(e)].forEach(t=>{r["Impersonate-Joined-Group"]?r["Impersonate-Joined-Group"]+=", "+t:r["Impersonate-Joined-Group"]=t})),r}clearStorage(){this.accessKey=null,localStorage.removeItem(d),localStorage.removeItem(R),p.remove(d,{secure:!0}),p.remove(R,{secure:!0}),p.remove(y,{secure:!0})}refreshCookie(){let e=this.accessKey||localStorage.getItem(d),s=p.get(d);e&&e!=s&&p.set(d,e,k)}async logout(){let e=await this.management(c.ManagementV1Self).Create(f(c.ManagementV1Self));if(e.err)return this.clearStorage(),e;if(!e.val.status?.accessKey)return this.clearStorage(),o.Ok();let s=await this.management(c.ManagementV1OwnedAccessKey).Delete(e.val.status.accessKey);return s.err?(this.clearStorage(),s):(this.clearStorage(),o.Ok())}},l=class{constructor(e,s){this.client=e,this.options=s}Name(e){return new l(this.client,{...this.options,name:e})}Namespace(e){return e?new l(this.client,{...this.options,namespace:e}):new l(this.client,{...this.options})}Resource(e){return new l(this.client,{...this.options,groupVersionResource:e})}buildPath(e){if(this.options.groupVersionResource)if(this.options.basePath){if(!this.options.name&&this.options.groupVersionResource.subResource)return o.Failed("resource name required when subresource is used")}else return o.Failed("basePath is missing");else return o.Failed("groupVersionResource is missing");let s=[this.options.basePath];this.options.groupVersionResource.group?s.push("apis",this.options.groupVersionResource.group):s.push("api"),s.push(this.options.groupVersionResource.version),this.options.namespace&&s.push("namespaces",this.options.namespace),s.push(this.options.groupVersionResource.resource),this.options.name&&s.push(this.options.name),this.options.groupVersionResource.subResource&&s.push(this.options.groupVersionResource.subResource);let r="";if(e){let t=[];for(let n of Object.keys(e))e[n]&&(Array.isArray(e[n])?e[n].forEach(i=>{t.push(n+"="+encodeURIComponent(i))}):t.push(n+"="+encodeURIComponent(e[n])));t.length>0&&(r="?"+t.join("&"))}else r="?timeout=180s";return o.Value(s.join("/")+r)}parseResourceList(e,s,r,t,n,i){for(let u=0;u1||n&&t.find(v=>v.group===e&&v.resource===V)||t.push({resource:V,subResource:g.length>1?g[1]:void 0,group:e,version:s,kind:m.kind,namespaced:m.namespaced,verbs:m.verbs})}}async ApiResources(e,s){let r=[],t=await this.client.doRaw([this.options.basePath,"api"].join("/"));if(t.err)return t;let n=[];for(let u=0;u{let g=t.val.versions[m];if(g===void 0)return;let V=await this.client.doRaw([this.options.basePath,"api",g].join("/"));if(V.err){console.error(V.val.message);return}this.parseResourceList("",g,V.val,r,e,s)})(u)),n.length>20&&(await Promise.all(n),n=[]);n.length>0&&(await Promise.all(n),n=[]);let i=await this.client.doRaw([this.options.basePath,"apis"].join("/"));if(i.err)return i;for(let u=0;u{let G=v.versions[V];if(G===void 0)return;let E=await this.client.doRaw([this.options.basePath,"apis",v.name,G.version].join("/"));if(E.err){console.error(E.val.message);return}this.parseResourceList(v.name,G.version,E.val,r,e,s)})(g,m)),n.length>20&&(await Promise.all(n),n=[])}return n.length>0&&await Promise.all(n),o.Value(r)}async Version(){let e=[this.options.basePath,"version"];return await this.client.doRaw(e.join("/"))}async VirtualClusterInstanceLogs(e,s,r){let t=[this.options.basePath,`apis/management.loft.sh/v1/namespaces/${e}/virtualclusterinstances/${s}/log`].join("/"),n=[];if(r)for(let i of Object.keys(r))n.push(`${i}=${encodeURIComponent(r[i])}`);return n.length>0&&(t+="?"+n.join("&")),await this.client.doRawStream(t,void 0,this.options.headers)}async TaskLogs(e,s){let r=[this.options.basePath,`apis/management.loft.sh/v1/tasks/${e}/log`].join("/"),t=[];if(s)for(let n of Object.keys(s))t.push(`${n}=${encodeURIComponent(s[n])}`);return t.length>0&&(r+="?"+t.join("&")),await this.client.doRawStream(r,void 0,this.options.headers)}async Logs(e,s,r){let t=[this.options.basePath,`api/v1/namespaces/${e}/pods/${s}/log`].join("/"),n=z(r);return n.length>0&&(t+="?"+n),await this.client.doRawStream(t,void 0,this.options.headers)}async Exec(e,s,r){let t=[this.options.basePath,`api/v1/namespaces/${e}/pods/${s}/exec`].join("/"),n=z(r);return n.length>0&&(t+="?"+n),await this.client.doRawSocket(t,ne)}async Path(e,s,r){let t=[this.options.basePath,e];return await this.client.doRaw(t.join("/"),s,{...r,...this.options.headers})}ResolvePath(e){return e&&(this.options.name=e),this.buildPath()}async Get(e,s){this.options.name=e;let r=this.buildPath(s);return r.err?r:o.WithExtra(await this.client.doRaw(r.val,void 0,this.options.headers),this.options)}async List(e){if(this.options.name)return o.Failed("name is set on a list request");let s=this.buildPath(e);return s.err?s:o.WithExtra(await this.client.doRaw(s.val,void 0,this.options.headers),this.options)}async ListTable(e){if(this.options.name)return o.Failed("name is set on a list request");let s=this.buildPath(e);return s.err?s:o.WithExtra(await this.client.doRaw(s.val,void 0,{...this.options.headers,Accept:"application/json;as=Table;v=v1;g=meta.k8s.io,application/json;as=Table;v=v1beta1;g=meta.k8s.io,application/json"}),this.options)}async Create(e,s){let r=this.buildPath(s);return r.err?r:o.WithExtra(await this.client.doRaw(r.val,{method:"POST",body:JSON.stringify(e)},{...this.options.headers,"Content-Type":"application/json"}),this.options)}async PatchObject(e,s,r,t){let n=te.generate(e,s);return this.Patch(s.metadata?.name,n,r,t)}async Patch(e,s,r,t){this.options.name=e;let n=this.buildPath(t);return n.err?n:o.WithExtra(await this.client.doRaw(n.val,{method:"PATCH",body:JSON.stringify(s,function(i,u){return u===void 0?null:u})},{...this.options.headers,"Content-Type":r||"application/merge-patch+json"}),this.options)}async Update(e,s,r){this.options.name=e;let t=this.buildPath(r);return t.err?t:o.WithExtra(await this.client.doRaw(t.val,{method:"PUT",body:JSON.stringify(s)},{...this.options.headers,"Content-Type":"application/json"}),this.options)}async Delete(e,s){this.options.name=e;let r=this.buildPath(s);return r.err?r:o.WithExtra(await this.client.doRaw(r.val,{method:"DELETE"},this.options.headers),this.options)}async CanI(e){let s=this.options.groupVersionResource,r=this.options.basePath?.indexOf(j)===0?this.options.basePath.substring(j.length):void 0,t,n;this.options.project?(t=this.client.project(this.options.project,c.V1SelfSubjectAccessReview),n=f(c.V1SelfSubjectAccessReview)):this.options.vCluster?(t=this.client.vCluster(this.options.vCluster,c.V1SelfSubjectAccessReview),n=f(c.V1SelfSubjectAccessReview)):r?(t=this.client.cluster(r,c.V1SelfSubjectAccessReview),n=f(c.V1SelfSubjectAccessReview)):(t=this.client.management(c.ManagementV1SelfSubjectAccessReview),n=f(c.ManagementV1SelfSubjectAccessReview)),n.spec={resourceAttributes:{verb:e,name:this.options.name,namespace:this.options.namespace,group:s.group,version:s.version,resource:s.resource,subresource:s.subResource}};let i=await t.Create(n);return i.err?i:o.Value(!!(i.val.status?.allowed&&!i.val.status.denied))}};function z(a){let e=new URLSearchParams;for(let[s,r]of Object.entries(a))Array.isArray(r)?r.forEach(t=>{e.append(s,t)}):e.append(s,r);return e.toString()}var ie=C;export{W as APIExtensionsGroup,Re as APIExtensionsGroupVersion,B as APIExtensionsVersion,ie as Client,j as ClusterBasePath,T as Err,Y as ErrorTypeAlreadyExists,se as ErrorTypeBadGateway,X as ErrorTypeBadRequest,Q as ErrorTypeForbidden,re as ErrorTypeGatewayTimeout,Z as ErrorTypeInternalError,D as ErrorTypeNetwork,L as ErrorTypeNotFound,ee as ErrorTypeNotImplemented,I as ErrorTypeServiceUnavailable,A as ErrorTypeUnauthorized,O as ErrorTypeUnknown,x as Failed,U as List,ge as LoftSchemeGroup,P as LoftSchemeGroupCluster,Ve as LoftSchemeGroupStorage,de as LoftSchemeGroupVersion,pe as LoftSchemeGroupVersionCluster,he as LoftSchemeGroupVersionStorage,me as LoftSchemeGroupVersionVirtualCluster,N as LoftSchemeGroupVirtualCluster,F as LoftSchemeVersion,S as LoftSchemeVersionCluster,fe as LoftSchemeVersionStorage,q as LoftSchemeVersionVirtualCluster,$ as ManagementBasePath,b as MapErrorCode,f as NewResource,w as Ok,_ as ProjectBasePath,c as Resources,o as Return,J as VClusterBasePath,oe as getApiHost,Le as getProjectFromNamespace,De as getProjectNamespace,Se as isResult}; diff --git a/lib/index.js b/lib/index.js index 2e475a8..ef910d2 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1 +1 @@ -"use strict";var ce=Object.create;var G=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var pe=Object.getPrototypeOf,ge=Object.prototype.hasOwnProperty;var de=(o,e)=>{for(var s in e)G(o,s,{get:e[s],enumerable:!0})},_=(o,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of me(e))!ge.call(o,t)&&t!==s&&G(o,t,{get:()=>e[t],enumerable:!(r=le(e,t))||r.enumerable});return o};var z=(o,e,s)=>(s=o!=null?ce(pe(o)):{},_(e||!o||!o.__esModule?G(s,"default",{value:o,enumerable:!0}):s,o)),Ve=o=>_(G({},"__esModule",{value:!0}),o);var Ae={};de(Ae,{APIExtensionsGroup:()=>B,APIExtensionsGroupVersion:()=>ke,APIExtensionsVersion:()=>H,Client:()=>ue,ClusterBasePath:()=>j,Err:()=>S,ErrorTypeAlreadyExists:()=>Z,ErrorTypeBadGateway:()=>re,ErrorTypeBadRequest:()=>Y,ErrorTypeForbidden:()=>X,ErrorTypeGatewayTimeout:()=>te,ErrorTypeInternalError:()=>ee,ErrorTypeNetwork:()=>O,ErrorTypeNotFound:()=>L,ErrorTypeNotImplemented:()=>se,ErrorTypeServiceUnavailable:()=>w,ErrorTypeUnauthorized:()=>T,ErrorTypeUnknown:()=>x,Failed:()=>E,List:()=>U,LoftSchemeGroup:()=>Re,LoftSchemeGroupCluster:()=>k,LoftSchemeGroupStorage:()=>Me,LoftSchemeGroupVersion:()=>ve,LoftSchemeGroupVersionCluster:()=>he,LoftSchemeGroupVersionStorage:()=>Ce,LoftSchemeGroupVersionVirtualCluster:()=>fe,LoftSchemeGroupVirtualCluster:()=>N,LoftSchemeVersion:()=>F,LoftSchemeVersionCluster:()=>y,LoftSchemeVersionStorage:()=>be,LoftSchemeVersionVirtualCluster:()=>q,ManagementBasePath:()=>W,MapErrorCode:()=>R,NewResource:()=>d,Ok:()=>P,ProjectBasePath:()=>J,Resources:()=>c,Return:()=>a,VClusterBasePath:()=>$,getApiHost:()=>ie,getProjectFromNamespace:()=>we,getProjectNamespace:()=>Te,isResult:()=>ye});module.exports=Ve(Ae);var m=z(require("js-cookie")),ae=z(require("json-merge-patch"));var b={loftAccessKeyIdentifier:"loft_access_key",loftImpersonateSubjectIdentifier:"loft_impersonate_subject",loftImpersonateJoinedGroupIdentifier:"loft_impersonate_joined_group",platformAccessKeyNotFound:"platform access key not found. Please login again"};function h(o){return o||[]}var Q={ManagementV1AgentAuditEvent:{group:"management.loft.sh",version:"v1",resource:"agentauditevents",subResource:"",namespaced:!1,kind:"AgentAuditEvent"},ManagementV1Announcement:{group:"management.loft.sh",version:"v1",resource:"announcements",subResource:"",namespaced:!1,kind:"Announcement"},ManagementV1App:{group:"management.loft.sh",version:"v1",resource:"apps",subResource:"",namespaced:!1,kind:"App"},ManagementV1AppCredentials:{group:"management.loft.sh",version:"v1",resource:"apps",subResource:"credentials",namespaced:!1,kind:"AppCredentials"},ManagementV1Backup:{group:"management.loft.sh",version:"v1",resource:"backups",subResource:"",namespaced:!1,kind:"Backup"},ManagementV1BackupApply:{group:"management.loft.sh",version:"v1",resource:"backups",subResource:"apply",namespaced:!1,kind:"BackupApply"},ManagementV1Cluster:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"",namespaced:!1,kind:"Cluster"},ManagementV1ClusterAccess:{group:"management.loft.sh",version:"v1",resource:"clusteraccesses",subResource:"",namespaced:!1,kind:"ClusterAccess"},ManagementV1ClusterAccessKey:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"accesskey",namespaced:!1,kind:"ClusterAccessKey"},ManagementV1ClusterAgentConfig:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"agentconfig",namespaced:!1,kind:"ClusterAgentConfig"},ManagementV1ClusterCharts:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"charts",namespaced:!1,kind:"ClusterCharts"},ManagementV1ClusterDomain:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"domain",namespaced:!1,kind:"ClusterDomain"},ManagementV1ClusterMemberAccess:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"memberaccess",namespaced:!1,kind:"ClusterMemberAccess"},ManagementV1ClusterMembers:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"members",namespaced:!1,kind:"ClusterMembers"},ManagementV1ClusterReset:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"reset",namespaced:!1,kind:"ClusterReset"},ManagementV1ClusterRoleTemplate:{group:"management.loft.sh",version:"v1",resource:"clusterroletemplates",subResource:"",namespaced:!1,kind:"ClusterRoleTemplate"},ManagementV1ClusterVirtualClusterDefaults:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"virtualclusterdefaults",namespaced:!1,kind:"ClusterVirtualClusterDefaults"},ManagementV1Config:{group:"management.loft.sh",version:"v1",resource:"configs",subResource:"",namespaced:!1,kind:"Config"},ManagementV1ConvertVirtualClusterConfig:{group:"management.loft.sh",version:"v1",resource:"convertvirtualclusterconfig",subResource:"",namespaced:!1,kind:"ConvertVirtualClusterConfig"},ManagementV1DevPodEnvironmentTemplate:{group:"management.loft.sh",version:"v1",resource:"devpodenvironmenttemplates",subResource:"",namespaced:!1,kind:"DevPodEnvironmentTemplate"},ManagementV1DevPodWorkspaceInstance:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"",namespaced:!0,kind:"DevPodWorkspaceInstance"},ManagementV1DevPodWorkspaceInstanceState:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"state",namespaced:!0,kind:"DevPodWorkspaceInstanceState"},ManagementV1DevPodWorkspaceTemplate:{group:"management.loft.sh",version:"v1",resource:"devpodworkspacetemplates",subResource:"",namespaced:!1,kind:"DevPodWorkspaceTemplate"},ManagementV1DirectClusterEndpointToken:{group:"management.loft.sh",version:"v1",resource:"directclusterendpointtokens",subResource:"",namespaced:!1,kind:"DirectClusterEndpointToken"},ManagementV1Event:{group:"management.loft.sh",version:"v1",resource:"events",subResource:"",namespaced:!1,kind:"Event"},ManagementV1Feature:{group:"management.loft.sh",version:"v1",resource:"features",subResource:"",namespaced:!1,kind:"Feature"},ManagementV1IngressAuthToken:{group:"management.loft.sh",version:"v1",resource:"ingressauthtokens",subResource:"",namespaced:!1,kind:"IngressAuthToken"},ManagementV1Kiosk:{group:"management.loft.sh",version:"v1",resource:"kiosk",subResource:"",namespaced:!1,kind:"Kiosk"},ManagementV1License:{group:"management.loft.sh",version:"v1",resource:"licenses",subResource:"",namespaced:!1,kind:"License"},ManagementV1LicenseRequest:{group:"management.loft.sh",version:"v1",resource:"licenses",subResource:"request",namespaced:!1,kind:"LicenseRequest"},ManagementV1LicenseToken:{group:"management.loft.sh",version:"v1",resource:"licensetokens",subResource:"",namespaced:!1,kind:"LicenseToken"},ManagementV1LoftUpgrade:{group:"management.loft.sh",version:"v1",resource:"loftupgrades",subResource:"",namespaced:!1,kind:"LoftUpgrade"},ManagementV1OIDCClient:{group:"management.loft.sh",version:"v1",resource:"oidcclients",subResource:"",namespaced:!1,kind:"OIDCClient"},ManagementV1OwnedAccessKey:{group:"management.loft.sh",version:"v1",resource:"ownedaccesskeys",subResource:"",namespaced:!1,kind:"OwnedAccessKey"},ManagementV1Project:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"",namespaced:!1,kind:"Project"},ManagementV1ProjectChartInfo:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"chartinfo",namespaced:!1,kind:"ProjectChartInfo"},ManagementV1ProjectCharts:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"charts",namespaced:!1,kind:"ProjectCharts"},ManagementV1ProjectClusters:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"clusters",namespaced:!1,kind:"ProjectClusters"},ManagementV1ProjectImportSpace:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"importspace",namespaced:!1,kind:"ProjectImportSpace"},ManagementV1ProjectMembers:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"members",namespaced:!1,kind:"ProjectMembers"},ManagementV1ProjectMigrateSpaceInstance:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"migratespaceinstance",namespaced:!1,kind:"ProjectMigrateSpaceInstance"},ManagementV1ProjectMigrateVirtualClusterInstance:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"migratevirtualclusterinstance",namespaced:!1,kind:"ProjectMigrateVirtualClusterInstance"},ManagementV1ProjectRunners:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"runners",namespaced:!1,kind:"ProjectRunners"},ManagementV1ProjectSecret:{group:"management.loft.sh",version:"v1",resource:"projectsecrets",subResource:"",namespaced:!0,kind:"ProjectSecret"},ManagementV1ProjectTemplates:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"templates",namespaced:!1,kind:"ProjectTemplates"},ManagementV1RedirectToken:{group:"management.loft.sh",version:"v1",resource:"redirecttokens",subResource:"",namespaced:!1,kind:"RedirectToken"},ManagementV1RegisterVirtualCluster:{group:"management.loft.sh",version:"v1",resource:"registervirtualclusters",subResource:"",namespaced:!1,kind:"RegisterVirtualCluster"},ManagementV1ResetAccessKey:{group:"management.loft.sh",version:"v1",resource:"resetaccesskeys",subResource:"",namespaced:!1,kind:"ResetAccessKey"},ManagementV1Runner:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"",namespaced:!1,kind:"Runner"},ManagementV1RunnerAccessKey:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"accesskey",namespaced:!1,kind:"RunnerAccessKey"},ManagementV1RunnerConfig:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"config",namespaced:!1,kind:"RunnerConfig"},ManagementV1Self:{group:"management.loft.sh",version:"v1",resource:"selves",subResource:"",namespaced:!1,kind:"Self"},ManagementV1SelfSubjectAccessReview:{group:"management.loft.sh",version:"v1",resource:"selfsubjectaccessreviews",subResource:"",namespaced:!1,kind:"SelfSubjectAccessReview"},ManagementV1SharedSecret:{group:"management.loft.sh",version:"v1",resource:"sharedsecrets",subResource:"",namespaced:!0,kind:"SharedSecret"},ManagementV1SpaceInstance:{group:"management.loft.sh",version:"v1",resource:"spaceinstances",subResource:"",namespaced:!0,kind:"SpaceInstance"},ManagementV1SpaceTemplate:{group:"management.loft.sh",version:"v1",resource:"spacetemplates",subResource:"",namespaced:!1,kind:"SpaceTemplate"},ManagementV1SubjectAccessReview:{group:"management.loft.sh",version:"v1",resource:"subjectaccessreviews",subResource:"",namespaced:!1,kind:"SubjectAccessReview"},ManagementV1Task:{group:"management.loft.sh",version:"v1",resource:"tasks",subResource:"",namespaced:!1,kind:"Task"},ManagementV1TaskLog:{group:"management.loft.sh",version:"v1",resource:"tasks",subResource:"log",namespaced:!1,kind:"TaskLog"},ManagementV1Team:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"",namespaced:!1,kind:"Team"},ManagementV1TeamAccessKeys:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"accesskeys",namespaced:!1,kind:"TeamAccessKeys"},ManagementV1TeamClusters:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"clusters",namespaced:!1,kind:"TeamClusters"},ManagementV1TranslateVClusterResourceName:{group:"management.loft.sh",version:"v1",resource:"translatevclusterresourcenames",subResource:"",namespaced:!1,kind:"TranslateVClusterResourceName"},ManagementV1User:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"",namespaced:!1,kind:"User"},ManagementV1UserAccessKeys:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"accesskeys",namespaced:!1,kind:"UserAccessKeys"},ManagementV1UserClusters:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"clusters",namespaced:!1,kind:"UserClusters"},ManagementV1UserPermissions:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"permissions",namespaced:!1,kind:"UserPermissions"},ManagementV1UserProfile:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"profile",namespaced:!1,kind:"UserProfile"},ManagementV1VirtualClusterAccessKey:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"accesskey",namespaced:!0,kind:"VirtualClusterAccessKey"},ManagementV1VirtualClusterInstance:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"",namespaced:!0,kind:"VirtualClusterInstance"},ManagementV1VirtualClusterInstanceKubeConfig:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"kubeconfig",namespaced:!0,kind:"VirtualClusterInstanceKubeConfig"},ManagementV1VirtualClusterInstanceLog:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"log",namespaced:!0,kind:"VirtualClusterInstanceLog"},ManagementV1VirtualClusterTemplate:{group:"management.loft.sh",version:"v1",resource:"virtualclustertemplates",subResource:"",namespaced:!1,kind:"VirtualClusterTemplate"}};var N="virtualcluster.loft.sh",q="v1",fe="virtualcluster.loft.sh/v1",k="cluster.loft.sh",y="v1",he="cluster.loft.sh/v1",Re="management.loft.sh",F="v1",ve="management.loft.sh/v1",Me="storage.loft.sh",be="v1",Ce="storage.loft.sh/v1",B="apiextensions.k8s.io",H="v1",ke="apiextensions.k8s.io/v1",U=class{};var c={...Q,ClusterV1SleepModeConfig:{group:k,version:y,resource:"sleepmodeconfigs",kind:"SleepModeConfig",namespaced:!0},ClusterV1HelmRelease:{group:k,version:y,resource:"helmreleases",kind:"HelmRelease",namespaced:!0},ClusterV1ChartInfo:{group:k,version:y,resource:"chartinfos",kind:"ChartInfo"},VirtualclusterV1HelmRelease:{group:N,version:q,resource:"helmreleases",kind:"HelmRelease",namespaced:!0},CustomResourceDefinition:{group:B,version:H,resource:"customresourcedefinitions",kind:"CustomResourceDefinition"},StorageV1ClusterQuota:{group:"storage.loft.sh",version:F,resource:"clusterquotas",kind:"ClusterQuota"},NetworkingV1Ingress:{group:"networking.k8s.io",version:"v1",resource:"ingresses",kind:"Ingress",namespaced:!0},V1StatefulSet:{group:"apps",version:"v1",resource:"statefulsets",kind:"StatefulSet",namespaced:!0},V1Deployment:{group:"apps",version:"v1",resource:"deployments",kind:"Deployment",namespaced:!0},V1Event:{group:"",version:"v1",resource:"events",kind:"Event",namespaced:!0},V1Pod:{group:"",version:"v1",resource:"pods",kind:"Pod",namespaced:!0},V1Node:{group:"",version:"v1",resource:"nodes",kind:"Node"},V1Namespace:{group:"",version:"v1",resource:"namespaces",kind:"Namespace"},V1SelfSubjectAccessReview:{group:"authorization.k8s.io",version:"v1",resource:"selfsubjectaccessreviews",kind:"SelfSubjectAccessReview"},V1ClusterRole:{group:"rbac.authorization.k8s.io",version:"v1",resource:"clusterroles",kind:"ClusterRole"},V1ClusterRoleBinding:{group:"rbac.authorization.k8s.io",version:"v1",resource:"clusterrolebindings",kind:"ClusterRoleBinding"},V1Role:{group:"rbac.authorization.k8s.io",version:"v1",resource:"roles",kind:"Role",namespaced:!0},V1RoleBinding:{group:"rbac.authorization.k8s.io",version:"v1",resource:"rolebindings",kind:"RoleBinding",namespaced:!0},V1Secret:{group:"",version:"v1",resource:"secrets",kind:"Secret",namespaced:!0},V1ConfigMap:{group:"",version:"v1",resource:"configmaps",kind:"ConfigMap",namespaced:!0},V1Service:{group:"",version:"v1",resource:"services",kind:"Service",namespaced:!0},V1User:{group:"",version:"v1",resource:"users",kind:"User",namespaced:!1},V1StorageClassList:{group:"storage.k8s.io",version:"v1",resource:"storageclasses",kind:"StorageClass",namespaced:!1},V1Beta1PodMetrics:{group:"metrics.k8s.io",version:"v1beta1",resource:"pods",kind:"PodMetrics",namespaced:!0}};function d(o,e,s){return{apiVersion:o.group?o.group+"/"+o.version:o.version,kind:o.kind,metadata:{name:e},...s}}var S=class{constructor(e,s=void 0){this.val=e;this.extra=s;this.ok=!1;this.err=!0}},P=class{constructor(e,s=void 0){this.val=e;this.extra=s;this.ok=!0;this.err=!1}};function ye(o){return"ok"in o&&typeof o.ok=="boolean"&&"err"in o&&typeof o.err=="boolean"}var x="",O="Network",X="Forbidden",Y="BadRequest",L="NotFound",T="Unauthorized",Z="AlreadyExists",ee="InternalServerError",se="NotImplemented",re="BadGateway",w="ServiceUnavailable",te="GatewayTimeout",R=o=>{switch(o){case 400:return Y;case 401:return T;case 403:return X;case 404:return L;case 409:return Z;case 500:return ee;case 501:return se;case 502:return re;case 503:return w;case 504:return te}return x},a=class{static Ok(){return new P(void 0)}static Value(e){return new P(e)}static Failed(e,s="",r=x,t=void 0){return new S(new E(e,r,s),t)}static Error(e){return new S(e)}static WithExtra(e,s=void 0){return e.extra=s,e}},E=class{constructor(e,s=x,r=""){this.message=e;this.type=s;this.reason=r}};var A={secure:!0,expires:365*10,sameSite:"strict"},V=b.loftAccessKeyIdentifier,v=b.loftImpersonateSubjectIdentifier,I=b.loftImpersonateJoinedGroupIdentifier,Se=["v4.channel.k8s.io","v3.channel.k8s.io","v2.channel.k8s.io","channel.k8s.io"];function ie(){return typeof window<"u"&&window.location.href.startsWith("http://localhost:3000")?"https://localhost:9898":""}function Pe(){return typeof window>"u"||window.location.host==="localhost:3000"?"wss://localhost:8080":`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}`}function ne(o){return[o.virtualCluster?"loft:vcluster:main":`loft:space:${o.project}:${o.space}`]}var W="/kubernetes/management",j="/kubernetes/cluster/",$="/kubernetes/virtualcluster/",J="/kubernetes/project/";function Te(o,e){return o?e&&e.endsWith("-")?`${e}${o}`:e===""?`${o}`:e?`${e}-${o}`:`p-${o}`:"p-"}function we(o,e){if(o)return e?e.endsWith("-")?o.replace(new RegExp(`^${e}`),""):o.replace(new RegExp(`^${e}-`),""):o.replace(/^p-/,"")}var C=class{constructor(e,s,r){this.apiHost="";this.wsHost="";this.accessKey="";this.managementNonResource=()=>new l(this,{basePath:W,headers:this.impersonationHeaders()});this.cluster=(e,s)=>new l(this,{basePath:j+e,groupVersionResource:s,headers:this.impersonationHeaders()});this.clusterNonResource=e=>new l(this,{basePath:j+e,headers:this.impersonationHeaders()});this.project=(e,s)=>new l(this,{basePath:J+e.project+"/"+(e.space?"space/"+e.space:"virtualcluster/"+e.virtualCluster),groupVersionResource:s,project:e,headers:this.impersonationHeaders(ne(e))});this.projectNonResource=e=>new l(this,{basePath:J+e.project+"/"+(e.space?"space/"+e.space:"virtualcluster/"+e.virtualCluster),project:e,headers:this.impersonationHeaders(ne(e))});this.apiHost=s||ie(),this.wsHost=r||Pe(),this.accessKey=e||C.getAccessKey()}static getAccessKey(){return localStorage.getItem(V)}static tryCastToStatus(e){if(e.kind){if(e.kind!=="Status"||e.apiVersion!=="v1")return a.Value(null)}else return a.Value(null);return a.Value(e)}async getUser(){let e=await this.management(c.ManagementV1Self).Create(d(c.ManagementV1Self));return e.err?e:e.val.status?.user?(typeof window<"u"&&(window.loft||(window.loft={}),window.loft.instanceID=e.val.status.instanceID,window.loft.chatAuthToken=e.val.status.chatAuthToken,window.loft.user=e.val.status.user),a.Value(e.val.status.user.name)):a.Failed("no user found")}getAccessKey(){return this.accessKey}async loftVersion(e){try{let s=this.apiHost+"/version";e&&(s+="?refresh=true");let t=await(await fetch(s)).json();return a.Value(t)}catch(s){return console.error(s),a.Failed("error during version retrieval")}}impersonatedUser(){try{let e=localStorage.getItem(v);if(e)return JSON.parse(e)}catch(e){console.error(e)}}impersonate(e,s,r){s?(localStorage.setItem(v,JSON.stringify({name:e,subject:s,groups:r})),s&&m.default.set(v,s,A),r?.forEach(t=>{let n=m.default.get(I);n?(n+=", "+t,m.default.set(I,n,A)):m.default.set(I,t,A)})):(localStorage.removeItem(v),m.default.remove(v),m.default.remove(I))}async login(e,s){let r=await this.request("/auth/password/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:s})});if(r.err)return r;let t=r.val;return this.setAccessKey(t.accessKey),a.Ok()}async loginWithAccessKey(e){this.isLoggedIn()&&await this.logout(),this.accessKey=e;let s=await this.management(c.ManagementV1Self).Create(d(c.ManagementV1Self));return s.err?(this.clearStorage(),s):(this.setAccessKey(e),a.Ok())}isLoggedIn(){return!!this.accessKey}setAccessKey(e){this.accessKey=e,localStorage.setItem(V,e),m.default.set(V,e,A)}async stream(e,s){try{let r=await fetch(this.apiHost+e,s);return r.status>=400||!r.body?await this.parseResponse(e,r):a.Value(r.body.getReader())}catch(r){return a.Failed(r+"","NetworkError",O)}}async request(e,s){try{let r=await fetch(this.apiHost+e,{...s,credentials:"same-origin"});if(!r.ok){let n=await r.clone().text();if(r.status===401)try{let i=JSON.parse(n);if(i?.message===b.platformAccessKeyNotFound)return window.location.href=`/login?error=${i?.message}&errorType=${i?.reason}`,a.Failed(i.message||"Unauthorized",i.reason,T)}catch{}}return await this.parseResponse(e,r)}catch(r){let t=r;return t.message===b.platformAccessKeyNotFound&&(window.location.href=`/login?error=${t.message}&errorType=${t.reason}`),a.Failed(r+"","NetworkError",O)}}async socket(e,s){return this.refreshCookie(),new Promise((r,t)=>{let n=new WebSocket(`${this.wsHost}${e}`,s),i=!1;n.onopen=()=>{i=!0,r(n)},n.onerror=u=>{if(!i){let p=m.default.get(V)!="";t(p?u:new Error("Web socket is not authenticated. Please log in again"))}}})}async parseResponse(e,s){let r=await s.text(),t;try{t=JSON.parse(r)}catch{if(s.status===404)return a.Failed("page not found","NotFound",L);if(s.status===503){if(e.includes("kiosk.sh")||e.includes("cluster.loft.sh")){let u=e.split("/");return u.length>=4&&u[0]===""&&u[1]==="kubernetes"&&u[2]==="cluster"?a.Failed(`Agent seems to be currently unavailable, it is maybe just starting up. Click here for more information`,"LoftAgentUnavailable",w):a.Failed("Agent seems to be currently unavailable, it is maybe just starting up","LoftAgentUnavailable",w)}}else if(s.status===200)return a.Value(r);return console.info("Unexpected Server Response",r),a.Failed("Unexpected server response",R(s.status),R(s.status))}let n=C.tryCastToStatus(t);return n.err?n:n.val!==null&&n.val.status==="Failure"?n.val.code===500&&(n.val.message?.indexOf("vcluster secret not found")!==-1||n.val.message.indexOf("no ready pod for virtual cluster")!==-1)?a.Failed("vcluster seems to be not ready. Please refresh in a second",n.val.reason,R(n.val.code)):a.Failed(n.val.message,n.val.reason,R(n.val.code)):s.status>=400?a.Failed("unknown error","Unknown",R(s.status)):a.Value(t)}management(e){return new l(this,{basePath:W,groupVersionResource:e,headers:this.impersonationHeaders()})}vCluster(e,s){return new l(this,{basePath:$+e.cluster+"/"+e.namespace+"/"+e.name,groupVersionResource:s,vCluster:e,headers:this.impersonationHeaders()})}vClusterNonResource(e){return new l(this,{basePath:$+e.cluster+"/"+e.namespace+"/"+e.name,vCluster:e,headers:this.impersonationHeaders()})}auto(e,s,r,t){return r?this.project(r,t):s?this.vCluster(s,t):e?this.cluster(e,t):this.management(t)}autoNonResource(e,s,r){return r?this.projectNonResource(r):s?this.vClusterNonResource(s):e?this.clusterNonResource(e):this.managementNonResource()}async doRawSocket(e,s){try{return a.Value(await this.socket(e,s))}catch(r){return console.error(r),a.Failed(r.message||JSON.stringify(r))}}async doRawStream(e,s,r){return this.doRawInternal(e,s,r,!0)}async doRaw(e,s,r){return this.doRawInternal(e,s,r)}async doRawInternal(e,s,r,t){let n=this.accessKey,i=n?new Headers({...r,Authorization:"bearer "+n,"X-Sleep-Mode-Ignore":"true","X-Platform-Client":"true"}):new Headers({...r,"X-Sleep-Mode-Ignore":"true","X-Platform-Client":"true"}),u=t?await this.stream(e,{...s,headers:i}):await this.request(e,{...s,headers:i});return u.err&&u.val.type===T&&(u.val.message==="Access key not found. Please login again"||u.val.message==="invalid bearer token")&&(this.clearStorage(),typeof window<"u"&&(window.location.href="/"),await new Promise(()=>{})),u}impersonationHeaders(e){let s=this.impersonatedUser(),r={};return s&&(s.subject&&(r["Impersonate-User"]=s.subject),[...h(s.groups),...h(e)].forEach(t=>{r["Impersonate-Joined-Group"]?r["Impersonate-Joined-Group"]+=", "+t:r["Impersonate-Joined-Group"]=t})),r}clearStorage(){this.accessKey=null,localStorage.removeItem(V),localStorage.removeItem(v),m.default.remove(V,{secure:!0}),m.default.remove(v,{secure:!0}),m.default.remove(I,{secure:!0})}refreshCookie(){let e=this.accessKey||localStorage.getItem(V),s=m.default.get(V);e&&e!=s&&m.default.set(V,e,A)}async logout(){let e=await this.management(c.ManagementV1Self).Create(d(c.ManagementV1Self));if(e.err)return this.clearStorage(),e;if(!e.val.status?.accessKey)return this.clearStorage(),a.Ok();let s=await this.management(c.ManagementV1OwnedAccessKey).Delete(e.val.status.accessKey);return s.err?(this.clearStorage(),s):(this.clearStorage(),a.Ok())}},l=class{constructor(e,s){this.client=e,this.options=s}Name(e){return new l(this.client,{...this.options,name:e})}Namespace(e){return e?new l(this.client,{...this.options,namespace:e}):new l(this.client,{...this.options})}Resource(e){return new l(this.client,{...this.options,groupVersionResource:e})}buildPath(e){if(this.options.groupVersionResource)if(this.options.basePath){if(!this.options.name&&this.options.groupVersionResource.subResource)return a.Failed("resource name required when subresource is used")}else return a.Failed("basePath is missing");else return a.Failed("groupVersionResource is missing");let s=[this.options.basePath];this.options.groupVersionResource.group?s.push("apis",this.options.groupVersionResource.group):s.push("api"),s.push(this.options.groupVersionResource.version),this.options.namespace&&s.push("namespaces",this.options.namespace),s.push(this.options.groupVersionResource.resource),this.options.name&&s.push(this.options.name),this.options.groupVersionResource.subResource&&s.push(this.options.groupVersionResource.subResource);let r="";if(e){let t=[];for(let n of Object.keys(e))e[n]&&(Array.isArray(e[n])?e[n].forEach(i=>{t.push(n+"="+encodeURIComponent(i))}):t.push(n+"="+encodeURIComponent(e[n])));t.length>0&&(r="?"+t.join("&"))}else r="?timeout=180s";return a.Value(s.join("/")+r)}parseResourceList(e,s,r,t,n,i){for(let u=0;u1||n&&t.find(M=>M.group===e&&M.resource===f)||t.push({resource:f,subResource:g.length>1?g[1]:void 0,group:e,version:s,kind:p.kind,namespaced:p.namespaced,verbs:p.verbs})}}async ApiResources(e,s){let r=[],t=await this.client.doRaw([this.options.basePath,"api"].join("/"));if(t.err)return t;let n=[];for(let u=0;u{let g=t.val.versions[p];if(g===void 0)return;let f=await this.client.doRaw([this.options.basePath,"api",g].join("/"));if(f.err){console.error(f.val.message);return}this.parseResourceList("",g,f.val,r,e,s)})(u)),n.length>20&&(await Promise.all(n),n=[]);n.length>0&&(await Promise.all(n),n=[]);let i=await this.client.doRaw([this.options.basePath,"apis"].join("/"));if(i.err)return i;for(let u=0;u{let K=M.versions[f];if(K===void 0)return;let D=await this.client.doRaw([this.options.basePath,"apis",M.name,K.version].join("/"));if(D.err){console.error(D.val.message);return}this.parseResourceList(M.name,K.version,D.val,r,e,s)})(g,p)),n.length>20&&(await Promise.all(n),n=[])}return n.length>0&&await Promise.all(n),a.Value(r)}async Version(){let e=[this.options.basePath,"version"];return await this.client.doRaw(e.join("/"))}async VirtualClusterInstanceLogs(e,s,r){let t=[this.options.basePath,`apis/management.loft.sh/v1/namespaces/${e}/virtualclusterinstances/${s}/log`].join("/"),n=[];if(r)for(let i of Object.keys(r))n.push(`${i}=${encodeURIComponent(r[i])}`);return n.length>0&&(t+="?"+n.join("&")),await this.client.doRawStream(t,void 0,this.options.headers)}async TaskLogs(e,s){let r=[this.options.basePath,`apis/management.loft.sh/v1/tasks/${e}/log`].join("/"),t=[];if(s)for(let n of Object.keys(s))t.push(`${n}=${encodeURIComponent(s[n])}`);return t.length>0&&(r+="?"+t.join("&")),await this.client.doRawStream(r,void 0,this.options.headers)}async Logs(e,s,r){let t=[this.options.basePath,`api/v1/namespaces/${e}/pods/${s}/log`].join("/"),n=oe(r);return n.length>0&&(t+="?"+n),await this.client.doRawStream(t,void 0,this.options.headers)}async Exec(e,s,r){let t=[this.options.basePath,`api/v1/namespaces/${e}/pods/${s}/exec`].join("/"),n=oe(r);return n.length>0&&(t+="?"+n),await this.client.doRawSocket(t,Se)}async Path(e,s,r){let t=[this.options.basePath,e];return await this.client.doRaw(t.join("/"),s,{...r,...this.options.headers})}ResolvePath(e){return e&&(this.options.name=e),this.buildPath()}async Get(e,s){this.options.name=e;let r=this.buildPath(s);return r.err?r:a.WithExtra(await this.client.doRaw(r.val,void 0,this.options.headers),this.options)}async List(e){if(this.options.name)return a.Failed("name is set on a list request");let s=this.buildPath(e);return s.err?s:a.WithExtra(await this.client.doRaw(s.val,void 0,this.options.headers),this.options)}async ListTable(e){if(this.options.name)return a.Failed("name is set on a list request");let s=this.buildPath(e);return s.err?s:a.WithExtra(await this.client.doRaw(s.val,void 0,{...this.options.headers,Accept:"application/json;as=Table;v=v1;g=meta.k8s.io,application/json;as=Table;v=v1beta1;g=meta.k8s.io,application/json"}),this.options)}async Create(e,s){let r=this.buildPath(s);return r.err?r:a.WithExtra(await this.client.doRaw(r.val,{method:"POST",body:JSON.stringify(e)},{...this.options.headers,"Content-Type":"application/json"}),this.options)}async PatchObject(e,s,r,t){let n=ae.default.generate(e,s);return this.Patch(s.metadata?.name,n,r,t)}async Patch(e,s,r,t){this.options.name=e;let n=this.buildPath(t);return n.err?n:a.WithExtra(await this.client.doRaw(n.val,{method:"PATCH",body:JSON.stringify(s,function(i,u){return u===void 0?null:u})},{...this.options.headers,"Content-Type":r||"application/merge-patch+json"}),this.options)}async Update(e,s,r){this.options.name=e;let t=this.buildPath(r);return t.err?t:a.WithExtra(await this.client.doRaw(t.val,{method:"PUT",body:JSON.stringify(s)},{...this.options.headers,"Content-Type":"application/json"}),this.options)}async Delete(e,s){this.options.name=e;let r=this.buildPath(s);return r.err?r:a.WithExtra(await this.client.doRaw(r.val,{method:"DELETE"},this.options.headers),this.options)}async CanI(e){let s=this.options.groupVersionResource,r=this.options.basePath?.indexOf(j)===0?this.options.basePath.substring(j.length):void 0,t,n;this.options.project?(t=this.client.project(this.options.project,c.V1SelfSubjectAccessReview),n=d(c.V1SelfSubjectAccessReview)):this.options.vCluster?(t=this.client.vCluster(this.options.vCluster,c.V1SelfSubjectAccessReview),n=d(c.V1SelfSubjectAccessReview)):r?(t=this.client.cluster(r,c.V1SelfSubjectAccessReview),n=d(c.V1SelfSubjectAccessReview)):(t=this.client.management(c.ManagementV1SelfSubjectAccessReview),n=d(c.ManagementV1SelfSubjectAccessReview)),n.spec={resourceAttributes:{verb:e,name:this.options.name,namespace:this.options.namespace,group:s.group,version:s.version,resource:s.resource,subresource:s.subResource}};let i=await t.Create(n);return i.err?i:a.Value(!!(i.val.status?.allowed&&!i.val.status.denied))}};function oe(o){let e=new URLSearchParams;for(let[s,r]of Object.entries(o))Array.isArray(r)?r.forEach(t=>{e.append(s,t)}):e.append(s,r);return e.toString()}var ue=C;0&&(module.exports={APIExtensionsGroup,APIExtensionsGroupVersion,APIExtensionsVersion,Client,ClusterBasePath,Err,ErrorTypeAlreadyExists,ErrorTypeBadGateway,ErrorTypeBadRequest,ErrorTypeForbidden,ErrorTypeGatewayTimeout,ErrorTypeInternalError,ErrorTypeNetwork,ErrorTypeNotFound,ErrorTypeNotImplemented,ErrorTypeServiceUnavailable,ErrorTypeUnauthorized,ErrorTypeUnknown,Failed,List,LoftSchemeGroup,LoftSchemeGroupCluster,LoftSchemeGroupStorage,LoftSchemeGroupVersion,LoftSchemeGroupVersionCluster,LoftSchemeGroupVersionStorage,LoftSchemeGroupVersionVirtualCluster,LoftSchemeGroupVirtualCluster,LoftSchemeVersion,LoftSchemeVersionCluster,LoftSchemeVersionStorage,LoftSchemeVersionVirtualCluster,ManagementBasePath,MapErrorCode,NewResource,Ok,ProjectBasePath,Resources,Return,VClusterBasePath,getApiHost,getProjectFromNamespace,getProjectNamespace,isResult}); +"use strict";var ce=Object.create;var G=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var pe=Object.getPrototypeOf,ge=Object.prototype.hasOwnProperty;var de=(o,e)=>{for(var s in e)G(o,s,{get:e[s],enumerable:!0})},_=(o,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of me(e))!ge.call(o,t)&&t!==s&&G(o,t,{get:()=>e[t],enumerable:!(r=le(e,t))||r.enumerable});return o};var z=(o,e,s)=>(s=o!=null?ce(pe(o)):{},_(e||!o||!o.__esModule?G(s,"default",{value:o,enumerable:!0}):s,o)),Ve=o=>_(G({},"__esModule",{value:!0}),o);var Ae={};de(Ae,{APIExtensionsGroup:()=>W,APIExtensionsGroupVersion:()=>ke,APIExtensionsVersion:()=>B,Client:()=>ue,ClusterBasePath:()=>j,Err:()=>P,ErrorTypeAlreadyExists:()=>Z,ErrorTypeBadGateway:()=>re,ErrorTypeBadRequest:()=>Y,ErrorTypeForbidden:()=>X,ErrorTypeGatewayTimeout:()=>te,ErrorTypeInternalError:()=>ee,ErrorTypeNetwork:()=>O,ErrorTypeNotFound:()=>D,ErrorTypeNotImplemented:()=>se,ErrorTypeServiceUnavailable:()=>w,ErrorTypeUnauthorized:()=>T,ErrorTypeUnknown:()=>x,Failed:()=>E,List:()=>U,LoftSchemeGroup:()=>Re,LoftSchemeGroupCluster:()=>k,LoftSchemeGroupStorage:()=>Me,LoftSchemeGroupVersion:()=>ve,LoftSchemeGroupVersionCluster:()=>he,LoftSchemeGroupVersionStorage:()=>Ce,LoftSchemeGroupVersionVirtualCluster:()=>fe,LoftSchemeGroupVirtualCluster:()=>N,LoftSchemeVersion:()=>F,LoftSchemeVersionCluster:()=>y,LoftSchemeVersionStorage:()=>be,LoftSchemeVersionVirtualCluster:()=>q,ManagementBasePath:()=>H,MapErrorCode:()=>R,NewResource:()=>d,Ok:()=>S,ProjectBasePath:()=>J,Resources:()=>c,Return:()=>a,VClusterBasePath:()=>$,getApiHost:()=>ie,getProjectFromNamespace:()=>we,getProjectNamespace:()=>Te,isResult:()=>ye});module.exports=Ve(Ae);var m=z(require("js-cookie")),ae=z(require("json-merge-patch"));var b={loftAccessKeyIdentifier:"loft_access_key",loftImpersonateSubjectIdentifier:"loft_impersonate_subject",loftImpersonateJoinedGroupIdentifier:"loft_impersonate_joined_group",platformAccessKeyNotFound:"platform access key not found. Please login again"};function h(o){return o||[]}var Q={ManagementV1AgentAuditEvent:{group:"management.loft.sh",version:"v1",resource:"agentauditevents",subResource:"",namespaced:!1,kind:"AgentAuditEvent"},ManagementV1Announcement:{group:"management.loft.sh",version:"v1",resource:"announcements",subResource:"",namespaced:!1,kind:"Announcement"},ManagementV1App:{group:"management.loft.sh",version:"v1",resource:"apps",subResource:"",namespaced:!1,kind:"App"},ManagementV1AppCredentials:{group:"management.loft.sh",version:"v1",resource:"apps",subResource:"credentials",namespaced:!1,kind:"AppCredentials"},ManagementV1Backup:{group:"management.loft.sh",version:"v1",resource:"backups",subResource:"",namespaced:!1,kind:"Backup"},ManagementV1BackupApply:{group:"management.loft.sh",version:"v1",resource:"backups",subResource:"apply",namespaced:!1,kind:"BackupApply"},ManagementV1Cluster:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"",namespaced:!1,kind:"Cluster"},ManagementV1ClusterAccess:{group:"management.loft.sh",version:"v1",resource:"clusteraccesses",subResource:"",namespaced:!1,kind:"ClusterAccess"},ManagementV1ClusterAccessKey:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"accesskey",namespaced:!1,kind:"ClusterAccessKey"},ManagementV1ClusterAgentConfig:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"agentconfig",namespaced:!1,kind:"ClusterAgentConfig"},ManagementV1ClusterCharts:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"charts",namespaced:!1,kind:"ClusterCharts"},ManagementV1ClusterDomain:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"domain",namespaced:!1,kind:"ClusterDomain"},ManagementV1ClusterMemberAccess:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"memberaccess",namespaced:!1,kind:"ClusterMemberAccess"},ManagementV1ClusterMembers:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"members",namespaced:!1,kind:"ClusterMembers"},ManagementV1ClusterReset:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"reset",namespaced:!1,kind:"ClusterReset"},ManagementV1ClusterRoleTemplate:{group:"management.loft.sh",version:"v1",resource:"clusterroletemplates",subResource:"",namespaced:!1,kind:"ClusterRoleTemplate"},ManagementV1ClusterVirtualClusterDefaults:{group:"management.loft.sh",version:"v1",resource:"clusters",subResource:"virtualclusterdefaults",namespaced:!1,kind:"ClusterVirtualClusterDefaults"},ManagementV1Config:{group:"management.loft.sh",version:"v1",resource:"configs",subResource:"",namespaced:!1,kind:"Config"},ManagementV1ConvertVirtualClusterConfig:{group:"management.loft.sh",version:"v1",resource:"convertvirtualclusterconfig",subResource:"",namespaced:!1,kind:"ConvertVirtualClusterConfig"},ManagementV1DevPodEnvironmentTemplate:{group:"management.loft.sh",version:"v1",resource:"devpodenvironmenttemplates",subResource:"",namespaced:!1,kind:"DevPodEnvironmentTemplate"},ManagementV1DevPodWorkspaceInstance:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"",namespaced:!0,kind:"DevPodWorkspaceInstance"},ManagementV1DevPodWorkspaceInstanceState:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"state",namespaced:!0,kind:"DevPodWorkspaceInstanceState"},ManagementV1DevPodWorkspaceInstanceTroubleshoot:{group:"management.loft.sh",version:"v1",resource:"devpodworkspaceinstances",subResource:"troubleshoot",namespaced:!0,kind:"DevPodWorkspaceInstanceTroubleshoot"},ManagementV1DevPodWorkspacePreset:{group:"management.loft.sh",version:"v1",resource:"devpodworkspacepresets",subResource:"",namespaced:!1,kind:"DevPodWorkspacePreset"},ManagementV1DevPodWorkspaceTemplate:{group:"management.loft.sh",version:"v1",resource:"devpodworkspacetemplates",subResource:"",namespaced:!1,kind:"DevPodWorkspaceTemplate"},ManagementV1DirectClusterEndpointToken:{group:"management.loft.sh",version:"v1",resource:"directclusterendpointtokens",subResource:"",namespaced:!1,kind:"DirectClusterEndpointToken"},ManagementV1Event:{group:"management.loft.sh",version:"v1",resource:"events",subResource:"",namespaced:!1,kind:"Event"},ManagementV1Feature:{group:"management.loft.sh",version:"v1",resource:"features",subResource:"",namespaced:!1,kind:"Feature"},ManagementV1IngressAuthToken:{group:"management.loft.sh",version:"v1",resource:"ingressauthtokens",subResource:"",namespaced:!1,kind:"IngressAuthToken"},ManagementV1Kiosk:{group:"management.loft.sh",version:"v1",resource:"kiosk",subResource:"",namespaced:!1,kind:"Kiosk"},ManagementV1License:{group:"management.loft.sh",version:"v1",resource:"licenses",subResource:"",namespaced:!1,kind:"License"},ManagementV1LicenseRequest:{group:"management.loft.sh",version:"v1",resource:"licenses",subResource:"request",namespaced:!1,kind:"LicenseRequest"},ManagementV1LicenseToken:{group:"management.loft.sh",version:"v1",resource:"licensetokens",subResource:"",namespaced:!1,kind:"LicenseToken"},ManagementV1LoftUpgrade:{group:"management.loft.sh",version:"v1",resource:"loftupgrades",subResource:"",namespaced:!1,kind:"LoftUpgrade"},ManagementV1OIDCClient:{group:"management.loft.sh",version:"v1",resource:"oidcclients",subResource:"",namespaced:!1,kind:"OIDCClient"},ManagementV1OwnedAccessKey:{group:"management.loft.sh",version:"v1",resource:"ownedaccesskeys",subResource:"",namespaced:!1,kind:"OwnedAccessKey"},ManagementV1Project:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"",namespaced:!1,kind:"Project"},ManagementV1ProjectChartInfo:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"chartinfo",namespaced:!1,kind:"ProjectChartInfo"},ManagementV1ProjectCharts:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"charts",namespaced:!1,kind:"ProjectCharts"},ManagementV1ProjectClusters:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"clusters",namespaced:!1,kind:"ProjectClusters"},ManagementV1ProjectImportSpace:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"importspace",namespaced:!1,kind:"ProjectImportSpace"},ManagementV1ProjectMembers:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"members",namespaced:!1,kind:"ProjectMembers"},ManagementV1ProjectMigrateSpaceInstance:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"migratespaceinstance",namespaced:!1,kind:"ProjectMigrateSpaceInstance"},ManagementV1ProjectMigrateVirtualClusterInstance:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"migratevirtualclusterinstance",namespaced:!1,kind:"ProjectMigrateVirtualClusterInstance"},ManagementV1ProjectRunners:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"runners",namespaced:!1,kind:"ProjectRunners"},ManagementV1ProjectSecret:{group:"management.loft.sh",version:"v1",resource:"projectsecrets",subResource:"",namespaced:!0,kind:"ProjectSecret"},ManagementV1ProjectTemplates:{group:"management.loft.sh",version:"v1",resource:"projects",subResource:"templates",namespaced:!1,kind:"ProjectTemplates"},ManagementV1RedirectToken:{group:"management.loft.sh",version:"v1",resource:"redirecttokens",subResource:"",namespaced:!1,kind:"RedirectToken"},ManagementV1RegisterVirtualCluster:{group:"management.loft.sh",version:"v1",resource:"registervirtualclusters",subResource:"",namespaced:!1,kind:"RegisterVirtualCluster"},ManagementV1ResetAccessKey:{group:"management.loft.sh",version:"v1",resource:"resetaccesskeys",subResource:"",namespaced:!1,kind:"ResetAccessKey"},ManagementV1Runner:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"",namespaced:!1,kind:"Runner"},ManagementV1RunnerAccessKey:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"accesskey",namespaced:!1,kind:"RunnerAccessKey"},ManagementV1RunnerConfig:{group:"management.loft.sh",version:"v1",resource:"runners",subResource:"config",namespaced:!1,kind:"RunnerConfig"},ManagementV1Self:{group:"management.loft.sh",version:"v1",resource:"selves",subResource:"",namespaced:!1,kind:"Self"},ManagementV1SelfSubjectAccessReview:{group:"management.loft.sh",version:"v1",resource:"selfsubjectaccessreviews",subResource:"",namespaced:!1,kind:"SelfSubjectAccessReview"},ManagementV1SharedSecret:{group:"management.loft.sh",version:"v1",resource:"sharedsecrets",subResource:"",namespaced:!0,kind:"SharedSecret"},ManagementV1SpaceInstance:{group:"management.loft.sh",version:"v1",resource:"spaceinstances",subResource:"",namespaced:!0,kind:"SpaceInstance"},ManagementV1SpaceTemplate:{group:"management.loft.sh",version:"v1",resource:"spacetemplates",subResource:"",namespaced:!1,kind:"SpaceTemplate"},ManagementV1SubjectAccessReview:{group:"management.loft.sh",version:"v1",resource:"subjectaccessreviews",subResource:"",namespaced:!1,kind:"SubjectAccessReview"},ManagementV1Task:{group:"management.loft.sh",version:"v1",resource:"tasks",subResource:"",namespaced:!1,kind:"Task"},ManagementV1TaskLog:{group:"management.loft.sh",version:"v1",resource:"tasks",subResource:"log",namespaced:!1,kind:"TaskLog"},ManagementV1Team:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"",namespaced:!1,kind:"Team"},ManagementV1TeamAccessKeys:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"accesskeys",namespaced:!1,kind:"TeamAccessKeys"},ManagementV1TeamClusters:{group:"management.loft.sh",version:"v1",resource:"teams",subResource:"clusters",namespaced:!1,kind:"TeamClusters"},ManagementV1TranslateVClusterResourceName:{group:"management.loft.sh",version:"v1",resource:"translatevclusterresourcenames",subResource:"",namespaced:!1,kind:"TranslateVClusterResourceName"},ManagementV1User:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"",namespaced:!1,kind:"User"},ManagementV1UserAccessKeys:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"accesskeys",namespaced:!1,kind:"UserAccessKeys"},ManagementV1UserClusters:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"clusters",namespaced:!1,kind:"UserClusters"},ManagementV1UserPermissions:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"permissions",namespaced:!1,kind:"UserPermissions"},ManagementV1UserProfile:{group:"management.loft.sh",version:"v1",resource:"users",subResource:"profile",namespaced:!1,kind:"UserProfile"},ManagementV1VirtualClusterAccessKey:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"accesskey",namespaced:!0,kind:"VirtualClusterAccessKey"},ManagementV1VirtualClusterExternalDatabase:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"externaldatabase",namespaced:!0,kind:"VirtualClusterExternalDatabase"},ManagementV1VirtualClusterInstance:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"",namespaced:!0,kind:"VirtualClusterInstance"},ManagementV1VirtualClusterInstanceKubeConfig:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"kubeconfig",namespaced:!0,kind:"VirtualClusterInstanceKubeConfig"},ManagementV1VirtualClusterInstanceLog:{group:"management.loft.sh",version:"v1",resource:"virtualclusterinstances",subResource:"log",namespaced:!0,kind:"VirtualClusterInstanceLog"},ManagementV1VirtualClusterTemplate:{group:"management.loft.sh",version:"v1",resource:"virtualclustertemplates",subResource:"",namespaced:!1,kind:"VirtualClusterTemplate"}};var N="virtualcluster.loft.sh",q="v1",fe="virtualcluster.loft.sh/v1",k="cluster.loft.sh",y="v1",he="cluster.loft.sh/v1",Re="management.loft.sh",F="v1",ve="management.loft.sh/v1",Me="storage.loft.sh",be="v1",Ce="storage.loft.sh/v1",W="apiextensions.k8s.io",B="v1",ke="apiextensions.k8s.io/v1",U=class{};var c={...Q,ClusterV1SleepModeConfig:{group:k,version:y,resource:"sleepmodeconfigs",kind:"SleepModeConfig",namespaced:!0},ClusterV1HelmRelease:{group:k,version:y,resource:"helmreleases",kind:"HelmRelease",namespaced:!0},ClusterV1ChartInfo:{group:k,version:y,resource:"chartinfos",kind:"ChartInfo"},VirtualclusterV1HelmRelease:{group:N,version:q,resource:"helmreleases",kind:"HelmRelease",namespaced:!0},CustomResourceDefinition:{group:W,version:B,resource:"customresourcedefinitions",kind:"CustomResourceDefinition"},StorageV1ClusterQuota:{group:"storage.loft.sh",version:F,resource:"clusterquotas",kind:"ClusterQuota"},NetworkingV1Ingress:{group:"networking.k8s.io",version:"v1",resource:"ingresses",kind:"Ingress",namespaced:!0},V1StatefulSet:{group:"apps",version:"v1",resource:"statefulsets",kind:"StatefulSet",namespaced:!0},V1Deployment:{group:"apps",version:"v1",resource:"deployments",kind:"Deployment",namespaced:!0},V1Event:{group:"",version:"v1",resource:"events",kind:"Event",namespaced:!0},V1Pod:{group:"",version:"v1",resource:"pods",kind:"Pod",namespaced:!0},V1Node:{group:"",version:"v1",resource:"nodes",kind:"Node"},V1Namespace:{group:"",version:"v1",resource:"namespaces",kind:"Namespace"},V1SelfSubjectAccessReview:{group:"authorization.k8s.io",version:"v1",resource:"selfsubjectaccessreviews",kind:"SelfSubjectAccessReview"},V1ClusterRole:{group:"rbac.authorization.k8s.io",version:"v1",resource:"clusterroles",kind:"ClusterRole"},V1ClusterRoleBinding:{group:"rbac.authorization.k8s.io",version:"v1",resource:"clusterrolebindings",kind:"ClusterRoleBinding"},V1Role:{group:"rbac.authorization.k8s.io",version:"v1",resource:"roles",kind:"Role",namespaced:!0},V1RoleBinding:{group:"rbac.authorization.k8s.io",version:"v1",resource:"rolebindings",kind:"RoleBinding",namespaced:!0},V1Secret:{group:"",version:"v1",resource:"secrets",kind:"Secret",namespaced:!0},V1ConfigMap:{group:"",version:"v1",resource:"configmaps",kind:"ConfigMap",namespaced:!0},V1Service:{group:"",version:"v1",resource:"services",kind:"Service",namespaced:!0},V1User:{group:"",version:"v1",resource:"users",kind:"User",namespaced:!1},V1StorageClassList:{group:"storage.k8s.io",version:"v1",resource:"storageclasses",kind:"StorageClass",namespaced:!1},V1Beta1PodMetrics:{group:"metrics.k8s.io",version:"v1beta1",resource:"pods",kind:"PodMetrics",namespaced:!0}};function d(o,e,s){return{apiVersion:o.group?o.group+"/"+o.version:o.version,kind:o.kind,metadata:{name:e},...s}}var P=class{constructor(e,s=void 0){this.val=e;this.extra=s;this.ok=!1;this.err=!0}},S=class{constructor(e,s=void 0){this.val=e;this.extra=s;this.ok=!0;this.err=!1}};function ye(o){return"ok"in o&&typeof o.ok=="boolean"&&"err"in o&&typeof o.err=="boolean"}var x="",O="Network",X="Forbidden",Y="BadRequest",D="NotFound",T="Unauthorized",Z="AlreadyExists",ee="InternalServerError",se="NotImplemented",re="BadGateway",w="ServiceUnavailable",te="GatewayTimeout",R=o=>{switch(o){case 400:return Y;case 401:return T;case 403:return X;case 404:return D;case 409:return Z;case 500:return ee;case 501:return se;case 502:return re;case 503:return w;case 504:return te}return x},a=class{static Ok(){return new S(void 0)}static Value(e){return new S(e)}static Failed(e,s="",r=x,t=void 0){return new P(new E(e,r,s),t)}static Error(e){return new P(e)}static WithExtra(e,s=void 0){return e.extra=s,e}},E=class{constructor(e,s=x,r=""){this.message=e;this.type=s;this.reason=r}};var A={secure:!0,expires:365*10,sameSite:"strict"},V=b.loftAccessKeyIdentifier,v=b.loftImpersonateSubjectIdentifier,I=b.loftImpersonateJoinedGroupIdentifier,Pe=["v4.channel.k8s.io","v3.channel.k8s.io","v2.channel.k8s.io","channel.k8s.io"];function ie(){return typeof window<"u"&&window.location.href.startsWith("http://localhost:3000")?"https://localhost:9898":""}function Se(){return typeof window>"u"||window.location.host==="localhost:3000"?"wss://localhost:8080":`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}`}function ne(o){return[o.virtualCluster?"loft:vcluster:main":`loft:space:${o.project}:${o.space}`]}var H="/kubernetes/management",j="/kubernetes/cluster/",$="/kubernetes/virtualcluster/",J="/kubernetes/project/",Te=(o,e)=>o?e?`${e}${o}`:`p-${o}`:"p-";function we(o,e){if(o)return e?e.endsWith("-")?o.replace(new RegExp(`^${e}`),""):o.replace(new RegExp(`^${e}-`),""):o.replace(/^p-/,"")}var C=class{constructor(e,s,r){this.apiHost="";this.wsHost="";this.accessKey="";this.managementNonResource=()=>new l(this,{basePath:H,headers:this.impersonationHeaders()});this.cluster=(e,s)=>new l(this,{basePath:j+e,groupVersionResource:s,headers:this.impersonationHeaders()});this.clusterNonResource=e=>new l(this,{basePath:j+e,headers:this.impersonationHeaders()});this.project=(e,s)=>new l(this,{basePath:J+e.project+"/"+(e.space?"space/"+e.space:"virtualcluster/"+e.virtualCluster),groupVersionResource:s,project:e,headers:this.impersonationHeaders(ne(e))});this.projectNonResource=e=>new l(this,{basePath:J+e.project+"/"+(e.space?"space/"+e.space:"virtualcluster/"+e.virtualCluster),project:e,headers:this.impersonationHeaders(ne(e))});this.apiHost=s||ie(),this.wsHost=r||Se(),this.accessKey=e||C.getAccessKey()}static getAccessKey(){return localStorage.getItem(V)}static tryCastToStatus(e){if(e.kind){if(e.kind!=="Status"||e.apiVersion!=="v1")return a.Value(null)}else return a.Value(null);return a.Value(e)}async getUser(){let e=await this.management(c.ManagementV1Self).Create(d(c.ManagementV1Self));return e.err?e:e.val.status?.user?(typeof window<"u"&&(window.loft||(window.loft={}),window.loft.instanceID=e.val.status.instanceID,window.loft.chatAuthToken=e.val.status.chatAuthToken,window.loft.user=e.val.status.user),a.Value(e.val.status.user.name)):a.Failed("no user found")}getAccessKey(){return this.accessKey}async loftVersion(e){try{let s=this.apiHost+"/version";e&&(s+="?refresh=true");let t=await(await fetch(s)).json();return a.Value(t)}catch(s){return console.error(s),a.Failed("error during version retrieval")}}impersonatedUser(){try{let e=localStorage.getItem(v);if(e)return JSON.parse(e)}catch(e){console.error(e)}}impersonate(e,s,r){s?(localStorage.setItem(v,JSON.stringify({name:e,subject:s,groups:r})),s&&m.default.set(v,s,A),r?.forEach(t=>{let n=m.default.get(I);n?(n+=", "+t,m.default.set(I,n,A)):m.default.set(I,t,A)})):(localStorage.removeItem(v),m.default.remove(v),m.default.remove(I))}async login(e,s){let r=await this.request("/auth/password/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e,password:s})});if(r.err)return r;let t=r.val;return this.setAccessKey(t.accessKey),a.Ok()}async loginWithAccessKey(e){this.isLoggedIn()&&await this.logout(),this.accessKey=e;let s=await this.management(c.ManagementV1Self).Create(d(c.ManagementV1Self));return s.err?(this.clearStorage(),s):(this.setAccessKey(e),a.Ok())}isLoggedIn(){return!!this.accessKey}setAccessKey(e){this.accessKey=e,localStorage.setItem(V,e),m.default.set(V,e,A)}async stream(e,s){try{let r=await fetch(this.apiHost+e,s);return r.status>=400||!r.body?await this.parseResponse(e,r):a.Value(r.body.getReader())}catch(r){return a.Failed(r+"","NetworkError",O)}}async request(e,s){try{let r=await fetch(this.apiHost+e,{...s,credentials:"same-origin"});if(!r.ok){let n=await r.clone().text();if(r.status===401)try{let i=JSON.parse(n);if(i?.message===b.platformAccessKeyNotFound)return window.location.href=`/login?error=${i?.message}&errorType=${i?.reason}`,a.Failed(i.message||"Unauthorized",i.reason,T)}catch{}}return await this.parseResponse(e,r)}catch(r){let t=r;return t.message===b.platformAccessKeyNotFound&&(window.location.href=`/login?error=${t.message}&errorType=${t.reason}`),a.Failed(r+"","NetworkError",O)}}async socket(e,s){return this.refreshCookie(),new Promise((r,t)=>{let n=new WebSocket(`${this.wsHost}${e}`,s),i=!1;n.onopen=()=>{i=!0,r(n)},n.onerror=u=>{if(!i){let p=m.default.get(V)!="";t(p?u:new Error("Web socket is not authenticated. Please log in again"))}}})}async parseResponse(e,s){let r=await s.text(),t;try{t=JSON.parse(r)}catch{if(s.status===404)return a.Failed("page not found","NotFound",D);if(s.status===503){if(e.includes("kiosk.sh")||e.includes("cluster.loft.sh")){let u=e.split("/");return u.length>=4&&u[0]===""&&u[1]==="kubernetes"&&u[2]==="cluster"?a.Failed(`Agent seems to be currently unavailable, it is maybe just starting up. Click here for more information`,"LoftAgentUnavailable",w):a.Failed("Agent seems to be currently unavailable, it is maybe just starting up","LoftAgentUnavailable",w)}}else if(s.status===200)return a.Value(r);return console.info("Unexpected Server Response",r),a.Failed("Unexpected server response",R(s.status),R(s.status))}let n=C.tryCastToStatus(t);return n.err?n:n.val!==null&&n.val.status==="Failure"?n.val.code===500&&(n.val.message?.indexOf("vcluster secret not found")!==-1||n.val.message.indexOf("no ready pod for virtual cluster")!==-1)?a.Failed("vcluster seems to be not ready. Please refresh in a second",n.val.reason,R(n.val.code)):a.Failed(n.val.message,n.val.reason,R(n.val.code)):s.status>=400?a.Failed("unknown error","Unknown",R(s.status)):a.Value(t)}management(e){return new l(this,{basePath:H,groupVersionResource:e,headers:this.impersonationHeaders()})}vCluster(e,s){return new l(this,{basePath:$+e.cluster+"/"+e.namespace+"/"+e.name,groupVersionResource:s,vCluster:e,headers:this.impersonationHeaders()})}vClusterNonResource(e){return new l(this,{basePath:$+e.cluster+"/"+e.namespace+"/"+e.name,vCluster:e,headers:this.impersonationHeaders()})}auto(e,s,r,t){return r?this.project(r,t):s?this.vCluster(s,t):e?this.cluster(e,t):this.management(t)}autoNonResource(e,s,r){return r?this.projectNonResource(r):s?this.vClusterNonResource(s):e?this.clusterNonResource(e):this.managementNonResource()}async doRawSocket(e,s){try{return a.Value(await this.socket(e,s))}catch(r){return console.error(r),a.Failed(r.message||JSON.stringify(r))}}async doRawStream(e,s,r){return this.doRawInternal(e,s,r,!0)}async doRaw(e,s,r){return this.doRawInternal(e,s,r)}async doRawInternal(e,s,r,t){let n=this.accessKey,i=n?new Headers({...r,Authorization:"bearer "+n,"X-Sleep-Mode-Ignore":"true","X-Platform-Client":"true"}):new Headers({...r,"X-Sleep-Mode-Ignore":"true","X-Platform-Client":"true"}),u=t?await this.stream(e,{...s,headers:i}):await this.request(e,{...s,headers:i});return u.err&&u.val.type===T&&(u.val.message==="Access key not found. Please login again"||u.val.message==="invalid bearer token")&&(this.clearStorage(),typeof window<"u"&&(window.location.href="/"),await new Promise(()=>{})),u}impersonationHeaders(e){let s=this.impersonatedUser(),r={};return s&&(s.subject&&(r["Impersonate-User"]=s.subject),[...h(s.groups),...h(e)].forEach(t=>{r["Impersonate-Joined-Group"]?r["Impersonate-Joined-Group"]+=", "+t:r["Impersonate-Joined-Group"]=t})),r}clearStorage(){this.accessKey=null,localStorage.removeItem(V),localStorage.removeItem(v),m.default.remove(V,{secure:!0}),m.default.remove(v,{secure:!0}),m.default.remove(I,{secure:!0})}refreshCookie(){let e=this.accessKey||localStorage.getItem(V),s=m.default.get(V);e&&e!=s&&m.default.set(V,e,A)}async logout(){let e=await this.management(c.ManagementV1Self).Create(d(c.ManagementV1Self));if(e.err)return this.clearStorage(),e;if(!e.val.status?.accessKey)return this.clearStorage(),a.Ok();let s=await this.management(c.ManagementV1OwnedAccessKey).Delete(e.val.status.accessKey);return s.err?(this.clearStorage(),s):(this.clearStorage(),a.Ok())}},l=class{constructor(e,s){this.client=e,this.options=s}Name(e){return new l(this.client,{...this.options,name:e})}Namespace(e){return e?new l(this.client,{...this.options,namespace:e}):new l(this.client,{...this.options})}Resource(e){return new l(this.client,{...this.options,groupVersionResource:e})}buildPath(e){if(this.options.groupVersionResource)if(this.options.basePath){if(!this.options.name&&this.options.groupVersionResource.subResource)return a.Failed("resource name required when subresource is used")}else return a.Failed("basePath is missing");else return a.Failed("groupVersionResource is missing");let s=[this.options.basePath];this.options.groupVersionResource.group?s.push("apis",this.options.groupVersionResource.group):s.push("api"),s.push(this.options.groupVersionResource.version),this.options.namespace&&s.push("namespaces",this.options.namespace),s.push(this.options.groupVersionResource.resource),this.options.name&&s.push(this.options.name),this.options.groupVersionResource.subResource&&s.push(this.options.groupVersionResource.subResource);let r="";if(e){let t=[];for(let n of Object.keys(e))e[n]&&(Array.isArray(e[n])?e[n].forEach(i=>{t.push(n+"="+encodeURIComponent(i))}):t.push(n+"="+encodeURIComponent(e[n])));t.length>0&&(r="?"+t.join("&"))}else r="?timeout=180s";return a.Value(s.join("/")+r)}parseResourceList(e,s,r,t,n,i){for(let u=0;u1||n&&t.find(M=>M.group===e&&M.resource===f)||t.push({resource:f,subResource:g.length>1?g[1]:void 0,group:e,version:s,kind:p.kind,namespaced:p.namespaced,verbs:p.verbs})}}async ApiResources(e,s){let r=[],t=await this.client.doRaw([this.options.basePath,"api"].join("/"));if(t.err)return t;let n=[];for(let u=0;u{let g=t.val.versions[p];if(g===void 0)return;let f=await this.client.doRaw([this.options.basePath,"api",g].join("/"));if(f.err){console.error(f.val.message);return}this.parseResourceList("",g,f.val,r,e,s)})(u)),n.length>20&&(await Promise.all(n),n=[]);n.length>0&&(await Promise.all(n),n=[]);let i=await this.client.doRaw([this.options.basePath,"apis"].join("/"));if(i.err)return i;for(let u=0;u{let L=M.versions[f];if(L===void 0)return;let K=await this.client.doRaw([this.options.basePath,"apis",M.name,L.version].join("/"));if(K.err){console.error(K.val.message);return}this.parseResourceList(M.name,L.version,K.val,r,e,s)})(g,p)),n.length>20&&(await Promise.all(n),n=[])}return n.length>0&&await Promise.all(n),a.Value(r)}async Version(){let e=[this.options.basePath,"version"];return await this.client.doRaw(e.join("/"))}async VirtualClusterInstanceLogs(e,s,r){let t=[this.options.basePath,`apis/management.loft.sh/v1/namespaces/${e}/virtualclusterinstances/${s}/log`].join("/"),n=[];if(r)for(let i of Object.keys(r))n.push(`${i}=${encodeURIComponent(r[i])}`);return n.length>0&&(t+="?"+n.join("&")),await this.client.doRawStream(t,void 0,this.options.headers)}async TaskLogs(e,s){let r=[this.options.basePath,`apis/management.loft.sh/v1/tasks/${e}/log`].join("/"),t=[];if(s)for(let n of Object.keys(s))t.push(`${n}=${encodeURIComponent(s[n])}`);return t.length>0&&(r+="?"+t.join("&")),await this.client.doRawStream(r,void 0,this.options.headers)}async Logs(e,s,r){let t=[this.options.basePath,`api/v1/namespaces/${e}/pods/${s}/log`].join("/"),n=oe(r);return n.length>0&&(t+="?"+n),await this.client.doRawStream(t,void 0,this.options.headers)}async Exec(e,s,r){let t=[this.options.basePath,`api/v1/namespaces/${e}/pods/${s}/exec`].join("/"),n=oe(r);return n.length>0&&(t+="?"+n),await this.client.doRawSocket(t,Pe)}async Path(e,s,r){let t=[this.options.basePath,e];return await this.client.doRaw(t.join("/"),s,{...r,...this.options.headers})}ResolvePath(e){return e&&(this.options.name=e),this.buildPath()}async Get(e,s){this.options.name=e;let r=this.buildPath(s);return r.err?r:a.WithExtra(await this.client.doRaw(r.val,void 0,this.options.headers),this.options)}async List(e){if(this.options.name)return a.Failed("name is set on a list request");let s=this.buildPath(e);return s.err?s:a.WithExtra(await this.client.doRaw(s.val,void 0,this.options.headers),this.options)}async ListTable(e){if(this.options.name)return a.Failed("name is set on a list request");let s=this.buildPath(e);return s.err?s:a.WithExtra(await this.client.doRaw(s.val,void 0,{...this.options.headers,Accept:"application/json;as=Table;v=v1;g=meta.k8s.io,application/json;as=Table;v=v1beta1;g=meta.k8s.io,application/json"}),this.options)}async Create(e,s){let r=this.buildPath(s);return r.err?r:a.WithExtra(await this.client.doRaw(r.val,{method:"POST",body:JSON.stringify(e)},{...this.options.headers,"Content-Type":"application/json"}),this.options)}async PatchObject(e,s,r,t){let n=ae.default.generate(e,s);return this.Patch(s.metadata?.name,n,r,t)}async Patch(e,s,r,t){this.options.name=e;let n=this.buildPath(t);return n.err?n:a.WithExtra(await this.client.doRaw(n.val,{method:"PATCH",body:JSON.stringify(s,function(i,u){return u===void 0?null:u})},{...this.options.headers,"Content-Type":r||"application/merge-patch+json"}),this.options)}async Update(e,s,r){this.options.name=e;let t=this.buildPath(r);return t.err?t:a.WithExtra(await this.client.doRaw(t.val,{method:"PUT",body:JSON.stringify(s)},{...this.options.headers,"Content-Type":"application/json"}),this.options)}async Delete(e,s){this.options.name=e;let r=this.buildPath(s);return r.err?r:a.WithExtra(await this.client.doRaw(r.val,{method:"DELETE"},this.options.headers),this.options)}async CanI(e){let s=this.options.groupVersionResource,r=this.options.basePath?.indexOf(j)===0?this.options.basePath.substring(j.length):void 0,t,n;this.options.project?(t=this.client.project(this.options.project,c.V1SelfSubjectAccessReview),n=d(c.V1SelfSubjectAccessReview)):this.options.vCluster?(t=this.client.vCluster(this.options.vCluster,c.V1SelfSubjectAccessReview),n=d(c.V1SelfSubjectAccessReview)):r?(t=this.client.cluster(r,c.V1SelfSubjectAccessReview),n=d(c.V1SelfSubjectAccessReview)):(t=this.client.management(c.ManagementV1SelfSubjectAccessReview),n=d(c.ManagementV1SelfSubjectAccessReview)),n.spec={resourceAttributes:{verb:e,name:this.options.name,namespace:this.options.namespace,group:s.group,version:s.version,resource:s.resource,subresource:s.subResource}};let i=await t.Create(n);return i.err?i:a.Value(!!(i.val.status?.allowed&&!i.val.status.denied))}};function oe(o){let e=new URLSearchParams;for(let[s,r]of Object.entries(o))Array.isArray(r)?r.forEach(t=>{e.append(s,t)}):e.append(s,r);return e.toString()}var ue=C;0&&(module.exports={APIExtensionsGroup,APIExtensionsGroupVersion,APIExtensionsVersion,Client,ClusterBasePath,Err,ErrorTypeAlreadyExists,ErrorTypeBadGateway,ErrorTypeBadRequest,ErrorTypeForbidden,ErrorTypeGatewayTimeout,ErrorTypeInternalError,ErrorTypeNetwork,ErrorTypeNotFound,ErrorTypeNotImplemented,ErrorTypeServiceUnavailable,ErrorTypeUnauthorized,ErrorTypeUnknown,Failed,List,LoftSchemeGroup,LoftSchemeGroupCluster,LoftSchemeGroupStorage,LoftSchemeGroupVersion,LoftSchemeGroupVersionCluster,LoftSchemeGroupVersionStorage,LoftSchemeGroupVersionVirtualCluster,LoftSchemeGroupVirtualCluster,LoftSchemeVersion,LoftSchemeVersionCluster,LoftSchemeVersionStorage,LoftSchemeVersionVirtualCluster,ManagementBasePath,MapErrorCode,NewResource,Ok,ProjectBasePath,Resources,Return,VClusterBasePath,getApiHost,getProjectFromNamespace,getProjectNamespace,isResult}); diff --git a/package.json b/package.json index 68c2b6b..77758ab 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "description": "loft-enterprise js client", "dependencies": { - "@kubernetes/client-node": "0.20.0", + "@kubernetes/client-node": "0.22.1", "js-cookie": "3.0.1", "json-merge-patch": "1.0.2" }, diff --git a/src/client.ts b/src/client.ts index e186482..5c2871c 100644 --- a/src/client.ts +++ b/src/client.ts @@ -115,23 +115,8 @@ export const ClusterBasePath = "/kubernetes/cluster/" export const VClusterBasePath = "/kubernetes/virtualcluster/" export const ProjectBasePath = "/kubernetes/project/" -export function getProjectNamespace(name: string | undefined, prefix?: string | undefined): string { - if (!name) { - return "p-" - } - - const prefixHasDash = prefix && prefix.endsWith("-") - - if (prefixHasDash) { - return `${prefix}${name}` - } else if (prefix === "") { - return `${name}` - } else if (prefix) { - return `${prefix}-${name}` - } else { - return `p-${name}` - } -} +export const getProjectNamespace = (name?: string, prefix?: string): string => + !name ? "p-" : prefix ? `${prefix}${name}` : `p-${name}` export function getProjectFromNamespace( namespace: string | undefined,