API Reference
API Reference
core.management.kubernetes.vmware.com/v1alpha1
Package v1alpha1 contains API definitions for the VKS cluster management Core APIs from core.v1alpha1 group-version. This includes APIs with Kind Cluster and ClusterResource.
AggregatedData
AggregatedData is the data aggregated from all the pods in a Kubernetes resource. This aggregates the CPU and Memory Requests and Limits across all pods in the given resource.
| Field | Description | Default | Validation |
|---|---|---|---|
|
totalPods is the total number of pods in the resource. |
Minimum: 0 |
|
|
cpuRequests is the total CPU requests across all the pods in the resource. |
||
|
memoryRequests is the total Memory requests across all the pods in the resource. |
||
|
cpuLimits is the total CPU limits across all the pods in the resource. |
||
|
memoryLimits is the total Memory limits across all the pods in the resource. |
Cluster
Cluster is the representation of a VKS cluster in VKS cluster management.
This is a read-only API that displays the VKS clusters available for VKS cluster management. It also contains cluster health and observability information retrieved from the VKS cluster.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
spec contains the desired state of the cluster. |
||
|
status contains the status of the cluster. |
ClusterHealth
ClusterHealth shows health information on the control-plane components in the cluster, including etcd, scheduler and controller-manager.
| Field | Description | Default | Validation |
|---|---|---|---|
|
message shows the overall health of the cluster. |
||
|
etcdHealth shows the health status of all the ETCD components on the cluster. |
||
|
schedulerHealth shows the health status of the Scheduler on the cluster. |
||
|
controllerManagerHealth shows the health status of the ControllerManager on the cluster. |
||
|
lastUpdatedTime is the time at which this cluster health was recorded. |
ClusterPhase
Underlying type: string
ClusterPhase shows the current phase of a cluster being managed by VKS cluster management.
ClusterResource
ClusterResource is a generic Kubernetes resource (object) in a cluster managed by VKS cluster management.
This is a read-only API that provides observability into various objects in the VKS cluster. It also provides an aggregation of the compute resources, for better observability, on the Kubernetes resources containing pods. Below are the list of resource Kinds that are returned in this API: - Namespace - Node - Pod - Deployment - Service - ReplicaSet - DaemonSet - StatefulSet - CronJob - Job - ConfigMap
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
spec contains the desired state of the cluster resource. |
||
|
status contains the status of the cluster resource. |
ClusterResourceSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
selector is used to show the parent resource hierarchy. |
||
|
gvk is the Group, Version and Kind used to identify the type of Kubernetes resource. |
||
|
clusterNamespace is the namespace in the cluster that this Kubernetes resource belongs to. |
||
|
object is the Kubernetes resource object of the given Group Version Kind. |
ClusterResourceState
Underlying type: string
ClusterResourceState shows the state of a Kubernetes resource (object) on the cluster.
ClusterResourceStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
state shows the state of a Kubernetes resource (object) on the cluster. |
||
|
message shows the details related to the given state. |
||
|
aggregatedData is the data aggregated from all the pods deployed in the given resource. |
ClusterSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
selector is used to show the parent resource hierarchy. |
ClusterState
Underlying type: string
ClusterState shows the state of the VKS cluster management agents deployed on a cluster.
ClusterStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
conditions shows the list of Conditions attached to the cluster. |
||
|
phase shows the phase of the cluster being managed by VKS cluster management. |
||
|
state shows the state of the VKS cluster management agents deployed on the cluster. |
||
|
allocatedMemory shows the memory allocation details in the cluster. |
||
|
allocatedCpu shows the CPU allocation details in the cluster. |
||
|
health shows health information on the control-plane components in the cluster. |
ComponentHealth
ComponentHealth shows details on the health status of a component.
| Field | Description | Default | Validation |
|---|---|---|---|
|
name shows the name of the component |
||
|
state shows the current state the component in the cluster. |
||
|
message shows the details related to the given state. |
ComponentState
Underlying type: string
ComponentState shows the state of a component on the cluster.
ResourceAllocation
ResourceAllocation is used to display the CPU and Memory metrics of a cluster.
| Field | Description | Default | Validation |
|---|---|---|---|
|
capacity is the total quantity of compute resources available including reserved resources. |
||
|
allocatable is the quantity of compute resources that can be allocated by the Kubelet |
||
|
requested is the requested quantity of compute resources. |
||
|
allocatedPercentage represents the percentage of the resource allocated from the |
dataprotection.management.kubernetes.vmware.com/v1alpha1
Package v1alpha1 contains API definitions for the VKS cluster management ClusterDataProtection APIs from policy.v1alpha1 group-version. This includes APIs with Kind ClusterDataProtection, ClusterBackupLocation, ClusterBackup, ClusterRestore, ClusterSchedule and ClusterBackupLocationCredential.
AwsS3Config
| Field | Description | Default | Validation |
|---|---|---|---|
|
s3ForcePathStyle is a flag for whether to force path style URLs for S3 objects. |
||
|
s3Url is the service endpoint for AWS S3 storage solution. |
MinLength: 1 |
|
|
publicUrl is the service endpoint used for generating download URLs. |
||
|
caCerts is a PEM-encoded certificate bundle to trust while connecting to AWS S3. |
BackupHooks
BackupHooks contains custom actions that should be executed at different phases of the backup.
| Field | Description | Default | Validation |
|---|---|---|---|
|
resources are hooks that should be executed when backing up individual instances of a resource. |
BackupResourceHook
BackupResourceHook defines a hook for a backup resource.
| Field | Description | Default | Validation |
|---|---|---|---|
|
exec defines an exec hook. |
BackupResourceHookSpec
BackupResourceHookSpec defines one or more BackupResourceHooks that should be executed based on the rules defined for namespaces and labels.
| Field | Description | Default | Validation |
|---|---|---|---|
|
name is the name of this hook. |
MinLength: 1 |
|
|
includedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies |
||
|
excludedNamespaces specifies the namespaces to which this hook spec does not apply. |
||
|
labelSelector if specified, filters the resources to which this hook spec applies. |
||
|
preHooks is a list of BackupResourceHooks to execute prior to storing the item in the backup. |
||
|
postHooks is a list of BackupResourceHooks to execute after storing the item in the backup. |
ClusterBackup
ClusterBackup is used to take a backup of the given state of a cluster.
The ClusterBackup API will invoke a Velero backup in the target cluster according to the spec. It can back up any of the following resources: - All resources in a cluster - Selected namespaces in a VKS cluster - Specific resources in a cluster identified by a label
Additionally, resources filters and hooks can be defined to customize the backup. The status field reports the progress, outcome, and metadata of the backup.
A ClusterBackup can only be applied at the Cluster level:
- To create a backup at the cluster level, provide cluster name and
supervisor namespace name in 'spec.selector.matchNames'. ClusterBackup
name can be provided in 'metadata.generateName', so the backend can
generate the fully qualified name by appending the selector names.
To use metadata.name directly, it needs to be fully qualified in the
format:
"<backup-name>:cluster:<cluster-name>:supervisor-namespace:<svns-name>"
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
spec contains the desired state of the backup. |
||
|
status contains the status of the backup. |
ClusterBackupLocation
ClusterBackupLocation is used to define a target location for storing backups.
ClusterBackupLocation identifies the place where you want the backup stored, and references the associated data protection credential. The target location can be shared across multiple clusters.
ClusterBackupLocation can only be applied at the Organization level by selecting specific or all clusters: - To create a backup at the organization level, provide 'metadata.namespace'="@org".
Inherited read-only ClusterBackupLocations at the cluster: - For each backup location, you will see a read-only backup location resource at every selected cluster in the organization. The 'metadata.name' of this read-only resource will be prefixed with "org:" and suffixed with the selector names to maintain uniqueness. 'spec.selector' will point to the corresponding cluster, and 'metadata.namespace' will point to the project to which the cluster belongs.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
spec contains the desired state of the backup location. |
|||
|
status contains the status of the backup location. |
ClusterBackupLocationCredential
ClusterBackupLocationCredential is used to encrypt and securely store credentials of the storage service used to store backups.
Data Protection capability requires access to a public storage service to store cluster backups. The credentials required to access your selected storage service can be provided using this API, to ensure they are encrypted and stored securely.
The encrypted data is never returned in any response, and it cannot be edited/changed. Hence, patch/update is not supported in this API.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
spec contains the desired state of the credential. |
ClusterBackupLocationCredentialProvider
Underlying type: string
ClusterBackupLocationCredentialProvider is the service provider that can be accessed using the credential.
ClusterBackupLocationCredentialSpec
| Field | Description | Default | Validation |
|---|---|---|---|
provider is the service provider that can be accessed using the credential. |
Enum: [AmazonS3] |
||
|
keyValueSecretData contains the secret data in the form of key-value pairs. |
ClusterBackupLocationSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
selector is used to show the parent resource hierarchy. |
||
|
targetProvider is the target provider of the backup storage. |
Enum: [AWS_S3] |
|
|
awsS3Config contains the AWS S3 storage configuration fields. |
||
|
bucket is the bucket to use for storage. |
MinLength: 1 |
|
|
region is the region of the bucket origin. |
||
|
credentialRef is the reference to the ClusterBackupLocationCredential to be used to access the bucket. |
||
|
prefix is the prefix of the bucket. |
||
|
clusterRefs is the list of cluster references on which this backup location can be used. |
ClusterBackupLocationStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
conditions shows the list of Conditions attached to the backup location. |
||
|
phase shows the current phase of the ClusterBackup location. |
||
|
message contains a short summary explaining the reason for the given Phase. |
ClusterBackupSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
selector is used to show the parent resource hierarchy. |
||
|
includedNamespaces are the namespace on the cluster to include in the backup. |
||
|
excludedNamespaces are the namespaces on the cluster to exclude from the backup. |
||
|
includedNamespaceScopedResources are the namespace-scoped resources on the cluster to include in |
||
|
excludedNamespaceScopedResources are the namespace-scoped resources on the cluster to exclude |
||
|
includedClusterScopedResources are the cluster-scoped resource types on the cluster to include in |
||
|
excludedClusterScopedResources are the cluster-scoped resource types on the cluster to exclude |
||
|
labelSelector is used to include or exclude individual resources on the cluster to the backup, |
||
|
snapshotVolumes is a flag that specifies whether to take cloud snapshots of any PersistentVolumes referenced |
||
|
ttlHours is the backup retention period, in hours. |
Minimum: 0 |
|
|
snapshotMoveData specifies whether snapshot data should be moved to the target location. |
||
|
storageLocation is the name of the ClusterBackupStorageLocation where the backup should be stored. |
||
|
hooks represent custom actions that should be executed at different phases of the backup. |
ClusterBackupStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
conditions shows the list of Conditions attached to the backup. |
||
|
phase shows the current phase of the ClusterBackup on the cluster. |
||
|
message contains a short summary explaining the reason for the given Phase. |
||
|
startTime is the time when the backup was started. |
||
|
completionTime is the time when the backup was completed. |
||
|
expiration is the expiration time associated with the ClusterBackup object, if it is eligible for garbage-collection. |
||
|
progress shows the current progress of the backup. |
||
|
resources is a list of important resources containing the resource kind and list of resource names belonging |
||
|
gatherBackupResourcesStatus holds the status of ListClusterBackupResources action which is triggered on the cluster |
||
|
failureReason contains the error that caused the entire backup to fail, in-case of such a failure. |
||
|
volumeBackups contain the information about volumes that are backed up. |
ClusterDataProtection
ClusterDataProtection is a singleton resource used to enable data protection feature on a cluster.
The name, namespace and selector should be the same as that of the resource
on which data protection feature is being enabled, for example, Cluster.
- To enable data protection on a Cluster, provide the supervisor namespace
name in 'spec.selector.matchNames'. Cluster name can be provided in
'metadata.generateName', so the backend can generate the fully qualified
name by appending the selector names. To use metadata.name directly,
it needs to be fully qualified in the format:
"<cluster-name>:cluster:<cluster-name>:supervisor-namespace:<svns-name>"
which is same as the 'metadata.name' value returned in the Cluster API.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
spec contains the desired state of the data protection. |
|||
|
status contains the status of the data protection. |
ClusterDataProtectionSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
selector is used to show the parent resource hierarchy. |
ClusterDataProtectionStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
conditions shows the list of Conditions attached to the data protection. |
||
|
phase shows the current phase of the data protection on the cluster. |
||
|
message contains a short summary explaining the reason for the given data protection. |
||
|
clusterNamespace is the namespace used to install backup solution. |
||
|
version is the version information of backup solution. |
ClusterRestore
ClusterRestore is used to restore a previous state of the cluster using a backup.
This API will invoke a Velero restore in the target cluster according to the spec. It can restore: - The entire cluster backup - Selected namespaces from the backup - Specific resources from the backup identified by a label - The backup from a different cluster
Additionally, resource filters and hooks can be defined to customize the restore. The status field reports the progress, outcome, and metadata of the restore.
A ClusterRestore can only be applied at the Cluster level:
- To initiate a restore at the cluster level, provide cluster name and
supervisor namespace name in 'spec.selector.matchNames'. ClusterRestore
name can be provided in 'metadata.generateName', so the backend can
generate the fully qualified name by appending the selector names.
To use metadata.name directly, it needs to be fully qualified in the
format:
"<restore-name>:cluster:<cluster-name>:supervisor-namespace:<svns-name>"
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
spec contains the desired state of the restore. |
||
|
status contains the status of the restore. |
ClusterRestoreSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
selector is used to show the parent resource hierarchy. |
||
|
clusterBackupRef is the reference to the ClusterBackup on the cluster to restore from. |
||
|
includedNamespaces are the namespaces in the backup to include in the restore. |
||
|
excludedNamespaces are the namespaces in the backup to exclude from the restore. |
||
|
includedResources are the resources in the backup to include in the restore. If empty, |
||
|
excludedResources are the resources in the backup to exclude from the restore. |
||
|
labelSelector is used to include or exclude individual resources in the backup to restore, |
||
|
namespaceMapping is a map of source namespace names in the backup to target namespace names to restore |
||
|
restorePvs is a flag that specifies whether to restore all included PersistentVolumes from a snapshot. |
||
|
includeClusterResources is a flag that specifies whether cluster-scoped resources should be included |
||
|
hooks represent custom actions that should be executed during or post restore. |
ClusterRestoreStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
conditions shows the list of Conditions attached to the restore. |
||
|
phase shows the current phase of the ClusterRestore on the cluster. |
||
|
message contains a short summary explaining the reason for the given ClusterRestore. |
||
|
completionTime is the time when the ClusterRestore was completed. |
||
|
progress shows the current progress of the ClusterRestore. |
||
|
volumeRestores contain the information about volumes that are restored. |
ClusterSchedule
ClusterSchedule is used to schedule a cron job for periodically taking backups of the given state of a cluster.
The ClusterSchedule API describes a template for creating ClusterBackups at specified intervals. When you create a ClusterSchedule, velero ClusterBackup CRs are generated at the defined intervals in the target cluster according to the schedule. This API also allows to pause and resume the schedule.
A ClusterSchedule can only be applied at the Cluster level:
- To create a schedule at the cluster level, provide cluster name and
supervisor namespace name in 'spec.selector.matchNames'. ClusterSchedule
name can be provided in 'metadata.generateName', so the backend can
generate the fully qualified name by appending the selector names.
To use metadata.name directly, it needs to be fully qualified in the
format:
"<schedule-name>:cluster:<cluster-name>:supervisor-namespace:<svns-name>"
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
spec contains the desired state of the schedule. |
||
|
status contains the status of the schedule. |
ClusterScheduleSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
selector is used to show the parent resource hierarchy. |
||
|
template is a template containing the details of the backup to take at given periodic intervals. |
||
|
schedule is a Cron expression defining when to run the backups. |
MinLength: 1 |
|
|
paused can be used to pause a schedule for backups. By default, the schedule is not paused. |
ClusterScheduleStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
conditions shows the list of Conditions attached to the schedule. |
||
|
phase shows the current phase of the ClusterSchedule on the cluster. |
||
|
message contains a short summary explaining the reason for the given Phase. |
||
|
lastClusterBackupTime is the timestamp showing when the last backup associated with this schedule |
ExecHook
ExecHook is a hook that uses the pod exec API to execute a command in a container in a pod.
ExecRestoreHook
ExecRestoreHook is a hook that uses pod exec API to execute a command inside a container in a pod.
GatherBackupResourcesStatus
GatherBackupResourcesStatus shows the status of ListClusterBackupResources action.
| Field | Description | Default | Validation |
|---|---|---|---|
|
conditions shows the list of Conditions attached to sub-operations like uploads during the collection |
||
phase is the overall state of the ListClusterBackupResources operation. |
|||
|
message contains a short summary explaining the reason for the given Phase. |
GatherBackupResourcesStatusPhase
Underlying type: string
GatherBackupResourcesStatusPhase is the phase of the ListClusterBackupResources action in the associated cluster.
InitRestoreHook
InitRestoreHook is a hook that adds an init container to a PodSpec to run commands before the workload pod is able to start.
KeyValueSecretData
KeyValueSecretData contains the secret data in the form of key-value pairs. This data is encrypted and stored securely, and it is never returned in the API response.
| Field | Description | Default | Validation |
|---|---|---|---|
|
key of the secret data. |
MinLength: 1 |
|
|
value of the secret data. |
Phase
Underlying type: string
Phase of the data protection objects, these objects includes: - ClusterBackup - ClusterRestore - ClusterSchedule - ClusterDataProtection - ClusterBackupLocation
PodVolumeBackupRestorePhase
Underlying type: string
PodVolumeBackupRestorePhase is the phase of the pod volume backup or restore on the cluster.
Progress
Progress provides additional data to track backup completion progress.
| Field | Description | Default | Validation |
|---|---|---|---|
|
totalItems is the total number of items to be backed up. This number may change |
Minimum: 0 |
|
|
itemsProcessed is the number of items that have actually been processed |
Minimum: 0 |
Resources
Resources represents all the resources belonging to a Kubernetes resource Kind.
| Field | Description | Default | Validation |
|---|---|---|---|
|
kind is a Kubernetes resource Kind. |
||
|
names are the list of resource names under the specified Kind. |
RestoreHooks
RestoreHooks contain custom actions that should be executed during or post restore.
| Field | Description | Default | Validation |
|---|---|---|---|
|
resources are hooks that should be executed when restoring individual instances of a resource. |
RestoreResourceHook
RestoreResourceHook defines a restore hook for a resource.
| Field | Description | Default | Validation |
|---|---|---|---|
|
exec defines an exec restore hook. |
||
|
init defines an init restore hook. |
RestoreResourceHookSpec
RestoreResourceHookSpec defines one or more RestoreResourceHooks that should be executed based on the rules defined for namespaces, and labels.
| Field | Description | Default | Validation |
|---|---|---|---|
|
name is the name of this hook. |
MinLength: 1 |
|
|
includedNamespaces specifies the namespaces to which this hook spec applies. If empty, it applies |
||
|
excludedNamespaces specifies the namespaces to which this hook spec does not apply. |
||
|
labelSelector if specified, filters the resources to which this hook spec applies. |
||
|
postHooks is a list of ClusterRestoreResourceHooks to execute during and after restoring a resource. |
TargetProvider
Underlying type: string
TargetProvider is the target storage provider of the backup storage.
VolumeBackupRestore
VolumeBackupRestore contains metadata about a particular volume backup taken or restored.
| Field | Description | Default | Validation |
|---|---|---|---|
|
pvcName is the name of the persistent volume claim. |
||
|
pvcNamespace is the namespace of the persistent volume claim. |
||
|
pvName is the name of the persistent volume. |
||
|
scName is the name of the storage class used by the persistent volume. |
||
|
sizeBytes is the complete size of the snapshot in bytes. |
Minimum: 0 |
|
|
method is the method used to perform the volume backup or backup. |
||
|
podInfo contains additional metadata about the pod where the volume was mounted. |
VolumeBackupRestoreMethod
Underlying type: string
VolumeBackupRestoreMethod is the method used to perform a volume backup or restore.
VolumeBackupRestorePodInfo
VolumeBackupRestorePodInfo contains additional metadata about the pod where a backed up or restored volume was mounted.
| Field | Description | Default | Validation |
|---|---|---|---|
|
podName is the name of the pod where the volume was mounted. |
||
|
podNamespace is the namespace of the pod where the volume was mounted. |
||
|
podVolumeName is the name of the volume as depicted in the pod manifest. |
||
phase is the phase of the pod volume backup or restore. |
policy.management.kubernetes.vmware.com/v1alpha1
Package v1alpha1 contains API definitions for the VKS cluster management Policy APIs from policy.v1alpha1 group-version. This includes APIs with Kind Policy, PolicyTemplate, PolicySchema and PolicyInsight.
ClusterPolicy
ClusterPolicy to apply on a resource (organization / project / cluster).
To apply a policy, you need to first identify the ClusterPolicySchema you wish to use by viewing the available list of ClusterPolicySchemas. These schemas are grouped by various policy types, for example, security-policy, image-registry-policy, custom-policy etc. ClusterPolicy creation requires the reference to the ClusterPolicySchema and the inputs described in that schema.
Parent Resource Hierarchy can be provided as below:
- To apply a policy at the organization level, provide 'metadata.namespace'="@org".
- To apply a policy at the project level, provide 'metadata.namespace'="<project-name>".
- To apply a policy at the cluster level, provide cluster name and supervisor namespace
name in 'spec.selector.matchNames'. ClusterPolicy name can be provided in 'metadata.generateName',
so the backend can generate the fully qualified name by appending the selector names.
To use metadata.name directly, it needs to be fully qualified in the format:
"<policy-name>:cluster:<cluster-name>:supervisor-namespace:<svns-name>"
Inherited read-only ClusterPolicies: - When a policy is applied at the organization level, you will see a read-only ClusterPolicy resource at every project and every cluster in the organization. The 'metadata.name' of this read-only resource will be prefixed with "org:" and suffixed with the selector names to maintain uniqueness. 'metadata.namespace' and 'spec.selector' will point to the corresponding project or cluster. - Similarly, when a policy is applied at the project level, you will see a read-only ClusterPolicy resource at every cluster in that project. The 'metadata.name' of this read-only resource will be prefixed with "prj:" and suffixed with the selector names.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
|
spec contains the desired state of the policy. |
||
|
status contains the status of the policy. |
ClusterPolicyInsight
ClusterPolicyInsight provides insight related to the policies applied on a resource.
Below are the various types of insights reported by this API: - VIOLATION: Indicates that a Kubernetes resource on the cluster is not in compliance with the policy. This insight is only applicable to Gatekeeper-based policies. - SYNC: Indicates that the policy sync to the VKS cluster failed. - THRESHOLD: Indicates that a namespace on the cluster has exceeded 80% of the applied quota. This insight is only applicable to Namespace Quota policies. - HEALTH: Indicates that the policy is not enforced due to policy operator health issues. For example, Gatekeeper installation failure. This insight is only applicable to Gatekeeper-based policies. - INCOMPATIBILITY: Indicates a warning that the policy may not work, because the Gatekeeper installation on the cluster is not managed by VKS cluster management. This situation may potentially cause issues with the functionality of policies applied to the cluster.
This is a read-only API.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
spec contains the desired state of the policy insight. |
|||
|
status contains the status of the policy insight. |
ClusterPolicyInsightSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
selector is used to show the parent resource hierarchy. |
||
|
clusterPolicyRef is the reference to the source policy that is responsible for the insight. |
||
|
clusterNamespace is the impacted namespace on the cluster from which the insight is generated. |
ClusterPolicyInsightStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
policyType shows the type of policy that triggered the insight. |
Enum: [security-policy image-registry-policy custom-policy namespace-quota-policy mutation-policy] |
|
|
insightType shows the type of policy insight. |
Enum: [Violation Sync Threshold Health Incompatibility] |
|
|
message contains details about the policy insight. |
ClusterPolicySchema
ClusterPolicySchema defines the schema required to apply policies.
VKS cluster management has a set of built-in policy templates combined into various schemas. In addition, creation of a new ClusterPolicyTemplate will internally generate a corresponding ClusterPolicySchema using that template. ClusterPolicy creation always requires a ClusterPolicySchema reference and optional inputs defined in this schema.
The type of the policy is embedded in the schema name. For example: - baseline:security-policy - restricted:security-policy - custom:image-registry-policy - k8srequirelabels:custom-policy
ClusterPolicySchema is a read-only API. It is organization scoped, but viewable by everyone.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
spec contains the desired state of the policy schema. |
ClusterPolicySchemaSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
type shows the type of the policy. |
Enum: [security-policy image-registry-policy custom-policy namespace-quota-policy mutation-policy] |
|
|
openAPIV3Schema defines the set of variable inputs needed to create a ClusterPolicy using this ClusterPolicySchema. |
||
|
clusterPolicyTemplateRefs define the list of ClusterPolicyTemplates applied when a ClusterPolicy is created using this ClusterPolicySchema. |
ClusterPolicySpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
selector is used to show the parent resource hierarchy. |
||
|
clusterPolicySchemaRef is the reference to the ClusterPolicySchema to use for applying the policy. |
||
|
input is the arbitrary input required for creating a policy with the chosen schema. |
||
|
clusterNamespaceSelector is a label based namespace selector used to filter namespaces in |
ClusterPolicyStatus
| Field | Description | Default | Validation |
|---|---|---|---|
|
conditions shows the list of Conditions attached to the cluster. |
||
|
phase shows the current phase of the policy application on a cluster. |
||
|
message contains a short summary explaining the reason for the given Phase. |
ClusterPolicyTemplate
ClusterPolicyTemplate is a wrapper for the policy definition containing the enforcement logic.
This template object is a pre-requisite for applying certain policies. The embedded object contains the policy enforcement logic. When a policy created requires this template, the embedded object in this template will get applied on the cluster along with the policy object.
An example of this template object is OPA Gatekeeper ConstraintTemplate object, which contains the Gatekeeper enforcement logic in Rego/CEL and is a pre-requisite for applying a Gatekeeper based policy (Constraint object).
ClusterPolicyTemplate is an organization scoped API, viewable by everyone, but only organization admins can perform write operations like creating/deleting new templates. Built-in templates cannot be updated or deleted.
| Field | Description | Default | Validation |
|---|---|---|---|
|
|
||
|
|
||
|
Refer to Kubernetes API documentation for fields of |
||
spec contains the desired state of the policy template. |
ClusterPolicyTemplateSpec
| Field | Description | Default | Validation |
|---|---|---|---|
|
templateType is the type of the policy template. |
OPAGatekeeper |
Enum: [OPAGatekeeper] |
|
objectKind is the Kind of the Kubernetes Resource embedded in Object. |
ConstraintTemplate |
Enum: [ConstraintTemplate] |
|
object is the Kubernetes Resource of the specified ObjectKind (for example, ConstraintTemplate |
||
|
dataInventory is a list of Kubernetes api-resource kinds that need to be synced/replicated |
ClusterPolicyType
Underlying type: string
ClusterPolicyType shows the type of the policy.
InsightType
Underlying type: string
InsightType shows the type of the policy insight.
ObjectKind
Underlying type: string
ObjectKind is the Kind of the Kubernetes resource that is provided.
Phase
Underlying type: string
Phase shows the current phase of the policy application on a cluster.
TemplateType
Underlying type: string
TemplateType is the type of the policy template.