mirror of
https://github.com/rancher/k3k.git
synced 2026-05-19 07:46:40 +00:00
* Add hostUsers to cluster spec Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * wsl Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * Fix the do comment for hostusers Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> * Fix the do comment for hostusers Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com> --------- Signed-off-by: galal-hussein <hussein.galal.ahmed.11@gmail.com>
619 lines
30 KiB
Markdown
619 lines
30 KiB
Markdown
# API Reference
|
|
|
|
## Packages
|
|
- [k3k.io/v1beta1](#k3kiov1beta1)
|
|
|
|
|
|
## k3k.io/v1beta1
|
|
|
|
|
|
### Resource Types
|
|
- [Cluster](#cluster)
|
|
- [ClusterList](#clusterlist)
|
|
- [VirtualClusterPolicy](#virtualclusterpolicy)
|
|
- [VirtualClusterPolicyList](#virtualclusterpolicylist)
|
|
|
|
|
|
|
|
#### Addon
|
|
|
|
|
|
|
|
Addon specifies a Secret containing YAML to be deployed on cluster startup.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ClusterSpec](#clusterspec)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `secretNamespace` _string_ | SecretNamespace is the namespace of the Secret. | | |
|
|
| `secretRef` _string_ | SecretRef is the name of the Secret. | | |
|
|
|
|
|
|
#### AppliedPolicy
|
|
|
|
|
|
|
|
AppliedPolicy defines the observed state of an applied policy.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ClusterStatus](#clusterstatus)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `name` _string_ | name is the name of the VirtualClusterPolicy currently applied to this cluster. | | MinLength: 1 <br /> |
|
|
| `priorityClass` _string_ | priorityClass is the priority class enforced by the active VirtualClusterPolicy. | | |
|
|
| `nodeSelector` _object (keys:string, values:string)_ | nodeSelector is a node selector enforced by the active VirtualClusterPolicy. | | |
|
|
| `serverAffinity` _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#affinity-v1-core)_ | serverAffinity is the affinity rules for server pods enforced by the active VirtualClusterPolicy.<br />This includes both node affinity and pod affinity/anti-affinity rules. | | |
|
|
| `agentAffinity` _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#affinity-v1-core)_ | agentAffinity is the affinity rules for agent pods enforced by the active VirtualClusterPolicy.<br />This includes both node affinity and pod affinity/anti-affinity rules. | | |
|
|
| `sync` _[SyncConfig](#syncconfig)_ | sync is the SyncConfig enforced by the active VirtualClusterPolicy. | | |
|
|
| `runtimeClassName` _string_ | SecurityContext specifies custom SecurityContext to be added<br />to the agent and server pods of the cluster in virtual or shared mode. | | |
|
|
| `securityContext` _[SecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#securitycontext-v1-core)_ | RuntimeClassName specifies alternative runtime class for the<br />agent and server pods of the cluster in virtual or shared mode. | | |
|
|
| `hostUsers` _boolean_ | HostUsers sets the user namespace for server and agent pods.<br />If set to true or not present, the pod will be run in the host user namespace.<br />When set to false, a new userns is created for the pod.<br />This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature. | | |
|
|
|
|
|
|
#### Cluster
|
|
|
|
|
|
|
|
Cluster defines a virtual Kubernetes cluster managed by k3k.
|
|
It specifies the desired state of a virtual cluster, including version, node configuration, and networking.
|
|
k3k uses this to provision and manage these virtual clusters.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ClusterList](#clusterlist)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `apiVersion` _string_ | `k3k.io/v1beta1` | | |
|
|
| `kind` _string_ | `Cluster` | | |
|
|
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
|
|
| `spec` _[ClusterSpec](#clusterspec)_ | Spec defines the desired state of the Cluster. | \{ \} | |
|
|
| `status` _[ClusterStatus](#clusterstatus)_ | Status reflects the observed state of the Cluster. | \{ \} | |
|
|
|
|
|
|
#### ClusterList
|
|
|
|
|
|
|
|
ClusterList is a list of Cluster resources.
|
|
|
|
|
|
|
|
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `apiVersion` _string_ | `k3k.io/v1beta1` | | |
|
|
| `kind` _string_ | `ClusterList` | | |
|
|
| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
|
|
| `items` _[Cluster](#cluster) array_ | | | |
|
|
|
|
|
|
#### ClusterMode
|
|
|
|
_Underlying type:_ _string_
|
|
|
|
ClusterMode is the possible provisioning mode of a Cluster.
|
|
|
|
_Validation:_
|
|
- Enum: [shared virtual]
|
|
|
|
_Appears in:_
|
|
- [ClusterSpec](#clusterspec)
|
|
- [VirtualClusterPolicySpec](#virtualclusterpolicyspec)
|
|
|
|
|
|
|
|
#### ClusterPhase
|
|
|
|
_Underlying type:_ _string_
|
|
|
|
ClusterPhase is a high-level summary of the cluster's current lifecycle state.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ClusterStatus](#clusterstatus)
|
|
|
|
|
|
|
|
#### ClusterSpec
|
|
|
|
|
|
|
|
ClusterSpec defines the desired state of a virtual Kubernetes cluster.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [Cluster](#cluster)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `version` _string_ | Version is the K3s version to use for the virtual nodes.<br />It should follow the K3s versioning convention (e.g., v1.28.2-k3s1).<br />If not specified, the Kubernetes version of the host node will be used. | | |
|
|
| `mode` _[ClusterMode](#clustermode)_ | Mode specifies the cluster provisioning mode: "shared" or "virtual".<br />Defaults to "shared". This field is immutable. | shared | Enum: [shared virtual] <br /> |
|
|
| `servers` _integer_ | Servers specifies the number of K3s pods to run in server (control plane) mode.<br />Must be at least 1. Defaults to 1. | 1 | |
|
|
| `agents` _integer_ | Agents specifies the number of K3s pods to run in agent (worker) mode.<br />Must be 0 or greater. Defaults to 0.<br />This field is ignored in "shared" mode. | 0 | |
|
|
| `clusterCIDR` _string_ | ClusterCIDR is the CIDR range for pod IPs.<br />Defaults to 10.42.0.0/16 in shared mode and 10.52.0.0/16 in virtual mode.<br />This field is immutable. | | |
|
|
| `serviceCIDR` _string_ | ServiceCIDR is the CIDR range for service IPs.<br />Defaults to 10.43.0.0/16 in shared mode and 10.53.0.0/16 in virtual mode.<br />This field is immutable. | | |
|
|
| `clusterDNS` _string_ | ClusterDNS is the IP address for the CoreDNS service.<br />Must be within the ServiceCIDR range. Defaults to 10.43.0.10.<br />This field is immutable. | | |
|
|
| `persistence` _[PersistenceConfig](#persistenceconfig)_ | Persistence specifies options for persisting etcd data.<br />Defaults to dynamic persistence, which uses a PersistentVolumeClaim to provide data persistence.<br />A default StorageClass is required for dynamic persistence. | | |
|
|
| `expose` _[ExposeConfig](#exposeconfig)_ | Expose specifies options for exposing the API server.<br />By default, it's only exposed as a ClusterIP. | | |
|
|
| `nodeSelector` _object (keys:string, values:string)_ | NodeSelector specifies node labels to constrain where server/agent pods are scheduled.<br />In "shared" mode, this also applies to workloads. | | |
|
|
| `priorityClass` _string_ | PriorityClass specifies the priorityClassName for server/agent pods.<br />In "shared" mode, this also applies to workloads. | | |
|
|
| `tokenSecretRef` _[SecretReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#secretreference-v1-core)_ | TokenSecretRef is a Secret reference containing the token used by worker nodes to join the cluster.<br />The Secret must have a "token" field in its data. | | |
|
|
| `tlsSANs` _string array_ | TLSSANs specifies subject alternative names for the K3s server certificate. | | |
|
|
| `serverArgs` _string array_ | ServerArgs specifies ordered key-value pairs for K3s server pods.<br />Example: ["--tls-san=example.com"] | | |
|
|
| `agentArgs` _string array_ | AgentArgs specifies ordered key-value pairs for K3s agent pods.<br />Example: ["--node-name=my-agent-node"] | | |
|
|
| `serverEnvs` _[EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#envvar-v1-core) array_ | ServerEnvs specifies list of environment variables to set in the server pod. | | |
|
|
| `agentEnvs` _[EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#envvar-v1-core) array_ | AgentEnvs specifies list of environment variables to set in the agent pod. | | |
|
|
| `addons` _[Addon](#addon) array_ | Addons specifies secrets containing raw YAML to deploy on cluster startup. | | |
|
|
| `serverLimit` _[ResourceList](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#resourcelist-v1-core)_ | ServerLimit specifies resource limits for server nodes. | | |
|
|
| `workerLimit` _[ResourceList](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#resourcelist-v1-core)_ | WorkerLimit specifies resource limits for agent nodes. | | |
|
|
| `serverAffinity` _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#affinity-v1-core)_ | ServerAffinity specifies the affinity rules for server pods.<br />This includes both node affinity and pod affinity/anti-affinity rules. | | |
|
|
| `agentAffinity` _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#affinity-v1-core)_ | AgentAffinity specifies the affinity rules for agent pods.<br />This includes both node affinity and pod affinity/anti-affinity rules. | | |
|
|
| `mirrorHostNodes` _boolean_ | MirrorHostNodes controls whether node objects from the host cluster<br />are mirrored into the virtual cluster. | | |
|
|
| `customCAs` _[CustomCAs](#customcas)_ | CustomCAs specifies the cert/key pairs for custom CA certificates. | | |
|
|
| `sync` _[SyncConfig](#syncconfig)_ | Sync specifies the resources types that will be synced from virtual cluster to host cluster. | \{ \} | |
|
|
| `secretMounts` _[SecretMount](#secretmount) array_ | SecretMounts specifies a list of secrets to mount into server and agent pods.<br />Each entry defines a secret and its mount path within the pods. | | |
|
|
| `securityContext` _[SecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#securitycontext-v1-core)_ | SecurityContext specifies custom SecurityContext to be added<br />to the agent and server pods of the cluster in virtual or shared mode.<br />This option will override the SecurityContext set by default for virtual mode. | | |
|
|
| `runtimeClassName` _string_ | RuntimeClassName specifies alternative runtime class for the<br />agent and server pods of the cluster in virtual or shared mode. | | |
|
|
| `hostUsers` _boolean_ | HostUsers sets the user namespace for server and agent pods.<br />If set to true or not present, the pod will be run in the host user namespace.<br />When set to false, a new userns is created for the pod.<br />This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature. | | |
|
|
|
|
|
|
#### ClusterStatus
|
|
|
|
|
|
|
|
ClusterStatus reflects the observed state of a Cluster.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [Cluster](#cluster)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `hostVersion` _string_ | HostVersion is the Kubernetes version of the host node. | | |
|
|
| `clusterCIDR` _string_ | ClusterCIDR is the CIDR range for pod IPs. | | |
|
|
| `serviceCIDR` _string_ | ServiceCIDR is the CIDR range for service IPs. | | |
|
|
| `clusterDNS` _string_ | ClusterDNS is the IP address for the CoreDNS service. | | |
|
|
| `tlsSANs` _string array_ | TLSSANs specifies subject alternative names for the K3s server certificate. | | |
|
|
| `policyName` _string_ | PolicyName specifies the virtual cluster policy name bound to the virtual cluster. | | |
|
|
| `policy` _[AppliedPolicy](#appliedpolicy)_ | policy represents the status of the policy applied to this cluster.<br />This field is set by the VirtualClusterPolicy controller. | | |
|
|
| `kubeletPort` _integer_ | KubeletPort specefies the port used by k3k-kubelet in shared mode. | | |
|
|
| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#condition-v1-meta) array_ | Conditions are the individual conditions for the cluster set. | | |
|
|
| `phase` _[ClusterPhase](#clusterphase)_ | Phase is a high-level summary of the cluster's current lifecycle state. | Unknown | Enum: [Pending Provisioning Ready Failed Terminating Unknown] <br /> |
|
|
|
|
|
|
#### ConfigMapSyncConfig
|
|
|
|
|
|
|
|
ConfigMapSyncConfig specifies the sync options for ConfigMaps.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [SyncConfig](#syncconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `enabled` _boolean_ | Enabled is an on/off switch for syncing resources. | true | |
|
|
| `selector` _object (keys:string, values:string)_ | Selector specifies set of labels of the resources that will be synced, if empty<br />then all resources of the given type will be synced. | | |
|
|
|
|
|
|
#### CredentialSource
|
|
|
|
|
|
|
|
CredentialSource defines where to get a credential from.
|
|
It can represent either a TLS key pair or a single private key.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [CredentialSources](#credentialsources)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `secretName` _string_ | The secret must contain specific keys based on the credential type:<br />- For TLS certificate pairs (e.g., ServerCA): `tls.crt` and `tls.key`.<br />- For the ServiceAccountToken signing key: `tls.key`. | | |
|
|
|
|
|
|
#### CredentialSources
|
|
|
|
|
|
|
|
CredentialSources lists all the required credentials, including both
|
|
TLS key pairs and single signing keys.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [CustomCAs](#customcas)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `serverCA` _[CredentialSource](#credentialsource)_ | ServerCA specifies the server-ca cert/key pair. | | |
|
|
| `clientCA` _[CredentialSource](#credentialsource)_ | ClientCA specifies the client-ca cert/key pair. | | |
|
|
| `requestHeaderCA` _[CredentialSource](#credentialsource)_ | RequestHeaderCA specifies the request-header-ca cert/key pair. | | |
|
|
| `etcdServerCA` _[CredentialSource](#credentialsource)_ | ETCDServerCA specifies the etcd-server-ca cert/key pair. | | |
|
|
| `etcdPeerCA` _[CredentialSource](#credentialsource)_ | ETCDPeerCA specifies the etcd-peer-ca cert/key pair. | | |
|
|
| `serviceAccountToken` _[CredentialSource](#credentialsource)_ | ServiceAccountToken specifies the service-account-token key. | | |
|
|
|
|
|
|
#### CustomCAs
|
|
|
|
|
|
|
|
CustomCAs specifies the cert/key pairs for custom CA certificates.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ClusterSpec](#clusterspec)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `enabled` _boolean_ | Enabled toggles this feature on or off. | true | |
|
|
| `sources` _[CredentialSources](#credentialsources)_ | Sources defines the sources for all required custom CA certificates. | | |
|
|
|
|
|
|
#### ExposeConfig
|
|
|
|
|
|
|
|
ExposeConfig specifies options for exposing the API server.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ClusterSpec](#clusterspec)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `ingress` _[IngressConfig](#ingressconfig)_ | Ingress specifies options for exposing the API server through an Ingress. | | |
|
|
| `loadBalancer` _[LoadBalancerConfig](#loadbalancerconfig)_ | LoadBalancer specifies options for exposing the API server through a LoadBalancer service. | | |
|
|
| `nodePort` _[NodePortConfig](#nodeportconfig)_ | NodePort specifies options for exposing the API server through NodePort. | | |
|
|
|
|
|
|
#### IngressConfig
|
|
|
|
|
|
|
|
IngressConfig specifies options for exposing the API server through an Ingress.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ExposeConfig](#exposeconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `annotations` _object (keys:string, values:string)_ | Annotations specifies annotations to add to the Ingress. | | |
|
|
| `ingressClassName` _string_ | IngressClassName specifies the IngressClass to use for the Ingress. | | |
|
|
|
|
|
|
#### IngressSyncConfig
|
|
|
|
|
|
|
|
IngressSyncConfig specifies the sync options for Ingresses.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [SyncConfig](#syncconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `enabled` _boolean_ | Enabled is an on/off switch for syncing resources. | false | |
|
|
| `selector` _object (keys:string, values:string)_ | Selector specifies set of labels of the resources that will be synced, if empty<br />then all resources of the given type will be synced. | | |
|
|
| `disableTLSSecretTranslation` _boolean_ | DisableTLSSecretTranslation is an on/off switch for translating TLS secrets<br />from virtual cluster to host cluster | false | |
|
|
|
|
|
|
#### LoadBalancerConfig
|
|
|
|
|
|
|
|
LoadBalancerConfig specifies options for exposing the API server through a LoadBalancer service.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ExposeConfig](#exposeconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `serverPort` _integer_ | ServerPort is the port on which the K3s server is exposed when type is LoadBalancer.<br />If not specified, the default https 443 port will be allocated.<br />If 0 or negative, the port will not be exposed. | | |
|
|
| `etcdPort` _integer_ | ETCDPort is the port on which the ETCD service is exposed when type is LoadBalancer.<br />If not specified, the default etcd 2379 port will be allocated.<br />If 0 or negative, the port will not be exposed. | | |
|
|
|
|
|
|
#### NodePortConfig
|
|
|
|
|
|
|
|
NodePortConfig specifies options for exposing the API server through NodePort.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ExposeConfig](#exposeconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `serverPort` _integer_ | ServerPort is the port on each node on which the K3s server is exposed when type is NodePort.<br />If not specified, a random port between 30000-32767 will be allocated.<br />If out of range, the port will not be exposed. | | |
|
|
| `etcdPort` _integer_ | ETCDPort is the port on each node on which the ETCD service is exposed when type is NodePort.<br />If not specified, a random port between 30000-32767 will be allocated.<br />If out of range, the port will not be exposed. | | |
|
|
|
|
|
|
#### PersistenceConfig
|
|
|
|
|
|
|
|
PersistenceConfig specifies options for persisting etcd data.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ClusterSpec](#clusterspec)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `type` _[PersistenceMode](#persistencemode)_ | Type specifies the persistence mode. | dynamic | |
|
|
| `storageClassName` _string_ | StorageClassName is the name of the StorageClass to use for the PVC.<br />This field is only relevant in "dynamic" mode. | | |
|
|
| `storageRequestSize` _[Quantity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#quantity-resource-api)_ | StorageRequestSize is the requested size for the PVC.<br />This field is only relevant in "dynamic" mode. | 2G | |
|
|
|
|
|
|
#### PersistenceMode
|
|
|
|
_Underlying type:_ _string_
|
|
|
|
PersistenceMode is the storage mode of a Cluster.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [PersistenceConfig](#persistenceconfig)
|
|
|
|
|
|
|
|
#### PersistentVolumeClaimSyncConfig
|
|
|
|
|
|
|
|
PersistentVolumeClaimSyncConfig specifies the sync options for PersistentVolumeClaims.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [SyncConfig](#syncconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `enabled` _boolean_ | Enabled is an on/off switch for syncing resources. | true | |
|
|
| `selector` _object (keys:string, values:string)_ | Selector specifies set of labels of the resources that will be synced, if empty<br />then all resources of the given type will be synced. | | |
|
|
|
|
|
|
#### PodSecurityAdmissionLevel
|
|
|
|
_Underlying type:_ _string_
|
|
|
|
PodSecurityAdmissionLevel is the policy level applied to the pods in the namespace.
|
|
|
|
_Validation:_
|
|
- Enum: [privileged baseline restricted]
|
|
|
|
_Appears in:_
|
|
- [VirtualClusterPolicySpec](#virtualclusterpolicyspec)
|
|
|
|
|
|
|
|
#### PriorityClassSyncConfig
|
|
|
|
|
|
|
|
PriorityClassSyncConfig specifies the sync options for PriorityClasses.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [SyncConfig](#syncconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `enabled` _boolean_ | Enabled is an on/off switch for syncing resources. | false | |
|
|
| `selector` _object (keys:string, values:string)_ | Selector specifies set of labels of the resources that will be synced, if empty<br />then all resources of the given type will be synced. | | |
|
|
|
|
|
|
#### SecretMount
|
|
|
|
|
|
|
|
SecretMount defines a secret to be mounted into server or agent pods,
|
|
allowing for custom configurations, certificates, or other sensitive data.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [ClusterSpec](#clusterspec)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `secretName` _string_ | secretName is the name of the secret in the pod's namespace to use.<br />More info: https://kubernetes.io/docs/concepts/storage/volumes#secret | | |
|
|
| `items` _[KeyToPath](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#keytopath-v1-core) array_ | items If unspecified, each key-value pair in the Data field of the referenced<br />Secret will be projected into the volume as a file whose name is the<br />key and content is the value. If specified, the listed keys will be<br />projected into the specified paths, and unlisted keys will not be<br />present. If a key is specified which is not present in the Secret,<br />the volume setup will error unless it is marked optional. Paths must be<br />relative and may not contain the '..' path or start with '..'. | | |
|
|
| `defaultMode` _integer_ | defaultMode is Optional: mode bits used to set permissions on created files by default.<br />Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.<br />YAML accepts both octal and decimal values, JSON requires decimal values<br />for mode bits. Defaults to 0644.<br />Directories within the path are not affected by this setting.<br />This might be in conflict with other options that affect the file<br />mode, like fsGroup, and the result can be other mode bits set. | | |
|
|
| `optional` _boolean_ | optional field specify whether the Secret or its keys must be defined | | |
|
|
| `mountPath` _string_ | MountPath is the path within server and agent pods where the<br />secret contents will be mounted. | | |
|
|
| `subPath` _string_ | SubPath is an optional path within the secret to mount instead of the root.<br />When specified, only the specified key from the secret will be mounted as a file<br />at MountPath, keeping the parent directory writable. | | |
|
|
| `role` _string_ | Role is the type of the k3k pod that will be used to mount the secret.<br />This can be 'server', 'agent', or 'all' (for both). | | Enum: [server agent all] <br /> |
|
|
|
|
|
|
#### SecretSyncConfig
|
|
|
|
|
|
|
|
SecretSyncConfig specifies the sync options for Secrets.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [SyncConfig](#syncconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `enabled` _boolean_ | Enabled is an on/off switch for syncing resources. | true | |
|
|
| `selector` _object (keys:string, values:string)_ | Selector specifies set of labels of the resources that will be synced, if empty<br />then all resources of the given type will be synced. | | |
|
|
|
|
|
|
#### ServiceSyncConfig
|
|
|
|
|
|
|
|
ServiceSyncConfig specifies the sync options for Services.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [SyncConfig](#syncconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `enabled` _boolean_ | Enabled is an on/off switch for syncing resources. | true | |
|
|
| `selector` _object (keys:string, values:string)_ | Selector specifies set of labels of the resources that will be synced, if empty<br />then all resources of the given type will be synced. | | |
|
|
|
|
|
|
#### StorageClassSyncConfig
|
|
|
|
|
|
|
|
StorageClassSyncConfig specifies the sync options for StorageClasses.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [SyncConfig](#syncconfig)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `enabled` _boolean_ | Enabled is an on/off switch for syncing resources. | false | |
|
|
| `selector` _object (keys:string, values:string)_ | Selector specifies set of labels of the resources that will be synced, if empty<br />then all resources of the given type will be synced. | | |
|
|
|
|
|
|
#### SyncConfig
|
|
|
|
|
|
|
|
SyncConfig will contain the resources that should be synced from virtual cluster to host cluster.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [AppliedPolicy](#appliedpolicy)
|
|
- [ClusterSpec](#clusterspec)
|
|
- [VirtualClusterPolicySpec](#virtualclusterpolicyspec)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `services` _[ServiceSyncConfig](#servicesyncconfig)_ | Services resources sync configuration. | \{ enabled:true \} | |
|
|
| `configMaps` _[ConfigMapSyncConfig](#configmapsyncconfig)_ | ConfigMaps resources sync configuration. | \{ enabled:true \} | |
|
|
| `secrets` _[SecretSyncConfig](#secretsyncconfig)_ | Secrets resources sync configuration. | \{ enabled:true \} | |
|
|
| `ingresses` _[IngressSyncConfig](#ingresssyncconfig)_ | Ingresses resources sync configuration. | \{ enabled:false \} | |
|
|
| `persistentVolumeClaims` _[PersistentVolumeClaimSyncConfig](#persistentvolumeclaimsyncconfig)_ | PersistentVolumeClaims resources sync configuration. | \{ enabled:true \} | |
|
|
| `priorityClasses` _[PriorityClassSyncConfig](#priorityclasssyncconfig)_ | PriorityClasses resources sync configuration. | \{ enabled:false \} | |
|
|
| `storageClasses` _[StorageClassSyncConfig](#storageclasssyncconfig)_ | StorageClasses resources sync configuration. | \{ enabled:false \} | |
|
|
|
|
|
|
#### VirtualClusterPolicy
|
|
|
|
|
|
|
|
VirtualClusterPolicy allows defining common configurations and constraints
|
|
for clusters within a clusterpolicy.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [VirtualClusterPolicyList](#virtualclusterpolicylist)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `apiVersion` _string_ | `k3k.io/v1beta1` | | |
|
|
| `kind` _string_ | `VirtualClusterPolicy` | | |
|
|
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
|
|
| `spec` _[VirtualClusterPolicySpec](#virtualclusterpolicyspec)_ | Spec defines the desired state of the VirtualClusterPolicy. | \{ \} | |
|
|
| `status` _[VirtualClusterPolicyStatus](#virtualclusterpolicystatus)_ | Status reflects the observed state of the VirtualClusterPolicy. | | |
|
|
|
|
|
|
#### VirtualClusterPolicyList
|
|
|
|
|
|
|
|
VirtualClusterPolicyList is a list of VirtualClusterPolicy resources.
|
|
|
|
|
|
|
|
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `apiVersion` _string_ | `k3k.io/v1beta1` | | |
|
|
| `kind` _string_ | `VirtualClusterPolicyList` | | |
|
|
| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
|
|
| `items` _[VirtualClusterPolicy](#virtualclusterpolicy) array_ | | | |
|
|
|
|
|
|
#### VirtualClusterPolicySpec
|
|
|
|
|
|
|
|
VirtualClusterPolicySpec defines the desired state of a VirtualClusterPolicy.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [VirtualClusterPolicy](#virtualclusterpolicy)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `quota` _[ResourceQuotaSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#resourcequotaspec-v1-core)_ | Quota specifies the resource limits for clusters within a clusterpolicy. | | |
|
|
| `limit` _[LimitRangeSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#limitrangespec-v1-core)_ | Limit specifies the LimitRange that will be applied to all pods within the VirtualClusterPolicy<br />to set defaults and constraints (min/max) | | |
|
|
| `defaultNodeSelector` _object (keys:string, values:string)_ | DefaultNodeSelector specifies the node selector that applies to all clusters (server + agent) in the target Namespace. | | |
|
|
| `defaultPriorityClass` _string_ | DefaultPriorityClass specifies the priorityClassName applied to all pods of all clusters in the target Namespace. | | |
|
|
| `defaultServerAffinity` _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#affinity-v1-core)_ | DefaultServerAffinity specifies the affinity rules applied to server pods of all clusters in the target Namespace.<br />This includes both node affinity and pod affinity/anti-affinity rules. | | |
|
|
| `defaultAgentAffinity` _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#affinity-v1-core)_ | DefaultAgentAffinity specifies the affinity rules applied to agent pods of all clusters in the target Namespace.<br />This includes both node affinity and pod affinity/anti-affinity rules. | | |
|
|
| `allowedMode` _[ClusterMode](#clustermode)_ | AllowedMode specifies the allowed cluster provisioning mode. Defaults to "shared". | shared | Enum: [shared virtual] <br /> |
|
|
| `disableNetworkPolicy` _boolean_ | DisableNetworkPolicy indicates whether to disable the creation of a default network policy for cluster isolation. | | |
|
|
| `podSecurityAdmissionLevel` _[PodSecurityAdmissionLevel](#podsecurityadmissionlevel)_ | PodSecurityAdmissionLevel specifies the pod security admission level applied to the pods in the namespace. | | Enum: [privileged baseline restricted] <br /> |
|
|
| `sync` _[SyncConfig](#syncconfig)_ | Sync specifies the resources types that will be synced from virtual cluster to host cluster. | \{ \} | |
|
|
| `runtimeClassName` _string_ | SecurityContext specifies custom SecurityContext to be added<br />to the agent and server pods of the cluster in virtual or shared mode. | | |
|
|
| `securityContext` _[SecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#securitycontext-v1-core)_ | RuntimeClassName specifies alternative runtime class for the<br />agent and server pods of the cluster in virtual or shared mode. | | |
|
|
| `hostUsers` _boolean_ | HostUsers sets the user namespace for server and agent pods.<br />If set to true or not present, the pod will be run in the host user namespace.<br />When set to false, a new userns is created for the pod.<br />This field is alpha-level and is only honored by servers that enable the UserNamespacesSupport feature. | | |
|
|
|
|
|
|
#### VirtualClusterPolicyStatus
|
|
|
|
|
|
|
|
VirtualClusterPolicyStatus reflects the observed state of a VirtualClusterPolicy.
|
|
|
|
|
|
|
|
_Appears in:_
|
|
- [VirtualClusterPolicy](#virtualclusterpolicy)
|
|
|
|
| Field | Description | Default | Validation |
|
|
| --- | --- | --- | --- |
|
|
| `observedGeneration` _integer_ | ObservedGeneration was the generation at the time the status was updated. | | |
|
|
| `lastUpdateTime` _string_ | LastUpdate is the timestamp when the status was last updated. | | |
|
|
| `summary` _string_ | Summary is a summary of the status. | | |
|
|
| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#condition-v1-meta) array_ | Conditions are the individual conditions for the cluster set. | | |
|
|
|
|
|