k8s.K8sResource1.2.1
- Module URI:
- package://pkg.pkl-lang.org/pkl-k8s/k8s@1.2.1#/K8sResource.pklcontent_copy
- Source code:
- K8sResource.pkl
- Known subtypes:
- APIGroup, APIGroupList, APIResourceList, APIService, APIService, APIServiceList, APIServiceList, APIVersions, Binding, CSIDriver, CSIDriver, CSIDriverList, CSIDriverList, CSINode, CSINode, CSINodeList, CSINodeList, CSIStorageCapacity, CSIStorageCapacity, CSIStorageCapacity, CSIStorageCapacityList, CSIStorageCapacityList, CSIStorageCapacityList, CertificateSigningRequest, CertificateSigningRequest, CertificateSigningRequestList, CertificateSigningRequestList, ClusterCIDR, ClusterCIDRList, ClusterRole, ClusterRole, ClusterRole, ClusterRoleBinding, ClusterRoleBinding, ClusterRoleBinding, ClusterRoleBindingList, ClusterRoleBindingList, ClusterRoleBindingList, ClusterRoleList, ClusterRoleList, ClusterRoleList, ClusterTrustBundle, ClusterTrustBundleList, ComponentStatus, ComponentStatusList, ConfigMap, ConfigMapList, ControllerRevision, ControllerRevisionList, CronJob, CronJob, CronJob, CronJobList, CronJobList, CronJobList, CustomResourceDefinition, CustomResourceDefinition, CustomResourceDefinitionList, CustomResourceDefinitionList, DaemonSet, DaemonSetList, DeleteOptions, Deployment, DeploymentList, DeviceClass, DeviceClass, DeviceClassList, DeviceClassList, EndpointSlice, EndpointSlice, EndpointSliceList, EndpointSliceList, Endpoints, EndpointsList, EphemeralContainers, Event, Event, Event, EventList, EventList, EventList, Eviction, Eviction, FlowSchema, FlowSchema, FlowSchema, FlowSchema, FlowSchema, FlowSchemaList, FlowSchemaList, FlowSchemaList, FlowSchemaList, FlowSchemaList, HorizontalPodAutoscaler, HorizontalPodAutoscaler, HorizontalPodAutoscaler, HorizontalPodAutoscaler, HorizontalPodAutoscalerList, HorizontalPodAutoscalerList, HorizontalPodAutoscalerList, HorizontalPodAutoscalerList, IPAddress, IPAddress, IPAddressList, IPAddressList, Ingress, Ingress, Ingress, IngressClass, IngressClass, IngressClassList, IngressClassList, IngressList, IngressList, IngressList, Job, JobList, Lease, Lease, LeaseCandidate, LeaseCandidate, LeaseCandidateList, LeaseCandidateList, LeaseList, LeaseList, LimitRange, LimitRangeList, LocalSubjectAccessReview, LocalSubjectAccessReview, MutatingAdmissionPolicy, MutatingAdmissionPolicyBinding, MutatingAdmissionPolicyBindingList, MutatingAdmissionPolicyList, MutatingWebhookConfiguration, MutatingWebhookConfiguration, MutatingWebhookConfigurationList, MutatingWebhookConfigurationList, Namespace, NamespaceList, NetworkPolicy, NetworkPolicyList, Node, NodeList, PersistentVolume, PersistentVolumeClaim, PersistentVolumeClaimList, PersistentVolumeList, Pod, PodDisruptionBudget, PodDisruptionBudget, PodDisruptionBudgetList, PodDisruptionBudgetList, PodList, PodPreset, PodPresetList, PodScheduling, PodSchedulingContext, PodSchedulingContext, PodSchedulingContextList, PodSchedulingContextList, PodSchedulingList, PodSecurityPolicy, PodSecurityPolicyList, PodTemplate, PodTemplateList, PriorityClass, PriorityClass, PriorityClass, PriorityClassList, PriorityClassList, PriorityClassList, PriorityLevelConfiguration, PriorityLevelConfiguration, PriorityLevelConfiguration, PriorityLevelConfiguration, PriorityLevelConfiguration, PriorityLevelConfigurationList, PriorityLevelConfigurationList, PriorityLevelConfigurationList, PriorityLevelConfigurationList, PriorityLevelConfigurationList, ReplicaSet, ReplicaSetList, ReplicationController, ReplicationControllerList, ResourceClaim, ResourceClaim, ResourceClaim, ResourceClaim, ResourceClaimList, ResourceClaimList, ResourceClaimList, ResourceClaimList, ResourceClaimParameters, ResourceClaimParametersList, ResourceClaimTemplate, ResourceClaimTemplate, ResourceClaimTemplate, ResourceClaimTemplate, ResourceClaimTemplateList, ResourceClaimTemplateList, ResourceClaimTemplateList, ResourceClaimTemplateList, ResourceClass, ResourceClass, ResourceClassList, ResourceClassList, ResourceClassParameters, ResourceClassParametersList, ResourceQuota, ResourceQuotaList, ResourceSlice, ResourceSlice, ResourceSlice, ResourceSliceList, ResourceSliceList, ResourceSliceList, Role, Role, Role, RoleBinding, RoleBinding, RoleBinding, RoleBindingList, RoleBindingList, RoleBindingList, RoleList, RoleList, RoleList, RuntimeClass, RuntimeClass, RuntimeClass, RuntimeClassList, RuntimeClassList, RuntimeClassList, Scale, Secret, SecretList, SelfSubjectAccessReview, SelfSubjectAccessReview, SelfSubjectReview, SelfSubjectReview, SelfSubjectReview, SelfSubjectRulesReview, SelfSubjectRulesReview, Service, ServiceAccount, ServiceAccountList, ServiceCIDR, ServiceCIDR, ServiceCIDRList, ServiceCIDRList, ServiceList, StatefulSet, StatefulSetList, Status, StorageClass, StorageClass, StorageClassList, StorageClassList, StorageVersion, StorageVersionList, StorageVersionMigration, StorageVersionMigrationList, SubjectAccessReview, SubjectAccessReview, TokenRequest, TokenReview, TokenReview, ValidatingAdmissionPolicy, ValidatingAdmissionPolicy, ValidatingAdmissionPolicy, ValidatingAdmissionPolicyBinding, ValidatingAdmissionPolicyBinding, ValidatingAdmissionPolicyBinding, ValidatingAdmissionPolicyBindingList, ValidatingAdmissionPolicyBindingList, ValidatingAdmissionPolicyBindingList, ValidatingAdmissionPolicyList, ValidatingAdmissionPolicyList, ValidatingAdmissionPolicyList, ValidatingWebhookConfiguration, ValidatingWebhookConfiguration, ValidatingWebhookConfigurationList, ValidatingWebhookConfigurationList, VolumeAttachment, VolumeAttachment, VolumeAttachment, VolumeAttachmentList, VolumeAttachmentList, VolumeAttachmentList, VolumeAttributesClass, VolumeAttributesClass, VolumeAttributesClassList, VolumeAttributesClassList, WatchEvent
- Known usages:
- All versions:
- 1.2.1, 1.2.0, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.1
To describe a concrete resource, amend the module named after that resource. For example, to describe a deployment, use:
amends "package://pkg.pkl-lang.org/pkl-k8s/k8s@<version>#/api/apps/v1/Deployment.pkl"
spec {
...
}
In the above code, <version>
is the Pkl module version, for example 1.0.0
.
It is usually best to use the latest version, which can be found on the module's documentation page.
Because modules in the k8s
namespace are versioned in lockstep, the same version should be used across modules.
Properties(show inherited)
-
expand_morelinkhidden
The output of this module.
Defaults to all module properties rendered as either Pcf or the format specified on the command line.
-
expand_morelink
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
-
expand_morelink
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
Methods(show inherited)
-
-
-
-
-
-
-
-
-
expand_morelinkfunction
Returns the relative, descendent directory path between this module and
other
.Throws if no such path exists.
For example, if module
mod1
has path/dir1/mod1.pkl
, and modulemod2
has path/dir1/dir2/dir3/mod2.pkl
, thenmod1.relativePathTo(mod2)
will returnList("dir2", "dir3")
.A common use case is to compute the directory path between a template located at the root of a hierarchy (say
rootModule.pkl
) and the currently evaluated module (accessible via themodule
keyword):import "rootModule.pkl" // self-import path = rootModule.relativePathTo(module)
-
-
-
-
-
Classes(show inherited)
Type Aliases(show inherited)
-
expand_morelinktypealias
-
expand_morelinktypealias
-
-
-
expand_morelinktypealiasPortName = String(length <= 15, matches(Regex("[a-z0-9]+(-[a-z0-9]+)*")), contains(Regex("[a-z]"))) (k8s.K8sObject)
A port name conforming to RFC 6335 IANA service name syntax.
Contrary to the RFC, Kubernetes does not allow uppercase letters.
-
-
expand_morelinktypealiasRfc1123Label = String(length <= 63, matches(Regex("[a-z0-9]([-a-z0-9]*[a-z0-9])?"))) (k8s.K8sObject)
An RFC 1123 DNS label.
Contrary to the RFC, Kubernetes does not allow uppercase letters.
-
expand_morelinktypealiasRfc1123Hostname = String(length <= 253, matches(Regex("[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"))) (k8s.K8sObject)
An RFC 1123 hostname.
Contrary to the RFC, Kubernetes does not allow uppercase letters.
-
expand_morelinktypealiasApiRequestVerb = "get"|"list"|"watch"|"create"|"update"|"patch"|"delete"|"deletecollection"|"*"|"use"|"bind"|"escalate"|"impersonate"|String (k8s.K8sObject)
API verbs like
get
,list
,create
,update
,patch
,watch
,delete
, anddeletecollection
are used for resource requests.To determine the request verb for a resource API endpoint, see Determine the request verb. CRDs may use verbs outside of the predefined set.
-
linktypealiasHttpRequestVerb = "get"|"post"|"put"|"delete"|"patch"|"head"|"*" (k8s.K8sObject)
Lowercased HTTP methods like
get
,post
,put
, anddelete
are used for non-resource requests. -
expand_morelinktypealias
FieldsV1 stores a set of fields in a data structure like a Trie, in JSON format.
Each key is either a '.' representing the field itself, and will always map to an empty set, or a string representing a sub-field or item. The string will follow one of these four formats:
- 'f:
', where is the name of a field in a struct, or key in a map - 'v:
', where is the exact json formatted value of a list item - 'i:
', where is position of a item in a list - 'k:
', where is a map of a list item's key fields to their unique values
If a key maps to an empty Fields value, the field that key represents is part of the set. The exact format is defined in sigs.k8s.io/structured-merge-diff.
- 'f:
-
Base module for Kubernetes resource objects ("entities").