cdk8s-plus-31 (Python) ¶
Constructs ¶
AbstractPod ¶
- Implements: IPodSelector, INetworkPolicyPeer, ISubject
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.AbstractPod(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_container |
No description. |
add_host_alias |
No description. |
add_init_container |
No description. |
add_volume |
No description. |
attach_container |
No description. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_pod_selector_config |
Return the configuration of this selector. |
to_subject_configuration |
Return the subject configuration. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_container ¶
def add_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_host_alias ¶
def add_host_alias(
hostnames: typing.List[str],
ip: str
) -> None
hostnamesRequired ¶
- Type: typing.List[str]
Hostnames for the chosen IP address.
ipRequired ¶
- Type: str
IP address of the host file entry.
add_init_container ¶
def add_init_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_volume ¶
def add_volume(
vol: Volume
) -> None
volRequired ¶
- Type: Volume
attach_container ¶
def attach_container(
cont: Container
) -> None
contRequired ¶
- Type: Container
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.AbstractPod.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
automount_service_account_token |
bool |
No description. |
containers |
typing.List[Container] |
No description. |
dns |
PodDns |
No description. |
host_aliases |
typing.List[HostAlias] |
No description. |
init_containers |
typing.List[Container] |
No description. |
pod_metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
security_context |
PodSecurityContext |
No description. |
share_process_namespace |
bool |
No description. |
volumes |
typing.List[Volume] |
No description. |
docker_registry_auth |
ISecret |
No description. |
enable_service_links |
bool |
No description. |
host_network |
bool |
No description. |
restart_policy |
RestartPolicy |
No description. |
service_account |
IServiceAccount |
No description. |
termination_grace_period |
cdk8s.Duration |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
automount_service_account_tokenRequired ¶
automount_service_account_token: bool
- Type: bool
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[Container]
dnsRequired ¶
dns: PodDns
- Type: PodDns
host_aliasesRequired ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
init_containersRequired ¶
init_containers: typing.List[Container]
- Type: typing.List[Container]
pod_metadataRequired ¶
pod_metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
security_contextRequired ¶
security_context: PodSecurityContext
- Type: PodSecurityContext
share_process_namespaceRequired ¶
share_process_namespace: bool
- Type: bool
volumesRequired ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
host_networkOptional ¶
host_network: bool
- Type: bool
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
AwsElasticBlockStorePersistentVolume ¶
Represents an AWS Disk resource that is attached to a kubelet’s host machine and then exposed to the pod.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.AwsElasticBlockStorePersistentVolume(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
claim: IPersistentVolumeClaim = None,
mount_options: typing.List[str] = None,
reclaim_policy: PersistentVolumeReclaimPolicy = None,
storage: Size = None,
storage_class_name: str = None,
volume_mode: PersistentVolumeMode = None,
volume_id: str,
fs_type: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains all ways the volume can be mounted. |
claim |
IPersistentVolumeClaim |
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. |
mount_options |
typing.List[str] |
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. |
storage |
cdk8s.Size |
What is the storage capacity of this volume. |
storage_class_name |
str |
Name of StorageClass to which this persistent volume belongs. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
volume_id |
str |
Unique ID of the persistent disk resource in AWS (Amazon EBS volume). |
fs_type |
str |
Filesystem type of the volume that you want to mount. |
partition |
typing.Union[int, float] |
The partition in the volume that you want to mount. |
read_only |
bool |
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes.
Contains all ways the volume can be mounted.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
claimOptional ¶
- Type: IPersistentVolumeClaim
- Default: Not bound to a specific claim.
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
mount_optionsOptional ¶
- Type: typing.List[str]
- Default: No options.
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
reclaim_policyOptional ¶
- Type: PersistentVolumeReclaimPolicy
- Default: PersistentVolumeReclaimPolicy.RETAIN
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
storageOptional ¶
- Type: cdk8s.Size
- Default: No specified.
What is the storage capacity of this volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
- Type: str
- Default: Volume does not belong to any storage class.
Name of StorageClass to which this persistent volume belongs.
volume_modeOptional ¶
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
volume_idRequired ¶
- Type: str
Unique ID of the persistent disk resource in AWS (Amazon EBS volume).
More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
fs_typeOptional ¶
- Type: str
- Default: ‘ext4’
Filesystem type of the volume that you want to mount.
Tip: Ensure that the filesystem type is supported by the host operating system.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
partitionOptional ¶
- Type: typing.Union[int, float]
- Default: No partition.
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).
read_onlyOptional ¶
- Type: bool
- Default: false
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
as_volume |
Convert the piece of storage into a concrete volume. |
bind |
Bind a volume to a specific claim. |
reserve |
Reserve a PersistentVolume by creating a PersistentVolumeClaim that is wired to claim this volume. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
as_volume ¶
def as_volume() -> Volume
Convert the piece of storage into a concrete volume.
bind ¶
def bind(
claim: IPersistentVolumeClaim
) -> None
Bind a volume to a specific claim.
Note that you must also bind the claim to the volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding
claimRequired ¶
- Type: IPersistentVolumeClaim
The PVC to bind to.
reserve ¶
def reserve() -> PersistentVolumeClaim
Reserve a PersistentVolume by creating a PersistentVolumeClaim that is wired to claim this volume.
Note that this method will throw in case the volume is already claimed.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reserving-a-persistentvolume
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_persistent_volume_name |
Imports a pv from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.AwsElasticBlockStorePersistentVolume.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_persistent_volume_name ¶
import cdk8s_plus_31
cdk8s_plus_31.AwsElasticBlockStorePersistentVolume.from_persistent_volume_name(
scope: Construct,
id: str,
volume_name: str
)
Imports a pv from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
volume_nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
mode |
PersistentVolumeMode |
Volume mode of this volume. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
Reclaim policy of this volume. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Access modes requirement of this claim. |
claim |
IPersistentVolumeClaim |
PVC this volume is bound to. |
mount_options |
typing.List[str] |
Mount options of this volume. |
storage |
cdk8s.Size |
Storage size of this volume. |
storage_class_name |
str |
Storage class this volume belongs to. |
fs_type |
str |
File system type of this volume. |
read_only |
bool |
Whether or not it is mounted as a read-only volume. |
volume_id |
str |
Volume id of this volume. |
partition |
typing.Union[int, float] |
Partition of this volume. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
modeRequired ¶
mode: PersistentVolumeMode
- Type: PersistentVolumeMode
Volume mode of this volume.
reclaim_policyRequired ¶
reclaim_policy: PersistentVolumeReclaimPolicy
Reclaim policy of this volume.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
Access modes requirement of this claim.
claimOptional ¶
claim: IPersistentVolumeClaim
- Type: IPersistentVolumeClaim
PVC this volume is bound to.
Undefined means this volume is not yet claimed by any PVC.
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
Mount options of this volume.
storageOptional ¶
storage: Size
- Type: cdk8s.Size
Storage size of this volume.
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
Storage class this volume belongs to.
fs_typeRequired ¶
fs_type: str
- Type: str
File system type of this volume.
read_onlyRequired ¶
read_only: bool
- Type: bool
Whether or not it is mounted as a read-only volume.
volume_idRequired ¶
volume_id: str
- Type: str
Volume id of this volume.
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
Partition of this volume.
AzureDiskPersistentVolume ¶
AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.AzureDiskPersistentVolume(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
claim: IPersistentVolumeClaim = None,
mount_options: typing.List[str] = None,
reclaim_policy: PersistentVolumeReclaimPolicy = None,
storage: Size = None,
storage_class_name: str = None,
volume_mode: PersistentVolumeMode = None,
disk_name: str,
disk_uri: str,
caching_mode: AzureDiskPersistentVolumeCachingMode = None,
fs_type: str = None,
kind: AzureDiskPersistentVolumeKind = None,
read_only: bool = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains all ways the volume can be mounted. |
claim |
IPersistentVolumeClaim |
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. |
mount_options |
typing.List[str] |
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. |
storage |
cdk8s.Size |
What is the storage capacity of this volume. |
storage_class_name |
str |
Name of StorageClass to which this persistent volume belongs. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
disk_name |
str |
The Name of the data disk in the blob storage. |
disk_uri |
str |
The URI the data disk in the blob storage. |
caching_mode |
AzureDiskPersistentVolumeCachingMode |
Host Caching mode. |
fs_type |
str |
Filesystem type to mount. |
kind |
AzureDiskPersistentVolumeKind |
Kind of disk. |
read_only |
bool |
Force the ReadOnly setting in VolumeMounts. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes.
Contains all ways the volume can be mounted.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
claimOptional ¶
- Type: IPersistentVolumeClaim
- Default: Not bound to a specific claim.
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
mount_optionsOptional ¶
- Type: typing.List[str]
- Default: No options.
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
reclaim_policyOptional ¶
- Type: PersistentVolumeReclaimPolicy
- Default: PersistentVolumeReclaimPolicy.RETAIN
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
storageOptional ¶
- Type: cdk8s.Size
- Default: No specified.
What is the storage capacity of this volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
- Type: str
- Default: Volume does not belong to any storage class.
Name of StorageClass to which this persistent volume belongs.
volume_modeOptional ¶
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
disk_nameRequired ¶
- Type: str
The Name of the data disk in the blob storage.
disk_uriRequired ¶
- Type: str
The URI the data disk in the blob storage.
caching_modeOptional ¶
- Type: AzureDiskPersistentVolumeCachingMode
- Default: AzureDiskPersistentVolumeCachingMode.NONE.
Host Caching mode.
fs_typeOptional ¶
- Type: str
- Default: ‘ext4’
Filesystem type to mount.
Must be a filesystem type supported by the host operating system.
kindOptional ¶
- Type: AzureDiskPersistentVolumeKind
- Default: AzureDiskPersistentVolumeKind.SHARED
Kind of disk.
read_onlyOptional ¶
- Type: bool
- Default: false
Force the ReadOnly setting in VolumeMounts.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
as_volume |
Convert the piece of storage into a concrete volume. |
bind |
Bind a volume to a specific claim. |
reserve |
Reserve a PersistentVolume by creating a PersistentVolumeClaim that is wired to claim this volume. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
as_volume ¶
def as_volume() -> Volume
Convert the piece of storage into a concrete volume.
bind ¶
def bind(
claim: IPersistentVolumeClaim
) -> None
Bind a volume to a specific claim.
Note that you must also bind the claim to the volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding
claimRequired ¶
- Type: IPersistentVolumeClaim
The PVC to bind to.
reserve ¶
def reserve() -> PersistentVolumeClaim
Reserve a PersistentVolume by creating a PersistentVolumeClaim that is wired to claim this volume.
Note that this method will throw in case the volume is already claimed.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reserving-a-persistentvolume
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_persistent_volume_name |
Imports a pv from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.AzureDiskPersistentVolume.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_persistent_volume_name ¶
import cdk8s_plus_31
cdk8s_plus_31.AzureDiskPersistentVolume.from_persistent_volume_name(
scope: Construct,
id: str,
volume_name: str
)
Imports a pv from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
volume_nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
mode |
PersistentVolumeMode |
Volume mode of this volume. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
Reclaim policy of this volume. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Access modes requirement of this claim. |
claim |
IPersistentVolumeClaim |
PVC this volume is bound to. |
mount_options |
typing.List[str] |
Mount options of this volume. |
storage |
cdk8s.Size |
Storage size of this volume. |
storage_class_name |
str |
Storage class this volume belongs to. |
azure_kind |
AzureDiskPersistentVolumeKind |
Azure kind of this volume. |
caching_mode |
AzureDiskPersistentVolumeCachingMode |
Caching mode of this volume. |
disk_name |
str |
Disk name of this volume. |
disk_uri |
str |
Disk URI of this volume. |
fs_type |
str |
File system type of this volume. |
read_only |
bool |
Whether or not it is mounted as a read-only volume. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
modeRequired ¶
mode: PersistentVolumeMode
- Type: PersistentVolumeMode
Volume mode of this volume.
reclaim_policyRequired ¶
reclaim_policy: PersistentVolumeReclaimPolicy
Reclaim policy of this volume.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
Access modes requirement of this claim.
claimOptional ¶
claim: IPersistentVolumeClaim
- Type: IPersistentVolumeClaim
PVC this volume is bound to.
Undefined means this volume is not yet claimed by any PVC.
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
Mount options of this volume.
storageOptional ¶
storage: Size
- Type: cdk8s.Size
Storage size of this volume.
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
Storage class this volume belongs to.
azure_kindRequired ¶
azure_kind: AzureDiskPersistentVolumeKind
Azure kind of this volume.
caching_modeRequired ¶
caching_mode: AzureDiskPersistentVolumeCachingMode
Caching mode of this volume.
disk_nameRequired ¶
disk_name: str
- Type: str
Disk name of this volume.
disk_uriRequired ¶
disk_uri: str
- Type: str
Disk URI of this volume.
fs_typeRequired ¶
fs_type: str
- Type: str
File system type of this volume.
read_onlyRequired ¶
read_only: bool
- Type: bool
Whether or not it is mounted as a read-only volume.
BasicAuthSecret ¶
Create a secret for basic authentication.
https://kubernetes.io/docs/concepts/configuration/secret/#basic-authentication-secret
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.BasicAuthSecret(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
immutable: bool = None,
password: str,
username: str
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
password |
str |
The password or token for authentication. |
username |
str |
The user name for authentication. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
passwordRequired ¶
- Type: str
The password or token for authentication.
usernameRequired ¶
- Type: str
The user name for authentication.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_string_data |
Adds a string data field to the secret. |
env_value |
Returns EnvValue object from a secret’s key. |
get_string_data |
Gets a string data by key or undefined. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_string_data ¶
def add_string_data(
key: str,
value: str
) -> None
Adds a string data field to the secret.
keyRequired ¶
- Type: str
Key.
valueRequired ¶
- Type: str
Value.
env_value ¶
def env_value(
key: str,
optional: bool = None
) -> EnvValue
Returns EnvValue object from a secret’s key.
keyRequired ¶
- Type: str
optionalOptional ¶
- Type: bool
- Default: false
Specify whether the Secret or its key must be defined.
get_string_data ¶
def get_string_data(
key: str
) -> str
Gets a string data by key or undefined.
keyRequired ¶
- Type: str
Key.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_secret_name |
Imports a secret from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.BasicAuthSecret.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_secret_name ¶
import cdk8s_plus_31
cdk8s_plus_31.BasicAuthSecret.from_secret_name(
scope: Construct,
id: str,
name: str
)
Imports a secret from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
immutable |
bool |
Whether or not the secret is immutable. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
immutableRequired ¶
immutable: bool
- Type: bool
Whether or not the secret is immutable.
ClusterRole ¶
- Implements: IClusterRole, IRole
ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.ClusterRole(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
aggregation_labels: typing.Mapping[str] = None,
rules: typing.List[ClusterRolePolicyRule] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
aggregation_labels |
typing.Mapping[str] |
Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole’s rules. |
rules |
typing.List[ClusterRolePolicyRule] |
A list of rules the role should allow. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
aggregation_labelsOptional ¶
- Type: typing.Mapping[str]
Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole’s rules.
rulesOptional ¶
- Type: typing.List[ClusterRolePolicyRule]
- Default: []
A list of rules the role should allow.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
aggregate |
Aggregate rules from roles matching this label selector. |
allow |
Add permission to perform a list of HTTP verbs on a collection of resources. |
allow_create |
Add “create” permission for the resources. |
allow_delete |
Add “delete” permission for the resources. |
allow_delete_collection |
Add “deletecollection” permission for the resources. |
allow_get |
Add “get” permission for the resources. |
allow_list |
Add “list” permission for the resources. |
allow_patch |
Add “patch” permission for the resources. |
allow_read |
Add “get”, “list”, and “watch” permissions for the resources. |
allow_read_write |
Add “get”, “list”, “watch”, “create”, “update”, “patch”, “delete”, and “deletecollection” permissions for the resources. |
allow_update |
Add “update” permission for the resources. |
allow_watch |
Add “watch” permission for the resources. |
bind |
Create a ClusterRoleBinding that binds the permissions in this ClusterRole to a list of subjects, without namespace restrictions. |
bind_in_namespace |
Create a RoleBinding that binds the permissions in this ClusterRole to a list of subjects, that will only apply to the given namespace. |
combine |
Combines the rules of the argument ClusterRole into this ClusterRole using aggregation labels. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
aggregate ¶
def aggregate(
key: str,
value: str
) -> None
Aggregate rules from roles matching this label selector.
keyRequired ¶
- Type: str
valueRequired ¶
- Type: str
allow ¶
def allow(
verbs: typing.List[str],
endpoints: *IApiEndpoint
) -> None
Add permission to perform a list of HTTP verbs on a collection of resources.
https://kubernetes.io/docs/reference/access-authn-authz/authorization/#determine-the-request-verb
verbsRequired ¶
- Type: typing.List[str]
endpointsRequired ¶
- Type: *IApiEndpoint
The endpoints(s) to apply to.
allow_create ¶
def allow_create(
endpoints: *IApiEndpoint
) -> None
Add “create” permission for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
allow_delete ¶
def allow_delete(
endpoints: *IApiEndpoint
) -> None
Add “delete” permission for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
allow_delete_collection ¶
def allow_delete_collection(
endpoints: *IApiEndpoint
) -> None
Add “deletecollection” permission for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
allow_get ¶
def allow_get(
endpoints: *IApiEndpoint
) -> None
Add “get” permission for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
allow_list ¶
def allow_list(
endpoints: *IApiEndpoint
) -> None
Add “list” permission for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
allow_patch ¶
def allow_patch(
endpoints: *IApiEndpoint
) -> None
Add “patch” permission for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
allow_read ¶
def allow_read(
endpoints: *IApiEndpoint
) -> None
Add “get”, “list”, and “watch” permissions for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
allow_read_write ¶
def allow_read_write(
endpoints: *IApiEndpoint
) -> None
Add “get”, “list”, “watch”, “create”, “update”, “patch”, “delete”, and “deletecollection” permissions for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
allow_update ¶
def allow_update(
endpoints: *IApiEndpoint
) -> None
Add “update” permission for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
allow_watch ¶
def allow_watch(
endpoints: *IApiEndpoint
) -> None
Add “watch” permission for the resources.
endpointsRequired ¶
- Type: *IApiEndpoint
The resource(s) to apply to.
bind ¶
def bind(
subjects: *ISubject
) -> ClusterRoleBinding
Create a ClusterRoleBinding that binds the permissions in this ClusterRole to a list of subjects, without namespace restrictions.
subjectsRequired ¶
- Type: *ISubject
a list of subjects to bind to.
bind_in_namespace ¶
def bind_in_namespace(
namespace: str,
subjects: *ISubject
) -> RoleBinding
Create a RoleBinding that binds the permissions in this ClusterRole to a list of subjects, that will only apply to the given namespace.
namespaceRequired ¶
- Type: str
the namespace to limit permissions to.
subjectsRequired ¶
- Type: *ISubject
a list of subjects to bind to.
combine ¶
def combine(
rol: ClusterRole
) -> None
Combines the rules of the argument ClusterRole into this ClusterRole using aggregation labels.
rolRequired ¶
- Type: ClusterRole
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_cluster_role_name |
Imports a role from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.ClusterRole.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_cluster_role_name ¶
import cdk8s_plus_31
cdk8s_plus_31.ClusterRole.from_cluster_role_name(
scope: Construct,
id: str,
name: str
)
Imports a role from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
rules |
typing.List[ClusterRolePolicyRule] |
Rules associaated with this Role. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
rulesRequired ¶
rules: typing.List[ClusterRolePolicyRule]
- Type: typing.List[ClusterRolePolicyRule]
Rules associaated with this Role.
Returns a copy, use allow to add rules.
ClusterRoleBinding ¶
A ClusterRoleBinding grants permissions cluster-wide to a user or set of users.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.ClusterRoleBinding(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
role: IClusterRole
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
role |
IClusterRole |
The role to bind to. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
roleRequired ¶
- Type: IClusterRole
The role to bind to.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_subjects |
Adds a subject to the role. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_subjects ¶
def add_subjects(
subjects: *ISubject
) -> None
Adds a subject to the role.
subjectsRequired ¶
- Type: *ISubject
The subjects to add.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.ClusterRoleBinding.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
role |
IClusterRole |
No description. |
subjects |
typing.List[ISubject] |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
roleRequired ¶
role: IClusterRole
- Type: IClusterRole
subjectsRequired ¶
subjects: typing.List[ISubject]
- Type: typing.List[ISubject]
ConfigMap ¶
- Implements: IConfigMap
ConfigMap holds configuration data for pods to consume.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.ConfigMap(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
binary_data: typing.Mapping[str] = None,
data: typing.Mapping[str] = None,
immutable: bool = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
binary_data |
typing.Mapping[str] |
BinaryData contains the binary data. |
data |
typing.Mapping[str] |
Data contains the configuration data. |
immutable |
bool |
If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
binary_dataOptional ¶
- Type: typing.Mapping[str]
BinaryData contains the binary data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process.
You can also add binary data using configMap.addBinaryData().
dataOptional ¶
- Type: typing.Mapping[str]
Data contains the configuration data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.
You can also add data using configMap.addData().
immutableOptional ¶
- Type: bool
- Default: false
If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_binary_data |
Adds a binary data entry to the config map. |
add_data |
Adds a data entry to the config map. |
add_directory |
Adds a directory to the ConfigMap. |
add_file |
Adds a file to the ConfigMap. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_binary_data ¶
def add_binary_data(
key: str,
value: str
) -> None
Adds a binary data entry to the config map.
BinaryData can contain byte sequences that are not in the UTF-8 range.
keyRequired ¶
- Type: str
The key.
valueRequired ¶
- Type: str
The value.
add_data ¶
def add_data(
key: str,
value: str
) -> None
Adds a data entry to the config map.
keyRequired ¶
- Type: str
The key.
valueRequired ¶
- Type: str
The value.
add_directory ¶
def add_directory(
local_dir: str,
exclude: typing.List[str] = None,
key_prefix: str = None
) -> None
Adds a directory to the ConfigMap.
local_dirRequired ¶
- Type: str
A path to a local directory.
excludeOptional ¶
- Type: typing.List[str]
- Default: include all files
Glob patterns to exclude when adding files.
key_prefixOptional ¶
- Type: str
- Default: “”
A prefix to add to all keys in the config map.
add_file ¶
def add_file(
local_file: str,
key: str = None
) -> None
Adds a file to the ConfigMap.
local_fileRequired ¶
- Type: str
The path to the local file.
keyOptional ¶
- Type: str
The ConfigMap key (default to the file name).
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_config_map_name |
Represents a ConfigMap created elsewhere. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.ConfigMap.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_config_map_name ¶
import cdk8s_plus_31
cdk8s_plus_31.ConfigMap.from_config_map_name(
scope: Construct,
id: str,
name: str
)
Represents a ConfigMap created elsewhere.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
binary_data |
typing.Mapping[str] |
The binary data associated with this config map. |
data |
typing.Mapping[str] |
The data associated with this config map. |
immutable |
bool |
Whether or not this config map is immutable. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
binary_dataRequired ¶
binary_data: typing.Mapping[str]
- Type: typing.Mapping[str]
The binary data associated with this config map.
Returns a copy. To add data records, use addBinaryData() or addData().
dataRequired ¶
data: typing.Mapping[str]
- Type: typing.Mapping[str]
The data associated with this config map.
Returns an copy. To add data records, use addData() or addBinaryData().
immutableRequired ¶
immutable: bool
- Type: bool
Whether or not this config map is immutable.
CronJob ¶
A CronJob is responsible for creating a Job and scheduling it based on provided cron schedule.
This helps running Jobs in a recurring manner.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.CronJob(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
active_deadline: Duration = None,
backoff_limit: typing.Union[int, float] = None,
ttl_after_finished: Duration = None,
schedule: Cron,
concurrency_policy: ConcurrencyPolicy = None,
failed_jobs_retained: typing.Union[int, float] = None,
starting_deadline: Duration = None,
successful_jobs_retained: typing.Union[int, float] = None,
suspend: bool = None,
time_zone: str = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
active_deadline |
cdk8s.Duration |
Specifies the duration the job may be active before the system tries to terminate it. |
backoff_limit |
typing.Union[int, float] |
Specifies the number of retries before marking this job failed. |
ttl_after_finished |
cdk8s.Duration |
Limits the lifetime of a Job that has finished execution (either Complete or Failed). |
schedule |
cdk8s.Cron |
Specifies the time in which the job would run again. |
concurrency_policy |
ConcurrencyPolicy |
Specifies the concurrency policy for the job. |
failed_jobs_retained |
typing.Union[int, float] |
Specifies the number of failed jobs history retained. |
starting_deadline |
cdk8s.Duration |
Kubernetes attempts to start cron jobs at its schedule time, but this is not guaranteed. |
successful_jobs_retained |
typing.Union[int, float] |
Specifies the number of successful jobs history retained. |
suspend |
bool |
Specifies if the cron job should be suspended. |
time_zone |
str |
Specifies the timezone for the job. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
active_deadlineOptional ¶
- Type: cdk8s.Duration
- Default: If unset, then there is no deadline.
Specifies the duration the job may be active before the system tries to terminate it.
backoff_limitOptional ¶
- Type: typing.Union[int, float]
- Default: If not set, system defaults to 6.
Specifies the number of retries before marking this job failed.
ttl_after_finishedOptional ¶
- Type: cdk8s.Duration
- Default: If this field is unset, the Job won’t be automatically deleted.
Limits the lifetime of a Job that has finished execution (either Complete or Failed).
If this field is set, after the Job finishes, it is eligible to
be automatically deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored. If this field is set to zero,
the Job becomes eligible to be deleted immediately after it finishes. This
field is alpha-level and is only honored by servers that enable the
TTLAfterFinished feature.
scheduleRequired ¶
- Type: cdk8s.Cron
Specifies the time in which the job would run again.
This is defined as a cron expression in the CronJob resource.
concurrency_policyOptional ¶
- Type: ConcurrencyPolicy
- Default: ConcurrencyPolicy.Forbid
Specifies the concurrency policy for the job.
failed_jobs_retainedOptional ¶
- Type: typing.Union[int, float]
- Default: 1
Specifies the number of failed jobs history retained.
This would retain the Job and the associated Pod resource and can be useful for debugging.
starting_deadlineOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(10)
Kubernetes attempts to start cron jobs at its schedule time, but this is not guaranteed.
This deadline specifies how much time can pass after a schedule point, for which kubernetes can still start the job. For example, if this is set to 100 seconds, kubernetes is allowed to start the job at a maximum 100 seconds after the scheduled time.
Note that the Kubernetes CronJobController checks for things every 10 seconds, for this reason, a deadline below 10 seconds is not allowed, as it may cause your job to never be scheduled.
In addition, kubernetes will stop scheduling jobs if more than 100 schedules were missed (for any reason). This property also controls what time interval should kubernetes consider when counting for missed schedules.
For example, suppose a CronJob is set to schedule a new Job every one minute beginning at 08:30:00,
and its startingDeadline field is not set. If the CronJob controller happens to be down from 08:29:00 to 10:21:00,
the job will not start as the number of missed jobs which missed their schedule is greater than 100.
However, if startingDeadline is set to 200 seconds, kubernetes will only count 3 missed schedules, and thus
start a new execution at 10:22:00.
successful_jobs_retainedOptional ¶
- Type: typing.Union[int, float]
- Default: 3
Specifies the number of successful jobs history retained.
This would retain the Job and the associated Pod resource and can be useful for debugging.
suspendOptional ¶
- Type: bool
- Default: false
Specifies if the cron job should be suspended.
Only applies to future executions, current ones are remained untouched.
time_zoneOptional ¶
- Type: str
- Default: Timezone of kube-controller-manager process.
Specifies the timezone for the job.
This helps aligining the schedule to follow the specified timezone.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_container |
No description. |
add_host_alias |
No description. |
add_init_container |
No description. |
add_volume |
No description. |
attach_container |
No description. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_pod_selector_config |
Return the configuration of this selector. |
to_subject_configuration |
Return the subject configuration. |
select |
Configure selectors for this workload. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_container ¶
def add_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_host_alias ¶
def add_host_alias(
hostnames: typing.List[str],
ip: str
) -> None
hostnamesRequired ¶
- Type: typing.List[str]
Hostnames for the chosen IP address.
ipRequired ¶
- Type: str
IP address of the host file entry.
add_init_container ¶
def add_init_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_volume ¶
def add_volume(
vol: Volume
) -> None
volRequired ¶
- Type: Volume
attach_container ¶
def attach_container(
cont: Container
) -> None
contRequired ¶
- Type: Container
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
select ¶
def select(
selectors: *LabelSelector
) -> None
Configure selectors for this workload.
selectorsRequired ¶
- Type: *LabelSelector
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.CronJob.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
Represents the resource type. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
automount_service_account_token |
bool |
No description. |
containers |
typing.List[Container] |
No description. |
dns |
PodDns |
No description. |
host_aliases |
typing.List[HostAlias] |
No description. |
init_containers |
typing.List[Container] |
No description. |
pod_metadata |
cdk8s.ApiObjectMetadataDefinition |
The metadata of pods in this workload. |
security_context |
PodSecurityContext |
No description. |
share_process_namespace |
bool |
No description. |
volumes |
typing.List[Volume] |
No description. |
docker_registry_auth |
ISecret |
No description. |
enable_service_links |
bool |
No description. |
host_network |
bool |
No description. |
restart_policy |
RestartPolicy |
No description. |
service_account |
IServiceAccount |
No description. |
termination_grace_period |
cdk8s.Duration |
No description. |
connections |
PodConnections |
No description. |
match_expressions |
typing.List[LabelSelectorRequirement] |
The expression matchers this workload will use in order to select pods. |
match_labels |
typing.Mapping[str] |
The label matchers this workload will use in order to select pods. |
scheduling |
WorkloadScheduling |
No description. |
concurrency_policy |
str |
The policy used by this cron job to determine the concurrency mode in which to schedule jobs. |
failed_jobs_retained |
typing.Union[int, float] |
The number of failed jobs retained by this cron job. |
schedule |
cdk8s.Cron |
The schedule this cron job is scheduled to run in. |
starting_deadline |
cdk8s.Duration |
The time by which the running cron job needs to schedule the next job execution. |
successful_jobs_retained |
typing.Union[int, float] |
The number of successful jobs retained by this cron job. |
suspend |
bool |
Whether or not the cron job is currently suspended or not. |
time_zone |
str |
The timezone which this cron job would follow to schedule jobs. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
Represents the resource type.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
automount_service_account_tokenRequired ¶
automount_service_account_token: bool
- Type: bool
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[Container]
dnsRequired ¶
dns: PodDns
- Type: PodDns
host_aliasesRequired ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
init_containersRequired ¶
init_containers: typing.List[Container]
- Type: typing.List[Container]
pod_metadataRequired ¶
pod_metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
The metadata of pods in this workload.
security_contextRequired ¶
security_context: PodSecurityContext
- Type: PodSecurityContext
share_process_namespaceRequired ¶
share_process_namespace: bool
- Type: bool
volumesRequired ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
host_networkOptional ¶
host_network: bool
- Type: bool
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
connectionsRequired ¶
connections: PodConnections
- Type: PodConnections
match_expressionsRequired ¶
match_expressions: typing.List[LabelSelectorRequirement]
- Type: typing.List[LabelSelectorRequirement]
The expression matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add expression matchers.
match_labelsRequired ¶
match_labels: typing.Mapping[str]
- Type: typing.Mapping[str]
The label matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add label matchers.
schedulingRequired ¶
scheduling: WorkloadScheduling
- Type: WorkloadScheduling
concurrency_policyRequired ¶
concurrency_policy: str
- Type: str
The policy used by this cron job to determine the concurrency mode in which to schedule jobs.
failed_jobs_retainedRequired ¶
failed_jobs_retained: typing.Union[int, float]
- Type: typing.Union[int, float]
The number of failed jobs retained by this cron job.
scheduleRequired ¶
schedule: Cron
- Type: cdk8s.Cron
The schedule this cron job is scheduled to run in.
starting_deadlineRequired ¶
starting_deadline: Duration
- Type: cdk8s.Duration
The time by which the running cron job needs to schedule the next job execution.
The job is considered as failed if it misses this deadline.
successful_jobs_retainedRequired ¶
successful_jobs_retained: typing.Union[int, float]
- Type: typing.Union[int, float]
The number of successful jobs retained by this cron job.
suspendRequired ¶
suspend: bool
- Type: bool
Whether or not the cron job is currently suspended or not.
time_zoneOptional ¶
time_zone: str
- Type: str
The timezone which this cron job would follow to schedule jobs.
DaemonSet ¶
A DaemonSet ensures that all (or some) Nodes run a copy of a Pod.
As nodes are added to the cluster, Pods are added to them. As nodes are removed from the cluster, those Pods are garbage collected. Deleting a DaemonSet will clean up the Pods it created.
Some typical uses of a DaemonSet are:
- running a cluster storage daemon on every node
- running a logs collection daemon on every node
- running a node monitoring daemon on every node
In a simple case, one DaemonSet, covering all nodes, would be used for each type of daemon. A more complex setup might use multiple DaemonSets for a single type of daemon, but with different flags and/or different memory and cpu requests for different hardware types.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.DaemonSet(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
min_ready_seconds: typing.Union[int, float] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
min_ready_seconds |
typing.Union[int, float] |
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
min_ready_secondsOptional ¶
- Type: typing.Union[int, float]
- Default: 0
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_container |
No description. |
add_host_alias |
No description. |
add_init_container |
No description. |
add_volume |
No description. |
attach_container |
No description. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_pod_selector_config |
Return the configuration of this selector. |
to_subject_configuration |
Return the subject configuration. |
select |
Configure selectors for this workload. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_container ¶
def add_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_host_alias ¶
def add_host_alias(
hostnames: typing.List[str],
ip: str
) -> None
hostnamesRequired ¶
- Type: typing.List[str]
Hostnames for the chosen IP address.
ipRequired ¶
- Type: str
IP address of the host file entry.
add_init_container ¶
def add_init_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_volume ¶
def add_volume(
vol: Volume
) -> None
volRequired ¶
- Type: Volume
attach_container ¶
def attach_container(
cont: Container
) -> None
contRequired ¶
- Type: Container
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
select ¶
def select(
selectors: *LabelSelector
) -> None
Configure selectors for this workload.
selectorsRequired ¶
- Type: *LabelSelector
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.DaemonSet.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
automount_service_account_token |
bool |
No description. |
containers |
typing.List[Container] |
No description. |
dns |
PodDns |
No description. |
host_aliases |
typing.List[HostAlias] |
No description. |
init_containers |
typing.List[Container] |
No description. |
pod_metadata |
cdk8s.ApiObjectMetadataDefinition |
The metadata of pods in this workload. |
security_context |
PodSecurityContext |
No description. |
share_process_namespace |
bool |
No description. |
volumes |
typing.List[Volume] |
No description. |
docker_registry_auth |
ISecret |
No description. |
enable_service_links |
bool |
No description. |
host_network |
bool |
No description. |
restart_policy |
RestartPolicy |
No description. |
service_account |
IServiceAccount |
No description. |
termination_grace_period |
cdk8s.Duration |
No description. |
connections |
PodConnections |
No description. |
match_expressions |
typing.List[LabelSelectorRequirement] |
The expression matchers this workload will use in order to select pods. |
match_labels |
typing.Mapping[str] |
The label matchers this workload will use in order to select pods. |
scheduling |
WorkloadScheduling |
No description. |
min_ready_seconds |
typing.Union[int, float] |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
automount_service_account_tokenRequired ¶
automount_service_account_token: bool
- Type: bool
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[Container]
dnsRequired ¶
dns: PodDns
- Type: PodDns
host_aliasesRequired ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
init_containersRequired ¶
init_containers: typing.List[Container]
- Type: typing.List[Container]
pod_metadataRequired ¶
pod_metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
The metadata of pods in this workload.
security_contextRequired ¶
security_context: PodSecurityContext
- Type: PodSecurityContext
share_process_namespaceRequired ¶
share_process_namespace: bool
- Type: bool
volumesRequired ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
host_networkOptional ¶
host_network: bool
- Type: bool
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
connectionsRequired ¶
connections: PodConnections
- Type: PodConnections
match_expressionsRequired ¶
match_expressions: typing.List[LabelSelectorRequirement]
- Type: typing.List[LabelSelectorRequirement]
The expression matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add expression matchers.
match_labelsRequired ¶
match_labels: typing.Mapping[str]
- Type: typing.Mapping[str]
The label matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add label matchers.
schedulingRequired ¶
scheduling: WorkloadScheduling
- Type: WorkloadScheduling
min_ready_secondsRequired ¶
min_ready_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
Deployment ¶
- Implements: IScalable
A Deployment provides declarative updates for Pods and ReplicaSets.
You describe a desired state in a Deployment, and the Deployment Controller changes the actual state to the desired state at a controlled rate. You can define Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.
Note: Do not manage ReplicaSets owned by a Deployment. Consider opening an issue in the main Kubernetes repository if your use case is not covered below.
Use Case
The following are typical use cases for Deployments:
- Create a Deployment to rollout a ReplicaSet. The ReplicaSet creates Pods in the background. Check the status of the rollout to see if it succeeds or not.
- Declare the new state of the Pods by updating the PodTemplateSpec of the Deployment. A new ReplicaSet is created and the Deployment manages moving the Pods from the old ReplicaSet to the new one at a controlled rate. Each new ReplicaSet updates the revision of the Deployment.
- Rollback to an earlier Deployment revision if the current state of the Deployment is not stable. Each rollback updates the revision of the Deployment.
- Scale up the Deployment to facilitate more load.
- Pause the Deployment to apply multiple fixes to its PodTemplateSpec and then resume it to start a new rollout.
- Use the status of the Deployment as an indicator that a rollout has stuck.
- Clean up older ReplicaSets that you don’t need anymore.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Deployment(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
min_ready: Duration = None,
progress_deadline: Duration = None,
replicas: typing.Union[int, float] = None,
revision_history_limit: typing.Union[int, float] = None,
strategy: DeploymentStrategy = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
min_ready |
cdk8s.Duration |
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
progress_deadline |
cdk8s.Duration |
The maximum duration for a deployment to make progress before it is considered to be failed. |
replicas |
typing.Union[int, float] |
Number of desired pods. |
revision_history_limit |
typing.Union[int, float] |
Specify how many old ReplicaSets for this Deployment you want to retain. |
strategy |
DeploymentStrategy |
Specifies the strategy used to replace old Pods by new ones. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
min_readyOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(0)
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
Zero means the pod will be considered available as soon as it is ready.
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds
progress_deadlineOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(600)
The maximum duration for a deployment to make progress before it is considered to be failed.
The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status.
Note that progress will not be estimated during the time a deployment is paused.
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds
replicasOptional ¶
- Type: typing.Union[int, float]
- Default: 2
Number of desired pods.
revision_history_limitOptional ¶
- Type: typing.Union[int, float]
- Default: 10
Specify how many old ReplicaSets for this Deployment you want to retain.
The rest will be garbage-collected in the background. By default, it is 10.
strategyOptional ¶
- Type: DeploymentStrategy
- Default: RollingUpdate with maxSurge and maxUnavailable set to 25%.
Specifies the strategy used to replace old Pods by new ones.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_container |
No description. |
add_host_alias |
No description. |
add_init_container |
No description. |
add_volume |
No description. |
attach_container |
No description. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_pod_selector_config |
Return the configuration of this selector. |
to_subject_configuration |
Return the subject configuration. |
select |
Configure selectors for this workload. |
expose_via_ingress |
Expose a deployment via an ingress. |
expose_via_service |
Expose a deployment via a service. |
mark_has_autoscaler |
Called on all IScalable targets when they are associated with an autoscaler. |
to_scaling_target |
Return the target spec properties of this Scalable. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_container ¶
def add_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_host_alias ¶
def add_host_alias(
hostnames: typing.List[str],
ip: str
) -> None
hostnamesRequired ¶
- Type: typing.List[str]
Hostnames for the chosen IP address.
ipRequired ¶
- Type: str
IP address of the host file entry.
add_init_container ¶
def add_init_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_volume ¶
def add_volume(
vol: Volume
) -> None
volRequired ¶
- Type: Volume
attach_container ¶
def attach_container(
cont: Container
) -> None
contRequired ¶
- Type: Container
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
select ¶
def select(
selectors: *LabelSelector
) -> None
Configure selectors for this workload.
selectorsRequired ¶
- Type: *LabelSelector
expose_via_ingress ¶
def expose_via_ingress(
path: str,
name: str = None,
ports: typing.List[ServicePort] = None,
service_type: ServiceType = None,
ingress: Ingress = None,
path_type: HttpIngressPathType = None
) -> Ingress
Expose a deployment via an ingress.
This will first expose the deployment with a service, and then expose the service via an ingress.
pathRequired ¶
- Type: str
The ingress path to register under.
nameOptional ¶
- Type: str
- Default: auto generated.
The name of the service to expose.
If you’d like to expose the deployment multiple times, you must explicitly set a name starting from the second expose call.
portsOptional ¶
- Type: typing.List[ServicePort]
- Default: extracted from the deployment.
The ports that the service should bind to.
service_typeOptional ¶
- Type: ServiceType
- Default: ClusterIP.
The type of the exposed service.
ingressOptional ¶
- Type: Ingress
- Default: An ingress will be automatically created.
The ingress to add rules to.
path_typeOptional ¶
- Type: HttpIngressPathType
- Default: HttpIngressPathType.PREFIX
The type of the path.
expose_via_service ¶
def expose_via_service(
name: str = None,
ports: typing.List[ServicePort] = None,
service_type: ServiceType = None
) -> Service
Expose a deployment via a service.
This is equivalent to running kubectl expose deployment <deployment-name>.
nameOptional ¶
- Type: str
- Default: auto generated.
The name of the service to expose.
If you’d like to expose the deployment multiple times, you must explicitly set a name starting from the second expose call.
portsOptional ¶
- Type: typing.List[ServicePort]
- Default: extracted from the deployment.
The ports that the service should bind to.
service_typeOptional ¶
- Type: ServiceType
- Default: ClusterIP.
The type of the exposed service.
mark_has_autoscaler ¶
def mark_has_autoscaler() -> None
Called on all IScalable targets when they are associated with an autoscaler.
to_scaling_target ¶
def to_scaling_target() -> ScalingTarget
Return the target spec properties of this Scalable.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Deployment.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
automount_service_account_token |
bool |
No description. |
containers |
typing.List[Container] |
No description. |
dns |
PodDns |
No description. |
host_aliases |
typing.List[HostAlias] |
No description. |
init_containers |
typing.List[Container] |
No description. |
pod_metadata |
cdk8s.ApiObjectMetadataDefinition |
The metadata of pods in this workload. |
security_context |
PodSecurityContext |
No description. |
share_process_namespace |
bool |
No description. |
volumes |
typing.List[Volume] |
No description. |
docker_registry_auth |
ISecret |
No description. |
enable_service_links |
bool |
No description. |
host_network |
bool |
No description. |
restart_policy |
RestartPolicy |
No description. |
service_account |
IServiceAccount |
No description. |
termination_grace_period |
cdk8s.Duration |
No description. |
connections |
PodConnections |
No description. |
match_expressions |
typing.List[LabelSelectorRequirement] |
The expression matchers this workload will use in order to select pods. |
match_labels |
typing.Mapping[str] |
The label matchers this workload will use in order to select pods. |
scheduling |
WorkloadScheduling |
No description. |
min_ready |
cdk8s.Duration |
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
progress_deadline |
cdk8s.Duration |
The maximum duration for a deployment to make progress before it is considered to be failed. |
revision_history_limit |
typing.Union[int, float] |
Number of desired replicasets history. |
strategy |
DeploymentStrategy |
No description. |
replicas |
typing.Union[int, float] |
Number of desired pods. |
has_autoscaler |
bool |
If this is a target of an autoscaler. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
automount_service_account_tokenRequired ¶
automount_service_account_token: bool
- Type: bool
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[Container]
dnsRequired ¶
dns: PodDns
- Type: PodDns
host_aliasesRequired ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
init_containersRequired ¶
init_containers: typing.List[Container]
- Type: typing.List[Container]
pod_metadataRequired ¶
pod_metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
The metadata of pods in this workload.
security_contextRequired ¶
security_context: PodSecurityContext
- Type: PodSecurityContext
share_process_namespaceRequired ¶
share_process_namespace: bool
- Type: bool
volumesRequired ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
host_networkOptional ¶
host_network: bool
- Type: bool
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
connectionsRequired ¶
connections: PodConnections
- Type: PodConnections
match_expressionsRequired ¶
match_expressions: typing.List[LabelSelectorRequirement]
- Type: typing.List[LabelSelectorRequirement]
The expression matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add expression matchers.
match_labelsRequired ¶
match_labels: typing.Mapping[str]
- Type: typing.Mapping[str]
The label matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add label matchers.
schedulingRequired ¶
scheduling: WorkloadScheduling
- Type: WorkloadScheduling
min_readyRequired ¶
min_ready: Duration
- Type: cdk8s.Duration
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
progress_deadlineRequired ¶
progress_deadline: Duration
- Type: cdk8s.Duration
The maximum duration for a deployment to make progress before it is considered to be failed.
revision_history_limitRequired ¶
revision_history_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 10
Number of desired replicasets history.
strategyRequired ¶
strategy: DeploymentStrategy
- Type: DeploymentStrategy
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
Number of desired pods.
has_autoscalerRequired ¶
has_autoscaler: bool
- Type: bool
If this is a target of an autoscaler.
DockerConfigSecret ¶
Create a secret for storing credentials for accessing a container image registry.
https://kubernetes.io/docs/concepts/configuration/secret/#docker-config-secrets
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.DockerConfigSecret(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
immutable: bool = None,
data: typing.Mapping[typing.Any]
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
data |
typing.Mapping[typing.Any] |
JSON content to provide for the ~/.docker/config.json file. This will be stringified and inserted as stringData. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
dataRequired ¶
- Type: typing.Mapping[typing.Any]
JSON content to provide for the ~/.docker/config.json file. This will be stringified and inserted as stringData.
https://docs.docker.com/engine/reference/commandline/cli/#sample-configuration-file
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_string_data |
Adds a string data field to the secret. |
env_value |
Returns EnvValue object from a secret’s key. |
get_string_data |
Gets a string data by key or undefined. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_string_data ¶
def add_string_data(
key: str,
value: str
) -> None
Adds a string data field to the secret.
keyRequired ¶
- Type: str
Key.
valueRequired ¶
- Type: str
Value.
env_value ¶
def env_value(
key: str,
optional: bool = None
) -> EnvValue
Returns EnvValue object from a secret’s key.
keyRequired ¶
- Type: str
optionalOptional ¶
- Type: bool
- Default: false
Specify whether the Secret or its key must be defined.
get_string_data ¶
def get_string_data(
key: str
) -> str
Gets a string data by key or undefined.
keyRequired ¶
- Type: str
Key.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_secret_name |
Imports a secret from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.DockerConfigSecret.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_secret_name ¶
import cdk8s_plus_31
cdk8s_plus_31.DockerConfigSecret.from_secret_name(
scope: Construct,
id: str,
name: str
)
Imports a secret from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
immutable |
bool |
Whether or not the secret is immutable. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
immutableRequired ¶
immutable: bool
- Type: bool
Whether or not the secret is immutable.
GCEPersistentDiskPersistentVolume ¶
GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet’s host machine and then exposed to the pod.
Provisioned by an admin.
https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.GCEPersistentDiskPersistentVolume(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
claim: IPersistentVolumeClaim = None,
mount_options: typing.List[str] = None,
reclaim_policy: PersistentVolumeReclaimPolicy = None,
storage: Size = None,
storage_class_name: str = None,
volume_mode: PersistentVolumeMode = None,
pd_name: str,
fs_type: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains all ways the volume can be mounted. |
claim |
IPersistentVolumeClaim |
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. |
mount_options |
typing.List[str] |
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. |
storage |
cdk8s.Size |
What is the storage capacity of this volume. |
storage_class_name |
str |
Name of StorageClass to which this persistent volume belongs. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
pd_name |
str |
Unique name of the PD resource in GCE. |
fs_type |
str |
Filesystem type of the volume that you want to mount. |
partition |
typing.Union[int, float] |
The partition in the volume that you want to mount. |
read_only |
bool |
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes.
Contains all ways the volume can be mounted.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
claimOptional ¶
- Type: IPersistentVolumeClaim
- Default: Not bound to a specific claim.
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
mount_optionsOptional ¶
- Type: typing.List[str]
- Default: No options.
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
reclaim_policyOptional ¶
- Type: PersistentVolumeReclaimPolicy
- Default: PersistentVolumeReclaimPolicy.RETAIN
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
storageOptional ¶
- Type: cdk8s.Size
- Default: No specified.
What is the storage capacity of this volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
- Type: str
- Default: Volume does not belong to any storage class.
Name of StorageClass to which this persistent volume belongs.
volume_modeOptional ¶
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
pd_nameRequired ¶
- Type: str
Unique name of the PD resource in GCE.
Used to identify the disk in GCE.
https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
fs_typeOptional ¶
- Type: str
- Default: ‘ext4’
Filesystem type of the volume that you want to mount.
Tip: Ensure that the filesystem type is supported by the host operating system.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
partitionOptional ¶
- Type: typing.Union[int, float]
- Default: No partition.
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).
read_onlyOptional ¶
- Type: bool
- Default: false
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
as_volume |
Convert the piece of storage into a concrete volume. |
bind |
Bind a volume to a specific claim. |
reserve |
Reserve a PersistentVolume by creating a PersistentVolumeClaim that is wired to claim this volume. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
as_volume ¶
def as_volume() -> Volume
Convert the piece of storage into a concrete volume.
bind ¶
def bind(
claim: IPersistentVolumeClaim
) -> None
Bind a volume to a specific claim.
Note that you must also bind the claim to the volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding
claimRequired ¶
- Type: IPersistentVolumeClaim
The PVC to bind to.
reserve ¶
def reserve() -> PersistentVolumeClaim
Reserve a PersistentVolume by creating a PersistentVolumeClaim that is wired to claim this volume.
Note that this method will throw in case the volume is already claimed.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reserving-a-persistentvolume
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_persistent_volume_name |
Imports a pv from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.GCEPersistentDiskPersistentVolume.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_persistent_volume_name ¶
import cdk8s_plus_31
cdk8s_plus_31.GCEPersistentDiskPersistentVolume.from_persistent_volume_name(
scope: Construct,
id: str,
volume_name: str
)
Imports a pv from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
volume_nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
mode |
PersistentVolumeMode |
Volume mode of this volume. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
Reclaim policy of this volume. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Access modes requirement of this claim. |
claim |
IPersistentVolumeClaim |
PVC this volume is bound to. |
mount_options |
typing.List[str] |
Mount options of this volume. |
storage |
cdk8s.Size |
Storage size of this volume. |
storage_class_name |
str |
Storage class this volume belongs to. |
fs_type |
str |
File system type of this volume. |
pd_name |
str |
PD resource in GCE of this volume. |
read_only |
bool |
Whether or not it is mounted as a read-only volume. |
partition |
typing.Union[int, float] |
Partition of this volume. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
modeRequired ¶
mode: PersistentVolumeMode
- Type: PersistentVolumeMode
Volume mode of this volume.
reclaim_policyRequired ¶
reclaim_policy: PersistentVolumeReclaimPolicy
Reclaim policy of this volume.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
Access modes requirement of this claim.
claimOptional ¶
claim: IPersistentVolumeClaim
- Type: IPersistentVolumeClaim
PVC this volume is bound to.
Undefined means this volume is not yet claimed by any PVC.
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
Mount options of this volume.
storageOptional ¶
storage: Size
- Type: cdk8s.Size
Storage size of this volume.
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
Storage class this volume belongs to.
fs_typeRequired ¶
fs_type: str
- Type: str
File system type of this volume.
pd_nameRequired ¶
pd_name: str
- Type: str
PD resource in GCE of this volume.
read_onlyRequired ¶
read_only: bool
- Type: bool
Whether or not it is mounted as a read-only volume.
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
Partition of this volume.
Group ¶
- Implements: ISubject
Represents a group.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
to_subject_configuration |
Return the subject configuration. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_name |
Reference a group by name. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Group.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_name ¶
import cdk8s_plus_31
cdk8s_plus_31.Group.from_name(
scope: Construct,
id: str,
name: str
)
Reference a group by name.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
kind |
str |
No description. |
name |
str |
No description. |
api_group |
str |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
kindRequired ¶
kind: str
- Type: str
nameRequired ¶
name: str
- Type: str
api_groupOptional ¶
api_group: str
- Type: str
HorizontalPodAutoscaler ¶
A HorizontalPodAutoscaler scales a workload up or down in response to a metric change.
This allows your services to scale up when demand is high and scale down when they are no longer needed.
Typical use cases for HorizontalPodAutoscaler:
- When Memory usage is above 70%, scale up the number of replicas to meet the demand.
- When CPU usage is below 30%, scale down the number of replicas to save resources.
- When a service is experiencing a spike in traffic, scale up the number of replicas to meet the demand. Then, when the traffic subsides, scale down the number of replicas to save resources.
The autoscaler uses the following algorithm to determine the number of replicas to scale:
desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]
HorizontalPodAutoscaler’s can be used to with any Scalable workload:
- Deployment
- StatefulSet
Targets that already have a replica count defined:
Remove any replica counts from the target resource before associating with a HorizontalPodAutoscaler. If this isn’t done, then any time a change to that object is applied, Kubernetes will scale the current number of Pods to the value of the target.replicas key. This may not be desired and could lead to unexpected behavior.
Example
# Example automatically generated from non-compiling source. May contain errors.
backend = kplus.Deployment(self, "Backend", ...)
hpa = kplus.HorizontalPodAutoscaler(chart, "Hpa",
target=backend,
max_replicas=10,
scale_up={
"policies": [{
"replicas": kplus.Replicas.absolute(3),
"duration": Duration.minutes(5)
}
]
}
)
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.HorizontalPodAutoscaler(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
max_replicas: typing.Union[int, float],
target: IScalable,
metrics: typing.List[Metric] = None,
min_replicas: typing.Union[int, float] = None,
scale_down: ScalingRules = None,
scale_up: ScalingRules = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
max_replicas |
typing.Union[int, float] |
The maximum number of replicas that can be scaled up to. |
target |
IScalable |
The workload to scale up or down. |
metrics |
typing.List[Metric] |
The metric conditions that trigger a scale up or scale down. |
min_replicas |
typing.Union[int, float] |
The minimum number of replicas that can be scaled down to. |
scale_down |
ScalingRules |
The scaling behavior when scaling down. |
scale_up |
ScalingRules |
The scaling behavior when scaling up. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
max_replicasRequired ¶
- Type: typing.Union[int, float]
The maximum number of replicas that can be scaled up to.
targetRequired ¶
- Type: IScalable
The workload to scale up or down.
Scalable workload types:
- Deployment
- StatefulSet
metricsOptional ¶
- Type: typing.List[Metric]
- Default: If metrics are not provided, then the target resource constraints (e.g. cpu limit) will be used as scaling metrics.
The metric conditions that trigger a scale up or scale down.
min_replicasOptional ¶
- Type: typing.Union[int, float]
- Default: 1
The minimum number of replicas that can be scaled down to.
Can be set to 0 if the alpha feature gate HPAScaleToZero is enabled and
at least one Object or External metric is configured.
scale_downOptional ¶
- Type: ScalingRules
- Default: Scale down to minReplica count with a 5 minute stabilization window.
The scaling behavior when scaling down.
scale_upOptional ¶
- Type: ScalingRules
- Default: Is the higher of: * Increase no more than 4 pods per 60 seconds * Double the number of pods per 60 seconds
The scaling behavior when scaling up.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.HorizontalPodAutoscaler.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
max_replicas |
typing.Union[int, float] |
The maximum number of replicas that can be scaled up to. |
min_replicas |
typing.Union[int, float] |
The minimum number of replicas that can be scaled down to. |
scale_down |
ScalingRules |
The scaling behavior when scaling down. |
scale_up |
ScalingRules |
The scaling behavior when scaling up. |
target |
IScalable |
The workload to scale up or down. |
metrics |
typing.List[Metric] |
The metric conditions that trigger a scale up or scale down. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
max_replicasRequired ¶
max_replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
The maximum number of replicas that can be scaled up to.
min_replicasRequired ¶
min_replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
The minimum number of replicas that can be scaled down to.
scale_downRequired ¶
scale_down: ScalingRules
- Type: ScalingRules
The scaling behavior when scaling down.
scale_upRequired ¶
scale_up: ScalingRules
- Type: ScalingRules
The scaling behavior when scaling up.
targetRequired ¶
target: IScalable
- Type: IScalable
The workload to scale up or down.
metricsOptional ¶
metrics: typing.List[Metric]
- Type: typing.List[Metric]
The metric conditions that trigger a scale up or scale down.
Ingress ¶
Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend.
An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Ingress(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
class_name: str = None,
default_backend: IngressBackend = None,
rules: typing.List[IngressRule] = None,
tls: typing.List[IngressTls] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
class_name |
str |
Class Name for this ingress. |
default_backend |
IngressBackend |
The default backend services requests that do not match any rule. |
rules |
typing.List[IngressRule] |
Routing rules for this ingress. |
tls |
typing.List[IngressTls] |
TLS settings for this ingress. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
class_nameOptional ¶
- Type: str
Class Name for this ingress.
This field is a reference to an IngressClass resource that contains additional Ingress configuration, including the name of the Ingress controller.
default_backendOptional ¶
- Type: IngressBackend
The default backend services requests that do not match any rule.
Using this option or the addDefaultBackend() method is equivalent to
adding a rule with both path and host undefined.
rulesOptional ¶
- Type: typing.List[IngressRule]
Routing rules for this ingress.
Each rule must define an IngressBackend that will receive the requests
that match this rule. If both host and path are not specifiec, this
backend will be used as the default backend of the ingress.
You can also add rules later using addRule(), addHostRule(),
addDefaultBackend() and addHostDefaultBackend().
tlsOptional ¶
- Type: typing.List[IngressTls]
TLS settings for this ingress.
Using this option tells the ingress controller to expose a TLS endpoint. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_default_backend |
Defines the default backend for this ingress. |
add_host_default_backend |
Specify a default backend for a specific host name. |
add_host_rule |
Adds an ingress rule applied to requests to a specific host and a specific HTTP path (the Host header matches this value). |
add_rule |
Adds an ingress rule applied to requests sent to a specific HTTP path. |
add_rules |
Adds rules to this ingress. |
add_tls |
No description. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_default_backend ¶
def add_default_backend(
backend: IngressBackend
) -> None
Defines the default backend for this ingress.
A default backend capable of servicing requests that don’t match any rule.
backendRequired ¶
- Type: IngressBackend
The backend to use for requests that do not match any rule.
add_host_default_backend ¶
def add_host_default_backend(
host: str,
backend: IngressBackend
) -> None
Specify a default backend for a specific host name.
This backend will be used as a catch-all for requests
targeted to this host name (the Host header matches this value).
hostRequired ¶
- Type: str
The host name to match.
backendRequired ¶
- Type: IngressBackend
The backend to route to.
add_host_rule ¶
def add_host_rule(
host: str,
path: str,
backend: IngressBackend,
path_type: HttpIngressPathType = None
) -> None
Adds an ingress rule applied to requests to a specific host and a specific HTTP path (the Host header matches this value).
hostRequired ¶
- Type: str
The host name.
pathRequired ¶
- Type: str
The HTTP path.
backendRequired ¶
- Type: IngressBackend
The backend to route requests to.
path_typeOptional ¶
- Type: HttpIngressPathType
How the path is matched against request paths.
add_rule ¶
def add_rule(
path: str,
backend: IngressBackend,
path_type: HttpIngressPathType = None
) -> None
Adds an ingress rule applied to requests sent to a specific HTTP path.
pathRequired ¶
- Type: str
The HTTP path.
backendRequired ¶
- Type: IngressBackend
The backend to route requests to.
path_typeOptional ¶
- Type: HttpIngressPathType
How the path is matched against request paths.
add_rules ¶
def add_rules(
backend: IngressBackend,
host: str = None,
path: str = None,
path_type: HttpIngressPathType = None
) -> None
Adds rules to this ingress.
backendRequired ¶
- Type: IngressBackend
Backend defines the referenced service endpoint to which the traffic will be forwarded to.
hostOptional ¶
- Type: str
- Default: If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.
Host is the fully qualified domain name of a network host, as defined by RFC 3986.
Note the following deviations from the “host” part of the URI as
defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue
can only apply to the IP in the Spec of the parent Ingress. 2. The :
delimiter is not respected because ports are not allowed. Currently the
port of an Ingress is implicitly :80 for http and :443 for https. Both
these may change in the future. Incoming requests are matched against the
host before the IngressRuleValue.
pathOptional ¶
- Type: str
- Default: If unspecified, the path defaults to a catch all sending traffic to the backend.
Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional “path” part of a URL as defined by RFC 3986. Paths must begin with a ‘/’.
path_typeOptional ¶
- Type: HttpIngressPathType
Specify how the path is matched against request paths.
By default, path types will be matched by prefix.
https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types
add_tls ¶
def add_tls(
tls: typing.List[IngressTls]
) -> None
tlsRequired ¶
- Type: typing.List[IngressTls]
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Ingress.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
Job ¶
A Job creates one or more Pods and ensures that a specified number of them successfully terminate.
As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot). You can also use a Job to run multiple Pods in parallel.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Job(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
active_deadline: Duration = None,
backoff_limit: typing.Union[int, float] = None,
ttl_after_finished: Duration = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
active_deadline |
cdk8s.Duration |
Specifies the duration the job may be active before the system tries to terminate it. |
backoff_limit |
typing.Union[int, float] |
Specifies the number of retries before marking this job failed. |
ttl_after_finished |
cdk8s.Duration |
Limits the lifetime of a Job that has finished execution (either Complete or Failed). |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
active_deadlineOptional ¶
- Type: cdk8s.Duration
- Default: If unset, then there is no deadline.
Specifies the duration the job may be active before the system tries to terminate it.
backoff_limitOptional ¶
- Type: typing.Union[int, float]
- Default: If not set, system defaults to 6.
Specifies the number of retries before marking this job failed.
ttl_after_finishedOptional ¶
- Type: cdk8s.Duration
- Default: If this field is unset, the Job won’t be automatically deleted.
Limits the lifetime of a Job that has finished execution (either Complete or Failed).
If this field is set, after the Job finishes, it is eligible to
be automatically deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored. If this field is set to zero,
the Job becomes eligible to be deleted immediately after it finishes. This
field is alpha-level and is only honored by servers that enable the
TTLAfterFinished feature.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_container |
No description. |
add_host_alias |
No description. |
add_init_container |
No description. |
add_volume |
No description. |
attach_container |
No description. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_pod_selector_config |
Return the configuration of this selector. |
to_subject_configuration |
Return the subject configuration. |
select |
Configure selectors for this workload. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_container ¶
def add_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_host_alias ¶
def add_host_alias(
hostnames: typing.List[str],
ip: str
) -> None
hostnamesRequired ¶
- Type: typing.List[str]
Hostnames for the chosen IP address.
ipRequired ¶
- Type: str
IP address of the host file entry.
add_init_container ¶
def add_init_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_volume ¶
def add_volume(
vol: Volume
) -> None
volRequired ¶
- Type: Volume
attach_container ¶
def attach_container(
cont: Container
) -> None
contRequired ¶
- Type: Container
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
select ¶
def select(
selectors: *LabelSelector
) -> None
Configure selectors for this workload.
selectorsRequired ¶
- Type: *LabelSelector
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Job.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
automount_service_account_token |
bool |
No description. |
containers |
typing.List[Container] |
No description. |
dns |
PodDns |
No description. |
host_aliases |
typing.List[HostAlias] |
No description. |
init_containers |
typing.List[Container] |
No description. |
pod_metadata |
cdk8s.ApiObjectMetadataDefinition |
The metadata of pods in this workload. |
security_context |
PodSecurityContext |
No description. |
share_process_namespace |
bool |
No description. |
volumes |
typing.List[Volume] |
No description. |
docker_registry_auth |
ISecret |
No description. |
enable_service_links |
bool |
No description. |
host_network |
bool |
No description. |
restart_policy |
RestartPolicy |
No description. |
service_account |
IServiceAccount |
No description. |
termination_grace_period |
cdk8s.Duration |
No description. |
connections |
PodConnections |
No description. |
match_expressions |
typing.List[LabelSelectorRequirement] |
The expression matchers this workload will use in order to select pods. |
match_labels |
typing.Mapping[str] |
The label matchers this workload will use in order to select pods. |
scheduling |
WorkloadScheduling |
No description. |
active_deadline |
cdk8s.Duration |
Duration before job is terminated. |
backoff_limit |
typing.Union[int, float] |
Number of retries before marking failed. |
ttl_after_finished |
cdk8s.Duration |
TTL before the job is deleted after it is finished. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
automount_service_account_tokenRequired ¶
automount_service_account_token: bool
- Type: bool
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[Container]
dnsRequired ¶
dns: PodDns
- Type: PodDns
host_aliasesRequired ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
init_containersRequired ¶
init_containers: typing.List[Container]
- Type: typing.List[Container]
pod_metadataRequired ¶
pod_metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
The metadata of pods in this workload.
security_contextRequired ¶
security_context: PodSecurityContext
- Type: PodSecurityContext
share_process_namespaceRequired ¶
share_process_namespace: bool
- Type: bool
volumesRequired ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
host_networkOptional ¶
host_network: bool
- Type: bool
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
connectionsRequired ¶
connections: PodConnections
- Type: PodConnections
match_expressionsRequired ¶
match_expressions: typing.List[LabelSelectorRequirement]
- Type: typing.List[LabelSelectorRequirement]
The expression matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add expression matchers.
match_labelsRequired ¶
match_labels: typing.Mapping[str]
- Type: typing.Mapping[str]
The label matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add label matchers.
schedulingRequired ¶
scheduling: WorkloadScheduling
- Type: WorkloadScheduling
active_deadlineOptional ¶
active_deadline: Duration
- Type: cdk8s.Duration
Duration before job is terminated.
If undefined, there is no deadline.
backoff_limitOptional ¶
backoff_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
Number of retries before marking failed.
ttl_after_finishedOptional ¶
ttl_after_finished: Duration
- Type: cdk8s.Duration
TTL before the job is deleted after it is finished.
KubeApiService ¶
APIService represents a server for a particular GroupVersion.
Name must be “version.group”.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiService(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ApiServiceSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.ApiServiceSpec |
Spec contains information for locating and communicating with a server. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ApiServiceSpec
Spec contains information for locating and communicating with a server.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiService.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiService.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiService.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiService.manifest(
metadata: ObjectMeta = None,
spec: ApiServiceSpec = None
)
Renders a Kubernetes manifest for “io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ApiServiceSpec
Spec contains information for locating and communicating with a server.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService”.
KubeApiServiceList ¶
APIServiceList is a list of APIService objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiServiceList(
scope: Construct,
id: str,
items: typing.List[KubeApiServiceProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeApiServiceProps] |
Items is the list of APIService. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeApiServiceProps]
Items is the list of APIService.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiServiceList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiServiceList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiServiceList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiServiceList.manifest(
items: typing.List[KubeApiServiceProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeApiServiceProps]
Items is the list of APIService.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList”.
KubeBinding ¶
Binding ties one object to another;
for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeBinding(
scope: Construct,
id: str,
target: ObjectReference,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
target |
cdk8s_plus_31.k8s.ObjectReference |
The target object that you want to bind to the standard object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
targetRequired ¶
- Type: cdk8s_plus_31.k8s.ObjectReference
The target object that you want to bind to the standard object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Binding”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeBinding.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeBinding.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeBinding.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeBinding.manifest(
target: ObjectReference,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Binding”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
targetRequired ¶
- Type: cdk8s_plus_31.k8s.ObjectReference
The target object that you want to bind to the standard object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.Binding”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.Binding”.
KubeCertificateSigningRequest ¶
CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.
Kubelets use this API to obtain:
- client certificates to authenticate to kube-apiserver (with the “kubernetes.io/kube-apiserver-client-kubelet” signerName).
- serving certificates for TLS endpoints kube-apiserver can connect to securely (with the “kubernetes.io/kubelet-serving” signerName).
This API can be used to request client certificates to authenticate to kube-apiserver (with the “kubernetes.io/kube-apiserver-client” signerName), or to obtain certificates from custom non-Kubernetes signers.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequest(
scope: Construct,
id: str,
spec: CertificateSigningRequestSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.CertificateSigningRequestSpec |
spec contains the certificate request, and is immutable after creation. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
No description. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.CertificateSigningRequestSpec
spec contains the certificate request, and is immutable after creation.
Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.certificates.v1.CertificateSigningRequest”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequest.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequest.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequest.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequest.manifest(
spec: CertificateSigningRequestSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.certificates.v1.CertificateSigningRequest”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.CertificateSigningRequestSpec
spec contains the certificate request, and is immutable after creation.
Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.certificates.v1.CertificateSigningRequest”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.certificates.v1.CertificateSigningRequest”.
KubeCertificateSigningRequestList ¶
CertificateSigningRequestList is a collection of CertificateSigningRequest objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequestList(
scope: Construct,
id: str,
items: typing.List[KubeCertificateSigningRequestProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeCertificateSigningRequestProps] |
items is a collection of CertificateSigningRequest objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
No description. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCertificateSigningRequestProps]
items is a collection of CertificateSigningRequest objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.certificates.v1.CertificateSigningRequestList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequestList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequestList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequestList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequestList.manifest(
items: typing.List[KubeCertificateSigningRequestProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.certificates.v1.CertificateSigningRequestList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCertificateSigningRequestProps]
items is a collection of CertificateSigningRequest objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.certificates.v1.CertificateSigningRequestList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.certificates.v1.CertificateSigningRequestList”.
KubeClusterRole ¶
ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRole(
scope: Construct,
id: str,
aggregation_rule: AggregationRule = None,
metadata: ObjectMeta = None,
rules: typing.List[PolicyRule] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
aggregation_rule |
cdk8s_plus_31.k8s.AggregationRule |
AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
rules |
typing.List[cdk8s_plus_31.k8s.PolicyRule] |
Rules holds all the PolicyRules for this ClusterRole. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
aggregation_ruleOptional ¶
- Type: cdk8s_plus_31.k8s.AggregationRule
AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.PolicyRule]
Rules holds all the PolicyRules for this ClusterRole.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.ClusterRole”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRole.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRole.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRole.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRole.manifest(
aggregation_rule: AggregationRule = None,
metadata: ObjectMeta = None,
rules: typing.List[PolicyRule] = None
)
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.ClusterRole”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
aggregation_ruleOptional ¶
- Type: cdk8s_plus_31.k8s.AggregationRule
AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.PolicyRule]
Rules holds all the PolicyRules for this ClusterRole.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.ClusterRole”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.ClusterRole”.
KubeClusterRoleBinding ¶
ClusterRoleBinding references a ClusterRole, but not contain it.
It can reference a ClusterRole in the global namespace, and adds who information via Subject.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBinding(
scope: Construct,
id: str,
role_ref: RoleRef,
metadata: ObjectMeta = None,
subjects: typing.List[Subject] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
role_ref |
cdk8s_plus_31.k8s.RoleRef |
RoleRef can only reference a ClusterRole in the global namespace. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
subjects |
typing.List[cdk8s_plus_31.k8s.Subject] |
Subjects holds references to the objects the role applies to. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
role_refRequired ¶
- Type: cdk8s_plus_31.k8s.RoleRef
RoleRef can only reference a ClusterRole in the global namespace.
If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.Subject]
Subjects holds references to the objects the role applies to.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.ClusterRoleBinding”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBinding.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBinding.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBinding.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBinding.manifest(
role_ref: RoleRef,
metadata: ObjectMeta = None,
subjects: typing.List[Subject] = None
)
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.ClusterRoleBinding”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
role_refRequired ¶
- Type: cdk8s_plus_31.k8s.RoleRef
RoleRef can only reference a ClusterRole in the global namespace.
If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.Subject]
Subjects holds references to the objects the role applies to.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.ClusterRoleBinding”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.ClusterRoleBinding”.
KubeClusterRoleBindingList ¶
ClusterRoleBindingList is a collection of ClusterRoleBindings.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBindingList(
scope: Construct,
id: str,
items: typing.List[KubeClusterRoleBindingProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeClusterRoleBindingProps] |
Items is a list of ClusterRoleBindings. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeClusterRoleBindingProps]
Items is a list of ClusterRoleBindings.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.ClusterRoleBindingList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBindingList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBindingList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBindingList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBindingList.manifest(
items: typing.List[KubeClusterRoleBindingProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.ClusterRoleBindingList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeClusterRoleBindingProps]
Items is a list of ClusterRoleBindings.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.ClusterRoleBindingList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.ClusterRoleBindingList”.
KubeClusterRoleList ¶
ClusterRoleList is a collection of ClusterRoles.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleList(
scope: Construct,
id: str,
items: typing.List[KubeClusterRoleProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeClusterRoleProps] |
Items is a list of ClusterRoles. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeClusterRoleProps]
Items is a list of ClusterRoles.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.ClusterRoleList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleList.manifest(
items: typing.List[KubeClusterRoleProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.ClusterRoleList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeClusterRoleProps]
Items is a list of ClusterRoles.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.ClusterRoleList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.ClusterRoleList”.
KubeClusterTrustBundleListV1Alpha1 ¶
ClusterTrustBundleList is a collection of ClusterTrustBundle objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleListV1Alpha1(
scope: Construct,
id: str,
items: typing.List[KubeClusterTrustBundleV1Alpha1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeClusterTrustBundleV1Alpha1Props] |
items is a collection of ClusterTrustBundle objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata contains the list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeClusterTrustBundleV1Alpha1Props]
items is a collection of ClusterTrustBundle objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata contains the list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleListV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleListV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleListV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleListV1Alpha1.manifest(
items: typing.List[KubeClusterTrustBundleV1Alpha1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeClusterTrustBundleV1Alpha1Props]
items is a collection of ClusterTrustBundle objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata contains the list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList”.
KubeClusterTrustBundleV1Alpha1 ¶
ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors (root certificates).
ClusterTrustBundle objects are considered to be readable by any authenticated user in the cluster, because they can be mounted by pods using the clusterTrustBundle projection. All service accounts have read access to ClusterTrustBundles by default. Users who only have namespace-level access to a cluster can read ClusterTrustBundles by impersonating a serviceaccount that they have access to.
It can be optionally associated with a particular assigner, in which case it contains one valid set of trust anchors for that signer. Signers may have multiple associated ClusterTrustBundles; each is an independent set of trust anchors for that signer. Admission control is used to enforce that only users with permissions on the signer can create or modify the corresponding bundle.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleV1Alpha1(
scope: Construct,
id: str,
spec: ClusterTrustBundleSpecV1Alpha1,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.ClusterTrustBundleSpecV1Alpha1 |
spec contains the signer (if any) and trust anchors. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata contains the object metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.ClusterTrustBundleSpecV1Alpha1
spec contains the signer (if any) and trust anchors.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata contains the object metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.certificates.v1alpha1.ClusterTrustBundle”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleV1Alpha1.manifest(
spec: ClusterTrustBundleSpecV1Alpha1,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.certificates.v1alpha1.ClusterTrustBundle”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.ClusterTrustBundleSpecV1Alpha1
spec contains the signer (if any) and trust anchors.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata contains the object metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.certificates.v1alpha1.ClusterTrustBundle”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.certificates.v1alpha1.ClusterTrustBundle”.
KubeComponentStatus ¶
ComponentStatus (and ComponentStatusList) holds the cluster validation info.
Deprecated: This API is deprecated in v1.19+
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatus(
scope: Construct,
id: str,
conditions: typing.List[ComponentCondition] = None,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
conditions |
typing.List[cdk8s_plus_31.k8s.ComponentCondition] |
List of component conditions observed. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
conditionsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.ComponentCondition]
List of component conditions observed.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ComponentStatus”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatus.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatus.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatus.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatus.manifest(
conditions: typing.List[ComponentCondition] = None,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ComponentStatus”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
conditionsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.ComponentCondition]
List of component conditions observed.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ComponentStatus”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ComponentStatus”.
KubeComponentStatusList ¶
Status of all the conditions for the component as a list of ComponentStatus objects.
Deprecated: This API is deprecated in v1.19+
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatusList(
scope: Construct,
id: str,
items: typing.List[KubeComponentStatusProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeComponentStatusProps] |
List of ComponentStatus objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeComponentStatusProps]
List of ComponentStatus objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ComponentStatusList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatusList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatusList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatusList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatusList.manifest(
items: typing.List[KubeComponentStatusProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ComponentStatusList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeComponentStatusProps]
List of ComponentStatus objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ComponentStatusList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ComponentStatusList”.
KubeConfigMap ¶
ConfigMap holds configuration data for pods to consume.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMap(
scope: Construct,
id: str,
binary_data: typing.Mapping[str] = None,
data: typing.Mapping[str] = None,
immutable: bool = None,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
binary_data |
typing.Mapping[str] |
BinaryData contains the binary data. |
data |
typing.Mapping[str] |
Data contains the configuration data. |
immutable |
bool |
Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
binary_dataOptional ¶
- Type: typing.Mapping[str]
BinaryData contains the binary data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.
dataOptional ¶
- Type: typing.Mapping[str]
Data contains the configuration data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.
immutableOptional ¶
- Type: bool
Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time. Defaulted to nil.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ConfigMap”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMap.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMap.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMap.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMap.manifest(
binary_data: typing.Mapping[str] = None,
data: typing.Mapping[str] = None,
immutable: bool = None,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ConfigMap”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
binary_dataOptional ¶
- Type: typing.Mapping[str]
BinaryData contains the binary data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.
dataOptional ¶
- Type: typing.Mapping[str]
Data contains the configuration data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.
immutableOptional ¶
- Type: bool
Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time. Defaulted to nil.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ConfigMap”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ConfigMap”.
KubeConfigMapList ¶
ConfigMapList is a resource containing a list of ConfigMap objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMapList(
scope: Construct,
id: str,
items: typing.List[KubeConfigMapProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeConfigMapProps] |
Items is the list of ConfigMaps. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeConfigMapProps]
Items is the list of ConfigMaps.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ConfigMapList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMapList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMapList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMapList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMapList.manifest(
items: typing.List[KubeConfigMapProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ConfigMapList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeConfigMapProps]
Items is the list of ConfigMaps.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ConfigMapList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ConfigMapList”.
KubeControllerRevision ¶
ControllerRevision implements an immutable snapshot of state data.
Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevision(
scope: Construct,
id: str,
revision: typing.Union[int, float],
data: typing.Any = None,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
revision |
typing.Union[int, float] |
Revision indicates the revision of the state represented by Data. |
data |
typing.Any |
Data is the serialized representation of the state. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
revisionRequired ¶
- Type: typing.Union[int, float]
Revision indicates the revision of the state represented by Data.
dataOptional ¶
- Type: typing.Any
Data is the serialized representation of the state.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.ControllerRevision”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevision.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevision.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevision.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevision.manifest(
revision: typing.Union[int, float],
data: typing.Any = None,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.ControllerRevision”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
revisionRequired ¶
- Type: typing.Union[int, float]
Revision indicates the revision of the state represented by Data.
dataOptional ¶
- Type: typing.Any
Data is the serialized representation of the state.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.ControllerRevision”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.ControllerRevision”.
KubeControllerRevisionList ¶
ControllerRevisionList is a resource containing a list of ControllerRevision objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevisionList(
scope: Construct,
id: str,
items: typing.List[KubeControllerRevisionProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeControllerRevisionProps] |
Items is the list of ControllerRevisions. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeControllerRevisionProps]
Items is the list of ControllerRevisions.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.ControllerRevisionList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevisionList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevisionList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevisionList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevisionList.manifest(
items: typing.List[KubeControllerRevisionProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.ControllerRevisionList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeControllerRevisionProps]
Items is the list of ControllerRevisions.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.ControllerRevisionList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.ControllerRevisionList”.
KubeCronJob ¶
CronJob represents the configuration of a single cron job.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJob(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: CronJobSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.CronJobSpec |
Specification of the desired behavior of a cron job, including the schedule. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.CronJobSpec
Specification of the desired behavior of a cron job, including the schedule.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.batch.v1.CronJob”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJob.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJob.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJob.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJob.manifest(
metadata: ObjectMeta = None,
spec: CronJobSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.batch.v1.CronJob”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.CronJobSpec
Specification of the desired behavior of a cron job, including the schedule.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.batch.v1.CronJob”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.batch.v1.CronJob”.
KubeCronJobList ¶
CronJobList is a collection of cron jobs.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJobList(
scope: Construct,
id: str,
items: typing.List[KubeCronJobProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeCronJobProps] |
items is the list of CronJobs. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCronJobProps]
items is the list of CronJobs.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.batch.v1.CronJobList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJobList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJobList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJobList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJobList.manifest(
items: typing.List[KubeCronJobProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.batch.v1.CronJobList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCronJobProps]
items is the list of CronJobs.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.batch.v1.CronJobList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.batch.v1.CronJobList”.
KubeCsiDriver ¶
CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster.
Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriver(
scope: Construct,
id: str,
spec: CsiDriverSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.CsiDriverSpec |
spec represents the specification of the CSI Driver. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.CsiDriverSpec
spec represents the specification of the CSI Driver.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSIDriver”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriver.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriver.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriver.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriver.manifest(
spec: CsiDriverSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSIDriver”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.CsiDriverSpec
spec represents the specification of the CSI Driver.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSIDriver”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSIDriver”.
KubeCsiDriverList ¶
CSIDriverList is a collection of CSIDriver objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriverList(
scope: Construct,
id: str,
items: typing.List[KubeCsiDriverProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeCsiDriverProps] |
items is the list of CSIDriver. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCsiDriverProps]
items is the list of CSIDriver.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSIDriverList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriverList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriverList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriverList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriverList.manifest(
items: typing.List[KubeCsiDriverProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSIDriverList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCsiDriverProps]
items is the list of CSIDriver.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSIDriverList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSIDriverList”.
KubeCsiNode ¶
CSINode holds information about all CSI drivers installed on a node.
CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn’t create this object. CSINode has an OwnerReference that points to the corresponding node object.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNode(
scope: Construct,
id: str,
spec: CsiNodeSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.CsiNodeSpec |
spec is the specification of CSINode. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.CsiNodeSpec
spec is the specification of CSINode.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
metadata.name must be the Kubernetes node name.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSINode”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNode.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNode.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNode.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNode.manifest(
spec: CsiNodeSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSINode”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.CsiNodeSpec
spec is the specification of CSINode.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
metadata.name must be the Kubernetes node name.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSINode”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSINode”.
KubeCsiNodeList ¶
CSINodeList is a collection of CSINode objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNodeList(
scope: Construct,
id: str,
items: typing.List[KubeCsiNodeProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeCsiNodeProps] |
items is the list of CSINode. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCsiNodeProps]
items is the list of CSINode.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSINodeList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNodeList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNodeList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNodeList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNodeList.manifest(
items: typing.List[KubeCsiNodeProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSINodeList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCsiNodeProps]
items is the list of CSINode.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSINodeList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSINodeList”.
KubeCsiStorageCapacity ¶
CSIStorageCapacity stores the result of one CSI GetCapacity call.
For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.
For example this can express things like: - StorageClass “standard” has “1234 GiB” available in “topology.kubernetes.io/zone=us-east1” - StorageClass “localssd” has “10 GiB” available in “kubernetes.io/hostname=knode-abc123”
The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero
The producer of these objects can decide which approach is more suitable.
They are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacity(
scope: Construct,
id: str,
storage_class_name: str,
capacity: Quantity = None,
maximum_volume_size: Quantity = None,
metadata: ObjectMeta = None,
node_topology: LabelSelector = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
storage_class_name |
str |
storageClassName represents the name of the StorageClass that the reported capacity applies to. |
capacity |
cdk8s_plus_31.k8s.Quantity |
capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. |
maximum_volume_size |
cdk8s_plus_31.k8s.Quantity |
maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
node_topology |
cdk8s_plus_31.k8s.LabelSelector |
nodeTopology defines which nodes have access to the storage for which capacity was reported. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
storage_class_nameRequired ¶
- Type: str
storageClassName represents the name of the StorageClass that the reported capacity applies to.
It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.
capacityOptional ¶
- Type: cdk8s_plus_31.k8s.Quantity
capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.
The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.
maximum_volume_sizeOptional ¶
- Type: cdk8s_plus_31.k8s.Quantity
maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.
This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
The name has no particular meaning. It must be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-
Objects are namespaced.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
node_topologyOptional ¶
- Type: cdk8s_plus_31.k8s.LabelSelector
nodeTopology defines which nodes have access to the storage for which capacity was reported.
If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSIStorageCapacity”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacity.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacity.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacity.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacity.manifest(
storage_class_name: str,
capacity: Quantity = None,
maximum_volume_size: Quantity = None,
metadata: ObjectMeta = None,
node_topology: LabelSelector = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSIStorageCapacity”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
storage_class_nameRequired ¶
- Type: str
storageClassName represents the name of the StorageClass that the reported capacity applies to.
It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.
capacityOptional ¶
- Type: cdk8s_plus_31.k8s.Quantity
capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.
The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.
maximum_volume_sizeOptional ¶
- Type: cdk8s_plus_31.k8s.Quantity
maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.
This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
The name has no particular meaning. It must be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-
Objects are namespaced.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
node_topologyOptional ¶
- Type: cdk8s_plus_31.k8s.LabelSelector
nodeTopology defines which nodes have access to the storage for which capacity was reported.
If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSIStorageCapacity”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSIStorageCapacity”.
KubeCsiStorageCapacityList ¶
CSIStorageCapacityList is a collection of CSIStorageCapacity objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacityList(
scope: Construct,
id: str,
items: typing.List[KubeCsiStorageCapacityProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeCsiStorageCapacityProps] |
items is the list of CSIStorageCapacity objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCsiStorageCapacityProps]
items is the list of CSIStorageCapacity objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSIStorageCapacityList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacityList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacityList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacityList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacityList.manifest(
items: typing.List[KubeCsiStorageCapacityProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.CSIStorageCapacityList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCsiStorageCapacityProps]
items is the list of CSIStorageCapacity objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSIStorageCapacityList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.CSIStorageCapacityList”.
KubeCustomResourceDefinition ¶
CustomResourceDefinition represents a resource that should be exposed on the API server.
Its name MUST be in the format <.spec.name>.<.spec.group>.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinition(
scope: Construct,
id: str,
spec: CustomResourceDefinitionSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.CustomResourceDefinitionSpec |
spec describes how the user wants the resources to appear. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.CustomResourceDefinitionSpec
spec describes how the user wants the resources to appear.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinition.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinition.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinition.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinition.manifest(
spec: CustomResourceDefinitionSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.CustomResourceDefinitionSpec
spec describes how the user wants the resources to appear.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition”.
KubeCustomResourceDefinitionList ¶
CustomResourceDefinitionList is a list of CustomResourceDefinition objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinitionList(
scope: Construct,
id: str,
items: typing.List[KubeCustomResourceDefinitionProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeCustomResourceDefinitionProps] |
items list individual CustomResourceDefinition objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCustomResourceDefinitionProps]
items list individual CustomResourceDefinition objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinitionList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinitionList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinitionList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinitionList.manifest(
items: typing.List[KubeCustomResourceDefinitionProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeCustomResourceDefinitionProps]
items list individual CustomResourceDefinition objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList”.
KubeDaemonSet ¶
DaemonSet represents the configuration of a daemon set.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSet(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: DaemonSetSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.DaemonSetSpec |
The desired behavior of this daemon set. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.DaemonSetSpec
The desired behavior of this daemon set.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.DaemonSet”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSet.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSet.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSet.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSet.manifest(
metadata: ObjectMeta = None,
spec: DaemonSetSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.DaemonSet”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.DaemonSetSpec
The desired behavior of this daemon set.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.DaemonSet”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.DaemonSet”.
KubeDaemonSetList ¶
DaemonSetList is a collection of daemon sets.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSetList(
scope: Construct,
id: str,
items: typing.List[KubeDaemonSetProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeDaemonSetProps] |
A list of daemon sets. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeDaemonSetProps]
A list of daemon sets.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.DaemonSetList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSetList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSetList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSetList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSetList.manifest(
items: typing.List[KubeDaemonSetProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.DaemonSetList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeDaemonSetProps]
A list of daemon sets.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.DaemonSetList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.DaemonSetList”.
KubeDeployment ¶
Deployment enables declarative updates for Pods and ReplicaSets.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeployment(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: DeploymentSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.DeploymentSpec |
Specification of the desired behavior of the Deployment. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.DeploymentSpec
Specification of the desired behavior of the Deployment.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.Deployment”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeployment.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeployment.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeployment.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeployment.manifest(
metadata: ObjectMeta = None,
spec: DeploymentSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.Deployment”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.DeploymentSpec
Specification of the desired behavior of the Deployment.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.Deployment”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.Deployment”.
KubeDeploymentList ¶
DeploymentList is a list of Deployments.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeploymentList(
scope: Construct,
id: str,
items: typing.List[KubeDeploymentProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeDeploymentProps] |
Items is the list of Deployments. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeDeploymentProps]
Items is the list of Deployments.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.DeploymentList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeploymentList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeploymentList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeploymentList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeploymentList.manifest(
items: typing.List[KubeDeploymentProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.DeploymentList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeDeploymentProps]
Items is the list of Deployments.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.DeploymentList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.DeploymentList”.
KubeDeviceClassListV1Alpha3 ¶
DeviceClassList is a collection of classes.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassListV1Alpha3(
scope: Construct,
id: str,
items: typing.List[KubeDeviceClassV1Alpha3Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeDeviceClassV1Alpha3Props] |
Items is the list of resource classes. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeDeviceClassV1Alpha3Props]
Items is the list of resource classes.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.DeviceClassList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassListV1Alpha3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassListV1Alpha3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassListV1Alpha3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassListV1Alpha3.manifest(
items: typing.List[KubeDeviceClassV1Alpha3Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.DeviceClassList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeDeviceClassV1Alpha3Props]
Items is the list of resource classes.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.DeviceClassList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.DeviceClassList”.
KubeDeviceClassV1Alpha3 ¶
DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors.
It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassV1Alpha3(
scope: Construct,
id: str,
spec: DeviceClassSpecV1Alpha3,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.DeviceClassSpecV1Alpha3 |
Spec defines what can be allocated and how to configure it. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.DeviceClassSpecV1Alpha3
Spec defines what can be allocated and how to configure it.
This is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.DeviceClass”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassV1Alpha3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassV1Alpha3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassV1Alpha3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassV1Alpha3.manifest(
spec: DeviceClassSpecV1Alpha3,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.DeviceClass”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.DeviceClassSpecV1Alpha3
Spec defines what can be allocated and how to configure it.
This is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.DeviceClass”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.DeviceClass”.
KubeEndpoints ¶
Endpoints is a collection of endpoints that implement the actual service. Example:.
Name: “mysvc”, Subsets: [ { Addresses: [{“ip”: “10.10.1.1”}, {“ip”: “10.10.2.2”}], Ports: [{“name”: “a”, “port”: 8675}, {“name”: “b”, “port”: 309}] }, { Addresses: [{“ip”: “10.10.3.3”}], Ports: [{“name”: “a”, “port”: 93}, {“name”: “b”, “port”: 76}] }, ]
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpoints(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
subsets: typing.List[EndpointSubset] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
subsets |
typing.List[cdk8s_plus_31.k8s.EndpointSubset] |
The set of all endpoints is the union of all subsets. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
subsetsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.EndpointSubset]
The set of all endpoints is the union of all subsets.
Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Endpoints”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpoints.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpoints.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpoints.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpoints.manifest(
metadata: ObjectMeta = None,
subsets: typing.List[EndpointSubset] = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Endpoints”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
subsetsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.EndpointSubset]
The set of all endpoints is the union of all subsets.
Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.Endpoints”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.Endpoints”.
KubeEndpointSlice ¶
EndpointSlice represents a subset of the endpoints that implement a service.
For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSlice(
scope: Construct,
id: str,
address_type: str,
endpoints: typing.List[Endpoint],
metadata: ObjectMeta = None,
ports: typing.List[EndpointPort] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
address_type |
str |
addressType specifies the type of address carried by this EndpointSlice. |
endpoints |
typing.List[cdk8s_plus_31.k8s.Endpoint] |
endpoints is a list of unique endpoints in this slice. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
ports |
typing.List[cdk8s_plus_31.k8s.EndpointPort] |
ports specifies the list of network ports exposed by each endpoint in this slice. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
address_typeRequired ¶
- Type: str
addressType specifies the type of address carried by this EndpointSlice.
All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
endpointsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.Endpoint]
endpoints is a list of unique endpoints in this slice.
Each slice may include a maximum of 1000 endpoints.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
portsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.EndpointPort]
ports specifies the list of network ports exposed by each endpoint in this slice.
Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates “all ports”. Each slice may include a maximum of 100 ports.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.discovery.v1.EndpointSlice”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSlice.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSlice.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSlice.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSlice.manifest(
address_type: str,
endpoints: typing.List[Endpoint],
metadata: ObjectMeta = None,
ports: typing.List[EndpointPort] = None
)
Renders a Kubernetes manifest for “io.k8s.api.discovery.v1.EndpointSlice”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
address_typeRequired ¶
- Type: str
addressType specifies the type of address carried by this EndpointSlice.
All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
endpointsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.Endpoint]
endpoints is a list of unique endpoints in this slice.
Each slice may include a maximum of 1000 endpoints.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
portsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.EndpointPort]
ports specifies the list of network ports exposed by each endpoint in this slice.
Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates “all ports”. Each slice may include a maximum of 100 ports.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.discovery.v1.EndpointSlice”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.discovery.v1.EndpointSlice”.
KubeEndpointSliceList ¶
EndpointSliceList represents a list of endpoint slices.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSliceList(
scope: Construct,
id: str,
items: typing.List[KubeEndpointSliceProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeEndpointSliceProps] |
items is the list of endpoint slices. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeEndpointSliceProps]
items is the list of endpoint slices.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.discovery.v1.EndpointSliceList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSliceList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSliceList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSliceList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSliceList.manifest(
items: typing.List[KubeEndpointSliceProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.discovery.v1.EndpointSliceList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeEndpointSliceProps]
items is the list of endpoint slices.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.discovery.v1.EndpointSliceList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.discovery.v1.EndpointSliceList”.
KubeEndpointsList ¶
EndpointsList is a list of endpoints.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointsList(
scope: Construct,
id: str,
items: typing.List[KubeEndpointsProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeEndpointsProps] |
List of endpoints. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeEndpointsProps]
List of endpoints.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.EndpointsList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointsList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointsList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointsList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointsList.manifest(
items: typing.List[KubeEndpointsProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.EndpointsList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeEndpointsProps]
List of endpoints.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.EndpointsList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.EndpointsList”.
KubeEvent ¶
Event is a report of an event somewhere in the cluster.
It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeEvent(
scope: Construct,
id: str,
event_time: datetime.datetime,
action: str = None,
deprecated_count: typing.Union[int, float] = None,
deprecated_first_timestamp: datetime.datetime = None,
deprecated_last_timestamp: datetime.datetime = None,
deprecated_source: EventSource = None,
metadata: ObjectMeta = None,
note: str = None,
reason: str = None,
regarding: ObjectReference = None,
related: ObjectReference = None,
reporting_controller: str = None,
reporting_instance: str = None,
series: EventSeries = None,
type: str = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
event_time |
datetime.datetime |
eventTime is the time when this Event was first observed. |
action |
str |
action is what action was taken/failed regarding to the regarding object. |
deprecated_count |
typing.Union[int, float] |
deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. |
deprecated_first_timestamp |
datetime.datetime |
deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. |
deprecated_last_timestamp |
datetime.datetime |
deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. |
deprecated_source |
cdk8s_plus_31.k8s.EventSource |
deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
note |
str |
note is a human-readable description of the status of this operation. |
reason |
str |
reason is why the action was taken. |
regarding |
cdk8s_plus_31.k8s.ObjectReference |
regarding contains the object this Event is about. |
related |
cdk8s_plus_31.k8s.ObjectReference |
related is the optional secondary object for more complex actions. |
reporting_controller |
str |
reportingController is the name of the controller that emitted this Event, e.g. kubernetes.io/kubelet. This field cannot be empty for new Events. |
reporting_instance |
str |
reportingInstance is the ID of the controller instance, e.g. kubelet-xyzf. This field cannot be empty for new Events and it can have at most 128 characters. |
series |
cdk8s_plus_31.k8s.EventSeries |
series is data about the Event series this event represents or nil if it’s a singleton Event. |
type |
str |
type is the type of this event (Normal, Warning), new types could be added in the future. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
event_timeRequired ¶
- Type: datetime.datetime
eventTime is the time when this Event was first observed.
It is required.
actionOptional ¶
- Type: str
action is what action was taken/failed regarding to the regarding object.
It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
deprecated_countOptional ¶
- Type: typing.Union[int, float]
deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
deprecated_first_timestampOptional ¶
- Type: datetime.datetime
deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
deprecated_last_timestampOptional ¶
- Type: datetime.datetime
deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
deprecated_sourceOptional ¶
- Type: cdk8s_plus_31.k8s.EventSource
deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
noteOptional ¶
- Type: str
note is a human-readable description of the status of this operation.
Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
reasonOptional ¶
- Type: str
reason is why the action was taken.
It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
regardingOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectReference
regarding contains the object this Event is about.
In most cases it’s an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
relatedOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectReference
related is the optional secondary object for more complex actions.
E.g. when regarding object triggers a creation or deletion of related object.
reporting_controllerOptional ¶
- Type: str
reportingController is the name of the controller that emitted this Event, e.g. kubernetes.io/kubelet. This field cannot be empty for new Events.
reporting_instanceOptional ¶
- Type: str
reportingInstance is the ID of the controller instance, e.g. kubelet-xyzf. This field cannot be empty for new Events and it can have at most 128 characters.
seriesOptional ¶
- Type: cdk8s_plus_31.k8s.EventSeries
series is data about the Event series this event represents or nil if it’s a singleton Event.
typeOptional ¶
- Type: str
type is the type of this event (Normal, Warning), new types could be added in the future.
It is machine-readable. This field cannot be empty for new Events.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.events.v1.Event”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeEvent.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeEvent.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeEvent.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeEvent.manifest(
event_time: datetime.datetime,
action: str = None,
deprecated_count: typing.Union[int, float] = None,
deprecated_first_timestamp: datetime.datetime = None,
deprecated_last_timestamp: datetime.datetime = None,
deprecated_source: EventSource = None,
metadata: ObjectMeta = None,
note: str = None,
reason: str = None,
regarding: ObjectReference = None,
related: ObjectReference = None,
reporting_controller: str = None,
reporting_instance: str = None,
series: EventSeries = None,
type: str = None
)
Renders a Kubernetes manifest for “io.k8s.api.events.v1.Event”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
event_timeRequired ¶
- Type: datetime.datetime
eventTime is the time when this Event was first observed.
It is required.
actionOptional ¶
- Type: str
action is what action was taken/failed regarding to the regarding object.
It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
deprecated_countOptional ¶
- Type: typing.Union[int, float]
deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
deprecated_first_timestampOptional ¶
- Type: datetime.datetime
deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
deprecated_last_timestampOptional ¶
- Type: datetime.datetime
deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
deprecated_sourceOptional ¶
- Type: cdk8s_plus_31.k8s.EventSource
deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
noteOptional ¶
- Type: str
note is a human-readable description of the status of this operation.
Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
reasonOptional ¶
- Type: str
reason is why the action was taken.
It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
regardingOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectReference
regarding contains the object this Event is about.
In most cases it’s an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
relatedOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectReference
related is the optional secondary object for more complex actions.
E.g. when regarding object triggers a creation or deletion of related object.
reporting_controllerOptional ¶
- Type: str
reportingController is the name of the controller that emitted this Event, e.g. kubernetes.io/kubelet. This field cannot be empty for new Events.
reporting_instanceOptional ¶
- Type: str
reportingInstance is the ID of the controller instance, e.g. kubelet-xyzf. This field cannot be empty for new Events and it can have at most 128 characters.
seriesOptional ¶
- Type: cdk8s_plus_31.k8s.EventSeries
series is data about the Event series this event represents or nil if it’s a singleton Event.
typeOptional ¶
- Type: str
type is the type of this event (Normal, Warning), new types could be added in the future.
It is machine-readable. This field cannot be empty for new Events.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.events.v1.Event”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.events.v1.Event”.
KubeEventList ¶
EventList is a list of Event objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeEventList(
scope: Construct,
id: str,
items: typing.List[KubeEventProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeEventProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeEventProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.events.v1.EventList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeEventList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeEventList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeEventList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeEventList.manifest(
items: typing.List[KubeEventProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.events.v1.EventList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeEventProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.events.v1.EventList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.events.v1.EventList”.
KubeEviction ¶
Eviction evicts a pod from its node subject to certain policies and safety constraints.
This is a subresource of Pod. A request to cause such an eviction is created by POSTing to …/pods/
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeEviction(
scope: Construct,
id: str,
delete_options: DeleteOptions = None,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
delete_options |
cdk8s_plus_31.k8s.DeleteOptions |
DeleteOptions may be provided. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
ObjectMeta describes the pod that is being evicted. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
delete_optionsOptional ¶
- Type: cdk8s_plus_31.k8s.DeleteOptions
DeleteOptions may be provided.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
ObjectMeta describes the pod that is being evicted.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.policy.v1.Eviction”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeEviction.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeEviction.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeEviction.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeEviction.manifest(
delete_options: DeleteOptions = None,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.policy.v1.Eviction”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
delete_optionsOptional ¶
- Type: cdk8s_plus_31.k8s.DeleteOptions
DeleteOptions may be provided.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
ObjectMeta describes the pod that is being evicted.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.policy.v1.Eviction”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.policy.v1.Eviction”.
KubeFlowSchema ¶
FlowSchema defines the schema of a group of flows.
Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a “flow distinguisher”.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchema(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: FlowSchemaSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.FlowSchemaSpec |
spec is the specification of the desired behavior of a FlowSchema. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.FlowSchemaSpec
spec is the specification of the desired behavior of a FlowSchema.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1.FlowSchema”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchema.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchema.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchema.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchema.manifest(
metadata: ObjectMeta = None,
spec: FlowSchemaSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1.FlowSchema”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.FlowSchemaSpec
spec is the specification of the desired behavior of a FlowSchema.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1.FlowSchema”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1.FlowSchema”.
KubeFlowSchemaList ¶
FlowSchemaList is a list of FlowSchema objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaList(
scope: Construct,
id: str,
items: typing.List[KubeFlowSchemaProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaProps] |
items is a list of FlowSchemas. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaProps]
items is a list of FlowSchemas.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1.FlowSchemaList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaList.manifest(
items: typing.List[KubeFlowSchemaProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1.FlowSchemaList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaProps]
items is a list of FlowSchemas.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1.FlowSchemaList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1.FlowSchemaList”.
KubeFlowSchemaListV1Beta3 ¶
FlowSchemaList is a list of FlowSchema objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaListV1Beta3(
scope: Construct,
id: str,
items: typing.List[KubeFlowSchemaV1Beta3Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaV1Beta3Props] |
items is a list of FlowSchemas. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaV1Beta3Props]
items is a list of FlowSchemas.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1beta3.FlowSchemaList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaListV1Beta3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaListV1Beta3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaListV1Beta3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaListV1Beta3.manifest(
items: typing.List[KubeFlowSchemaV1Beta3Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1beta3.FlowSchemaList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaV1Beta3Props]
items is a list of FlowSchemas.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1beta3.FlowSchemaList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1beta3.FlowSchemaList”.
KubeFlowSchemaV1Beta3 ¶
FlowSchema defines the schema of a group of flows.
Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a “flow distinguisher”.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaV1Beta3(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: FlowSchemaSpecV1Beta3 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.FlowSchemaSpecV1Beta3 |
spec is the specification of the desired behavior of a FlowSchema. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.FlowSchemaSpecV1Beta3
spec is the specification of the desired behavior of a FlowSchema.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1beta3.FlowSchema”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaV1Beta3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaV1Beta3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaV1Beta3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaV1Beta3.manifest(
metadata: ObjectMeta = None,
spec: FlowSchemaSpecV1Beta3 = None
)
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1beta3.FlowSchema”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.FlowSchemaSpecV1Beta3
spec is the specification of the desired behavior of a FlowSchema.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1beta3.FlowSchema”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1beta3.FlowSchema”.
KubeHorizontalPodAutoscaler ¶
configuration of a horizontal pod autoscaler.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscaler(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: HorizontalPodAutoscalerSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
spec |
cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpec |
spec defines the behaviour of autoscaler. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpec
spec defines the behaviour of autoscaler.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscaler.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscaler.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscaler.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscaler.manifest(
metadata: ObjectMeta = None,
spec: HorizontalPodAutoscalerSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpec
spec defines the behaviour of autoscaler.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler”.
KubeHorizontalPodAutoscalerList ¶
list of horizontal pod autoscaler objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerList(
scope: Construct,
id: str,
items: typing.List[KubeHorizontalPodAutoscalerProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerProps] |
items is the list of horizontal pod autoscaler objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerProps]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerList.manifest(
items: typing.List[KubeHorizontalPodAutoscalerProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerProps]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList”.
KubeHorizontalPodAutoscalerListV2 ¶
HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerListV2(
scope: Construct,
id: str,
items: typing.List[KubeHorizontalPodAutoscalerV2Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerV2Props] |
items is the list of horizontal pod autoscaler objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerV2Props]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerListV2.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerListV2.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerListV2.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerListV2.manifest(
items: typing.List[KubeHorizontalPodAutoscalerV2Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerV2Props]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList”.
KubeHorizontalPodAutoscalerV2 ¶
HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerV2(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: HorizontalPodAutoscalerSpecV2 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object metadata. |
spec |
cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpecV2 |
spec is the specification for the behaviour of the autoscaler. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpecV2
spec is the specification for the behaviour of the autoscaler.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerV2.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerV2.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerV2.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerV2.manifest(
metadata: ObjectMeta = None,
spec: HorizontalPodAutoscalerSpecV2 = None
)
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpecV2
spec is the specification for the behaviour of the autoscaler.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler”.
KubeIngress ¶
Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend.
An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngress(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: IngressSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.IngressSpec |
spec is the desired state of the Ingress. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.IngressSpec
spec is the desired state of the Ingress.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.Ingress”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngress.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngress.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngress.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngress.manifest(
metadata: ObjectMeta = None,
spec: IngressSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.Ingress”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.IngressSpec
spec is the desired state of the Ingress.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1.Ingress”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1.Ingress”.
KubeIngressClass ¶
IngressClass represents the class of the Ingress, referenced by the Ingress Spec.
The ingressclass.kubernetes.io/is-default-class annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClass(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: IngressClassSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.IngressClassSpec |
spec is the desired state of the IngressClass. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.IngressClassSpec
spec is the desired state of the IngressClass.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.IngressClass”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClass.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClass.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClass.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClass.manifest(
metadata: ObjectMeta = None,
spec: IngressClassSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.IngressClass”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.IngressClassSpec
spec is the desired state of the IngressClass.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1.IngressClass”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1.IngressClass”.
KubeIngressClassList ¶
IngressClassList is a collection of IngressClasses.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClassList(
scope: Construct,
id: str,
items: typing.List[KubeIngressClassProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeIngressClassProps] |
items is the list of IngressClasses. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeIngressClassProps]
items is the list of IngressClasses.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.IngressClassList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClassList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClassList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClassList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClassList.manifest(
items: typing.List[KubeIngressClassProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.IngressClassList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeIngressClassProps]
items is the list of IngressClasses.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1.IngressClassList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1.IngressClassList”.
KubeIngressList ¶
IngressList is a collection of Ingress.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressList(
scope: Construct,
id: str,
items: typing.List[KubeIngressProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeIngressProps] |
items is the list of Ingress. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeIngressProps]
items is the list of Ingress.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.IngressList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressList.manifest(
items: typing.List[KubeIngressProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.IngressList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeIngressProps]
items is the list of Ingress.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1.IngressList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1.IngressList”.
KubeIpAddressListV1Beta1 ¶
IPAddressList contains a list of IPAddress.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressListV1Beta1(
scope: Construct,
id: str,
items: typing.List[KubeIpAddressV1Beta1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeIpAddressV1Beta1Props] |
items is the list of IPAddresses. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeIpAddressV1Beta1Props]
items is the list of IPAddresses.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1beta1.IPAddressList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressListV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressListV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressListV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressListV1Beta1.manifest(
items: typing.List[KubeIpAddressV1Beta1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1beta1.IPAddressList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeIpAddressV1Beta1Props]
items is the list of IPAddresses.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1beta1.IPAddressList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1beta1.IPAddressList”.
KubeIpAddressV1Beta1 ¶
IPAddress represents a single IP of a single IP Family.
The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressV1Beta1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: IpAddressSpecV1Beta1 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.IpAddressSpecV1Beta1 |
spec is the desired state of the IPAddress. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.IpAddressSpecV1Beta1
spec is the desired state of the IPAddress.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1beta1.IPAddress”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressV1Beta1.manifest(
metadata: ObjectMeta = None,
spec: IpAddressSpecV1Beta1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1beta1.IPAddress”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.IpAddressSpecV1Beta1
spec is the desired state of the IPAddress.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1beta1.IPAddress”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1beta1.IPAddress”.
KubeJob ¶
Job represents the configuration of a single job.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeJob(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: JobSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.JobSpec |
Specification of the desired behavior of a job. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.JobSpec
Specification of the desired behavior of a job.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.batch.v1.Job”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeJob.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeJob.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeJob.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeJob.manifest(
metadata: ObjectMeta = None,
spec: JobSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.batch.v1.Job”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.JobSpec
Specification of the desired behavior of a job.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.batch.v1.Job”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.batch.v1.Job”.
KubeJobList ¶
JobList is a collection of jobs.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeJobList(
scope: Construct,
id: str,
items: typing.List[KubeJobProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeJobProps] |
items is the list of Jobs. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeJobProps]
items is the list of Jobs.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.batch.v1.JobList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeJobList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeJobList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeJobList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeJobList.manifest(
items: typing.List[KubeJobProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.batch.v1.JobList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeJobProps]
items is the list of Jobs.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.batch.v1.JobList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.batch.v1.JobList”.
KubeLease ¶
Lease defines a lease concept.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeLease(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: LeaseSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
spec |
cdk8s_plus_31.k8s.LeaseSpec |
spec contains the specification of the Lease. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.LeaseSpec
spec contains the specification of the Lease.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1.Lease”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeLease.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeLease.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeLease.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeLease.manifest(
metadata: ObjectMeta = None,
spec: LeaseSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1.Lease”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.LeaseSpec
spec contains the specification of the Lease.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.coordination.v1.Lease”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.coordination.v1.Lease”.
KubeLeaseCandidateListV1Alpha1 ¶
LeaseCandidateList is a list of Lease objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateListV1Alpha1(
scope: Construct,
id: str,
items: typing.List[KubeLeaseCandidateV1Alpha1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeLeaseCandidateV1Alpha1Props] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeLeaseCandidateV1Alpha1Props]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1alpha1.LeaseCandidateList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateListV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateListV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateListV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateListV1Alpha1.manifest(
items: typing.List[KubeLeaseCandidateV1Alpha1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1alpha1.LeaseCandidateList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeLeaseCandidateV1Alpha1Props]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.coordination.v1alpha1.LeaseCandidateList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.coordination.v1alpha1.LeaseCandidateList”.
KubeLeaseCandidateV1Alpha1 ¶
LeaseCandidate defines a candidate for a Lease object.
Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateV1Alpha1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: LeaseCandidateSpecV1Alpha1 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
spec |
cdk8s_plus_31.k8s.LeaseCandidateSpecV1Alpha1 |
spec contains the specification of the Lease. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.LeaseCandidateSpecV1Alpha1
spec contains the specification of the Lease.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1alpha1.LeaseCandidate”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateV1Alpha1.manifest(
metadata: ObjectMeta = None,
spec: LeaseCandidateSpecV1Alpha1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1alpha1.LeaseCandidate”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.LeaseCandidateSpecV1Alpha1
spec contains the specification of the Lease.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.coordination.v1alpha1.LeaseCandidate”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.coordination.v1alpha1.LeaseCandidate”.
KubeLeaseList ¶
LeaseList is a list of Lease objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseList(
scope: Construct,
id: str,
items: typing.List[KubeLeaseProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeLeaseProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeLeaseProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1.LeaseList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseList.manifest(
items: typing.List[KubeLeaseProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1.LeaseList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeLeaseProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.coordination.v1.LeaseList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.coordination.v1.LeaseList”.
KubeLimitRange ¶
LimitRange sets resource usage limits for each kind of resource in a Namespace.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRange(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: LimitRangeSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.LimitRangeSpec |
Spec defines the limits enforced. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.LimitRangeSpec
Spec defines the limits enforced.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.LimitRange”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRange.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRange.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRange.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRange.manifest(
metadata: ObjectMeta = None,
spec: LimitRangeSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.LimitRange”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.LimitRangeSpec
Spec defines the limits enforced.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.LimitRange”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.LimitRange”.
KubeLimitRangeList ¶
LimitRangeList is a list of LimitRange items.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRangeList(
scope: Construct,
id: str,
items: typing.List[KubeLimitRangeProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeLimitRangeProps] |
Items is a list of LimitRange objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeLimitRangeProps]
Items is a list of LimitRange objects.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.LimitRangeList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRangeList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRangeList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRangeList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRangeList.manifest(
items: typing.List[KubeLimitRangeProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.LimitRangeList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeLimitRangeProps]
Items is a list of LimitRange objects.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.LimitRangeList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.LimitRangeList”.
KubeLocalSubjectAccessReview ¶
LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeLocalSubjectAccessReview(
scope: Construct,
id: str,
spec: SubjectAccessReviewSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.SubjectAccessReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.SubjectAccessReviewSpec
Spec holds information about the request being evaluated.
spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.authorization.v1.LocalSubjectAccessReview”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeLocalSubjectAccessReview.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeLocalSubjectAccessReview.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeLocalSubjectAccessReview.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeLocalSubjectAccessReview.manifest(
spec: SubjectAccessReviewSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.authorization.v1.LocalSubjectAccessReview”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.SubjectAccessReviewSpec
Spec holds information about the request being evaluated.
spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.authorization.v1.LocalSubjectAccessReview”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.authorization.v1.LocalSubjectAccessReview”.
KubeMutatingWebhookConfiguration ¶
MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfiguration(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
webhooks: typing.List[MutatingWebhook] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
webhooks |
typing.List[cdk8s_plus_31.k8s.MutatingWebhook] |
Webhooks is a list of webhooks and the affected resources and operations. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
webhooksOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.MutatingWebhook]
Webhooks is a list of webhooks and the affected resources and operations.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfiguration.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfiguration.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfiguration.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfiguration.manifest(
metadata: ObjectMeta = None,
webhooks: typing.List[MutatingWebhook] = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
webhooksOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.MutatingWebhook]
Webhooks is a list of webhooks and the affected resources and operations.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration”.
KubeMutatingWebhookConfigurationList ¶
MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfigurationList(
scope: Construct,
id: str,
items: typing.List[KubeMutatingWebhookConfigurationProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeMutatingWebhookConfigurationProps] |
List of MutatingWebhookConfiguration. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeMutatingWebhookConfigurationProps]
List of MutatingWebhookConfiguration.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfigurationList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfigurationList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfigurationList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfigurationList.manifest(
items: typing.List[KubeMutatingWebhookConfigurationProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeMutatingWebhookConfigurationProps]
List of MutatingWebhookConfiguration.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList”.
KubeNamespace ¶
Namespace provides a scope for Names.
Use of multiple namespaces is optional.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespace(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: NamespaceSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.NamespaceSpec |
Spec defines the behavior of the Namespace. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.NamespaceSpec
Spec defines the behavior of the Namespace.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Namespace”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespace.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespace.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespace.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespace.manifest(
metadata: ObjectMeta = None,
spec: NamespaceSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Namespace”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.NamespaceSpec
Spec defines the behavior of the Namespace.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.Namespace”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.Namespace”.
KubeNamespaceList ¶
NamespaceList is a list of Namespaces.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespaceList(
scope: Construct,
id: str,
items: typing.List[KubeNamespaceProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeNamespaceProps] |
Items is the list of Namespace objects in the list. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeNamespaceProps]
Items is the list of Namespace objects in the list.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.NamespaceList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespaceList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespaceList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespaceList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespaceList.manifest(
items: typing.List[KubeNamespaceProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.NamespaceList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeNamespaceProps]
Items is the list of Namespace objects in the list.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.NamespaceList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.NamespaceList”.
KubeNetworkPolicy ¶
NetworkPolicy describes what network traffic is allowed for a set of Pods.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicy(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: NetworkPolicySpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.NetworkPolicySpec |
spec represents the specification of the desired behavior for this NetworkPolicy. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.NetworkPolicySpec
spec represents the specification of the desired behavior for this NetworkPolicy.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.NetworkPolicy”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicy.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicy.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicy.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicy.manifest(
metadata: ObjectMeta = None,
spec: NetworkPolicySpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.NetworkPolicy”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.NetworkPolicySpec
spec represents the specification of the desired behavior for this NetworkPolicy.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1.NetworkPolicy”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1.NetworkPolicy”.
KubeNetworkPolicyList ¶
NetworkPolicyList is a list of NetworkPolicy objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicyList(
scope: Construct,
id: str,
items: typing.List[KubeNetworkPolicyProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeNetworkPolicyProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeNetworkPolicyProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.NetworkPolicyList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicyList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicyList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicyList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicyList.manifest(
items: typing.List[KubeNetworkPolicyProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1.NetworkPolicyList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeNetworkPolicyProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1.NetworkPolicyList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1.NetworkPolicyList”.
KubeNode ¶
Node is a worker node in Kubernetes.
Each node will have a unique identifier in the cache (i.e. in etcd).
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeNode(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: NodeSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.NodeSpec |
Spec defines the behavior of a node. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.NodeSpec
Spec defines the behavior of a node.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Node”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeNode.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeNode.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeNode.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeNode.manifest(
metadata: ObjectMeta = None,
spec: NodeSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Node”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.NodeSpec
Spec defines the behavior of a node.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.Node”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.Node”.
KubeNodeList ¶
NodeList is the whole list of all Nodes which have been registered with master.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeNodeList(
scope: Construct,
id: str,
items: typing.List[KubeNodeProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeNodeProps] |
List of nodes. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeNodeProps]
List of nodes.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.NodeList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeNodeList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeNodeList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeNodeList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeNodeList.manifest(
items: typing.List[KubeNodeProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.NodeList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeNodeProps]
List of nodes.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.NodeList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.NodeList”.
KubePersistentVolume ¶
PersistentVolume (PV) is a storage resource provisioned by an administrator.
It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolume(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: PersistentVolumeSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PersistentVolumeSpec |
spec defines a specification of a persistent volume owned by the cluster. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PersistentVolumeSpec
spec defines a specification of a persistent volume owned by the cluster.
Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PersistentVolume”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolume.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolume.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolume.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolume.manifest(
metadata: ObjectMeta = None,
spec: PersistentVolumeSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PersistentVolume”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PersistentVolumeSpec
spec defines a specification of a persistent volume owned by the cluster.
Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.PersistentVolume”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.PersistentVolume”.
KubePersistentVolumeClaim ¶
PersistentVolumeClaim is a user’s request for and claim to a persistent volume.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaim(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: PersistentVolumeClaimSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PersistentVolumeClaimSpec |
spec defines the desired characteristics of a volume requested by a pod author. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PersistentVolumeClaimSpec
spec defines the desired characteristics of a volume requested by a pod author.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PersistentVolumeClaim”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaim.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaim.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaim.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaim.manifest(
metadata: ObjectMeta = None,
spec: PersistentVolumeClaimSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PersistentVolumeClaim”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PersistentVolumeClaimSpec
spec defines the desired characteristics of a volume requested by a pod author.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.PersistentVolumeClaim”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.PersistentVolumeClaim”.
KubePersistentVolumeClaimList ¶
PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaimList(
scope: Construct,
id: str,
items: typing.List[KubePersistentVolumeClaimProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeClaimProps] |
items is a list of persistent volume claims. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeClaimProps]
items is a list of persistent volume claims.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PersistentVolumeClaimList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaimList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaimList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaimList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaimList.manifest(
items: typing.List[KubePersistentVolumeClaimProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PersistentVolumeClaimList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeClaimProps]
items is a list of persistent volume claims.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.PersistentVolumeClaimList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.PersistentVolumeClaimList”.
KubePersistentVolumeList ¶
PersistentVolumeList is a list of PersistentVolume items.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeList(
scope: Construct,
id: str,
items: typing.List[KubePersistentVolumeProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeProps] |
items is a list of persistent volumes. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeProps]
items is a list of persistent volumes.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PersistentVolumeList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeList.manifest(
items: typing.List[KubePersistentVolumeProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PersistentVolumeList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeProps]
items is a list of persistent volumes.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.PersistentVolumeList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.PersistentVolumeList”.
KubePod ¶
Pod is a collection of containers that can run on a host.
This resource is created by clients and scheduled onto hosts.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePod(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: PodSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PodSpec |
Specification of the desired behavior of the pod. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PodSpec
Specification of the desired behavior of the pod.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Pod”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePod.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePod.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePod.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePod.manifest(
metadata: ObjectMeta = None,
spec: PodSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Pod”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PodSpec
Specification of the desired behavior of the pod.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.Pod”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.Pod”.
KubePodDisruptionBudget ¶
PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudget(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: PodDisruptionBudgetSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PodDisruptionBudgetSpec |
Specification of the desired behavior of the PodDisruptionBudget. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PodDisruptionBudgetSpec
Specification of the desired behavior of the PodDisruptionBudget.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.policy.v1.PodDisruptionBudget”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudget.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudget.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudget.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudget.manifest(
metadata: ObjectMeta = None,
spec: PodDisruptionBudgetSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.policy.v1.PodDisruptionBudget”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PodDisruptionBudgetSpec
Specification of the desired behavior of the PodDisruptionBudget.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.policy.v1.PodDisruptionBudget”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.policy.v1.PodDisruptionBudget”.
KubePodDisruptionBudgetList ¶
PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudgetList(
scope: Construct,
id: str,
items: typing.List[KubePodDisruptionBudgetProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubePodDisruptionBudgetProps] |
Items is a list of PodDisruptionBudgets. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePodDisruptionBudgetProps]
Items is a list of PodDisruptionBudgets.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.policy.v1.PodDisruptionBudgetList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudgetList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudgetList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudgetList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudgetList.manifest(
items: typing.List[KubePodDisruptionBudgetProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.policy.v1.PodDisruptionBudgetList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePodDisruptionBudgetProps]
Items is a list of PodDisruptionBudgets.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.policy.v1.PodDisruptionBudgetList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.policy.v1.PodDisruptionBudgetList”.
KubePodList ¶
PodList is a list of Pods.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePodList(
scope: Construct,
id: str,
items: typing.List[KubePodProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubePodProps] |
List of pods. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePodProps]
List of pods.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PodList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePodList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePodList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePodList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePodList.manifest(
items: typing.List[KubePodProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PodList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePodProps]
List of pods.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.PodList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.PodList”.
KubePodSchedulingContextListV1Alpha3 ¶
PodSchedulingContextList is a collection of Pod scheduling objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextListV1Alpha3(
scope: Construct,
id: str,
items: typing.List[KubePodSchedulingContextV1Alpha3Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubePodSchedulingContextV1Alpha3Props] |
Items is the list of PodSchedulingContext objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePodSchedulingContextV1Alpha3Props]
Items is the list of PodSchedulingContext objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.PodSchedulingContextList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextListV1Alpha3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextListV1Alpha3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextListV1Alpha3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextListV1Alpha3.manifest(
items: typing.List[KubePodSchedulingContextV1Alpha3Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.PodSchedulingContextList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePodSchedulingContextV1Alpha3Props]
Items is the list of PodSchedulingContext objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.PodSchedulingContextList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.PodSchedulingContextList”.
KubePodSchedulingContextV1Alpha3 ¶
PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use “WaitForFirstConsumer” allocation mode.
This is an alpha type and requires enabling the DRAControlPlaneController feature gate.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextV1Alpha3(
scope: Construct,
id: str,
spec: PodSchedulingContextSpecV1Alpha3,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.PodSchedulingContextSpecV1Alpha3 |
Spec describes where resources for the Pod are needed. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.PodSchedulingContextSpecV1Alpha3
Spec describes where resources for the Pod are needed.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.PodSchedulingContext”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextV1Alpha3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextV1Alpha3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextV1Alpha3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextV1Alpha3.manifest(
spec: PodSchedulingContextSpecV1Alpha3,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.PodSchedulingContext”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.PodSchedulingContextSpecV1Alpha3
Spec describes where resources for the Pod are needed.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.PodSchedulingContext”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.PodSchedulingContext”.
KubePodTemplate ¶
PodTemplate describes a template for creating copies of a predefined pod.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplate(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
template: PodTemplateSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
template |
cdk8s_plus_31.k8s.PodTemplateSpec |
Template defines the pods that will be created from this pod template. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
templateOptional ¶
- Type: cdk8s_plus_31.k8s.PodTemplateSpec
Template defines the pods that will be created from this pod template.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PodTemplate”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplate.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplate.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplate.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplate.manifest(
metadata: ObjectMeta = None,
template: PodTemplateSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PodTemplate”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
templateOptional ¶
- Type: cdk8s_plus_31.k8s.PodTemplateSpec
Template defines the pods that will be created from this pod template.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.PodTemplate”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.PodTemplate”.
KubePodTemplateList ¶
PodTemplateList is a list of PodTemplates.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplateList(
scope: Construct,
id: str,
items: typing.List[KubePodTemplateProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubePodTemplateProps] |
List of pod templates. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePodTemplateProps]
List of pod templates.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PodTemplateList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplateList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplateList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplateList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplateList.manifest(
items: typing.List[KubePodTemplateProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.PodTemplateList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePodTemplateProps]
List of pod templates.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.PodTemplateList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.PodTemplateList”.
KubePriorityClass ¶
PriorityClass defines mapping from a priority class name to the priority integer value.
The value can be any valid integer.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClass(
scope: Construct,
id: str,
value: typing.Union[int, float],
description: str = None,
global_default: bool = None,
metadata: ObjectMeta = None,
preemption_policy: str = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
value |
typing.Union[int, float] |
value represents the integer value of this priority class. |
description |
str |
description is an arbitrary string that usually provides guidelines on when this priority class should be used. |
global_default |
bool |
globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
preemption_policy |
str |
preemptionPolicy is the Policy for preempting pods with lower priority. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
valueRequired ¶
- Type: typing.Union[int, float]
value represents the integer value of this priority class.
This is the actual priority that pods receive when they have the name of this class in their pod spec.
descriptionOptional ¶
- Type: str
description is an arbitrary string that usually provides guidelines on when this priority class should be used.
global_defaultOptional ¶
- Type: bool
globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class.
Only one PriorityClass can be marked as globalDefault. However, if more than one PriorityClasses exists with their globalDefault field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
preemption_policyOptional ¶
- Type: str
- Default: PreemptLowerPriority if unset.
preemptionPolicy is the Policy for preempting pods with lower priority.
One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.scheduling.v1.PriorityClass”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClass.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClass.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClass.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClass.manifest(
value: typing.Union[int, float],
description: str = None,
global_default: bool = None,
metadata: ObjectMeta = None,
preemption_policy: str = None
)
Renders a Kubernetes manifest for “io.k8s.api.scheduling.v1.PriorityClass”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
valueRequired ¶
- Type: typing.Union[int, float]
value represents the integer value of this priority class.
This is the actual priority that pods receive when they have the name of this class in their pod spec.
descriptionOptional ¶
- Type: str
description is an arbitrary string that usually provides guidelines on when this priority class should be used.
global_defaultOptional ¶
- Type: bool
globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class.
Only one PriorityClass can be marked as globalDefault. However, if more than one PriorityClasses exists with their globalDefault field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
preemption_policyOptional ¶
- Type: str
- Default: PreemptLowerPriority if unset.
preemptionPolicy is the Policy for preempting pods with lower priority.
One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.scheduling.v1.PriorityClass”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.scheduling.v1.PriorityClass”.
KubePriorityClassList ¶
PriorityClassList is a collection of priority classes.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClassList(
scope: Construct,
id: str,
items: typing.List[KubePriorityClassProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubePriorityClassProps] |
items is the list of PriorityClasses. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePriorityClassProps]
items is the list of PriorityClasses.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.scheduling.v1.PriorityClassList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClassList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClassList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClassList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClassList.manifest(
items: typing.List[KubePriorityClassProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.scheduling.v1.PriorityClassList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePriorityClassProps]
items is the list of PriorityClasses.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.scheduling.v1.PriorityClassList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.scheduling.v1.PriorityClassList”.
KubePriorityLevelConfiguration ¶
PriorityLevelConfiguration represents the configuration of a priority level.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfiguration(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: PriorityLevelConfigurationSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PriorityLevelConfigurationSpec |
spec is the specification of the desired behavior of a “request-priority”. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PriorityLevelConfigurationSpec
spec is the specification of the desired behavior of a “request-priority”.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfiguration.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfiguration.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfiguration.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfiguration.manifest(
metadata: ObjectMeta = None,
spec: PriorityLevelConfigurationSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PriorityLevelConfigurationSpec
spec is the specification of the desired behavior of a “request-priority”.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration”.
KubePriorityLevelConfigurationList ¶
PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationList(
scope: Construct,
id: str,
items: typing.List[KubePriorityLevelConfigurationProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationProps] |
items is a list of request-priorities. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationProps]
items is a list of request-priorities.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationList.manifest(
items: typing.List[KubePriorityLevelConfigurationProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationProps]
items is a list of request-priorities.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList”.
KubePriorityLevelConfigurationListV1Beta3 ¶
PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationListV1Beta3(
scope: Construct,
id: str,
items: typing.List[KubePriorityLevelConfigurationV1Beta3Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationV1Beta3Props] |
items is a list of request-priorities. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationV1Beta3Props]
items is a list of request-priorities.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationListV1Beta3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationListV1Beta3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationListV1Beta3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationListV1Beta3.manifest(
items: typing.List[KubePriorityLevelConfigurationV1Beta3Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationV1Beta3Props]
items is a list of request-priorities.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList”.
KubePriorityLevelConfigurationV1Beta3 ¶
PriorityLevelConfiguration represents the configuration of a priority level.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationV1Beta3(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: PriorityLevelConfigurationSpecV1Beta3 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PriorityLevelConfigurationSpecV1Beta3 |
spec is the specification of the desired behavior of a “request-priority”. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PriorityLevelConfigurationSpecV1Beta3
spec is the specification of the desired behavior of a “request-priority”.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationV1Beta3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationV1Beta3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationV1Beta3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationV1Beta3.manifest(
metadata: ObjectMeta = None,
spec: PriorityLevelConfigurationSpecV1Beta3 = None
)
Renders a Kubernetes manifest for “io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.PriorityLevelConfigurationSpecV1Beta3
spec is the specification of the desired behavior of a “request-priority”.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration”.
KubeReplicaSet ¶
ReplicaSet ensures that a specified number of pod replicas are running at any given time.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSet(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ReplicaSetSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. |
spec |
cdk8s_plus_31.k8s.ReplicaSetSpec |
Spec defines the specification of the desired behavior of the ReplicaSet. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages.
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ReplicaSetSpec
Spec defines the specification of the desired behavior of the ReplicaSet.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.ReplicaSet”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSet.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSet.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSet.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSet.manifest(
metadata: ObjectMeta = None,
spec: ReplicaSetSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.ReplicaSet”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages.
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ReplicaSetSpec
Spec defines the specification of the desired behavior of the ReplicaSet.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.ReplicaSet”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.ReplicaSet”.
KubeReplicaSetList ¶
ReplicaSetList is a collection of ReplicaSets.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSetList(
scope: Construct,
id: str,
items: typing.List[KubeReplicaSetProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeReplicaSetProps] |
List of ReplicaSets. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeReplicaSetProps]
List of ReplicaSets.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.ReplicaSetList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSetList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSetList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSetList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSetList.manifest(
items: typing.List[KubeReplicaSetProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.ReplicaSetList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeReplicaSetProps]
List of ReplicaSets.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.ReplicaSetList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.ReplicaSetList”.
KubeReplicationController ¶
ReplicationController represents the configuration of a replication controller.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationController(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ReplicationControllerSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. |
spec |
cdk8s_plus_31.k8s.ReplicationControllerSpec |
Spec defines the specification of the desired behavior of the replication controller. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages.
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ReplicationControllerSpec
Spec defines the specification of the desired behavior of the replication controller.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ReplicationController”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationController.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationController.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationController.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationController.manifest(
metadata: ObjectMeta = None,
spec: ReplicationControllerSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ReplicationController”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages.
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ReplicationControllerSpec
Spec defines the specification of the desired behavior of the replication controller.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ReplicationController”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ReplicationController”.
KubeReplicationControllerList ¶
ReplicationControllerList is a collection of replication controllers.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationControllerList(
scope: Construct,
id: str,
items: typing.List[KubeReplicationControllerProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeReplicationControllerProps] |
List of replication controllers. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeReplicationControllerProps]
List of replication controllers.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ReplicationControllerList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationControllerList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationControllerList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationControllerList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationControllerList.manifest(
items: typing.List[KubeReplicationControllerProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ReplicationControllerList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeReplicationControllerProps]
List of replication controllers.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ReplicationControllerList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ReplicationControllerList”.
KubeResourceClaimListV1Alpha3 ¶
ResourceClaimList is a collection of claims.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimListV1Alpha3(
scope: Construct,
id: str,
items: typing.List[KubeResourceClaimV1Alpha3Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeResourceClaimV1Alpha3Props] |
Items is the list of resource claims. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeResourceClaimV1Alpha3Props]
Items is the list of resource claims.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceClaimList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimListV1Alpha3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimListV1Alpha3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimListV1Alpha3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimListV1Alpha3.manifest(
items: typing.List[KubeResourceClaimV1Alpha3Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceClaimList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeResourceClaimV1Alpha3Props]
Items is the list of resource claims.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceClaimList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceClaimList”.
KubeResourceClaimTemplateListV1Alpha3 ¶
ResourceClaimTemplateList is a collection of claim templates.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateListV1Alpha3(
scope: Construct,
id: str,
items: typing.List[KubeResourceClaimTemplateV1Alpha3Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeResourceClaimTemplateV1Alpha3Props] |
Items is the list of resource claim templates. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeResourceClaimTemplateV1Alpha3Props]
Items is the list of resource claim templates.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateListV1Alpha3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateListV1Alpha3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateListV1Alpha3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateListV1Alpha3.manifest(
items: typing.List[KubeResourceClaimTemplateV1Alpha3Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeResourceClaimTemplateV1Alpha3Props]
Items is the list of resource claim templates.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceClaimTemplateList”.
KubeResourceClaimTemplateV1Alpha3 ¶
ResourceClaimTemplate is used to produce ResourceClaim objects.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateV1Alpha3(
scope: Construct,
id: str,
spec: ResourceClaimTemplateSpecV1Alpha3,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.ResourceClaimTemplateSpecV1Alpha3 |
Describes the ResourceClaim that is to be generated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.ResourceClaimTemplateSpecV1Alpha3
Describes the ResourceClaim that is to be generated.
This field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceClaimTemplate”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateV1Alpha3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateV1Alpha3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateV1Alpha3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateV1Alpha3.manifest(
spec: ResourceClaimTemplateSpecV1Alpha3,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceClaimTemplate”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.ResourceClaimTemplateSpecV1Alpha3
Describes the ResourceClaim that is to be generated.
This field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceClaimTemplate”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceClaimTemplate”.
KubeResourceClaimV1Alpha3 ¶
ResourceClaim describes a request for access to resources in the cluster, for use by workloads.
For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimV1Alpha3(
scope: Construct,
id: str,
spec: ResourceClaimSpecV1Alpha3,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.ResourceClaimSpecV1Alpha3 |
Spec describes what is being requested and how to configure it. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.ResourceClaimSpecV1Alpha3
Spec describes what is being requested and how to configure it.
The spec is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceClaim”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimV1Alpha3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimV1Alpha3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimV1Alpha3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimV1Alpha3.manifest(
spec: ResourceClaimSpecV1Alpha3,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceClaim”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.ResourceClaimSpecV1Alpha3
Spec describes what is being requested and how to configure it.
The spec is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceClaim”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceClaim”.
KubeResourceQuota ¶
ResourceQuota sets aggregate quota restrictions enforced per namespace.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuota(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ResourceQuotaSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.ResourceQuotaSpec |
Spec defines the desired quota. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ResourceQuotaSpec
Spec defines the desired quota.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ResourceQuota”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuota.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuota.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuota.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuota.manifest(
metadata: ObjectMeta = None,
spec: ResourceQuotaSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ResourceQuota”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ResourceQuotaSpec
Spec defines the desired quota.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ResourceQuota”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ResourceQuota”.
KubeResourceQuotaList ¶
ResourceQuotaList is a list of ResourceQuota items.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuotaList(
scope: Construct,
id: str,
items: typing.List[KubeResourceQuotaProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeResourceQuotaProps] |
Items is a list of ResourceQuota objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeResourceQuotaProps]
Items is a list of ResourceQuota objects.
More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ResourceQuotaList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuotaList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuotaList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuotaList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuotaList.manifest(
items: typing.List[KubeResourceQuotaProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ResourceQuotaList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeResourceQuotaProps]
Items is a list of ResourceQuota objects.
More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ResourceQuotaList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ResourceQuotaList”.
KubeResourceSliceV1Alpha3 ¶
ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver.
A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.
At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple
Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.
When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.
For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceSliceV1Alpha3(
scope: Construct,
id: str,
spec: ResourceSliceSpecV1Alpha3,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.ResourceSliceSpecV1Alpha3 |
Contains the information published by the driver. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.ResourceSliceSpecV1Alpha3
Contains the information published by the driver.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceSlice”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceSliceV1Alpha3.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceSliceV1Alpha3.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceSliceV1Alpha3.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceSliceV1Alpha3.manifest(
spec: ResourceSliceSpecV1Alpha3,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceSlice”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.ResourceSliceSpecV1Alpha3
Contains the information published by the driver.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceSlice”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceSlice”.
KubeRole ¶
Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeRole(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
rules: typing.List[PolicyRule] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
rules |
typing.List[cdk8s_plus_31.k8s.PolicyRule] |
Rules holds all the PolicyRules for this Role. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.PolicyRule]
Rules holds all the PolicyRules for this Role.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.Role”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeRole.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeRole.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeRole.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeRole.manifest(
metadata: ObjectMeta = None,
rules: typing.List[PolicyRule] = None
)
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.Role”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.PolicyRule]
Rules holds all the PolicyRules for this Role.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.Role”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.Role”.
KubeRoleBinding ¶
RoleBinding references a role, but does not contain it.
It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBinding(
scope: Construct,
id: str,
role_ref: RoleRef,
metadata: ObjectMeta = None,
subjects: typing.List[Subject] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
role_ref |
cdk8s_plus_31.k8s.RoleRef |
RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
subjects |
typing.List[cdk8s_plus_31.k8s.Subject] |
Subjects holds references to the objects the role applies to. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
role_refRequired ¶
- Type: cdk8s_plus_31.k8s.RoleRef
RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.Subject]
Subjects holds references to the objects the role applies to.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.RoleBinding”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBinding.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBinding.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBinding.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBinding.manifest(
role_ref: RoleRef,
metadata: ObjectMeta = None,
subjects: typing.List[Subject] = None
)
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.RoleBinding”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
role_refRequired ¶
- Type: cdk8s_plus_31.k8s.RoleRef
RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.Subject]
Subjects holds references to the objects the role applies to.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.RoleBinding”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.RoleBinding”.
KubeRoleBindingList ¶
RoleBindingList is a collection of RoleBindings.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBindingList(
scope: Construct,
id: str,
items: typing.List[KubeRoleBindingProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeRoleBindingProps] |
Items is a list of RoleBindings. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeRoleBindingProps]
Items is a list of RoleBindings.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.RoleBindingList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBindingList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBindingList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBindingList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBindingList.manifest(
items: typing.List[KubeRoleBindingProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.RoleBindingList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeRoleBindingProps]
Items is a list of RoleBindings.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.RoleBindingList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.RoleBindingList”.
KubeRoleList ¶
RoleList is a collection of Roles.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleList(
scope: Construct,
id: str,
items: typing.List[KubeRoleProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeRoleProps] |
Items is a list of Roles. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeRoleProps]
Items is a list of Roles.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.RoleList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleList.manifest(
items: typing.List[KubeRoleProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.rbac.v1.RoleList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeRoleProps]
Items is a list of Roles.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.RoleList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.rbac.v1.RoleList”.
KubeRuntimeClass ¶
RuntimeClass defines a class of container runtime supported in the cluster.
The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClass(
scope: Construct,
id: str,
handler: str,
metadata: ObjectMeta = None,
overhead: Overhead = None,
scheduling: Scheduling = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
handler |
str |
handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
overhead |
cdk8s_plus_31.k8s.Overhead |
overhead represents the resource overhead associated with running a pod for a given RuntimeClass. |
scheduling |
cdk8s_plus_31.k8s.Scheduling |
scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
handlerRequired ¶
- Type: str
handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class.
The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called “runc” might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
overheadOptional ¶
- Type: cdk8s_plus_31.k8s.Overhead
overhead represents the resource overhead associated with running a pod for a given RuntimeClass.
For more details, see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/
schedulingOptional ¶
- Type: cdk8s_plus_31.k8s.Scheduling
scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it.
If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.node.v1.RuntimeClass”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClass.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClass.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClass.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClass.manifest(
handler: str,
metadata: ObjectMeta = None,
overhead: Overhead = None,
scheduling: Scheduling = None
)
Renders a Kubernetes manifest for “io.k8s.api.node.v1.RuntimeClass”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
handlerRequired ¶
- Type: str
handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class.
The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called “runc” might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
overheadOptional ¶
- Type: cdk8s_plus_31.k8s.Overhead
overhead represents the resource overhead associated with running a pod for a given RuntimeClass.
For more details, see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/
schedulingOptional ¶
- Type: cdk8s_plus_31.k8s.Scheduling
scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it.
If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.node.v1.RuntimeClass”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.node.v1.RuntimeClass”.
KubeRuntimeClassList ¶
RuntimeClassList is a list of RuntimeClass objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClassList(
scope: Construct,
id: str,
items: typing.List[KubeRuntimeClassProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeRuntimeClassProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeRuntimeClassProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.node.v1.RuntimeClassList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClassList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClassList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClassList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClassList.manifest(
items: typing.List[KubeRuntimeClassProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.node.v1.RuntimeClassList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeRuntimeClassProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.node.v1.RuntimeClassList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.node.v1.RuntimeClassList”.
KubeScale ¶
Scale represents a scaling request for a resource.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeScale(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ScaleSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ScaleSpec |
spec defines the behavior of the scale. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ScaleSpec
spec defines the behavior of the scale.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v1.Scale”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeScale.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeScale.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeScale.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeScale.manifest(
metadata: ObjectMeta = None,
spec: ScaleSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.autoscaling.v1.Scale”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ScaleSpec
spec defines the behavior of the scale.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v1.Scale”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.autoscaling.v1.Scale”.
KubeSecret ¶
Secret holds secret data of a certain type.
The total bytes of the values in the Data field must be less than MaxSecretSize bytes.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecret(
scope: Construct,
id: str,
data: typing.Mapping[str] = None,
immutable: bool = None,
metadata: ObjectMeta = None,
string_data: typing.Mapping[str] = None,
type: str = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
data |
typing.Mapping[str] |
Data contains the secret data. |
immutable |
bool |
Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
string_data |
typing.Mapping[str] |
stringData allows specifying non-binary secret data in string form. |
type |
str |
Used to facilitate programmatic handling of secret data. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
dataOptional ¶
- Type: typing.Mapping[str]
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
immutableOptional ¶
- Type: bool
Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time. Defaulted to nil.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
string_dataOptional ¶
- Type: typing.Mapping[str]
stringData allows specifying non-binary secret data in string form.
It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.
typeOptional ¶
- Type: str
Used to facilitate programmatic handling of secret data.
More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Secret”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecret.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecret.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecret.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecret.manifest(
data: typing.Mapping[str] = None,
immutable: bool = None,
metadata: ObjectMeta = None,
string_data: typing.Mapping[str] = None,
type: str = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Secret”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
dataOptional ¶
- Type: typing.Mapping[str]
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
immutableOptional ¶
- Type: bool
Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time. Defaulted to nil.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
string_dataOptional ¶
- Type: typing.Mapping[str]
stringData allows specifying non-binary secret data in string form.
It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.
typeOptional ¶
- Type: str
Used to facilitate programmatic handling of secret data.
More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.Secret”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.Secret”.
KubeSecretList ¶
SecretList is a list of Secret.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecretList(
scope: Construct,
id: str,
items: typing.List[KubeSecretProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeSecretProps] |
Items is a list of secret objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeSecretProps]
Items is a list of secret objects.
More info: https://kubernetes.io/docs/concepts/configuration/secret
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.SecretList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecretList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecretList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecretList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecretList.manifest(
items: typing.List[KubeSecretProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.SecretList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeSecretProps]
Items is a list of secret objects.
More info: https://kubernetes.io/docs/concepts/configuration/secret
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.SecretList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.SecretList”.
KubeSelfSubjectAccessReview ¶
SelfSubjectAccessReview checks whether or the current user can perform an action.
Not filling in a spec.namespace means “in all namespaces”. Self is a special case, because users should always be able to check whether they can perform an action
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectAccessReview(
scope: Construct,
id: str,
spec: SelfSubjectAccessReviewSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.SelfSubjectAccessReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.SelfSubjectAccessReviewSpec
Spec holds information about the request being evaluated.
user and groups must be empty
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.authorization.v1.SelfSubjectAccessReview”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectAccessReview.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectAccessReview.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectAccessReview.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectAccessReview.manifest(
spec: SelfSubjectAccessReviewSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.authorization.v1.SelfSubjectAccessReview”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.SelfSubjectAccessReviewSpec
Spec holds information about the request being evaluated.
user and groups must be empty
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.authorization.v1.SelfSubjectAccessReview”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.authorization.v1.SelfSubjectAccessReview”.
KubeSelfSubjectReview ¶
SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReview(
scope: Construct,
id: str,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1.SelfSubjectReview”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReview.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReview.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReview.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReview.manifest(
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1.SelfSubjectReview”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.authentication.v1.SelfSubjectReview”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.authentication.v1.SelfSubjectReview”.
KubeSelfSubjectReviewV1Alpha1 ¶
SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Alpha1(
scope: Construct,
id: str,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1alpha1.SelfSubjectReview”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Alpha1.manifest(
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1alpha1.SelfSubjectReview”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.authentication.v1alpha1.SelfSubjectReview”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.authentication.v1alpha1.SelfSubjectReview”.
KubeSelfSubjectReviewV1Beta1 ¶
SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Beta1(
scope: Construct,
id: str,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1beta1.SelfSubjectReview”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Beta1.manifest(
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1beta1.SelfSubjectReview”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.authentication.v1beta1.SelfSubjectReview”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.authentication.v1beta1.SelfSubjectReview”.
KubeSelfSubjectRulesReview ¶
SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.
The returned list of actions may be incomplete depending on the server’s authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectRulesReview(
scope: Construct,
id: str,
spec: SelfSubjectRulesReviewSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.SelfSubjectRulesReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.SelfSubjectRulesReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.authorization.v1.SelfSubjectRulesReview”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectRulesReview.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectRulesReview.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectRulesReview.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectRulesReview.manifest(
spec: SelfSubjectRulesReviewSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.authorization.v1.SelfSubjectRulesReview”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.SelfSubjectRulesReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.authorization.v1.SelfSubjectRulesReview”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.authorization.v1.SelfSubjectRulesReview”.
KubeService ¶
Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeService(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ServiceSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.ServiceSpec |
Spec defines the behavior of a service. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ServiceSpec
Spec defines the behavior of a service.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Service”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeService.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeService.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeService.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeService.manifest(
metadata: ObjectMeta = None,
spec: ServiceSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.Service”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ServiceSpec
Spec defines the behavior of a service.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.Service”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.Service”.
KubeServiceAccount ¶
ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccount(
scope: Construct,
id: str,
automount_service_account_token: bool = None,
image_pull_secrets: typing.List[LocalObjectReference] = None,
metadata: ObjectMeta = None,
secrets: typing.List[ObjectReference] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
automount_service_account_token |
bool |
AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. |
image_pull_secrets |
typing.List[cdk8s_plus_31.k8s.LocalObjectReference] |
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
secrets |
typing.List[cdk8s_plus_31.k8s.ObjectReference] |
Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
automount_service_account_tokenOptional ¶
- Type: bool
AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
Can be overridden at the pod level.
image_pull_secretsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.LocalObjectReference]
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount.
ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
secretsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.ObjectReference]
Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use.
Pods are only limited to this list if this service account has a “kubernetes.io/enforce-mountable-secrets” annotation set to “true”. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ServiceAccount”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccount.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccount.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccount.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccount.manifest(
automount_service_account_token: bool = None,
image_pull_secrets: typing.List[LocalObjectReference] = None,
metadata: ObjectMeta = None,
secrets: typing.List[ObjectReference] = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ServiceAccount”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
automount_service_account_tokenOptional ¶
- Type: bool
AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
Can be overridden at the pod level.
image_pull_secretsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.LocalObjectReference]
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount.
ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
secretsOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.ObjectReference]
Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use.
Pods are only limited to this list if this service account has a “kubernetes.io/enforce-mountable-secrets” annotation set to “true”. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ServiceAccount”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ServiceAccount”.
KubeServiceAccountList ¶
ServiceAccountList is a list of ServiceAccount objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccountList(
scope: Construct,
id: str,
items: typing.List[KubeServiceAccountProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeServiceAccountProps] |
List of ServiceAccounts. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeServiceAccountProps]
List of ServiceAccounts.
More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ServiceAccountList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccountList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccountList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccountList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccountList.manifest(
items: typing.List[KubeServiceAccountProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ServiceAccountList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeServiceAccountProps]
List of ServiceAccounts.
More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ServiceAccountList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ServiceAccountList”.
KubeServiceCidrListV1Beta1 ¶
ServiceCIDRList contains a list of ServiceCIDR objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrListV1Beta1(
scope: Construct,
id: str,
items: typing.List[KubeServiceCidrv1Beta1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeServiceCidrv1Beta1Props] |
items is the list of ServiceCIDRs. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeServiceCidrv1Beta1Props]
items is the list of ServiceCIDRs.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1beta1.ServiceCIDRList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrListV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrListV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrListV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrListV1Beta1.manifest(
items: typing.List[KubeServiceCidrv1Beta1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1beta1.ServiceCIDRList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeServiceCidrv1Beta1Props]
items is the list of ServiceCIDRs.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1beta1.ServiceCIDRList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1beta1.ServiceCIDRList”.
KubeServiceCidrv1Beta1 ¶
ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrv1Beta1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ServiceCidrSpecV1Beta1 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.ServiceCidrSpecV1Beta1 |
spec is the desired state of the ServiceCIDR. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ServiceCidrSpecV1Beta1
spec is the desired state of the ServiceCIDR.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.networking.v1beta1.ServiceCIDR”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrv1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrv1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrv1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrv1Beta1.manifest(
metadata: ObjectMeta = None,
spec: ServiceCidrSpecV1Beta1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.networking.v1beta1.ServiceCIDR”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.ServiceCidrSpecV1Beta1
spec is the desired state of the ServiceCIDR.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.networking.v1beta1.ServiceCIDR”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.networking.v1beta1.ServiceCIDR”.
KubeServiceList ¶
ServiceList holds a list of services.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceList(
scope: Construct,
id: str,
items: typing.List[KubeServiceProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeServiceProps] |
List of services. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeServiceProps]
List of services.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ServiceList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceList.manifest(
items: typing.List[KubeServiceProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.core.v1.ServiceList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeServiceProps]
List of services.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.core.v1.ServiceList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.core.v1.ServiceList”.
KubeStatefulSet ¶
StatefulSet represents a set of pods with consistent identities.
Identities are defined as:
- Network: A single stable DNS and hostname.
- Storage: As many VolumeClaims as requested.
The StatefulSet guarantees that a given network identity will always map to the same storage identity.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSet(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: StatefulSetSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.StatefulSetSpec |
Spec defines the desired identities of pods in this set. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.StatefulSetSpec
Spec defines the desired identities of pods in this set.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.StatefulSet”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSet.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSet.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSet.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSet.manifest(
metadata: ObjectMeta = None,
spec: StatefulSetSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.StatefulSet”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.StatefulSetSpec
Spec defines the desired identities of pods in this set.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.StatefulSet”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.StatefulSet”.
KubeStatefulSetList ¶
StatefulSetList is a collection of StatefulSets.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSetList(
scope: Construct,
id: str,
items: typing.List[KubeStatefulSetProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeStatefulSetProps] |
Items is the list of stateful sets. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeStatefulSetProps]
Items is the list of stateful sets.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.StatefulSetList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSetList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSetList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSetList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSetList.manifest(
items: typing.List[KubeStatefulSetProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.apps.v1.StatefulSetList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeStatefulSetProps]
Items is the list of stateful sets.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apps.v1.StatefulSetList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apps.v1.StatefulSetList”.
KubeStatus ¶
Status is a return value for calls that don’t return other objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatus(
scope: Construct,
id: str,
code: typing.Union[int, float] = None,
details: StatusDetails = None,
message: str = None,
metadata: ListMeta = None,
reason: str = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
code |
typing.Union[int, float] |
Suggested HTTP return code for this status, 0 if not set. |
details |
cdk8s_plus_31.k8s.StatusDetails |
Extended data associated with the reason. |
message |
str |
A human-readable description of the status of this operation. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
reason |
str |
A machine-readable description of why this operation is in the “Failure” status. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
codeOptional ¶
- Type: typing.Union[int, float]
Suggested HTTP return code for this status, 0 if not set.
detailsOptional ¶
- Type: cdk8s_plus_31.k8s.StatusDetails
Extended data associated with the reason.
Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
messageOptional ¶
- Type: str
A human-readable description of the status of this operation.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
reasonOptional ¶
- Type: str
A machine-readable description of why this operation is in the “Failure” status.
If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.apimachinery.pkg.apis.meta.v1.Status”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatus.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatus.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatus.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatus.manifest(
code: typing.Union[int, float] = None,
details: StatusDetails = None,
message: str = None,
metadata: ListMeta = None,
reason: str = None
)
Renders a Kubernetes manifest for “io.k8s.apimachinery.pkg.apis.meta.v1.Status”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
codeOptional ¶
- Type: typing.Union[int, float]
Suggested HTTP return code for this status, 0 if not set.
detailsOptional ¶
- Type: cdk8s_plus_31.k8s.StatusDetails
Extended data associated with the reason.
Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
messageOptional ¶
- Type: str
A human-readable description of the status of this operation.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
reasonOptional ¶
- Type: str
A machine-readable description of why this operation is in the “Failure” status.
If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.apimachinery.pkg.apis.meta.v1.Status”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.apimachinery.pkg.apis.meta.v1.Status”.
KubeStorageClass ¶
StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.
StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClass(
scope: Construct,
id: str,
provisioner: str,
allowed_topologies: typing.List[TopologySelectorTerm] = None,
allow_volume_expansion: bool = None,
metadata: ObjectMeta = None,
mount_options: typing.List[str] = None,
parameters: typing.Mapping[str] = None,
reclaim_policy: str = None,
volume_binding_mode: str = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
provisioner |
str |
provisioner indicates the type of the provisioner. |
allowed_topologies |
typing.List[cdk8s_plus_31.k8s.TopologySelectorTerm] |
allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. |
allow_volume_expansion |
bool |
allowVolumeExpansion shows whether the storage class allow volume expand. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
mount_options |
typing.List[str] |
mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. |
parameters |
typing.Mapping[str] |
parameters holds the parameters for the provisioner that should create volumes of this storage class. |
reclaim_policy |
str |
reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. |
volume_binding_mode |
str |
volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
provisionerRequired ¶
- Type: str
provisioner indicates the type of the provisioner.
allowed_topologiesOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.TopologySelectorTerm]
allowedTopologies restrict the node topologies where volumes can be dynamically provisioned.
Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
allow_volume_expansionOptional ¶
- Type: bool
allowVolumeExpansion shows whether the storage class allow volume expand.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
mount_optionsOptional ¶
- Type: typing.List[str]
mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class.
e.g. [“ro”, “soft”]. Not validated - mount of the PVs will simply fail if one is invalid.
parametersOptional ¶
- Type: typing.Mapping[str]
parameters holds the parameters for the provisioner that should create volumes of this storage class.
reclaim_policyOptional ¶
- Type: str
- Default: Delete.
reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class.
Defaults to Delete.
volume_binding_modeOptional ¶
- Type: str
volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.
When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.StorageClass”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClass.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClass.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClass.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClass.manifest(
provisioner: str,
allowed_topologies: typing.List[TopologySelectorTerm] = None,
allow_volume_expansion: bool = None,
metadata: ObjectMeta = None,
mount_options: typing.List[str] = None,
parameters: typing.Mapping[str] = None,
reclaim_policy: str = None,
volume_binding_mode: str = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.StorageClass”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
provisionerRequired ¶
- Type: str
provisioner indicates the type of the provisioner.
allowed_topologiesOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.TopologySelectorTerm]
allowedTopologies restrict the node topologies where volumes can be dynamically provisioned.
Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
allow_volume_expansionOptional ¶
- Type: bool
allowVolumeExpansion shows whether the storage class allow volume expand.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
mount_optionsOptional ¶
- Type: typing.List[str]
mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class.
e.g. [“ro”, “soft”]. Not validated - mount of the PVs will simply fail if one is invalid.
parametersOptional ¶
- Type: typing.Mapping[str]
parameters holds the parameters for the provisioner that should create volumes of this storage class.
reclaim_policyOptional ¶
- Type: str
- Default: Delete.
reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class.
Defaults to Delete.
volume_binding_modeOptional ¶
- Type: str
volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.
When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.StorageClass”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.StorageClass”.
KubeStorageClassList ¶
StorageClassList is a collection of storage classes.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClassList(
scope: Construct,
id: str,
items: typing.List[KubeStorageClassProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeStorageClassProps] |
items is the list of StorageClasses. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeStorageClassProps]
items is the list of StorageClasses.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.StorageClassList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClassList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClassList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClassList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClassList.manifest(
items: typing.List[KubeStorageClassProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.StorageClassList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeStorageClassProps]
items is the list of StorageClasses.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.StorageClassList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.StorageClassList”.
KubeStorageVersionListV1Alpha1 ¶
A list of StorageVersions.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionListV1Alpha1(
scope: Construct,
id: str,
items: typing.List[KubeStorageVersionV1Alpha1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeStorageVersionV1Alpha1Props] |
Items holds a list of StorageVersion. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeStorageVersionV1Alpha1Props]
Items holds a list of StorageVersion.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionListV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionListV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionListV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionListV1Alpha1.manifest(
items: typing.List[KubeStorageVersionV1Alpha1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeStorageVersionV1Alpha1Props]
Items holds a list of StorageVersion.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList”.
KubeStorageVersionMigrationListV1Alpha1 ¶
StorageVersionMigrationList is a collection of storage version migrations.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationListV1Alpha1(
scope: Construct,
id: str,
items: typing.List[KubeStorageVersionMigrationV1Alpha1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeStorageVersionMigrationV1Alpha1Props] |
Items is the list of StorageVersionMigration. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeStorageVersionMigrationV1Alpha1Props]
Items is the list of StorageVersionMigration.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationListV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationListV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationListV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationListV1Alpha1.manifest(
items: typing.List[KubeStorageVersionMigrationV1Alpha1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeStorageVersionMigrationV1Alpha1Props]
Items is the list of StorageVersionMigration.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationList”.
KubeStorageVersionMigrationV1Alpha1 ¶
StorageVersionMigration represents a migration of stored data to the latest storage version.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationV1Alpha1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: StorageVersionMigrationSpecV1Alpha1 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
spec |
cdk8s_plus_31.k8s.StorageVersionMigrationSpecV1Alpha1 |
Specification of the migration. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.StorageVersionMigrationSpecV1Alpha1
Specification of the migration.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationV1Alpha1.manifest(
metadata: ObjectMeta = None,
spec: StorageVersionMigrationSpecV1Alpha1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_31.k8s.StorageVersionMigrationSpecV1Alpha1
Specification of the migration.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration”.
KubeStorageVersionV1Alpha1 ¶
Storage version of a specific resource.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionV1Alpha1(
scope: Construct,
id: str,
spec: typing.Any,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
typing.Any |
Spec is an empty spec. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
The name is |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: typing.Any
Spec is an empty spec.
It is here to comply with Kubernetes API style.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
The name is
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.apiserverinternal.v1alpha1.StorageVersion”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionV1Alpha1.manifest(
spec: typing.Any,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.apiserverinternal.v1alpha1.StorageVersion”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: typing.Any
Spec is an empty spec.
It is here to comply with Kubernetes API style.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
The name is
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.apiserverinternal.v1alpha1.StorageVersion”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.apiserverinternal.v1alpha1.StorageVersion”.
KubeSubjectAccessReview ¶
SubjectAccessReview checks whether or not a user or group can perform an action.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeSubjectAccessReview(
scope: Construct,
id: str,
spec: SubjectAccessReviewSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.SubjectAccessReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.SubjectAccessReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.authorization.v1.SubjectAccessReview”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeSubjectAccessReview.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeSubjectAccessReview.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeSubjectAccessReview.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeSubjectAccessReview.manifest(
spec: SubjectAccessReviewSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.authorization.v1.SubjectAccessReview”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.SubjectAccessReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.authorization.v1.SubjectAccessReview”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.authorization.v1.SubjectAccessReview”.
KubeTokenRequest ¶
TokenRequest requests a token for a given service account.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenRequest(
scope: Construct,
id: str,
spec: TokenRequestSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.TokenRequestSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.TokenRequestSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1.TokenRequest”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenRequest.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenRequest.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenRequest.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenRequest.manifest(
spec: TokenRequestSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1.TokenRequest”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.TokenRequestSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.authentication.v1.TokenRequest”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.authentication.v1.TokenRequest”.
KubeTokenReview ¶
TokenReview attempts to authenticate a token to a known user.
Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenReview(
scope: Construct,
id: str,
spec: TokenReviewSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.TokenReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.TokenReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1.TokenReview”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenReview.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenReview.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenReview.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenReview.manifest(
spec: TokenReviewSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.authentication.v1.TokenReview”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.TokenReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.authentication.v1.TokenReview”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.authentication.v1.TokenReview”.
KubeValidatingAdmissionPolicy ¶
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicy(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicySpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpec |
Specification of the desired behavior of the ValidatingAdmissionPolicy. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpec
Specification of the desired behavior of the ValidatingAdmissionPolicy.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicy.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicy.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicy.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicy.manifest(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicySpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpec
Specification of the desired behavior of the ValidatingAdmissionPolicy.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy”.
KubeValidatingAdmissionPolicyBinding ¶
ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources.
ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don’t use params, otherwise N is the number of parameters selected by the binding.
The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBinding(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicyBindingSpec = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpec |
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpec
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBinding.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBinding.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBinding.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBinding.manifest(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicyBindingSpec = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpec
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding”.
KubeValidatingAdmissionPolicyBindingList ¶
ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingList(
scope: Construct,
id: str,
items: typing.List[KubeValidatingAdmissionPolicyBindingProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingProps] |
List of PolicyBinding. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingProps]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingList.manifest(
items: typing.List[KubeValidatingAdmissionPolicyBindingProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingProps]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingList”.
KubeValidatingAdmissionPolicyBindingListV1Alpha1 ¶
ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Alpha1(
scope: Construct,
id: str,
items: typing.List[KubeValidatingAdmissionPolicyBindingV1Alpha1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1Props] |
List of PolicyBinding. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1Props]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Alpha1.manifest(
items: typing.List[KubeValidatingAdmissionPolicyBindingV1Alpha1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1Props]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList”.
KubeValidatingAdmissionPolicyBindingListV1Beta1 ¶
ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Beta1(
scope: Construct,
id: str,
items: typing.List[KubeValidatingAdmissionPolicyBindingV1Beta1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Beta1Props] |
List of PolicyBinding. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Beta1Props]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Beta1.manifest(
items: typing.List[KubeValidatingAdmissionPolicyBindingV1Beta1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Beta1Props]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList”.
KubeValidatingAdmissionPolicyBindingV1Alpha1 ¶
ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources.
ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don’t use params, otherwise N is the number of parameters selected by the binding.
The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicyBindingSpecV1Alpha1 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Alpha1 |
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Alpha1
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1.manifest(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicyBindingSpecV1Alpha1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Alpha1
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding”.
KubeValidatingAdmissionPolicyBindingV1Beta1 ¶
ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources.
ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don’t use params, otherwise N is the number of parameters selected by the binding.
The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Beta1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicyBindingSpecV1Beta1 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Beta1 |
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Beta1
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Beta1.manifest(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicyBindingSpecV1Beta1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Beta1
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding”.
KubeValidatingAdmissionPolicyList ¶
ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyList(
scope: Construct,
id: str,
items: typing.List[KubeValidatingAdmissionPolicyProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyProps] |
List of ValidatingAdmissionPolicy. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyProps]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyList.manifest(
items: typing.List[KubeValidatingAdmissionPolicyProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyProps]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyList”.
KubeValidatingAdmissionPolicyListV1Alpha1 ¶
ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Alpha1(
scope: Construct,
id: str,
items: typing.List[KubeValidatingAdmissionPolicyV1Alpha1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Alpha1Props] |
List of ValidatingAdmissionPolicy. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Alpha1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Alpha1.manifest(
items: typing.List[KubeValidatingAdmissionPolicyV1Alpha1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Alpha1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList”.
KubeValidatingAdmissionPolicyListV1Beta1 ¶
ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Beta1(
scope: Construct,
id: str,
items: typing.List[KubeValidatingAdmissionPolicyV1Beta1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Beta1Props] |
List of ValidatingAdmissionPolicy. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Beta1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Beta1.manifest(
items: typing.List[KubeValidatingAdmissionPolicyV1Beta1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Beta1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList”.
KubeValidatingAdmissionPolicyV1Alpha1 ¶
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Alpha1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicySpecV1Alpha1 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Alpha1 |
Specification of the desired behavior of the ValidatingAdmissionPolicy. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Alpha1
Specification of the desired behavior of the ValidatingAdmissionPolicy.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Alpha1.manifest(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicySpecV1Alpha1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Alpha1
Specification of the desired behavior of the ValidatingAdmissionPolicy.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy”.
KubeValidatingAdmissionPolicyV1Beta1 ¶
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Beta1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicySpecV1Beta1 = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Beta1 |
Specification of the desired behavior of the ValidatingAdmissionPolicy. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Beta1
Specification of the desired behavior of the ValidatingAdmissionPolicy.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Beta1.manifest(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicySpecV1Beta1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Beta1
Specification of the desired behavior of the ValidatingAdmissionPolicy.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy”.
KubeValidatingWebhookConfiguration ¶
ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfiguration(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
webhooks: typing.List[ValidatingWebhook] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
webhooks |
typing.List[cdk8s_plus_31.k8s.ValidatingWebhook] |
Webhooks is a list of webhooks and the affected resources and operations. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
webhooksOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.ValidatingWebhook]
Webhooks is a list of webhooks and the affected resources and operations.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfiguration.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfiguration.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfiguration.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfiguration.manifest(
metadata: ObjectMeta = None,
webhooks: typing.List[ValidatingWebhook] = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
webhooksOptional ¶
- Type: typing.List[cdk8s_plus_31.k8s.ValidatingWebhook]
Webhooks is a list of webhooks and the affected resources and operations.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration”.
KubeValidatingWebhookConfigurationList ¶
ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfigurationList(
scope: Construct,
id: str,
items: typing.List[KubeValidatingWebhookConfigurationProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingWebhookConfigurationProps] |
List of ValidatingWebhookConfiguration. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingWebhookConfigurationProps]
List of ValidatingWebhookConfiguration.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfigurationList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfigurationList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfigurationList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfigurationList.manifest(
items: typing.List[KubeValidatingWebhookConfigurationProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingWebhookConfigurationProps]
List of ValidatingWebhookConfiguration.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList”.
KubeVolumeAttachment ¶
VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.
VolumeAttachment objects are non-namespaced.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachment(
scope: Construct,
id: str,
spec: VolumeAttachmentSpec,
metadata: ObjectMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
spec |
cdk8s_plus_31.k8s.VolumeAttachmentSpec |
spec represents specification of the desired attach/detach volume behavior. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
specRequired ¶
- Type: cdk8s_plus_31.k8s.VolumeAttachmentSpec
spec represents specification of the desired attach/detach volume behavior.
Populated by the Kubernetes system.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.VolumeAttachment”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachment.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachment.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachment.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachment.manifest(
spec: VolumeAttachmentSpec,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.VolumeAttachment”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_31.k8s.VolumeAttachmentSpec
spec represents specification of the desired attach/detach volume behavior.
Populated by the Kubernetes system.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.VolumeAttachment”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.VolumeAttachment”.
KubeVolumeAttachmentList ¶
VolumeAttachmentList is a collection of VolumeAttachment objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachmentList(
scope: Construct,
id: str,
items: typing.List[KubeVolumeAttachmentProps],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeVolumeAttachmentProps] |
items is the list of VolumeAttachments. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeVolumeAttachmentProps]
items is the list of VolumeAttachments.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.VolumeAttachmentList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachmentList.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachmentList.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachmentList.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachmentList.manifest(
items: typing.List[KubeVolumeAttachmentProps],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1.VolumeAttachmentList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeVolumeAttachmentProps]
items is the list of VolumeAttachments.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1.VolumeAttachmentList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1.VolumeAttachmentList”.
KubeVolumeAttributesClassListV1Alpha1 ¶
VolumeAttributesClassList is a collection of VolumeAttributesClass objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Alpha1(
scope: Construct,
id: str,
items: typing.List[KubeVolumeAttributesClassV1Alpha1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Alpha1Props] |
items is the list of VolumeAttributesClass objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Alpha1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1alpha1.VolumeAttributesClassList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Alpha1.manifest(
items: typing.List[KubeVolumeAttributesClassV1Alpha1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1alpha1.VolumeAttributesClassList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Alpha1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1alpha1.VolumeAttributesClassList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1alpha1.VolumeAttributesClassList”.
KubeVolumeAttributesClassListV1Beta1 ¶
VolumeAttributesClassList is a collection of VolumeAttributesClass objects.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Beta1(
scope: Construct,
id: str,
items: typing.List[KubeVolumeAttributesClassV1Beta1Props],
metadata: ListMeta = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
items |
typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Beta1Props] |
items is the list of VolumeAttributesClass objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Beta1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1beta1.VolumeAttributesClassList”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Beta1.manifest(
items: typing.List[KubeVolumeAttributesClassV1Beta1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1beta1.VolumeAttributesClassList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Beta1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1beta1.VolumeAttributesClassList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1beta1.VolumeAttributesClassList”.
KubeVolumeAttributesClassV1Alpha1 ¶
VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver.
The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Alpha1(
scope: Construct,
id: str,
driver_name: str,
metadata: ObjectMeta = None,
parameters: typing.Mapping[str] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
driver_name |
str |
Name of the CSI driver This field is immutable. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
parameters |
typing.Mapping[str] |
parameters hold volume attributes defined by the CSI driver. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
driver_nameRequired ¶
- Type: str
Name of the CSI driver This field is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
parametersOptional ¶
- Type: typing.Mapping[str]
parameters hold volume attributes defined by the CSI driver.
These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.
This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an “Infeasible” state in the modifyVolumeStatus field.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1alpha1.VolumeAttributesClass”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Alpha1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Alpha1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Alpha1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Alpha1.manifest(
driver_name: str,
metadata: ObjectMeta = None,
parameters: typing.Mapping[str] = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1alpha1.VolumeAttributesClass”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
driver_nameRequired ¶
- Type: str
Name of the CSI driver This field is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
parametersOptional ¶
- Type: typing.Mapping[str]
parameters hold volume attributes defined by the CSI driver.
These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.
This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an “Infeasible” state in the modifyVolumeStatus field.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1alpha1.VolumeAttributesClass”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1alpha1.VolumeAttributesClass”.
KubeVolumeAttributesClassV1Beta1 ¶
VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver.
The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.
Initializers ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Beta1(
scope: Construct,
id: str,
driver_name: str,
metadata: ObjectMeta = None,
parameters: typing.Mapping[str] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
the scope in which to define this object. |
id |
str |
a scope-local name for the object. |
driver_name |
str |
Name of the CSI driver This field is immutable. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
parameters |
typing.Mapping[str] |
parameters hold volume attributes defined by the CSI driver. |
scopeRequired ¶
- Type: constructs.Construct
the scope in which to define this object.
idRequired ¶
- Type: str
a scope-local name for the object.
driver_nameRequired ¶
- Type: str
Name of the CSI driver This field is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
parametersOptional ¶
- Type: typing.Mapping[str]
parameters hold volume attributes defined by the CSI driver.
These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.
This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an “Infeasible” state in the modifyVolumeStatus field.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
add_dependency |
Create a dependency between this ApiObject and other constructs. |
add_json_patch |
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object. |
to_json |
Renders the object to Kubernetes JSON. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
add_dependency ¶
def add_dependency(
dependencies: *IConstruct
) -> None
Create a dependency between this ApiObject and other constructs.
These can be other ApiObjects, Charts, or custom.
dependenciesRequired ¶
- Type: *constructs.IConstruct
the dependencies to add.
add_json_patch ¶
def add_json_patch(
ops: *JsonPatch
) -> None
Applies a set of RFC-6902 JSON-Patch operations to the manifest synthesized for this API object.
Example
kubePod.addJsonPatch(JsonPatch.replace('/spec/enableServiceLinks', true));
opsRequired ¶
- Type: *cdk8s.JsonPatch
The JSON-Patch operations to apply.
to_json ¶
def to_json() -> typing.Any
Renders the object to Kubernetes JSON.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_api_object |
Return whether the given object is an ApiObject. |
of |
Returns the ApiObject named Resource which is a child of the given construct. |
manifest |
Renders a Kubernetes manifest for “io.k8s.api.storage.v1beta1.VolumeAttributesClass”. |
is_construct ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Beta1.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
is_api_object ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Beta1.is_api_object(
o: typing.Any
)
Return whether the given object is an ApiObject.
We do attribute detection since we can’t reliably use ‘instanceof’.
oRequired ¶
- Type: typing.Any
The object to check.
of ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Beta1.of(
c: IConstruct
)
Returns the ApiObject named Resource which is a child of the given construct.
If c is an ApiObject, it is returned directly. Throws an
exception if the construct does not have a child named Default or if
this child is not an ApiObject.
cRequired ¶
- Type: constructs.IConstruct
The higher-level construct.
manifest ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Beta1.manifest(
driver_name: str,
metadata: ObjectMeta = None,
parameters: typing.Mapping[str] = None
)
Renders a Kubernetes manifest for “io.k8s.api.storage.v1beta1.VolumeAttributesClass”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
driver_nameRequired ¶
- Type: str
Name of the CSI driver This field is immutable.
metadataOptional ¶
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
parametersOptional ¶
- Type: typing.Mapping[str]
parameters hold volume attributes defined by the CSI driver.
These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.
This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an “Infeasible” state in the modifyVolumeStatus field.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
api_version |
str |
The object’s API version (e.g. authorization.k8s.io/v1). |
chart |
cdk8s.Chart |
The chart in which this object is defined. |
kind |
str |
The object kind. |
metadata |
cdk8s.ApiObjectMetadataDefinition |
Metadata associated with this API object. |
name |
str |
The name of the API object. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. authorization.k8s.io/v1).
chartRequired ¶
chart: Chart
- Type: cdk8s.Chart
The chart in which this object is defined.
kindRequired ¶
kind: str
- Type: str
The object kind.
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
Metadata associated with this API object.
nameRequired ¶
name: str
- Type: str
The name of the API object.
If a name is specified in metadata.name this will be the name returned.
Otherwise, a name will be generated by calling
Chart.of(this).generatedObjectName(this), which by default uses the
construct path to generate a DNS-compatible name for the resource.
Constants ¶
| Name | Type | Description |
|---|---|---|
GVK |
cdk8s.GroupVersionKind |
Returns the apiVersion and kind for “io.k8s.api.storage.v1beta1.VolumeAttributesClass”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.storage.v1beta1.VolumeAttributesClass”.
Namespace ¶
- Implements: INamespaceSelector, INetworkPolicyPeer
In Kubernetes, namespaces provides a mechanism for isolating groups of resources within a single cluster.
Names of resources need to be unique within a namespace, but not across namespaces. Namespace-based scoping is applicable only for namespaced objects (e.g. Deployments, Services, etc) and not for cluster-wide objects (e.g. StorageClass, Nodes, PersistentVolumes, etc).
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Namespace(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
to_namespace_selector_config |
Return the configuration of this selector. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
to_namespace_selector_config ¶
def to_namespace_selector_config() -> NamespaceSelectorConfig
Return the configuration of this selector.
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Namespace.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
Constants ¶
| Name | Type | Description |
|---|---|---|
NAME_LABEL |
str |
No description. |
NAME_LABELRequired ¶
NAME_LABEL: str
- Type: str
https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/#automatic-labelling
Namespaces ¶
- Implements: INamespaceSelector, INetworkPolicyPeer
Represents a group of namespaces.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Namespaces(
scope: Construct,
id: str,
expressions: typing.List[LabelExpression] = None,
names: typing.List[str] = None,
labels: typing.Mapping[str] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
expressions |
typing.List[LabelExpression] |
No description. |
names |
typing.List[str] |
No description. |
labels |
typing.Mapping[str] |
No description. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
expressionsOptional ¶
- Type: typing.List[LabelExpression]
namesOptional ¶
- Type: typing.List[str]
labelsOptional ¶
- Type: typing.Mapping[str]
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
to_namespace_selector_config |
Return the configuration of this selector. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
to_namespace_selector_config ¶
def to_namespace_selector_config() -> NamespaceSelectorConfig
Return the configuration of this selector.
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
all |
Select all namespaces. |
select |
Select specific namespaces. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Namespaces.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
all ¶
import cdk8s_plus_31
cdk8s_plus_31.Namespaces.all(
scope: Construct,
id: str
)
Select all namespaces.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
select ¶
import cdk8s_plus_31
cdk8s_plus_31.Namespaces.select(
scope: Construct,
id: str,
expressions: typing.List[LabelExpression] = None,
labels: typing.Mapping[str] = None,
names: typing.List[str] = None
)
Select specific namespaces.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
expressionsOptional ¶
- Type: typing.List[LabelExpression]
- Default: no selector requirements.
Namespaces must satisfy these selectors.
The selectors query labels, just like the labels property, but they
provide a more advanced matching mechanism.
labelsOptional ¶
- Type: typing.Mapping[str]
- Default: no strict labels requirements.
Labels the namespaces must have.
This is equivalent to using an ‘Is’ selector.
namesOptional ¶
- Type: typing.List[str]
- Default: no name requirements.
Namespaces names must be one of these.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
NetworkPolicy ¶
Control traffic flow at the IP address or port level (OSI layer 3 or 4), network policies are an application-centric construct which allow you to specify how a pod is allowed to communicate with various network peers.
- Outgoing traffic is allowed if there are no network policies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the network policies that select the pod.
- Incoming traffic is allowed to a pod if there are no network policies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod’s local node, OR if the traffic matches at least one ingress rule across all of the network policies that select the pod.
Network policies do not conflict; they are additive. If any policy or policies apply to a given pod for a given direction, the connections allowed in that direction from that pod is the union of what the applicable policies allow. Thus, order of evaluation does not affect the policy result.
For a connection from a source pod to a destination pod to be allowed, both the egress policy on the source pod and the ingress policy on the destination pod need to allow the connection. If either side does not allow the connection, it will not happen.
https://kubernetes.io/docs/concepts/services-networking/network-policies/#networkpolicy-resource
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicy(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
egress: NetworkPolicyTraffic = None,
ingress: NetworkPolicyTraffic = None,
selector: IPodSelector = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
egress |
NetworkPolicyTraffic |
Egress traffic configuration. |
ingress |
NetworkPolicyTraffic |
Ingress traffic configuration. |
selector |
IPodSelector |
Which pods does this policy object applies to. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
egressOptional ¶
- Type: NetworkPolicyTraffic
- Default: the policy doesn’t change egress behavior of the pods it selects.
Egress traffic configuration.
ingressOptional ¶
- Type: NetworkPolicyTraffic
- Default: the policy doesn’t change ingress behavior of the pods it selects.
Ingress traffic configuration.
selectorOptional ¶
- Type: IPodSelector
- Default: will select all pods in the namespace of the policy.
Which pods does this policy object applies to.
This can either be a single pod / workload, or a grouping of pods selected
via the Pods.select function. Rules is applied to any pods selected by this property.
Multiple network policies can select the same set of pods.
In this case, the rules for each are combined additively.
Note that
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_egress_rule |
Allow outgoing traffic to the peer. |
add_ingress_rule |
Allow incoming traffic from the peer. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_egress_rule ¶
def add_egress_rule(
peer: INetworkPolicyPeer,
ports: typing.List[NetworkPolicyPort] = None
) -> None
Allow outgoing traffic to the peer.
If ports are not passed, traffic will be allowed on all ports.
peerRequired ¶
- Type: INetworkPolicyPeer
portsOptional ¶
- Type: typing.List[NetworkPolicyPort]
add_ingress_rule ¶
def add_ingress_rule(
peer: INetworkPolicyPeer,
ports: typing.List[NetworkPolicyPort] = None
) -> None
Allow incoming traffic from the peer.
If ports are not passed, traffic will be allowed on all ports.
peerRequired ¶
- Type: INetworkPolicyPeer
portsOptional ¶
- Type: typing.List[NetworkPolicyPort]
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicy.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
NetworkPolicyIpBlock ¶
- Implements: INetworkPolicyPeer
Describes a particular CIDR (Ex.
“192.168.1.1/24”,”2001:db9::/64”) that is allowed to the pods matched by a network policy selector. The except entry describes CIDRs that should not be included within this rule.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
any_ipv4 |
Any IPv4 address. |
any_ipv6 |
Any IPv6 address. |
ipv4 |
Create an IPv4 peer from a CIDR. |
ipv6 |
Create an IPv6 peer from a CIDR. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyIpBlock.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
any_ipv4 ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyIpBlock.any_ipv4(
scope: Construct,
id: str
)
Any IPv4 address.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
any_ipv6 ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyIpBlock.any_ipv6(
scope: Construct,
id: str
)
Any IPv6 address.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
ipv4 ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyIpBlock.ipv4(
scope: Construct,
id: str,
cidr_ip: str,
except: typing.List[str] = None
)
Create an IPv4 peer from a CIDR.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
cidr_ipRequired ¶
- Type: str
exceptOptional ¶
- Type: typing.List[str]
ipv6 ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyIpBlock.ipv6(
scope: Construct,
id: str,
cidr_ip: str,
except: typing.List[str] = None
)
Create an IPv6 peer from a CIDR.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
cidr_ipRequired ¶
- Type: str
exceptOptional ¶
- Type: typing.List[str]
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
cidr |
str |
A string representing the IP Block Valid examples are “192.168.1.1/24” or “2001:db9::/64”. |
except |
typing.List[str] |
A slice of CIDRs that should not be included within an IP Block Valid examples are “192.168.1.1/24” or “2001:db9::/64”. Except values will be rejected if they are outside the CIDR range. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
cidrRequired ¶
cidr: str
- Type: str
A string representing the IP Block Valid examples are “192.168.1.1/24” or “2001:db9::/64”.
exceptOptional ¶
except: typing.List[str]
- Type: typing.List[str]
A slice of CIDRs that should not be included within an IP Block Valid examples are “192.168.1.1/24” or “2001:db9::/64”. Except values will be rejected if they are outside the CIDR range.
PersistentVolume ¶
- Implements: IPersistentVolume, IStorage
A PersistentVolume (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using Storage Classes.
It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual Pod that uses the PV. This API object captures the details of the implementation of the storage, be that NFS, iSCSI, or a cloud-provider-specific storage system.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolume(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
claim: IPersistentVolumeClaim = None,
mount_options: typing.List[str] = None,
reclaim_policy: PersistentVolumeReclaimPolicy = None,
storage: Size = None,
storage_class_name: str = None,
volume_mode: PersistentVolumeMode = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains all ways the volume can be mounted. |
claim |
IPersistentVolumeClaim |
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. |
mount_options |
typing.List[str] |
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. |
storage |
cdk8s.Size |
What is the storage capacity of this volume. |
storage_class_name |
str |
Name of StorageClass to which this persistent volume belongs. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes.
Contains all ways the volume can be mounted.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
claimOptional ¶
- Type: IPersistentVolumeClaim
- Default: Not bound to a specific claim.
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
mount_optionsOptional ¶
- Type: typing.List[str]
- Default: No options.
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
reclaim_policyOptional ¶
- Type: PersistentVolumeReclaimPolicy
- Default: PersistentVolumeReclaimPolicy.RETAIN
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
storageOptional ¶
- Type: cdk8s.Size
- Default: No specified.
What is the storage capacity of this volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
- Type: str
- Default: Volume does not belong to any storage class.
Name of StorageClass to which this persistent volume belongs.
volume_modeOptional ¶
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
as_volume |
Convert the piece of storage into a concrete volume. |
bind |
Bind a volume to a specific claim. |
reserve |
Reserve a PersistentVolume by creating a PersistentVolumeClaim that is wired to claim this volume. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
as_volume ¶
def as_volume() -> Volume
Convert the piece of storage into a concrete volume.
bind ¶
def bind(
claim: IPersistentVolumeClaim
) -> None
Bind a volume to a specific claim.
Note that you must also bind the claim to the volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding
claimRequired ¶
- Type: IPersistentVolumeClaim
The PVC to bind to.
reserve ¶
def reserve() -> PersistentVolumeClaim
Reserve a PersistentVolume by creating a PersistentVolumeClaim that is wired to claim this volume.
Note that this method will throw in case the volume is already claimed.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#reserving-a-persistentvolume
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_persistent_volume_name |
Imports a pv from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolume.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_persistent_volume_name ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolume.from_persistent_volume_name(
scope: Construct,
id: str,
volume_name: str
)
Imports a pv from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
volume_nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
mode |
PersistentVolumeMode |
Volume mode of this volume. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
Reclaim policy of this volume. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Access modes requirement of this claim. |
claim |
IPersistentVolumeClaim |
PVC this volume is bound to. |
mount_options |
typing.List[str] |
Mount options of this volume. |
storage |
cdk8s.Size |
Storage size of this volume. |
storage_class_name |
str |
Storage class this volume belongs to. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
modeRequired ¶
mode: PersistentVolumeMode
- Type: PersistentVolumeMode
Volume mode of this volume.
reclaim_policyRequired ¶
reclaim_policy: PersistentVolumeReclaimPolicy
Reclaim policy of this volume.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
Access modes requirement of this claim.
claimOptional ¶
claim: IPersistentVolumeClaim
- Type: IPersistentVolumeClaim
PVC this volume is bound to.
Undefined means this volume is not yet claimed by any PVC.
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
Mount options of this volume.
storageOptional ¶
storage: Size
- Type: cdk8s.Size
Storage size of this volume.
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
Storage class this volume belongs to.
PersistentVolumeClaim ¶
- Implements: IPersistentVolumeClaim
A PersistentVolumeClaim (PVC) is a request for storage by a user.
It is similar to a Pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolumeClaim(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
storage: Size = None,
storage_class_name: str = None,
volume: IPersistentVolume = None,
volume_mode: PersistentVolumeMode = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains the access modes the volume should support. |
storage |
cdk8s.Size |
Minimum storage size the volume should have. |
storage_class_name |
str |
Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:. |
volume |
IPersistentVolume |
The PersistentVolume backing this claim. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes requirement.
Contains the access modes the volume should support.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
storageOptional ¶
- Type: cdk8s.Size
- Default: No storage requirement.
Minimum storage size the volume should have.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
- Type: str
- Default: Not set.
Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:.
- If the admission plugin is turned on, the storage class marked as default will be used.
- If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
volumeOptional ¶
- Type: IPersistentVolume
- Default: No specific volume binding.
The PersistentVolume backing this claim.
The control plane still checks that storage class, access modes, and requested storage size on the volume are valid.
Note that in order to guarantee a proper binding, the volume should
also define a claimRef referring to this claim. Otherwise, the volume may be
claimed be other pvc’s before it gets a chance to bind to this one.
If the volume is managed (i.e not imported), you can use pv.claim() to easily
create a bi-directional bounded claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding.
volume_modeOptional ¶
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
bind |
Bind a claim to a specific volume. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
bind ¶
def bind(
vol: IPersistentVolume
) -> None
Bind a claim to a specific volume.
Note that you must also bind the volume to the claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding
volRequired ¶
- Type: IPersistentVolume
The PV to bind to.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_claim_name |
Imports a pvc from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolumeClaim.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_claim_name ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolumeClaim.from_claim_name(
scope: Construct,
id: str,
claim_name: str
)
Imports a pvc from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
claim_nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
volume_mode |
PersistentVolumeMode |
Volume mode requirement of this claim. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Access modes requirement of this claim. |
storage |
cdk8s.Size |
Storage requirement of this claim. |
storage_class_name |
str |
Storage class requirment of this claim. |
volume |
IPersistentVolume |
PV this claim is bound to. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
volume_modeRequired ¶
volume_mode: PersistentVolumeMode
- Type: PersistentVolumeMode
Volume mode requirement of this claim.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
Access modes requirement of this claim.
storageOptional ¶
storage: Size
- Type: cdk8s.Size
Storage requirement of this claim.
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
Storage class requirment of this claim.
volumeOptional ¶
volume: IPersistentVolume
- Type: IPersistentVolume
PV this claim is bound to.
Undefined means the claim is not bound to any specific volume.
Pod ¶
Pod is a collection of containers that can run on a host.
This resource is created by clients and scheduled onto hosts.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Pod(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_container |
No description. |
add_host_alias |
No description. |
add_init_container |
No description. |
add_volume |
No description. |
attach_container |
No description. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_pod_selector_config |
Return the configuration of this selector. |
to_subject_configuration |
Return the subject configuration. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_container ¶
def add_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_host_alias ¶
def add_host_alias(
hostnames: typing.List[str],
ip: str
) -> None
hostnamesRequired ¶
- Type: typing.List[str]
Hostnames for the chosen IP address.
ipRequired ¶
- Type: str
IP address of the host file entry.
add_init_container ¶
def add_init_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_volume ¶
def add_volume(
vol: Volume
) -> None
volRequired ¶
- Type: Volume
attach_container ¶
def attach_container(
cont: Container
) -> None
contRequired ¶
- Type: Container
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Pod.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
automount_service_account_token |
bool |
No description. |
containers |
typing.List[Container] |
No description. |
dns |
PodDns |
No description. |
host_aliases |
typing.List[HostAlias] |
No description. |
init_containers |
typing.List[Container] |
No description. |
pod_metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
security_context |
PodSecurityContext |
No description. |
share_process_namespace |
bool |
No description. |
volumes |
typing.List[Volume] |
No description. |
docker_registry_auth |
ISecret |
No description. |
enable_service_links |
bool |
No description. |
host_network |
bool |
No description. |
restart_policy |
RestartPolicy |
No description. |
service_account |
IServiceAccount |
No description. |
termination_grace_period |
cdk8s.Duration |
No description. |
connections |
PodConnections |
No description. |
scheduling |
PodScheduling |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
automount_service_account_tokenRequired ¶
automount_service_account_token: bool
- Type: bool
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[Container]
dnsRequired ¶
dns: PodDns
- Type: PodDns
host_aliasesRequired ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
init_containersRequired ¶
init_containers: typing.List[Container]
- Type: typing.List[Container]
pod_metadataRequired ¶
pod_metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
security_contextRequired ¶
security_context: PodSecurityContext
- Type: PodSecurityContext
share_process_namespaceRequired ¶
share_process_namespace: bool
- Type: bool
volumesRequired ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
host_networkOptional ¶
host_network: bool
- Type: bool
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
connectionsRequired ¶
connections: PodConnections
- Type: PodConnections
schedulingRequired ¶
scheduling: PodScheduling
- Type: PodScheduling
Constants ¶
| Name | Type | Description |
|---|---|---|
ADDRESS_LABEL |
str |
This label is autoamtically added by cdk8s to any pod. |
ADDRESS_LABELRequired ¶
ADDRESS_LABEL: str
- Type: str
This label is autoamtically added by cdk8s to any pod.
It provides a unique and stable identifier for the pod.
Pods ¶
- Implements: IPodSelector
Represents a group of pods.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Pods(
scope: Construct,
id: str,
expressions: typing.List[LabelExpression] = None,
labels: typing.Mapping[str] = None,
namespaces: INamespaceSelector = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
expressions |
typing.List[LabelExpression] |
No description. |
labels |
typing.Mapping[str] |
No description. |
namespaces |
INamespaceSelector |
No description. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
expressionsOptional ¶
- Type: typing.List[LabelExpression]
labelsOptional ¶
- Type: typing.Mapping[str]
namespacesOptional ¶
- Type: INamespaceSelector
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
to_network_policy_peer_config |
No description. |
to_pod_selector |
No description. |
to_pod_selector_config |
Return the configuration of this selector. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
all |
Select all pods. |
select |
Select pods in the cluster with various selectors. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Pods.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
all ¶
import cdk8s_plus_31
cdk8s_plus_31.Pods.all(
scope: Construct,
id: str,
namespaces: Namespaces = None
)
Select all pods.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
namespacesOptional ¶
- Type: Namespaces
- Default: unset, implies the namespace of the resource this selection is used in.
Namespaces the pods are allowed to be in.
Use Namespaces.all() to allow all namespaces.
select ¶
import cdk8s_plus_31
cdk8s_plus_31.Pods.select(
scope: Construct,
id: str,
expressions: typing.List[LabelExpression] = None,
labels: typing.Mapping[str] = None,
namespaces: Namespaces = None
)
Select pods in the cluster with various selectors.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
expressionsOptional ¶
- Type: typing.List[LabelExpression]
- Default: no expressions requirements.
Expressions the pods must satisify.
labelsOptional ¶
- Type: typing.Mapping[str]
- Default: no strict labels requirements.
Labels the pods must have.
namespacesOptional ¶
- Type: Namespaces
- Default: unset, implies the namespace of the resource this selection is used in.
Namespaces the pods are allowed to be in.
Use Namespaces.all() to allow all namespaces.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
Resource ¶
- Implements: IResource, IApiResource, IApiEndpoint
Base class for all Kubernetes objects in stdk8s.
Represents a single resource.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Resource(
scope: Construct,
id: str
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Resource.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
Role ¶
- Implements: IRole
Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Role(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
rules: typing.List[RolePolicyRule] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
rules |
typing.List[RolePolicyRule] |
A list of rules the role should allow. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
rulesOptional ¶
- Type: typing.List[RolePolicyRule]
- Default: []
A list of rules the role should allow.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
allow |
Add permission to perform a list of HTTP verbs on a collection of resources. |
allow_create |
Add “create” permission for the resources. |
allow_delete |
Add “delete” permission for the resources. |
allow_delete_collection |
Add “deletecollection” permission for the resources. |
allow_get |
Add “get” permission for the resources. |
allow_list |
Add “list” permission for the resources. |
allow_patch |
Add “patch” permission for the resources. |
allow_read |
Add “get”, “list”, and “watch” permissions for the resources. |
allow_read_write |
Add “get”, “list”, “watch”, “create”, “update”, “patch”, “delete”, and “deletecollection” permissions for the resources. |
allow_update |
Add “update” permission for the resources. |
allow_watch |
Add “watch” permission for the resources. |
bind |
Create a RoleBinding that binds the permissions in this Role to a list of subjects, that will only apply this role’s namespace. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
allow ¶
def allow(
verbs: typing.List[str],
resources: *IApiResource
) -> None
Add permission to perform a list of HTTP verbs on a collection of resources.
https://kubernetes.io/docs/reference/access-authn-authz/authorization/#determine-the-request-verb
verbsRequired ¶
- Type: typing.List[str]
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_create ¶
def allow_create(
resources: *IApiResource
) -> None
Add “create” permission for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_delete ¶
def allow_delete(
resources: *IApiResource
) -> None
Add “delete” permission for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_delete_collection ¶
def allow_delete_collection(
resources: *IApiResource
) -> None
Add “deletecollection” permission for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_get ¶
def allow_get(
resources: *IApiResource
) -> None
Add “get” permission for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_list ¶
def allow_list(
resources: *IApiResource
) -> None
Add “list” permission for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_patch ¶
def allow_patch(
resources: *IApiResource
) -> None
Add “patch” permission for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_read ¶
def allow_read(
resources: *IApiResource
) -> None
Add “get”, “list”, and “watch” permissions for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_read_write ¶
def allow_read_write(
resources: *IApiResource
) -> None
Add “get”, “list”, “watch”, “create”, “update”, “patch”, “delete”, and “deletecollection” permissions for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_update ¶
def allow_update(
resources: *IApiResource
) -> None
Add “update” permission for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
allow_watch ¶
def allow_watch(
resources: *IApiResource
) -> None
Add “watch” permission for the resources.
resourcesRequired ¶
- Type: *IApiResource
The resource(s) to apply to.
bind ¶
def bind(
subjects: *ISubject
) -> RoleBinding
Create a RoleBinding that binds the permissions in this Role to a list of subjects, that will only apply this role’s namespace.
subjectsRequired ¶
- Type: *ISubject
a list of subjects to bind to.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_role_name |
Imports a role from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Role.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_role_name ¶
import cdk8s_plus_31
cdk8s_plus_31.Role.from_role_name(
scope: Construct,
id: str,
name: str
)
Imports a role from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
rules |
typing.List[RolePolicyRule] |
Rules associaated with this Role. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
rulesRequired ¶
rules: typing.List[RolePolicyRule]
- Type: typing.List[RolePolicyRule]
Rules associaated with this Role.
Returns a copy, use allow to add rules.
RoleBinding ¶
A RoleBinding grants permissions within a specific namespace to a user or set of users.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.RoleBinding(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
role: IRole
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
role |
IRole |
The role to bind to. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
roleRequired ¶
- Type: IRole
The role to bind to.
A RoleBinding can reference a Role or a ClusterRole.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_subjects |
Adds a subject to the role. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_subjects ¶
def add_subjects(
subjects: *ISubject
) -> None
Adds a subject to the role.
subjectsRequired ¶
- Type: *ISubject
The subjects to add.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.RoleBinding.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
role |
IRole |
No description. |
subjects |
typing.List[ISubject] |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
roleRequired ¶
role: IRole
- Type: IRole
subjectsRequired ¶
subjects: typing.List[ISubject]
- Type: typing.List[ISubject]
Secret ¶
- Implements: ISecret
Kubernetes Secrets let you store and manage sensitive information, such as passwords, OAuth tokens, and ssh keys.
Storing confidential information in a Secret is safer and more flexible than putting it verbatim in a Pod definition or in a container image.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Secret(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
immutable: bool = None,
string_data: typing.Mapping[str] = None,
type: str = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
string_data |
typing.Mapping[str] |
stringData allows specifying non-binary secret data in string form. |
type |
str |
Optional type associated with the secret. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
string_dataOptional ¶
- Type: typing.Mapping[str]
stringData allows specifying non-binary secret data in string form.
It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.
typeOptional ¶
- Type: str
- Default: undefined - Don’t set a type.
Optional type associated with the secret.
Used to facilitate programmatic handling of secret data by various controllers.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_string_data |
Adds a string data field to the secret. |
env_value |
Returns EnvValue object from a secret’s key. |
get_string_data |
Gets a string data by key or undefined. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_string_data ¶
def add_string_data(
key: str,
value: str
) -> None
Adds a string data field to the secret.
keyRequired ¶
- Type: str
Key.
valueRequired ¶
- Type: str
Value.
env_value ¶
def env_value(
key: str,
optional: bool = None
) -> EnvValue
Returns EnvValue object from a secret’s key.
keyRequired ¶
- Type: str
optionalOptional ¶
- Type: bool
- Default: false
Specify whether the Secret or its key must be defined.
get_string_data ¶
def get_string_data(
key: str
) -> str
Gets a string data by key or undefined.
keyRequired ¶
- Type: str
Key.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_secret_name |
Imports a secret from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Secret.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_secret_name ¶
import cdk8s_plus_31
cdk8s_plus_31.Secret.from_secret_name(
scope: Construct,
id: str,
name: str
)
Imports a secret from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
immutable |
bool |
Whether or not the secret is immutable. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
immutableRequired ¶
immutable: bool
- Type: bool
Whether or not the secret is immutable.
Service ¶
An abstract way to expose an application running on a set of Pods as a network service.
With Kubernetes you don’t need to modify your application to use an unfamiliar service discovery mechanism. Kubernetes gives Pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.
For example, consider a stateless image-processing backend which is running with 3 replicas. Those replicas are fungible—frontends do not care which backend they use. While the actual Pods that compose the backend set may change, the frontend clients should not need to be aware of that, nor should they need to keep track of the set of backends themselves. The Service abstraction enables this decoupling.
If you’re able to use Kubernetes APIs for service discovery in your application, you can query the API server for Endpoints, that get updated whenever the set of Pods in a Service changes. For non-native applications, Kubernetes offers ways to place a network port or load balancer in between your application and the backend Pods.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Service(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
cluster_i_p: str = None,
external_i_ps: typing.List[str] = None,
external_name: str = None,
load_balancer_source_ranges: typing.List[str] = None,
ports: typing.List[ServicePort] = None,
publish_not_ready_addresses: bool = None,
selector: IPodSelector = None,
type: ServiceType = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
cluster_i_p |
str |
The IP address of the service and is usually assigned randomly by the master. |
external_i_ps |
typing.List[str] |
A list of IP addresses for which nodes in the cluster will also accept traffic for this service. |
external_name |
str |
The externalName to be used when ServiceType.EXTERNAL_NAME is set. |
load_balancer_source_ranges |
typing.List[str] |
A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs. |
ports |
typing.List[ServicePort] |
The ports this service binds to. |
publish_not_ready_addresses |
bool |
The publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. |
selector |
IPodSelector |
Which pods should the service select and route to. |
type |
ServiceType |
Determines how the Service is exposed. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
cluster_i_pOptional ¶
- Type: str
- Default: Automatically assigned.
The IP address of the service and is usually assigned randomly by the master.
If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are “None”, empty string (“”), or a valid IP address. “None” can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName.
https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
external_i_psOptional ¶
- Type: typing.List[str]
- Default: No external IPs.
A list of IP addresses for which nodes in the cluster will also accept traffic for this service.
These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.
external_nameOptional ¶
- Type: str
- Default: No external name.
The externalName to be used when ServiceType.EXTERNAL_NAME is set.
load_balancer_source_rangesOptional ¶
- Type: typing.List[str]
A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs.
More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
portsOptional ¶
- Type: typing.List[ServicePort]
- Default: either the selector ports, or none.
The ports this service binds to.
If the selector of the service is a managed pod / workload, its ports will are automatically extracted and used as the default value. Otherwise, no ports are bound.
publish_not_ready_addressesOptional ¶
- Type: bool
- Default: false
The publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready.
More info: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#servicespec-v1-core
selectorOptional ¶
- Type: IPodSelector
- Default: unset, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify.
Which pods should the service select and route to.
You can pass one of the following:
- An instance of
Podor any workload resource (e.gDeployment,StatefulSet, …) - Pods selected by the
Pods.selectfunction. Note that in this case only labels can be specified.
Example
# Example automatically generated from non-compiling source. May contain errors.
# select the pods of a specific deployment
backend = kplus.Deployment(self, "Backend", ...)
kplus.Service(self, "Service", selector=backend)
# select all pods labeled with the `tier=backend` label
backend = kplus.Pod.labeled(tier="backend")
kplus.Service(self, "Service", selector=backend)
typeOptional ¶
- Type: ServiceType
- Default: ServiceType.ClusterIP
Determines how the Service is exposed.
More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
bind |
Configure a port the service will bind to. |
expose_via_ingress |
Expose a service via an ingress using the specified path. |
select |
Require this service to select pods matching the selector. |
select_label |
Require this service to select pods with this label. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
bind ¶
def bind(
port: typing.Union[int, float],
name: str = None,
node_port: typing.Union[int, float] = None,
protocol: Protocol = None,
target_port: typing.Union[int, float] = None
) -> None
Configure a port the service will bind to.
This method can be called multiple times.
portRequired ¶
- Type: typing.Union[int, float]
The port definition.
nameOptional ¶
- Type: str
The name of this port within the service.
This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the ‘Name’ field in EndpointPort objects. Optional if only one ServicePort is defined on this service.
node_portOptional ¶
- Type: typing.Union[int, float]
- Default: auto-allocate a port if the ServiceType of this Service requires one.
The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one.
https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
protocolOptional ¶
- Type: Protocol
- Default: Protocol.TCP
The IP protocol for this port.
Supports “TCP”, “UDP”, and “SCTP”. Default is TCP.
target_portOptional ¶
- Type: typing.Union[int, float]
- Default: The value of
portwill be used.
The port number the service will redirect to.
expose_via_ingress ¶
def expose_via_ingress(
path: str,
ingress: Ingress = None,
path_type: HttpIngressPathType = None
) -> Ingress
Expose a service via an ingress using the specified path.
pathRequired ¶
- Type: str
The path to expose the service under.
ingressOptional ¶
- Type: Ingress
- Default: An ingress will be automatically created.
The ingress to add rules to.
path_typeOptional ¶
- Type: HttpIngressPathType
- Default: HttpIngressPathType.PREFIX
The type of the path.
select ¶
def select(
selector: IPodSelector
) -> None
Require this service to select pods matching the selector.
Note that invoking this method multiple times acts as an AND operator on the resulting labels.
selectorRequired ¶
- Type: IPodSelector
select_label ¶
def select_label(
key: str,
value: str
) -> None
Require this service to select pods with this label.
Note that invoking this method multiple times acts as an AND operator on the resulting labels.
keyRequired ¶
- Type: str
valueRequired ¶
- Type: str
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Service.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
port |
typing.Union[int, float] |
Return the first port of the service. |
ports |
typing.List[ServicePort] |
Ports for this service. |
type |
ServiceType |
Determines how the Service is exposed. |
cluster_i_p |
str |
The IP address of the service and is usually assigned randomly by the master. |
external_name |
str |
The externalName to be used for EXTERNAL_NAME types. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
portRequired ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
Return the first port of the service.
portsRequired ¶
ports: typing.List[ServicePort]
- Type: typing.List[ServicePort]
Ports for this service.
Use bind() to bind additional service ports.
typeRequired ¶
type: ServiceType
- Type: ServiceType
Determines how the Service is exposed.
cluster_i_pOptional ¶
cluster_i_p: str
- Type: str
The IP address of the service and is usually assigned randomly by the master.
external_nameOptional ¶
external_name: str
- Type: str
The externalName to be used for EXTERNAL_NAME types.
ServiceAccount ¶
- Implements: IServiceAccount, ISubject
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceAccount(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
automount_token: bool = None,
secrets: typing.List[ISecret] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_token |
bool |
Indicates whether pods running as this service account should have an API token automatically mounted. |
secrets |
typing.List[ISecret] |
List of secrets allowed to be used by pods running using this ServiceAccount. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_tokenOptional ¶
- Type: bool
- Default: false
Indicates whether pods running as this service account should have an API token automatically mounted.
Can be overridden at the pod level.
secretsOptional ¶
- Type: typing.List[ISecret]
List of secrets allowed to be used by pods running using this ServiceAccount.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_secret |
Allow a secret to be accessed by pods using this service account. |
to_subject_configuration |
Return the subject configuration. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_secret ¶
def add_secret(
secr: ISecret
) -> None
Allow a secret to be accessed by pods using this service account.
secrRequired ¶
- Type: ISecret
The secret.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_service_account_name |
Imports a service account from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceAccount.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_service_account_name ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceAccount.from_service_account_name(
scope: Construct,
id: str,
name: str,
namespace_name: str = None
)
Imports a service account from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
The name of the service account resource.
namespace_nameOptional ¶
- Type: str
- Default: “default”
The name of the namespace the service account belongs to.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
automount_token |
bool |
Whether or not a token is automatically mounted for this service account. |
secrets |
typing.List[ISecret] |
List of secrets allowed to be used by pods running using this service account. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
automount_tokenRequired ¶
automount_token: bool
- Type: bool
Whether or not a token is automatically mounted for this service account.
secretsRequired ¶
secrets: typing.List[ISecret]
- Type: typing.List[ISecret]
List of secrets allowed to be used by pods running using this service account.
Returns a copy. To add a secret, use addSecret().
ServiceAccountTokenSecret ¶
Create a secret for a service account token.
https://kubernetes.io/docs/concepts/configuration/secret/#service-account-token-secrets
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceAccountTokenSecret(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
immutable: bool = None,
service_account: IServiceAccount
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
service_account |
IServiceAccount |
The service account to store a secret for. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
service_accountRequired ¶
- Type: IServiceAccount
The service account to store a secret for.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_string_data |
Adds a string data field to the secret. |
env_value |
Returns EnvValue object from a secret’s key. |
get_string_data |
Gets a string data by key or undefined. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_string_data ¶
def add_string_data(
key: str,
value: str
) -> None
Adds a string data field to the secret.
keyRequired ¶
- Type: str
Key.
valueRequired ¶
- Type: str
Value.
env_value ¶
def env_value(
key: str,
optional: bool = None
) -> EnvValue
Returns EnvValue object from a secret’s key.
keyRequired ¶
- Type: str
optionalOptional ¶
- Type: bool
- Default: false
Specify whether the Secret or its key must be defined.
get_string_data ¶
def get_string_data(
key: str
) -> str
Gets a string data by key or undefined.
keyRequired ¶
- Type: str
Key.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_secret_name |
Imports a secret from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceAccountTokenSecret.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_secret_name ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceAccountTokenSecret.from_secret_name(
scope: Construct,
id: str,
name: str
)
Imports a secret from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
immutable |
bool |
Whether or not the secret is immutable. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
immutableRequired ¶
immutable: bool
- Type: bool
Whether or not the secret is immutable.
SshAuthSecret ¶
Create a secret for ssh authentication.
https://kubernetes.io/docs/concepts/configuration/secret/#ssh-authentication-secrets
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.SshAuthSecret(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
immutable: bool = None,
ssh_private_key: str
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
ssh_private_key |
str |
The SSH private key to use. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
ssh_private_keyRequired ¶
- Type: str
The SSH private key to use.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_string_data |
Adds a string data field to the secret. |
env_value |
Returns EnvValue object from a secret’s key. |
get_string_data |
Gets a string data by key or undefined. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_string_data ¶
def add_string_data(
key: str,
value: str
) -> None
Adds a string data field to the secret.
keyRequired ¶
- Type: str
Key.
valueRequired ¶
- Type: str
Value.
env_value ¶
def env_value(
key: str,
optional: bool = None
) -> EnvValue
Returns EnvValue object from a secret’s key.
keyRequired ¶
- Type: str
optionalOptional ¶
- Type: bool
- Default: false
Specify whether the Secret or its key must be defined.
get_string_data ¶
def get_string_data(
key: str
) -> str
Gets a string data by key or undefined.
keyRequired ¶
- Type: str
Key.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_secret_name |
Imports a secret from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.SshAuthSecret.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_secret_name ¶
import cdk8s_plus_31
cdk8s_plus_31.SshAuthSecret.from_secret_name(
scope: Construct,
id: str,
name: str
)
Imports a secret from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
immutable |
bool |
Whether or not the secret is immutable. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
immutableRequired ¶
immutable: bool
- Type: bool
Whether or not the secret is immutable.
StatefulSet ¶
- Implements: IScalable
StatefulSet is the workload API object used to manage stateful applications.
Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods.
Like a Deployment, a StatefulSet manages Pods that are based on an identical container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. These pods are created from the same spec, but are not interchangeable: each has a persistent identifier that it maintains across any rescheduling.
If you want to use storage volumes to provide persistence for your workload, you can use a StatefulSet as part of the solution. Although individual Pods in a StatefulSet are susceptible to failure, the persistent Pod identifiers make it easier to match existing volumes to the new Pods that replace any that have failed.
Using StatefulSets¶
StatefulSets are valuable for applications that require one or more of the following.
- Stable, unique network identifiers.
- Stable, persistent storage.
- Ordered, graceful deployment and scaling.
- Ordered, automated rolling updates.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.StatefulSet(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
min_ready: Duration = None,
pod_management_policy: PodManagementPolicy = None,
replicas: typing.Union[int, float] = None,
service: Service = None,
strategy: StatefulSetUpdateStrategy = None,
volume_claim_templates: typing.List[PersistentVolumeClaimTemplateProps] = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
min_ready |
cdk8s.Duration |
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
pod_management_policy |
PodManagementPolicy |
Pod management policy to use for this statefulset. |
replicas |
typing.Union[int, float] |
Number of desired pods. |
service |
Service |
Service to associate with the statefulset. |
strategy |
StatefulSetUpdateStrategy |
Indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. |
volume_claim_templates |
typing.List[PersistentVolumeClaimTemplateProps] |
A list of PersistentVolumeClaim templates that will be created for each pod in the StatefulSet. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
min_readyOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(0)
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
Zero means the pod will be considered available as soon as it is ready.
This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds
pod_management_policyOptional ¶
- Type: PodManagementPolicy
- Default: PodManagementPolicy.ORDERED_READY
Pod management policy to use for this statefulset.
replicasOptional ¶
- Type: typing.Union[int, float]
- Default: 1
Number of desired pods.
serviceOptional ¶
- Type: Service
- Default: A new headless service will be created.
Service to associate with the statefulset.
strategyOptional ¶
- Type: StatefulSetUpdateStrategy
- Default: RollingUpdate with partition set to 0
Indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.
volume_claim_templatesOptional ¶
- Type: typing.List[PersistentVolumeClaimTemplateProps]
- Default: No volume claim templates will be created.
A list of PersistentVolumeClaim templates that will be created for each pod in the StatefulSet.
The StatefulSet controller creates a PVC and a PV for each template based on the pod’s ordinal index, ensuring stable storage across pod restarts and rescheduling.
Each claim in this list must have at least one matching (by name) volumeMount in one of the containers.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_container |
No description. |
add_host_alias |
No description. |
add_init_container |
No description. |
add_volume |
No description. |
attach_container |
No description. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_pod_selector_config |
Return the configuration of this selector. |
to_subject_configuration |
Return the subject configuration. |
select |
Configure selectors for this workload. |
add_volume_claim_template |
No description. |
mark_has_autoscaler |
Called on all IScalable targets when they are associated with an autoscaler. |
to_scaling_target |
Return the target spec properties of this Scalable. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_container ¶
def add_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_host_alias ¶
def add_host_alias(
hostnames: typing.List[str],
ip: str
) -> None
hostnamesRequired ¶
- Type: typing.List[str]
Hostnames for the chosen IP address.
ipRequired ¶
- Type: str
IP address of the host file entry.
add_init_container ¶
def add_init_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_volume ¶
def add_volume(
vol: Volume
) -> None
volRequired ¶
- Type: Volume
attach_container ¶
def attach_container(
cont: Container
) -> None
contRequired ¶
- Type: Container
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
select ¶
def select(
selectors: *LabelSelector
) -> None
Configure selectors for this workload.
selectorsRequired ¶
- Type: *LabelSelector
add_volume_claim_template ¶
def add_volume_claim_template(
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
storage: Size = None,
storage_class_name: str = None,
volume: IPersistentVolume = None,
volume_mode: PersistentVolumeMode = None,
name: str
) -> None
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes requirement.
Contains the access modes the volume should support.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
storageOptional ¶
- Type: cdk8s.Size
- Default: No storage requirement.
Minimum storage size the volume should have.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
- Type: str
- Default: Not set.
Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:.
- If the admission plugin is turned on, the storage class marked as default will be used.
- If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
volumeOptional ¶
- Type: IPersistentVolume
- Default: No specific volume binding.
The PersistentVolume backing this claim.
The control plane still checks that storage class, access modes, and requested storage size on the volume are valid.
Note that in order to guarantee a proper binding, the volume should
also define a claimRef referring to this claim. Otherwise, the volume may be
claimed be other pvc’s before it gets a chance to bind to this one.
If the volume is managed (i.e not imported), you can use pv.claim() to easily
create a bi-directional bounded claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding.
volume_modeOptional ¶
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
nameRequired ¶
- Type: str
The name of the claim that the StatefulSet controller will create for each pod.
This will be used to name the created PVC in the format
This name should match the name of a volume mount in one of the containers.
mark_has_autoscaler ¶
def mark_has_autoscaler() -> None
Called on all IScalable targets when they are associated with an autoscaler.
to_scaling_target ¶
def to_scaling_target() -> ScalingTarget
Return the target spec properties of this Scalable.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.StatefulSet.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
automount_service_account_token |
bool |
No description. |
containers |
typing.List[Container] |
No description. |
dns |
PodDns |
No description. |
host_aliases |
typing.List[HostAlias] |
No description. |
init_containers |
typing.List[Container] |
No description. |
pod_metadata |
cdk8s.ApiObjectMetadataDefinition |
The metadata of pods in this workload. |
security_context |
PodSecurityContext |
No description. |
share_process_namespace |
bool |
No description. |
volumes |
typing.List[Volume] |
No description. |
docker_registry_auth |
ISecret |
No description. |
enable_service_links |
bool |
No description. |
host_network |
bool |
No description. |
restart_policy |
RestartPolicy |
No description. |
service_account |
IServiceAccount |
No description. |
termination_grace_period |
cdk8s.Duration |
No description. |
connections |
PodConnections |
No description. |
match_expressions |
typing.List[LabelSelectorRequirement] |
The expression matchers this workload will use in order to select pods. |
match_labels |
typing.Mapping[str] |
The label matchers this workload will use in order to select pods. |
scheduling |
WorkloadScheduling |
No description. |
min_ready |
cdk8s.Duration |
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
pod_management_policy |
PodManagementPolicy |
Management policy to use for the set. |
service |
Service |
No description. |
strategy |
StatefulSetUpdateStrategy |
The update startegy of this stateful set. |
replicas |
typing.Union[int, float] |
Number of desired pods. |
has_autoscaler |
bool |
If this is a target of an autoscaler. |
volume_claim_templates |
typing.List[PersistentVolumeClaimTemplateProps] |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
automount_service_account_tokenRequired ¶
automount_service_account_token: bool
- Type: bool
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[Container]
dnsRequired ¶
dns: PodDns
- Type: PodDns
host_aliasesRequired ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
init_containersRequired ¶
init_containers: typing.List[Container]
- Type: typing.List[Container]
pod_metadataRequired ¶
pod_metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
The metadata of pods in this workload.
security_contextRequired ¶
security_context: PodSecurityContext
- Type: PodSecurityContext
share_process_namespaceRequired ¶
share_process_namespace: bool
- Type: bool
volumesRequired ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
host_networkOptional ¶
host_network: bool
- Type: bool
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
connectionsRequired ¶
connections: PodConnections
- Type: PodConnections
match_expressionsRequired ¶
match_expressions: typing.List[LabelSelectorRequirement]
- Type: typing.List[LabelSelectorRequirement]
The expression matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add expression matchers.
match_labelsRequired ¶
match_labels: typing.Mapping[str]
- Type: typing.Mapping[str]
The label matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add label matchers.
schedulingRequired ¶
scheduling: WorkloadScheduling
- Type: WorkloadScheduling
min_readyRequired ¶
min_ready: Duration
- Type: cdk8s.Duration
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
pod_management_policyRequired ¶
pod_management_policy: PodManagementPolicy
- Type: PodManagementPolicy
Management policy to use for the set.
serviceRequired ¶
service: Service
- Type: Service
strategyRequired ¶
strategy: StatefulSetUpdateStrategy
The update startegy of this stateful set.
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
Number of desired pods.
has_autoscalerRequired ¶
has_autoscaler: bool
- Type: bool
If this is a target of an autoscaler.
volume_claim_templatesOptional ¶
volume_claim_templates: typing.List[PersistentVolumeClaimTemplateProps]
- Type: typing.List[PersistentVolumeClaimTemplateProps]
TlsSecret ¶
Create a secret for storing a TLS certificate and its associated key.
https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.TlsSecret(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
immutable: bool = None,
tls_cert: str,
tls_key: str
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
tls_cert |
str |
The TLS cert. |
tls_key |
str |
The TLS key. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
tls_certRequired ¶
- Type: str
The TLS cert.
tls_keyRequired ¶
- Type: str
The TLS key.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_string_data |
Adds a string data field to the secret. |
env_value |
Returns EnvValue object from a secret’s key. |
get_string_data |
Gets a string data by key or undefined. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_string_data ¶
def add_string_data(
key: str,
value: str
) -> None
Adds a string data field to the secret.
keyRequired ¶
- Type: str
Key.
valueRequired ¶
- Type: str
Value.
env_value ¶
def env_value(
key: str,
optional: bool = None
) -> EnvValue
Returns EnvValue object from a secret’s key.
keyRequired ¶
- Type: str
optionalOptional ¶
- Type: bool
- Default: false
Specify whether the Secret or its key must be defined.
get_string_data ¶
def get_string_data(
key: str
) -> str
Gets a string data by key or undefined.
keyRequired ¶
- Type: str
Key.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_secret_name |
Imports a secret from the cluster as a reference. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.TlsSecret.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_secret_name ¶
import cdk8s_plus_31
cdk8s_plus_31.TlsSecret.from_secret_name(
scope: Construct,
id: str,
name: str
)
Imports a secret from the cluster as a reference.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
immutable |
bool |
Whether or not the secret is immutable. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
immutableRequired ¶
immutable: bool
- Type: bool
Whether or not the secret is immutable.
User ¶
- Implements: ISubject
Represents a user.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
to_subject_configuration |
Return the subject configuration. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_name |
Reference a user in the cluster by name. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.User.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_name ¶
import cdk8s_plus_31
cdk8s_plus_31.User.from_name(
scope: Construct,
id: str,
name: str
)
Reference a user in the cluster by name.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
kind |
str |
No description. |
name |
str |
No description. |
api_group |
str |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
kindRequired ¶
kind: str
- Type: str
nameRequired ¶
name: str
- Type: str
api_groupOptional ¶
api_group: str
- Type: str
Volume ¶
- Implements: IStorage
Volume represents a named volume in a pod that may be accessed by any container in the pod.
Docker also has a concept of volumes, though it is somewhat looser and less managed. In Docker, a volume is simply a directory on disk or in another Container. Lifetimes are not managed and until very recently there were only local-disk-backed volumes. Docker now provides volume drivers, but the functionality is very limited for now (e.g. as of Docker 1.7 only one volume driver is allowed per Container and there is no way to pass parameters to volumes).
A Kubernetes volume, on the other hand, has an explicit lifetime - the same as the Pod that encloses it. Consequently, a volume outlives any Containers that run within the Pod, and data is preserved across Container restarts. Of course, when a Pod ceases to exist, the volume will cease to exist, too. Perhaps more importantly than this, Kubernetes supports many types of volumes, and a Pod can use any number of them simultaneously.
At its core, a volume is just a directory, possibly with some data in it, which is accessible to the Containers in a Pod. How that directory comes to be, the medium that backs it, and the contents of it are determined by the particular volume type used.
To use a volume, a Pod specifies what volumes to provide for the Pod (the .spec.volumes field) and where to mount those into Containers (the .spec.containers[*].volumeMounts field).
A process in a container sees a filesystem view composed from their Docker image and volumes. The Docker image is at the root of the filesystem hierarchy, and any volumes are mounted at the specified paths within the image. Volumes can not mount onto other volumes
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_volume |
Convert the piece of storage into a concrete volume. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_volume ¶
def as_volume() -> Volume
Convert the piece of storage into a concrete volume.
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
from_aws_elastic_block_store |
Mounts an Amazon Web Services (AWS) EBS volume into your pod. |
from_azure_disk |
Mounts a Microsoft Azure Data Disk into a pod. |
from_config_map |
Populate the volume from a ConfigMap. |
from_csi |
Populate the volume from a CSI driver, for example the Secrets Store CSI Driver: https://secrets-store-csi-driver.sigs.k8s.io/introduction.html. Which in turn needs an associated provider to source the secrets, such as the AWS Secrets Manager and Systems Manager Parameter Store provider: https://aws.github.io/secrets-store-csi-driver-provider-aws/. |
from_empty_dir |
An emptyDir volume is first created when a Pod is assigned to a Node, and exists as long as that Pod is running on that node. |
from_gce_persistent_disk |
Mounts a Google Compute Engine (GCE) persistent disk (PD) into your Pod. |
from_host_path |
Used to mount a file or directory from the host node’s filesystem into a Pod. |
from_name |
Create a volume with an arbitrary name and no configuration. |
from_nfs |
Used to mount an NFS share into a Pod. |
from_persistent_volume_claim |
Used to mount a PersistentVolume into a Pod. |
from_secret |
Populate the volume from a Secret. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
from_aws_elastic_block_store ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_aws_elastic_block_store(
scope: Construct,
id: str,
volume_id: str,
fs_type: str = None,
name: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
Mounts an Amazon Web Services (AWS) EBS volume into your pod.
Unlike emptyDir, which is erased when a pod is removed, the contents of an EBS volume are persisted and the volume is unmounted. This means that an EBS volume can be pre-populated with data, and that data can be shared between pods.
There are some restrictions when using an awsElasticBlockStore volume:
- the nodes on which pods are running must be AWS EC2 instances.
- those instances need to be in the same region and availability zone as the EBS volume.
- EBS only supports a single EC2 instance mounting a volume.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
volume_idRequired ¶
- Type: str
fs_typeOptional ¶
- Type: str
- Default: ‘ext4’
Filesystem type of the volume that you want to mount.
Tip: Ensure that the filesystem type is supported by the host operating system.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
nameOptional ¶
- Type: str
- Default: auto-generated
The volume name.
partitionOptional ¶
- Type: typing.Union[int, float]
- Default: No partition.
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).
read_onlyOptional ¶
- Type: bool
- Default: false
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
from_azure_disk ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_azure_disk(
scope: Construct,
id: str,
disk_name: str,
disk_uri: str,
caching_mode: AzureDiskPersistentVolumeCachingMode = None,
fs_type: str = None,
kind: AzureDiskPersistentVolumeKind = None,
name: str = None,
read_only: bool = None
)
Mounts a Microsoft Azure Data Disk into a pod.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
disk_nameRequired ¶
- Type: str
disk_uriRequired ¶
- Type: str
caching_modeOptional ¶
- Type: AzureDiskPersistentVolumeCachingMode
- Default: AzureDiskPersistentVolumeCachingMode.NONE.
Host Caching mode.
fs_typeOptional ¶
- Type: str
- Default: ‘ext4’
Filesystem type to mount.
Must be a filesystem type supported by the host operating system.
kindOptional ¶
- Type: AzureDiskPersistentVolumeKind
- Default: AzureDiskPersistentVolumeKind.SHARED
Kind of disk.
nameOptional ¶
- Type: str
- Default: auto-generated
The volume name.
read_onlyOptional ¶
- Type: bool
- Default: false
Force the ReadOnly setting in VolumeMounts.
from_config_map ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_config_map(
scope: Construct,
id: str,
config_map: IConfigMap,
default_mode: typing.Union[int, float] = None,
items: typing.Mapping[PathMapping] = None,
name: str = None,
optional: bool = None
)
Populate the volume from a ConfigMap.
The configMap resource provides a way to inject configuration data into Pods. The data stored in a ConfigMap object can be referenced in a volume of type configMap and then consumed by containerized applications running in a Pod.
When referencing a configMap object, you can simply provide its name in the volume to reference it. You can also customize the path to use for a specific entry in the ConfigMap.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
config_mapRequired ¶
- Type: IConfigMap
The config map to use to populate the volume.
default_modeOptional ¶
- Type: typing.Union[int, float]
- Default: 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.
Mode bits to use on created files by default.
Must be a value between 0 and 0777. 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.
itemsOptional ¶
- Type: typing.Mapping[PathMapping]
- Default: no mapping
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 ‘..’.
nameOptional ¶
- Type: str
- Default: auto-generated
The volume name.
optionalOptional ¶
- Type: bool
- Default: undocumented
Specify whether the ConfigMap or its keys must be defined.
from_csi ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_csi(
scope: Construct,
id: str,
driver: str,
attributes: typing.Mapping[str] = None,
fs_type: str = None,
name: str = None,
read_only: bool = None
)
Populate the volume from a CSI driver, for example the Secrets Store CSI Driver: https://secrets-store-csi-driver.sigs.k8s.io/introduction.html. Which in turn needs an associated provider to source the secrets, such as the AWS Secrets Manager and Systems Manager Parameter Store provider: https://aws.github.io/secrets-store-csi-driver-provider-aws/.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
driverRequired ¶
- Type: str
The name of the CSI driver to use to populate the volume.
attributesOptional ¶
- Type: typing.Mapping[str]
- Default: undefined
Any driver-specific attributes to pass to the CSI volume builder.
fs_typeOptional ¶
- Type: str
- Default: driver-dependent
The filesystem type 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.
nameOptional ¶
- Type: str
- Default: auto-generated
The volume name.
read_onlyOptional ¶
- Type: bool
- Default: false
Whether the mounted volume should be read-only or not.
from_empty_dir ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_empty_dir(
scope: Construct,
id: str,
name: str,
medium: EmptyDirMedium = None,
size_limit: Size = None
)
An emptyDir volume is first created when a Pod is assigned to a Node, and exists as long as that Pod is running on that node.
As the name says, it is initially empty. Containers in the Pod can all read and write the same files in the emptyDir volume, though that volume can be mounted at the same or different paths in each Container. When a Pod is removed from a node for any reason, the data in the emptyDir is deleted forever.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
mediumOptional ¶
- Type: EmptyDirMedium
- Default: EmptyDirMedium.DEFAULT
By default, emptyDir volumes are stored on whatever medium is backing the node - that might be disk or SSD or network storage, depending on your environment.
However, you can set the emptyDir.medium field to
EmptyDirMedium.MEMORY to tell Kubernetes to mount a tmpfs (RAM-backed
filesystem) for you instead. While tmpfs is very fast, be aware that unlike
disks, tmpfs is cleared on node reboot and any files you write will count
against your Container’s memory limit.
size_limitOptional ¶
- Type: cdk8s.Size
- Default: limit is undefined
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.
from_gce_persistent_disk ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_gce_persistent_disk(
scope: Construct,
id: str,
pd_name: str,
fs_type: str = None,
name: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
Mounts a Google Compute Engine (GCE) persistent disk (PD) into your Pod.
Unlike emptyDir, which is erased when a pod is removed, the contents of a PD are preserved and the volume is merely unmounted. This means that a PD can be pre-populated with data, and that data can be shared between pods.
There are some restrictions when using a gcePersistentDisk:
- the nodes on which Pods are running must be GCE VMs
- those VMs need to be in the same GCE project and zone as the persistent disk
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
pd_nameRequired ¶
- Type: str
fs_typeOptional ¶
- Type: str
- Default: ‘ext4’
Filesystem type of the volume that you want to mount.
Tip: Ensure that the filesystem type is supported by the host operating system.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
nameOptional ¶
- Type: str
- Default: auto-generated
The volume name.
partitionOptional ¶
- Type: typing.Union[int, float]
- Default: No partition.
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).
read_onlyOptional ¶
- Type: bool
- Default: false
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
from_host_path ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_host_path(
scope: Construct,
id: str,
name: str,
path: str,
type: HostPathVolumeType = None
)
Used to mount a file or directory from the host node’s filesystem into a Pod.
This is not something that most Pods will need, but it offers a powerful escape hatch for some applications.
https://kubernetes.io/docs/concepts/storage/volumes/#hostpath
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
pathRequired ¶
- Type: str
The path of the directory on the host.
typeOptional ¶
- Type: HostPathVolumeType
- Default: HostPathVolumeType.DEFAULT
The expected type of the path found on the host.
from_name ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_name(
scope: Construct,
id: str,
name: str
)
Create a volume with an arbitrary name and no configuration.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
from_nfs ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_nfs(
scope: Construct,
id: str,
name: str,
path: str,
server: str,
read_only: bool = None
)
Used to mount an NFS share into a Pod.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
nameRequired ¶
- Type: str
pathRequired ¶
- Type: str
Path that is exported by the NFS server.
serverRequired ¶
- Type: str
Server is the hostname or IP address of the NFS server.
read_onlyOptional ¶
- Type: bool
- Default: false
If set to true, will force the NFS export to be mounted with read-only permissions.
from_persistent_volume_claim ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_persistent_volume_claim(
scope: Construct,
id: str,
claim: IPersistentVolumeClaim,
name: str = None,
read_only: bool = None
)
Used to mount a PersistentVolume into a Pod.
PersistentVolumeClaims are a way for users to “claim” durable storage (such as a GCE PersistentDisk or an iSCSI volume) without knowing the details of the particular cloud environment.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
claimRequired ¶
- Type: IPersistentVolumeClaim
nameOptional ¶
- Type: str
- Default: Derived from the PVC name.
The volume name.
read_onlyOptional ¶
- Type: bool
- Default: false
Will force the ReadOnly setting in VolumeMounts.
from_secret ¶
import cdk8s_plus_31
cdk8s_plus_31.Volume.from_secret(
scope: Construct,
id: str,
secr: ISecret,
default_mode: typing.Union[int, float] = None,
items: typing.Mapping[PathMapping] = None,
name: str = None,
optional: bool = None
)
Populate the volume from a Secret.
A secret volume is used to pass sensitive information, such as passwords, to Pods. You can store secrets in the Kubernetes API and mount them as files for use by pods without coupling to Kubernetes directly.
secret volumes are backed by tmpfs (a RAM-backed filesystem) so they are never written to non-volatile storage.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
secrRequired ¶
- Type: ISecret
The secret to use to populate the volume.
default_modeOptional ¶
- Type: typing.Union[int, float]
- Default: 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.
Mode bits to use on created files by default.
Must be a value between 0 and 0777. 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.
itemsOptional ¶
- Type: typing.Mapping[PathMapping]
- Default: no mapping
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 ‘..’.
nameOptional ¶
- Type: str
- Default: auto-generated
The volume name.
optionalOptional ¶
- Type: bool
- Default: undocumented
Specify whether the secret or its keys must be defined.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
name |
str |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
nameRequired ¶
name: str
- Type: str
Workload ¶
A workload is an application running on Kubernetes.
Whether your workload is a single component or several that work together, on Kubernetes you run it inside a set of pods. In Kubernetes, a Pod represents a set of running containers on your cluster.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Workload(
scope: Construct,
id: str,
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None
)
| Name | Type | Description |
|---|---|---|
scope |
constructs.Construct |
No description. |
id |
str |
No description. |
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
Methods ¶
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
add_container |
No description. |
add_host_alias |
No description. |
add_init_container |
No description. |
add_volume |
No description. |
attach_container |
No description. |
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_pod_selector_config |
Return the configuration of this selector. |
to_subject_configuration |
Return the subject configuration. |
select |
Configure selectors for this workload. |
to_string ¶
def to_string() -> str
Returns a string representation of this construct.
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
add_container ¶
def add_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_host_alias ¶
def add_host_alias(
hostnames: typing.List[str],
ip: str
) -> None
hostnamesRequired ¶
- Type: typing.List[str]
Hostnames for the chosen IP address.
ipRequired ¶
- Type: str
IP address of the host file entry.
add_init_container ¶
def add_init_container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
) -> Container
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
add_volume ¶
def add_volume(
vol: Volume
) -> None
volRequired ¶
- Type: Volume
attach_container ¶
def attach_container(
cont: Container
) -> None
contRequired ¶
- Type: Container
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
select ¶
def select(
selectors: *LabelSelector
) -> None
Configure selectors for this workload.
selectorsRequired ¶
- Type: *LabelSelector
Static Functions ¶
| Name | Description |
|---|---|
is_construct |
Checks if x is a construct. |
is_construct ¶
import cdk8s_plus_31
cdk8s_plus_31.Workload.is_construct(
x: typing.Any
)
Checks if x is a construct.
Use this method instead of instanceof to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct in each copy of the constructs library
is seen as a different class, and an instance of one class will not test as
instanceof the other class. npm install will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof will behave
unpredictably. It is safest to avoid using instanceof, and using
this type-testing method instead.
xRequired ¶
- Type: typing.Any
Any object.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. “authorization.k8s.io”). |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
metadata |
cdk8s.ApiObjectMetadataDefinition |
No description. |
name |
str |
The name of this API object. |
permissions |
ResourcePermissions |
No description. |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
automount_service_account_token |
bool |
No description. |
containers |
typing.List[Container] |
No description. |
dns |
PodDns |
No description. |
host_aliases |
typing.List[HostAlias] |
No description. |
init_containers |
typing.List[Container] |
No description. |
pod_metadata |
cdk8s.ApiObjectMetadataDefinition |
The metadata of pods in this workload. |
security_context |
PodSecurityContext |
No description. |
share_process_namespace |
bool |
No description. |
volumes |
typing.List[Volume] |
No description. |
docker_registry_auth |
ISecret |
No description. |
enable_service_links |
bool |
No description. |
host_network |
bool |
No description. |
restart_policy |
RestartPolicy |
No description. |
service_account |
IServiceAccount |
No description. |
termination_grace_period |
cdk8s.Duration |
No description. |
connections |
PodConnections |
No description. |
match_expressions |
typing.List[LabelSelectorRequirement] |
The expression matchers this workload will use in order to select pods. |
match_labels |
typing.Mapping[str] |
The label matchers this workload will use in order to select pods. |
scheduling |
WorkloadScheduling |
No description. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. “authorization.k8s.io”).
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
metadataRequired ¶
metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
nameRequired ¶
name: str
- Type: str
The name of this API object.
permissionsRequired ¶
permissions: ResourcePermissions
- Type: ResourcePermissions
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
automount_service_account_tokenRequired ¶
automount_service_account_token: bool
- Type: bool
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[Container]
dnsRequired ¶
dns: PodDns
- Type: PodDns
host_aliasesRequired ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
init_containersRequired ¶
init_containers: typing.List[Container]
- Type: typing.List[Container]
pod_metadataRequired ¶
pod_metadata: ApiObjectMetadataDefinition
- Type: cdk8s.ApiObjectMetadataDefinition
The metadata of pods in this workload.
security_contextRequired ¶
security_context: PodSecurityContext
- Type: PodSecurityContext
share_process_namespaceRequired ¶
share_process_namespace: bool
- Type: bool
volumesRequired ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
host_networkOptional ¶
host_network: bool
- Type: bool
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
connectionsRequired ¶
connections: PodConnections
- Type: PodConnections
match_expressionsRequired ¶
match_expressions: typing.List[LabelSelectorRequirement]
- Type: typing.List[LabelSelectorRequirement]
The expression matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add expression matchers.
match_labelsRequired ¶
match_labels: typing.Mapping[str]
- Type: typing.Mapping[str]
The label matchers this workload will use in order to select pods.
Returns a a copy. Use select() to add label matchers.
schedulingRequired ¶
scheduling: WorkloadScheduling
- Type: WorkloadScheduling
Structs ¶
AbstractPodProps ¶
Properties for AbstractPod.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.AbstractPodProps(
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
dns: PodDnsProps
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
host_network: bool
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
init_containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
isolate: bool
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
security_context: PodSecurityContextProps
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
share_process_namespace: bool
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
AddDeploymentOptions ¶
Options to add a deployment to a service.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.AddDeploymentOptions(
name: str = None,
node_port: typing.Union[int, float] = None,
protocol: Protocol = None,
target_port: typing.Union[int, float] = None,
port: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The name of this port within the service. |
node_port |
typing.Union[int, float] |
The port on each node on which this service is exposed when type=NodePort or LoadBalancer. |
protocol |
Protocol |
The IP protocol for this port. |
target_port |
typing.Union[int, float] |
The port number the service will redirect to. |
port |
typing.Union[int, float] |
The port number the service will bind to. |
nameOptional ¶
name: str
- Type: str
The name of this port within the service.
This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the ‘Name’ field in EndpointPort objects. Optional if only one ServicePort is defined on this service.
node_portOptional ¶
node_port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: auto-allocate a port if the ServiceType of this Service requires one.
The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one.
https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
protocolOptional ¶
protocol: Protocol
- Type: Protocol
- Default: Protocol.TCP
The IP protocol for this port.
Supports “TCP”, “UDP”, and “SCTP”. Default is TCP.
target_portOptional ¶
target_port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: The value of
portwill be used.
The port number the service will redirect to.
portOptional ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: Copied from the first container of the deployment.
The port number the service will bind to.
AddDirectoryOptions ¶
Options for configmap.addDirectory().
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.AddDirectoryOptions(
exclude: typing.List[str] = None,
key_prefix: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
exclude |
typing.List[str] |
Glob patterns to exclude when adding files. |
key_prefix |
str |
A prefix to add to all keys in the config map. |
excludeOptional ¶
exclude: typing.List[str]
- Type: typing.List[str]
- Default: include all files
Glob patterns to exclude when adding files.
key_prefixOptional ¶
key_prefix: str
- Type: str
- Default: “”
A prefix to add to all keys in the config map.
Affinity ¶
Affinity is a group of affinity scheduling rules.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Affinity(
node_affinity: NodeAffinity = None,
pod_affinity: PodAffinity = None,
pod_anti_affinity: PodAntiAffinity = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
node_affinity |
cdk8s_plus_31.k8s.NodeAffinity |
Describes node affinity scheduling rules for the pod. |
pod_affinity |
cdk8s_plus_31.k8s.PodAffinity |
Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). |
pod_anti_affinity |
cdk8s_plus_31.k8s.PodAntiAffinity |
Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). |
node_affinityOptional ¶
node_affinity: NodeAffinity
- Type: cdk8s_plus_31.k8s.NodeAffinity
Describes node affinity scheduling rules for the pod.
pod_affinityOptional ¶
pod_affinity: PodAffinity
- Type: cdk8s_plus_31.k8s.PodAffinity
Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
pod_anti_affinityOptional ¶
pod_anti_affinity: PodAntiAffinity
- Type: cdk8s_plus_31.k8s.PodAntiAffinity
Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
AggregationRule ¶
AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.AggregationRule(
cluster_role_selectors: typing.List[LabelSelector] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
cluster_role_selectors |
typing.List[cdk8s_plus_31.k8s.LabelSelector] |
ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. |
cluster_role_selectorsOptional ¶
cluster_role_selectors: typing.List[LabelSelector]
- Type: typing.List[cdk8s_plus_31.k8s.LabelSelector]
ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules.
If any of the selectors match, then the ClusterRole’s permissions will be added
ApiResourceOptions ¶
Options for ApiResource.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ApiResourceOptions(
api_group: str,
resource_type: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of the resource type as it appears in the relevant API endpoint. |
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of the resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
ApiServiceSpec ¶
APIServiceSpec contains information for locating and communicating with a server.
Only https is supported, though you are able to disable certificate verification.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ApiServiceSpec(
group_priority_minimum: typing.Union[int, float],
version_priority: typing.Union[int, float],
ca_bundle: str = None,
group: str = None,
insecure_skip_tls_verify: bool = None,
service: ServiceReference = None,
version: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
group_priority_minimum |
typing.Union[int, float] |
GroupPriorityMinimum is the priority this group should have at least. |
version_priority |
typing.Union[int, float] |
VersionPriority controls the ordering of this API version inside of its group. |
ca_bundle |
str |
CABundle is a PEM encoded CA bundle which will be used to validate an API server’s serving certificate. |
group |
str |
Group is the API group name this server hosts. |
insecure_skip_tls_verify |
bool |
InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. |
service |
cdk8s_plus_31.k8s.ServiceReference |
Service is a reference to the service for this API server. |
version |
str |
Version is the API version this server hosts. |
group_priority_minimumRequired ¶
group_priority_minimum: typing.Union[int, float]
- Type: typing.Union[int, float]
GroupPriorityMinimum is the priority this group should have at least.
Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We’d recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s
version_priorityRequired ¶
version_priority: typing.Union[int, float]
- Type: typing.Union[int, float]
VersionPriority controls the ordering of this API version inside of its group.
Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it’s inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is “kube-like”, it will sort above non “kube-like” version strings, which are ordered lexicographically. “Kube-like” versions start with a “v”, then are followed by a number (the major version), then optionally the string “alpha” or “beta” and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
ca_bundleOptional ¶
ca_bundle: str
- Type: str
CABundle is a PEM encoded CA bundle which will be used to validate an API server’s serving certificate.
If unspecified, system trust roots on the apiserver are used.
groupOptional ¶
group: str
- Type: str
Group is the API group name this server hosts.
insecure_skip_tls_verifyOptional ¶
insecure_skip_tls_verify: bool
- Type: bool
InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server.
This is strongly discouraged. You should use the CABundle instead.
serviceOptional ¶
service: ServiceReference
- Type: cdk8s_plus_31.k8s.ServiceReference
Service is a reference to the service for this API server.
It must communicate on port 443. If the Service is nil, that means the handling for the API groupversion is handled locally on this server. The call will simply delegate to the normal handler chain to be fulfilled.
versionOptional ¶
version: str
- Type: str
Version is the API version this server hosts.
For example, “v1”
AppArmorProfile ¶
AppArmorProfile defines a pod or container’s AppArmor settings.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.AppArmorProfile(
type: str,
localhost_profile: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type indicates which kind of AppArmor profile will be applied. |
localhost_profile |
str |
localhostProfile indicates a profile loaded on the node that should be used. |
typeRequired ¶
type: str
- Type: str
type indicates which kind of AppArmor profile will be applied.
Valid options are: Localhost - a profile pre-loaded on the node. RuntimeDefault - the container runtime’s default profile. Unconfined - no AppArmor enforcement.
localhost_profileOptional ¶
localhost_profile: str
- Type: str
localhostProfile indicates a profile loaded on the node that should be used.
The profile must be preconfigured on the node to work. Must match the loaded name of the profile. Must be set if and only if type is “Localhost”.
AuditAnnotation ¶
AuditAnnotation describes how to produce an audit annotation for an API request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.AuditAnnotation(
key: str,
value_expression: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
key specifies the audit annotation key. |
value_expression |
str |
valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. |
keyRequired ¶
key: str
- Type: str
key specifies the audit annotation key.
The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.
The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: “{ValidatingAdmissionPolicy name}/{key}”.
If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.
Required.
value_expressionRequired ¶
value_expression: str
- Type: str
valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value.
The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.
If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.
Required.
AuditAnnotationV1Alpha1 ¶
AuditAnnotation describes how to produce an audit annotation for an API request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.AuditAnnotationV1Alpha1(
key: str,
value_expression: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
key specifies the audit annotation key. |
value_expression |
str |
valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. |
keyRequired ¶
key: str
- Type: str
key specifies the audit annotation key.
The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.
The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: “{ValidatingAdmissionPolicy name}/{key}”.
If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.
Required.
value_expressionRequired ¶
value_expression: str
- Type: str
valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value.
The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.
If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.
Required.
AuditAnnotationV1Beta1 ¶
AuditAnnotation describes how to produce an audit annotation for an API request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.AuditAnnotationV1Beta1(
key: str,
value_expression: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
key specifies the audit annotation key. |
value_expression |
str |
valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. |
keyRequired ¶
key: str
- Type: str
key specifies the audit annotation key.
The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length.
The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: “{ValidatingAdmissionPolicy name}/{key}”.
If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded.
Required.
value_expressionRequired ¶
value_expression: str
- Type: str
valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value.
The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb.
If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list.
Required.
AwsElasticBlockStorePersistentVolumeProps ¶
Properties for AwsElasticBlockStorePersistentVolume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.AwsElasticBlockStorePersistentVolumeProps(
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
claim: IPersistentVolumeClaim = None,
mount_options: typing.List[str] = None,
reclaim_policy: PersistentVolumeReclaimPolicy = None,
storage: Size = None,
storage_class_name: str = None,
volume_mode: PersistentVolumeMode = None,
volume_id: str,
fs_type: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains all ways the volume can be mounted. |
claim |
IPersistentVolumeClaim |
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. |
mount_options |
typing.List[str] |
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. |
storage |
cdk8s.Size |
What is the storage capacity of this volume. |
storage_class_name |
str |
Name of StorageClass to which this persistent volume belongs. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
volume_id |
str |
Unique ID of the persistent disk resource in AWS (Amazon EBS volume). |
fs_type |
str |
Filesystem type of the volume that you want to mount. |
partition |
typing.Union[int, float] |
The partition in the volume that you want to mount. |
read_only |
bool |
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes.
Contains all ways the volume can be mounted.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
claimOptional ¶
claim: IPersistentVolumeClaim
- Type: IPersistentVolumeClaim
- Default: Not bound to a specific claim.
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
- Default: No options.
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
reclaim_policyOptional ¶
reclaim_policy: PersistentVolumeReclaimPolicy
- Type: PersistentVolumeReclaimPolicy
- Default: PersistentVolumeReclaimPolicy.RETAIN
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
storageOptional ¶
storage: Size
- Type: cdk8s.Size
- Default: No specified.
What is the storage capacity of this volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
- Default: Volume does not belong to any storage class.
Name of StorageClass to which this persistent volume belongs.
volume_modeOptional ¶
volume_mode: PersistentVolumeMode
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
volume_idRequired ¶
volume_id: str
- Type: str
Unique ID of the persistent disk resource in AWS (Amazon EBS volume).
More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
fs_typeOptional ¶
fs_type: str
- Type: str
- Default: ‘ext4’
Filesystem type of the volume that you want to mount.
Tip: Ensure that the filesystem type is supported by the host operating system.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: No partition.
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).
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
AwsElasticBlockStoreVolumeOptions ¶
Options of Volume.fromAwsElasticBlockStore.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.AwsElasticBlockStoreVolumeOptions(
fs_type: str = None,
name: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
fs_type |
str |
Filesystem type of the volume that you want to mount. |
name |
str |
The volume name. |
partition |
typing.Union[int, float] |
The partition in the volume that you want to mount. |
read_only |
bool |
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”. |
fs_typeOptional ¶
fs_type: str
- Type: str
- Default: ‘ext4’
Filesystem type of the volume that you want to mount.
Tip: Ensure that the filesystem type is supported by the host operating system.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
nameOptional ¶
name: str
- Type: str
- Default: auto-generated
The volume name.
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: No partition.
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).
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
AwsElasticBlockStoreVolumeSource ¶
Represents a Persistent Disk resource in AWS.
An AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.AwsElasticBlockStoreVolumeSource(
volume_id: str,
fs_type: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
volume_id |
str |
volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). |
fs_type |
str |
fsType is the filesystem type of the volume that you want to mount. |
partition |
typing.Union[int, float] |
partition is the partition in the volume that you want to mount. |
read_only |
bool |
readOnly value true will force the readOnly setting in VolumeMounts. |
volume_idRequired ¶
volume_id: str
- Type: str
volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume).
More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
fs_typeOptional ¶
fs_type: str
- Type: str
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
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
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).
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly value true will force the readOnly setting in VolumeMounts.
More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
AzureDiskPersistentVolumeProps ¶
Properties for AzureDiskPersistentVolume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.AzureDiskPersistentVolumeProps(
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
claim: IPersistentVolumeClaim = None,
mount_options: typing.List[str] = None,
reclaim_policy: PersistentVolumeReclaimPolicy = None,
storage: Size = None,
storage_class_name: str = None,
volume_mode: PersistentVolumeMode = None,
disk_name: str,
disk_uri: str,
caching_mode: AzureDiskPersistentVolumeCachingMode = None,
fs_type: str = None,
kind: AzureDiskPersistentVolumeKind = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains all ways the volume can be mounted. |
claim |
IPersistentVolumeClaim |
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. |
mount_options |
typing.List[str] |
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. |
storage |
cdk8s.Size |
What is the storage capacity of this volume. |
storage_class_name |
str |
Name of StorageClass to which this persistent volume belongs. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
disk_name |
str |
The Name of the data disk in the blob storage. |
disk_uri |
str |
The URI the data disk in the blob storage. |
caching_mode |
AzureDiskPersistentVolumeCachingMode |
Host Caching mode. |
fs_type |
str |
Filesystem type to mount. |
kind |
AzureDiskPersistentVolumeKind |
Kind of disk. |
read_only |
bool |
Force the ReadOnly setting in VolumeMounts. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes.
Contains all ways the volume can be mounted.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
claimOptional ¶
claim: IPersistentVolumeClaim
- Type: IPersistentVolumeClaim
- Default: Not bound to a specific claim.
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
- Default: No options.
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
reclaim_policyOptional ¶
reclaim_policy: PersistentVolumeReclaimPolicy
- Type: PersistentVolumeReclaimPolicy
- Default: PersistentVolumeReclaimPolicy.RETAIN
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
storageOptional ¶
storage: Size
- Type: cdk8s.Size
- Default: No specified.
What is the storage capacity of this volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
- Default: Volume does not belong to any storage class.
Name of StorageClass to which this persistent volume belongs.
volume_modeOptional ¶
volume_mode: PersistentVolumeMode
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
disk_nameRequired ¶
disk_name: str
- Type: str
The Name of the data disk in the blob storage.
disk_uriRequired ¶
disk_uri: str
- Type: str
The URI the data disk in the blob storage.
caching_modeOptional ¶
caching_mode: AzureDiskPersistentVolumeCachingMode
- Type: AzureDiskPersistentVolumeCachingMode
- Default: AzureDiskPersistentVolumeCachingMode.NONE.
Host Caching mode.
fs_typeOptional ¶
fs_type: str
- Type: str
- Default: ‘ext4’
Filesystem type to mount.
Must be a filesystem type supported by the host operating system.
kindOptional ¶
kind: AzureDiskPersistentVolumeKind
- Type: AzureDiskPersistentVolumeKind
- Default: AzureDiskPersistentVolumeKind.SHARED
Kind of disk.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Force the ReadOnly setting in VolumeMounts.
AzureDiskVolumeOptions ¶
Options of Volume.fromAzureDisk.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.AzureDiskVolumeOptions(
caching_mode: AzureDiskPersistentVolumeCachingMode = None,
fs_type: str = None,
kind: AzureDiskPersistentVolumeKind = None,
name: str = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
caching_mode |
AzureDiskPersistentVolumeCachingMode |
Host Caching mode. |
fs_type |
str |
Filesystem type to mount. |
kind |
AzureDiskPersistentVolumeKind |
Kind of disk. |
name |
str |
The volume name. |
read_only |
bool |
Force the ReadOnly setting in VolumeMounts. |
caching_modeOptional ¶
caching_mode: AzureDiskPersistentVolumeCachingMode
- Type: AzureDiskPersistentVolumeCachingMode
- Default: AzureDiskPersistentVolumeCachingMode.NONE.
Host Caching mode.
fs_typeOptional ¶
fs_type: str
- Type: str
- Default: ‘ext4’
Filesystem type to mount.
Must be a filesystem type supported by the host operating system.
kindOptional ¶
kind: AzureDiskPersistentVolumeKind
- Type: AzureDiskPersistentVolumeKind
- Default: AzureDiskPersistentVolumeKind.SHARED
Kind of disk.
nameOptional ¶
name: str
- Type: str
- Default: auto-generated
The volume name.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Force the ReadOnly setting in VolumeMounts.
AzureDiskVolumeSource ¶
AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.AzureDiskVolumeSource(
disk_name: str,
disk_uri: str,
caching_mode: str = None,
fs_type: str = None,
kind: str = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
disk_name |
str |
diskName is the Name of the data disk in the blob storage. |
disk_uri |
str |
diskURI is the URI of data disk in the blob storage. |
caching_mode |
str |
cachingMode is the Host Caching mode: None, Read Only, Read Write. |
fs_type |
str |
fsType is Filesystem type to mount. |
kind |
str |
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). |
read_only |
bool |
readOnly Defaults to false (read/write). |
disk_nameRequired ¶
disk_name: str
- Type: str
diskName is the Name of the data disk in the blob storage.
disk_uriRequired ¶
disk_uri: str
- Type: str
diskURI is the URI of data disk in the blob storage.
caching_modeOptional ¶
caching_mode: str
- Type: str
cachingMode is the Host Caching mode: None, Read Only, Read Write.
fs_typeOptional ¶
fs_type: str
- Type: str
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.
kindOptional ¶
kind: str
- Type: str
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
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
readOnly Defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
AzureFilePersistentVolumeSource ¶
AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.AzureFilePersistentVolumeSource(
secret_name: str,
share_name: str,
read_only: bool = None,
secret_namespace: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
secret_name |
str |
secretName is the name of secret that contains Azure Storage Account Name and Key. |
share_name |
str |
shareName is the azure Share Name. |
read_only |
bool |
readOnly defaults to false (read/write). |
secret_namespace |
str |
secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod. |
secret_nameRequired ¶
secret_name: str
- Type: str
secretName is the name of secret that contains Azure Storage Account Name and Key.
share_nameRequired ¶
share_name: str
- Type: str
shareName is the azure Share Name.
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
secret_namespaceOptional ¶
secret_namespace: str
- Type: str
secretNamespace is the namespace of the secret that contains Azure Storage Account Name and Key default is the same as the Pod.
AzureFileVolumeSource ¶
AzureFile represents an Azure File Service mount on the host and bind mount to the pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.AzureFileVolumeSource(
secret_name: str,
share_name: str,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
secret_name |
str |
secretName is the name of secret that contains Azure Storage Account Name and Key. |
share_name |
str |
shareName is the azure share Name. |
read_only |
bool |
readOnly defaults to false (read/write). |
secret_nameRequired ¶
secret_name: str
- Type: str
secretName is the name of secret that contains Azure Storage Account Name and Key.
share_nameRequired ¶
share_name: str
- Type: str
shareName is the azure share Name.
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
BasicAuthSecretProps ¶
Options for BasicAuthSecret.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.BasicAuthSecretProps(
metadata: ApiObjectMetadata = None,
immutable: bool = None,
password: str,
username: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
password |
str |
The password or token for authentication. |
username |
str |
The user name for authentication. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
immutable: bool
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
passwordRequired ¶
password: str
- Type: str
The password or token for authentication.
usernameRequired ¶
username: str
- Type: str
The user name for authentication.
BasicDeviceV1Alpha3 ¶
BasicDevice defines one device instance.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.BasicDeviceV1Alpha3(
attributes: typing.Mapping[DeviceAttributeV1Alpha3] = None,
capacity: typing.Mapping[Quantity] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
attributes |
typing.Mapping[cdk8s_plus_31.k8s.DeviceAttributeV1Alpha3] |
Attributes defines the set of attributes for this device. |
capacity |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
Capacity defines the set of capacities for this device. |
attributesOptional ¶
attributes: typing.Mapping[DeviceAttributeV1Alpha3]
- Type: typing.Mapping[cdk8s_plus_31.k8s.DeviceAttributeV1Alpha3]
Attributes defines the set of attributes for this device.
The name of each attribute must be unique in that set.
The maximum number of attributes and capacities combined is 32.
capacityOptional ¶
capacity: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
Capacity defines the set of capacities for this device.
The name of each capacity must be unique in that set.
The maximum number of attributes and capacities combined is 32.
BoundObjectReference ¶
BoundObjectReference is a reference to an object that a token is bound to.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.BoundObjectReference(
api_version: str = None,
kind: str = None,
name: str = None,
uid: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
API version of the referent. |
kind |
str |
Kind of the referent. |
name |
str |
Name of the referent. |
uid |
str |
UID of the referent. |
api_versionOptional ¶
api_version: str
- Type: str
API version of the referent.
kindOptional ¶
kind: str
- Type: str
Kind of the referent.
Valid kinds are ‘Pod’ and ‘Secret’.
nameOptional ¶
name: str
- Type: str
Name of the referent.
uidOptional ¶
uid: str
- Type: str
UID of the referent.
Capabilities ¶
Adds and removes POSIX capabilities from running containers.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Capabilities(
add: typing.List[str] = None,
drop: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
add |
typing.List[str] |
Added capabilities. |
drop |
typing.List[str] |
Removed capabilities. |
addOptional ¶
add: typing.List[str]
- Type: typing.List[str]
Added capabilities.
dropOptional ¶
drop: typing.List[str]
- Type: typing.List[str]
Removed capabilities.
CelDeviceSelectorV1Alpha3 ¶
CELDeviceSelector contains a CEL expression for selecting a device.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CelDeviceSelectorV1Alpha3(
expression: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression is a CEL expression which evaluates a single device. |
expressionRequired ¶
expression: str
- Type: str
Expression is a CEL expression which evaluates a single device.
It must evaluate to true when the device under consideration satisfies the desired criteria, and false when it does not. Any other result is an error and causes allocation of devices to abort.
The expression’s input is an object named “device”, which carries the following properties:
- driver (string): the name of the driver which defines this device.
- attributes (map[string]object): the device’s attributes, grouped by prefix (e.g. device.attributes[“dra.example.com”] evaluates to an object with all of the attributes which were prefixed by “dra.example.com”.
- capacity (map[string]object): the device’s capacities, grouped by prefix.
Example: Consider a device with driver=”dra.example.com”, which exposes two attributes named “model” and “ext.example.com/family” and which exposes one capacity named “modules”. This input to this expression would have the following fields:
device.driver device.attributes[“dra.example.com”].model device.attributes[“ext.example.com”].family device.capacity[“dra.example.com”].modules
The device.driver field can be used to check for a specific driver, either as a high-level precondition (i.e. you only want to consider devices from this driver) or as part of a multi-clause expression that is meant to consider devices from different drivers.
The value type of each attribute is defined by the device definition, and users who write these expressions must consult the documentation for their specific drivers. The value type of each capacity is Quantity.
If an unknown prefix is used as a lookup in either device.attributes or device.capacity, an empty map will be returned. Any reference to an unknown field will cause an evaluation error and allocation to abort.
A robust expression should check for the existence of attributes before referencing them.
For ease of use, the cel.bind() function is enabled, and can be used to simplify expressions that access multiple attributes with the same domain. For example:
cel.bind(dra, device.attributes[“dra.example.com”], dra.someBool && dra.anotherBool)
CephFsPersistentVolumeSource ¶
Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CephFsPersistentVolumeSource(
monitors: typing.List[str],
path: str = None,
read_only: bool = None,
secret_file: str = None,
secret_ref: SecretReference = None,
user: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
monitors |
typing.List[str] |
monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it. |
path |
str |
path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /. |
read_only |
bool |
readOnly is Optional: Defaults to false (read/write). |
secret_file |
str |
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. |
secret_ref |
cdk8s_plus_31.k8s.SecretReference |
secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. |
user |
str |
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. |
monitorsRequired ¶
monitors: typing.List[str]
- Type: typing.List[str]
monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it.
pathOptional ¶
path: str
- Type: str
path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: 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 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
secret_fileOptional ¶
secret_file: str
- Type: str
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.
secret_refOptional ¶
secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty.
More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
userOptional ¶
user: str
- Type: str
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.
CephFsVolumeSource ¶
Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CephFsVolumeSource(
monitors: typing.List[str],
path: str = None,
read_only: bool = None,
secret_file: str = None,
secret_ref: LocalObjectReference = None,
user: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
monitors |
typing.List[str] |
monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it. |
path |
str |
path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /. |
read_only |
bool |
readOnly is Optional: Defaults to false (read/write). |
secret_file |
str |
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. |
secret_ref |
cdk8s_plus_31.k8s.LocalObjectReference |
secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty. |
user |
str |
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. |
monitorsRequired ¶
monitors: typing.List[str]
- Type: typing.List[str]
monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it.
pathOptional ¶
path: str
- Type: str
path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: 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 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
secret_fileOptional ¶
secret_file: str
- Type: str
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.
secret_refOptional ¶
secret_ref: LocalObjectReference
- Type: cdk8s_plus_31.k8s.LocalObjectReference
secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty.
More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it
userOptional ¶
user: str
- Type: str
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.
CertificateSigningRequestSpec ¶
CertificateSigningRequestSpec contains the certificate request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CertificateSigningRequestSpec(
request: str,
signer_name: str,
expiration_seconds: typing.Union[int, float] = None,
extra: typing.Mapping[typing.List[str]] = None,
groups: typing.List[str] = None,
uid: str = None,
usages: typing.List[str] = None,
username: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
request |
str |
request contains an x509 certificate signing request encoded in a “CERTIFICATE REQUEST” PEM block. |
signer_name |
str |
signerName indicates the requested signer, and is a qualified name. |
expiration_seconds |
typing.Union[int, float] |
expirationSeconds is the requested duration of validity of the issued certificate. |
extra |
typing.Mapping[typing.List[str]] |
extra contains extra attributes of the user that created the CertificateSigningRequest. |
groups |
typing.List[str] |
groups contains group membership of the user that created the CertificateSigningRequest. |
uid |
str |
uid contains the uid of the user that created the CertificateSigningRequest. |
usages |
typing.List[str] |
usages specifies a set of key usages requested in the issued certificate. |
username |
str |
username contains the name of the user that created the CertificateSigningRequest. |
requestRequired ¶
request: str
- Type: str
request contains an x509 certificate signing request encoded in a “CERTIFICATE REQUEST” PEM block.
When serialized as JSON or YAML, the data is additionally base64-encoded.
signer_nameRequired ¶
signer_name: str
- Type: str
signerName indicates the requested signer, and is a qualified name.
List/watch requests for CertificateSigningRequests can filter on this field using a “spec.signerName=NAME” fieldSelector.
Well-known Kubernetes signers are:
- “kubernetes.io/kube-apiserver-client”: issues client certificates that can be used to authenticate to kube-apiserver. Requests for this signer are never auto-approved by kube-controller-manager, can be issued by the “csrsigning” controller in kube-controller-manager.
- “kubernetes.io/kube-apiserver-client-kubelet”: issues client certificates that kubelets use to authenticate to kube-apiserver. Requests for this signer can be auto-approved by the “csrapproving” controller in kube-controller-manager, and can be issued by the “csrsigning” controller in kube-controller-manager.
- “kubernetes.io/kubelet-serving” issues serving certificates that kubelets use to serve TLS endpoints, which kube-apiserver can connect to securely. Requests for this signer are never auto-approved by kube-controller-manager, and can be issued by the “csrsigning” controller in kube-controller-manager.
More details are available at https://k8s.io/docs/reference/access-authn-authz/certificate-signing-requests/#kubernetes-signers
Custom signerNames can also be specified. The signer defines:
- Trust distribution: how trust (CA bundles) are distributed.
- Permitted subjects: and behavior when a disallowed subject is requested.
- Required, permitted, or forbidden x509 extensions in the request (including whether subjectAltNames are allowed, which types, restrictions on allowed values) and behavior when a disallowed extension is requested.
- Required, permitted, or forbidden key usages / extended key usages.
- Expiration/certificate lifetime: whether it is fixed by the signer, configurable by the admin.
- Whether or not requests for CA certificates are allowed.
expiration_secondsOptional ¶
expiration_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
expirationSeconds is the requested duration of validity of the issued certificate.
The certificate signer may issue a certificate with a different validity duration so a client must check the delta between the notBefore and and notAfter fields in the issued certificate to determine the actual duration.
The v1.22+ in-tree implementations of the well-known Kubernetes signers will honor this field as long as the requested duration is not greater than the maximum duration they will honor per the –cluster-signing-duration CLI flag to the Kubernetes controller manager.
Certificate signers may not honor this field for various reasons:
- Old signer that is unaware of the field (such as the in-tree implementations prior to v1.22)
- Signer whose configured maximum is shorter than the requested duration
- Signer whose configured minimum is longer than the requested duration
The minimum valid value for expirationSeconds is 600, i.e. 10 minutes.
extraOptional ¶
extra: typing.Mapping[typing.List[str]]
- Type: typing.Mapping[typing.List[str]]
extra contains extra attributes of the user that created the CertificateSigningRequest.
Populated by the API server on creation and immutable.
groupsOptional ¶
groups: typing.List[str]
- Type: typing.List[str]
groups contains group membership of the user that created the CertificateSigningRequest.
Populated by the API server on creation and immutable.
uidOptional ¶
uid: str
- Type: str
uid contains the uid of the user that created the CertificateSigningRequest.
Populated by the API server on creation and immutable.
usagesOptional ¶
usages: typing.List[str]
- Type: typing.List[str]
usages specifies a set of key usages requested in the issued certificate.
Requests for TLS client certificates typically request: “digital signature”, “key encipherment”, “client auth”.
Requests for TLS serving certificates typically request: “key encipherment”, “digital signature”, “server auth”.
Valid values are: “signing”, “digital signature”, “content commitment”, “key encipherment”, “key agreement”, “data encipherment”, “cert sign”, “crl sign”, “encipher only”, “decipher only”, “any”, “server auth”, “client auth”, “code signing”, “email protection”, “s/mime”, “ipsec end system”, “ipsec tunnel”, “ipsec user”, “timestamping”, “ocsp signing”, “microsoft sgc”, “netscape sgc”
usernameOptional ¶
username: str
- Type: str
username contains the name of the user that created the CertificateSigningRequest.
Populated by the API server on creation and immutable.
CinderPersistentVolumeSource ¶
Represents a cinder volume resource in Openstack.
A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CinderPersistentVolumeSource(
volume_id: str,
fs_type: str = None,
read_only: bool = None,
secret_ref: SecretReference = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
volume_id |
str |
volumeID used to identify the volume in cinder. |
fs_type |
str |
fsType Filesystem type to mount. |
read_only |
bool |
readOnly is Optional: Defaults to false (read/write). |
secret_ref |
cdk8s_plus_31.k8s.SecretReference |
secretRef is Optional: points to a secret object containing parameters used to connect to OpenStack. |
volume_idRequired ¶
volume_id: str
- Type: str
volumeID used to identify the volume in cinder.
More info: https://examples.k8s.io/mysql-cinder-pd/README.md
fs_typeOptional ¶
fs_type: str
- Type: str
fsType 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
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md
readOnly is Optional: 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
secret_refOptional ¶
secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
secretRef is Optional: points to a secret object containing parameters used to connect to OpenStack.
CinderVolumeSource ¶
Represents a cinder volume resource in Openstack.
A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CinderVolumeSource(
volume_id: str,
fs_type: str = None,
read_only: bool = None,
secret_ref: LocalObjectReference = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
volume_id |
str |
volumeID used to identify the volume in cinder. |
fs_type |
str |
fsType is the filesystem type to mount. |
read_only |
bool |
readOnly defaults to false (read/write). |
secret_ref |
cdk8s_plus_31.k8s.LocalObjectReference |
secretRef is optional: points to a secret object containing parameters used to connect to OpenStack. |
volume_idRequired ¶
volume_id: str
- Type: str
volumeID used to identify the volume in cinder.
More info: https://examples.k8s.io/mysql-cinder-pd/README.md
fs_typeOptional ¶
fs_type: str
- Type: str
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
read_onlyOptional ¶
read_only: bool
- Type: bool
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
secret_refOptional ¶
secret_ref: LocalObjectReference
- Type: cdk8s_plus_31.k8s.LocalObjectReference
secretRef is optional: points to a secret object containing parameters used to connect to OpenStack.
ClientIpConfig ¶
ClientIPConfig represents the configurations of Client IP based session affinity.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ClientIpConfig(
timeout_seconds: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
timeout_seconds |
typing.Union[int, float] |
timeoutSeconds specifies the seconds of ClientIP type session sticky time. |
timeout_secondsOptional ¶
timeout_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
timeoutSeconds specifies the seconds of ClientIP type session sticky time.
The value must be >0 && <=86400(for 1 day) if ServiceAffinity == “ClientIP”. Default value is 10800(for 3 hours).
ClusterRoleBindingProps ¶
Properties for ClusterRoleBinding.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ClusterRoleBindingProps(
metadata: ApiObjectMetadata = None,
role: IClusterRole
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
role |
IClusterRole |
The role to bind to. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
roleRequired ¶
role: IClusterRole
- Type: IClusterRole
The role to bind to.
ClusterRolePolicyRule ¶
Policy rule of a `ClusterRole.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ClusterRolePolicyRule(
endpoints: typing.List[IApiEndpoint],
verbs: typing.List[str]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
endpoints |
typing.List[IApiEndpoint] |
Endpoints this rule applies to. |
verbs |
typing.List[str] |
Verbs to allow. |
endpointsRequired ¶
endpoints: typing.List[IApiEndpoint]
- Type: typing.List[IApiEndpoint]
Endpoints this rule applies to.
Can be either api resources or non api resources.
verbsRequired ¶
verbs: typing.List[str]
- Type: typing.List[str]
Verbs to allow.
(e.g [‘get’, ‘watch’])
ClusterRoleProps ¶
Properties for ClusterRole.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ClusterRoleProps(
metadata: ApiObjectMetadata = None,
aggregation_labels: typing.Mapping[str] = None,
rules: typing.List[ClusterRolePolicyRule] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
aggregation_labels |
typing.Mapping[str] |
Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole’s rules. |
rules |
typing.List[ClusterRolePolicyRule] |
A list of rules the role should allow. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
aggregation_labelsOptional ¶
aggregation_labels: typing.Mapping[str]
- Type: typing.Mapping[str]
Specify labels that should be used to locate ClusterRoles, whose rules will be automatically filled into this ClusterRole’s rules.
rulesOptional ¶
rules: typing.List[ClusterRolePolicyRule]
- Type: typing.List[ClusterRolePolicyRule]
- Default: []
A list of rules the role should allow.
ClusterTrustBundleProjection ¶
ClusterTrustBundleProjection describes how to select a set of ClusterTrustBundle objects and project their contents into the pod filesystem.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ClusterTrustBundleProjection(
path: str,
label_selector: LabelSelector = None,
name: str = None,
optional: bool = None,
signer_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
Relative path from the volume root to write the bundle. |
label_selector |
cdk8s_plus_31.k8s.LabelSelector |
Select all ClusterTrustBundles that match this label selector. |
name |
str |
Select a single ClusterTrustBundle by object name. |
optional |
bool |
If true, don’t block pod startup if the referenced ClusterTrustBundle(s) aren’t available. |
signer_name |
str |
Select all ClusterTrustBundles that match this signer name. |
pathRequired ¶
path: str
- Type: str
Relative path from the volume root to write the bundle.
label_selectorOptional ¶
label_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
Select all ClusterTrustBundles that match this label selector.
Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as “match nothing”. If set but empty, interpreted as “match everything”.
nameOptional ¶
name: str
- Type: str
Select a single ClusterTrustBundle by object name.
Mutually-exclusive with signerName and labelSelector.
optionalOptional ¶
optional: bool
- Type: bool
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.
signer_nameOptional ¶
signer_name: str
- Type: str
Select all ClusterTrustBundles that match this signer name.
Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated.
ClusterTrustBundleSpecV1Alpha1 ¶
ClusterTrustBundleSpec contains the signer and trust anchors.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ClusterTrustBundleSpecV1Alpha1(
trust_bundle: str,
signer_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
trust_bundle |
str |
trustBundle contains the individual X.509 trust anchors for this bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates. |
signer_name |
str |
signerName indicates the associated signer, if any. |
trust_bundleRequired ¶
trust_bundle: str
- Type: str
trustBundle contains the individual X.509 trust anchors for this bundle, as PEM bundle of PEM-wrapped, DER-formatted X.509 certificates.
The data must consist only of PEM certificate blocks that parse as valid X.509 certificates. Each certificate must include a basic constraints extension with the CA bit set. The API server will reject objects that contain duplicate certificates, or that use PEM block headers.
Users of ClusterTrustBundles, including Kubelet, are free to reorder and deduplicate certificate blocks in this file according to their own logic, as well as to drop PEM block headers and inter-block data.
signer_nameOptional ¶
signer_name: str
- Type: str
signerName indicates the associated signer, if any.
In order to create or update a ClusterTrustBundle that sets signerName, you must have the following cluster-scoped permission: group=certificates.k8s.io resource=signers resourceName=
If signerName is not empty, then the ClusterTrustBundle object must be named with the signer name as a prefix (translating slashes to colons). For example, for the signer name example.com/foo, valid ClusterTrustBundle object names include example.com:foo:abc and example.com:foo:v1.
If signerName is empty, then the ClusterTrustBundle object’s name must not have such a prefix.
List/watch requests for ClusterTrustBundles can filter on this field using a spec.signerName=NAME field selector.
CommandProbeOptions ¶
Options for Probe.fromCommand().
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.CommandProbeOptions(
failure_threshold: typing.Union[int, float] = None,
initial_delay_seconds: Duration = None,
period_seconds: Duration = None,
success_threshold: typing.Union[int, float] = None,
timeout_seconds: Duration = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
failure_threshold |
typing.Union[int, float] |
Minimum consecutive failures for the probe to be considered failed after having succeeded. |
initial_delay_seconds |
cdk8s.Duration |
Number of seconds after the container has started before liveness probes are initiated. |
period_seconds |
cdk8s.Duration |
How often (in seconds) to perform the probe. |
success_threshold |
typing.Union[int, float] |
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. |
timeout_seconds |
cdk8s.Duration |
Number of seconds after which the probe times out. |
failure_thresholdOptional ¶
failure_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 3
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
initial_delay_secondsOptional ¶
initial_delay_seconds: Duration
- Type: cdk8s.Duration
- Default: immediate
Number of seconds after the container has started before liveness probes are initiated.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_secondsOptional ¶
period_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(10) Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
success_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1 Must be 1 for liveness and startup. Minimum value is 1.
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.
timeout_secondsOptional ¶
timeout_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(1)
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
CommonSecretProps ¶
Common properties for Secret.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.CommonSecretProps(
metadata: ApiObjectMetadata = None,
immutable: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
immutable: bool
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
ComponentCondition ¶
Information about the condition of a component.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ComponentCondition(
status: str,
type: str,
error: str = None,
message: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
status |
str |
Status of the condition for a component. |
type |
str |
Type of condition for a component. |
error |
str |
Condition error code for a component. |
message |
str |
Message about the condition for a component. |
statusRequired ¶
status: str
- Type: str
Status of the condition for a component.
Valid values for “Healthy”: “True”, “False”, or “Unknown”.
typeRequired ¶
type: str
- Type: str
Type of condition for a component.
Valid value: “Healthy”
errorOptional ¶
error: str
- Type: str
Condition error code for a component.
For example, a health check error code.
messageOptional ¶
message: str
- Type: str
Message about the condition for a component.
For example, information about a health check.
ConfigMapEnvSource ¶
ConfigMapEnvSource selects a ConfigMap to populate the environment variables with.
The contents of the target ConfigMap’s Data field will represent the key-value pairs as environment variables.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ConfigMapEnvSource(
name: str = None,
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name of the referent. |
optional |
bool |
Specify whether the ConfigMap must be defined. |
nameOptional ¶
name: str
- Type: str
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
optionalOptional ¶
optional: bool
- Type: bool
Specify whether the ConfigMap must be defined.
ConfigMapKeySelector ¶
Selects a key from a ConfigMap.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ConfigMapKeySelector(
key: str,
name: str = None,
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
The key to select. |
name |
str |
Name of the referent. |
optional |
bool |
Specify whether the ConfigMap or its key must be defined. |
keyRequired ¶
key: str
- Type: str
The key to select.
nameOptional ¶
name: str
- Type: str
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
optionalOptional ¶
optional: bool
- Type: bool
Specify whether the ConfigMap or its key must be defined.
ConfigMapNodeConfigSource ¶
ConfigMapNodeConfigSource contains the information to reference a ConfigMap as a config source for the Node.
This API is deprecated since 1.22: https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ConfigMapNodeConfigSource(
kubelet_config_key: str,
name: str,
namespace: str,
resource_version: str = None,
uid: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kubelet_config_key |
str |
KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases. |
name |
str |
Name is the metadata.name of the referenced ConfigMap. This field is required in all cases. |
namespace |
str |
Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases. |
resource_version |
str |
ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. |
uid |
str |
UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status. |
kubelet_config_keyRequired ¶
kubelet_config_key: str
- Type: str
KubeletConfigKey declares which key of the referenced ConfigMap corresponds to the KubeletConfiguration structure This field is required in all cases.
nameRequired ¶
name: str
- Type: str
Name is the metadata.name of the referenced ConfigMap. This field is required in all cases.
namespaceRequired ¶
namespace: str
- Type: str
Namespace is the metadata.namespace of the referenced ConfigMap. This field is required in all cases.
resource_versionOptional ¶
resource_version: str
- Type: str
ResourceVersion is the metadata.ResourceVersion of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.
uidOptional ¶
uid: str
- Type: str
UID is the metadata.UID of the referenced ConfigMap. This field is forbidden in Node.Spec, and required in Node.Status.
ConfigMapProjection ¶
Adapts a ConfigMap into a projected volume.
The contents of the target ConfigMap’s Data field will be presented in a projected volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. Note that this is identical to a configmap volume source without the default mode.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ConfigMapProjection(
items: typing.List[KeyToPath] = None,
name: str = None,
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KeyToPath] |
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. |
name |
str |
Name of the referent. |
optional |
bool |
optional specify whether the ConfigMap or its keys must be defined. |
itemsOptional ¶
items: typing.List[KeyToPath]
- Type: typing.List[cdk8s_plus_31.k8s.KeyToPath]
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 ‘..’.
nameOptional ¶
name: str
- Type: str
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
optionalOptional ¶
optional: bool
- Type: bool
optional specify whether the ConfigMap or its keys must be defined.
ConfigMapProps ¶
Properties for initialization of ConfigMap.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ConfigMapProps(
metadata: ApiObjectMetadata = None,
binary_data: typing.Mapping[str] = None,
data: typing.Mapping[str] = None,
immutable: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
binary_data |
typing.Mapping[str] |
BinaryData contains the binary data. |
data |
typing.Mapping[str] |
Data contains the configuration data. |
immutable |
bool |
If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
binary_dataOptional ¶
binary_data: typing.Mapping[str]
- Type: typing.Mapping[str]
BinaryData contains the binary data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process.
You can also add binary data using configMap.addBinaryData().
dataOptional ¶
data: typing.Mapping[str]
- Type: typing.Mapping[str]
Data contains the configuration data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.
You can also add data using configMap.addData().
immutableOptional ¶
immutable: bool
- Type: bool
- Default: false
If set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
ConfigMapVolumeOptions ¶
Options for the ConfigMap-based volume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ConfigMapVolumeOptions(
default_mode: typing.Union[int, float] = None,
items: typing.Mapping[PathMapping] = None,
name: str = None,
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
default_mode |
typing.Union[int, float] |
Mode bits to use on created files by default. |
items |
typing.Mapping[PathMapping] |
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. |
name |
str |
The volume name. |
optional |
bool |
Specify whether the ConfigMap or its keys must be defined. |
default_modeOptional ¶
default_mode: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 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.
Mode bits to use on created files by default.
Must be a value between 0 and 0777. 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.
itemsOptional ¶
items: typing.Mapping[PathMapping]
- Type: typing.Mapping[PathMapping]
- Default: no mapping
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 ‘..’.
nameOptional ¶
name: str
- Type: str
- Default: auto-generated
The volume name.
optionalOptional ¶
optional: bool
- Type: bool
- Default: undocumented
Specify whether the ConfigMap or its keys must be defined.
ConfigMapVolumeSource ¶
Adapts a ConfigMap into a volume.
The contents of the target ConfigMap’s Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ConfigMapVolumeSource(
default_mode: typing.Union[int, float] = None,
items: typing.List[KeyToPath] = None,
name: str = None,
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
default_mode |
typing.Union[int, float] |
defaultMode is optional: mode bits used to set permissions on created files by default. |
items |
typing.List[cdk8s_plus_31.k8s.KeyToPath] |
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. |
name |
str |
Name of the referent. |
optional |
bool |
optional specify whether the ConfigMap or its keys must be defined. |
default_modeOptional ¶
default_mode: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 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 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.
itemsOptional ¶
items: typing.List[KeyToPath]
- Type: typing.List[cdk8s_plus_31.k8s.KeyToPath]
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 ‘..’.
nameOptional ¶
name: str
- Type: str
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
optionalOptional ¶
optional: bool
- Type: bool
optional specify whether the ConfigMap or its keys must be defined.
Container ¶
A single application container that you want to run within a pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Container(
name: str,
args: typing.List[str] = None,
command: typing.List[str] = None,
env: typing.List[EnvVar] = None,
env_from: typing.List[EnvFromSource] = None,
image: str = None,
image_pull_policy: str = None,
lifecycle: Lifecycle = None,
liveness_probe: Probe = None,
ports: typing.List[ContainerPort] = None,
readiness_probe: Probe = None,
resize_policy: typing.List[ContainerResizePolicy] = None,
resources: ResourceRequirements = None,
restart_policy: str = None,
security_context: SecurityContext = None,
startup_probe: Probe = None,
stdin: bool = None,
stdin_once: bool = None,
termination_message_path: str = None,
termination_message_policy: str = None,
tty: bool = None,
volume_devices: typing.List[VolumeDevice] = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name of the container specified as a DNS_LABEL. |
args |
typing.List[str] |
Arguments to the entrypoint. |
command |
typing.List[str] |
Entrypoint array. |
env |
typing.List[cdk8s_plus_31.k8s.EnvVar] |
List of environment variables to set in the container. |
env_from |
typing.List[cdk8s_plus_31.k8s.EnvFromSource] |
List of sources to populate environment variables in the container. |
image |
str |
Container image name. |
image_pull_policy |
str |
Image pull policy. |
lifecycle |
cdk8s_plus_31.k8s.Lifecycle |
Actions that the management system should take in response to container lifecycle events. |
liveness_probe |
cdk8s_plus_31.k8s.Probe |
Periodic probe of container liveness. |
ports |
typing.List[cdk8s_plus_31.k8s.ContainerPort] |
List of ports to expose from the container. |
readiness_probe |
cdk8s_plus_31.k8s.Probe |
Periodic probe of container service readiness. |
resize_policy |
typing.List[cdk8s_plus_31.k8s.ContainerResizePolicy] |
Resources resize policy for the container. |
resources |
cdk8s_plus_31.k8s.ResourceRequirements |
Compute Resources required by this container. |
restart_policy |
str |
RestartPolicy defines the restart behavior of individual containers in a pod. |
security_context |
cdk8s_plus_31.k8s.SecurityContext |
SecurityContext defines the security options the container should be run with. |
startup_probe |
cdk8s_plus_31.k8s.Probe |
StartupProbe indicates that the Pod has successfully initialized. |
stdin |
bool |
Whether this container should allocate a buffer for stdin in the container runtime. |
stdin_once |
bool |
Whether the container runtime should close the stdin channel after it has been opened by a single attach. |
termination_message_path |
str |
Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. |
termination_message_policy |
str |
Indicate how the termination message should be populated. |
tty |
bool |
Whether this container should allocate a TTY for itself, also requires ‘stdin’ to be true. |
volume_devices |
typing.List[cdk8s_plus_31.k8s.VolumeDevice] |
volumeDevices is the list of block devices to be used by the container. |
volume_mounts |
typing.List[cdk8s_plus_31.k8s.VolumeMount] |
Pod volumes to mount into the container’s filesystem. |
working_dir |
str |
Container’s working directory. |
nameRequired ¶
name: str
- Type: str
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
argsOptional ¶
args: typing.List[str]
- Type: typing.List[str]
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
commandOptional ¶
command: typing.List[str]
- Type: typing.List[str]
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
envOptional ¶
env: typing.List[EnvVar]
- Type: typing.List[cdk8s_plus_31.k8s.EnvVar]
List of environment variables to set in the container.
Cannot be updated.
env_fromOptional ¶
env_from: typing.List[EnvFromSource]
- Type: typing.List[cdk8s_plus_31.k8s.EnvFromSource]
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.
imageOptional ¶
image: str
- Type: str
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_pull_policyOptional ¶
image_pull_policy: str
- Type: str
- Default: Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
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
lifecycleOptional ¶
lifecycle: Lifecycle
- Type: cdk8s_plus_31.k8s.Lifecycle
Actions that the management system should take in response to container lifecycle events.
Cannot be updated.
liveness_probeOptional ¶
liveness_probe: Probe
- Type: cdk8s_plus_31.k8s.Probe
Periodic probe of container liveness.
Container will be restarted if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
portsOptional ¶
ports: typing.List[ContainerPort]
- Type: typing.List[cdk8s_plus_31.k8s.ContainerPort]
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.
readiness_probeOptional ¶
readiness_probe: Probe
- Type: cdk8s_plus_31.k8s.Probe
Periodic probe of container service readiness.
Container will be removed from service endpoints if the probe fails. Cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
resize_policyOptional ¶
resize_policy: typing.List[ContainerResizePolicy]
- Type: typing.List[cdk8s_plus_31.k8s.ContainerResizePolicy]
Resources resize policy for the container.
resourcesOptional ¶
resources: ResourceRequirements
- Type: cdk8s_plus_31.k8s.ResourceRequirements
Compute Resources required by this container.
Cannot be updated. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
restart_policy: str
- Type: str
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.
security_contextOptional ¶
security_context: SecurityContext
- Type: cdk8s_plus_31.k8s.SecurityContext
SecurityContext defines the security options the container should be run with.
If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startup_probeOptional ¶
startup_probe: Probe
- Type: cdk8s_plus_31.k8s.Probe
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully. If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. This can be used to provide different probe parameters at the beginning of a Pod’s lifecycle, when it might take a long time to load data or warm a cache, than during steady-state operation. This cannot be updated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
stdinOptional ¶
stdin: bool
- Type: bool
- Default: false.
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_onceOptional ¶
stdin_once: bool
- Type: bool
- Default: false
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
termination_message_pathOptional ¶
termination_message_path: str
- Type: str
- Default: dev/termination-log. Cannot be updated.
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.
termination_message_policyOptional ¶
termination_message_policy: str
- Type: str
- Default: File. Cannot be updated.
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.
ttyOptional ¶
tty: bool
- Type: bool
- Default: false.
Whether this container should allocate a TTY for itself, also requires ‘stdin’ to be true.
Default is false.
volume_devicesOptional ¶
volume_devices: typing.List[VolumeDevice]
- Type: typing.List[cdk8s_plus_31.k8s.VolumeDevice]
volumeDevices is the list of block devices to be used by the container.
volume_mountsOptional ¶
volume_mounts: typing.List[VolumeMount]
- Type: typing.List[cdk8s_plus_31.k8s.VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
working_dir: str
- Type: str
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.
ContainerLifecycle ¶
Container lifecycle properties.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ContainerLifecycle(
post_start: Handler = None,
pre_stop: Handler = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
post_start |
Handler |
This hook is executed immediately after a container is created. |
pre_stop |
Handler |
This hook is called immediately before a container is terminated due to an API request or management event such as a liveness/startup probe failure, preemption, resource contention and others. |
post_startOptional ¶
post_start: Handler
- Type: Handler
- Default: No post start handler.
This hook is executed immediately after a container is created.
However, there is no guarantee that the hook will execute before the container ENTRYPOINT.
pre_stopOptional ¶
pre_stop: Handler
- Type: Handler
- Default: No pre stop handler.
This hook is called immediately before a container is terminated due to an API request or management event such as a liveness/startup probe failure, preemption, resource contention and others.
A call to the PreStop hook fails if the container is already in a terminated or completed state and the hook must complete before the TERM signal to stop the container can be sent. The Pod’s termination grace period countdown begins before the PreStop hook is executed, so regardless of the outcome of the handler, the container will eventually terminate within the Pod’s termination grace period. No parameters are passed to the handler.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination
ContainerOpts ¶
Optional properties of a container.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ContainerOpts(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
args |
typing.List[str] |
Arguments to the entrypoint. The docker image’s CMD is used if command is not provided. |
command |
typing.List[str] |
Entrypoint array. |
env_from |
typing.List[EnvFrom] |
List of sources to populate environment variables in the container. |
env_variables |
typing.Mapping[EnvValue] |
Environment variables to set in the container. |
image_pull_policy |
ImagePullPolicy |
Image pull policy for this container. |
lifecycle |
ContainerLifecycle |
Describes actions that the management system should take in response to container lifecycle events. |
liveness |
Probe |
Periodic probe of container liveness. |
name |
str |
Name of the container specified as a DNS_LABEL. |
port |
typing.Union[int, float] |
No description. |
port_number |
typing.Union[int, float] |
Number of port to expose on the pod’s IP address. |
ports |
typing.List[ContainerPort] |
List of ports to expose from this container. |
readiness |
Probe |
Determines when the container is ready to serve traffic. |
resources |
ContainerResources |
Compute resources (CPU and memory requests and limits) required by the container. |
restart_policy |
ContainerRestartPolicy |
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always. |
security_context |
ContainerSecurityContextProps |
SecurityContext defines the security options the container should be run with. |
startup |
Probe |
StartupProbe indicates that the Pod has successfully initialized. |
volume_mounts |
typing.List[VolumeMount] |
Pod volumes to mount into the container’s filesystem. |
working_dir |
str |
Container’s working directory. |
argsOptional ¶
args: typing.List[str]
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
command: typing.List[str]
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
env_from: typing.List[EnvFrom]
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
env_variables: typing.Mapping[EnvValue]
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
image_pull_policy: ImagePullPolicy
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
lifecycle: ContainerLifecycle
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
liveness: Probe
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
name: str
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
- Deprecated: - use
portNumber.
port: typing.Union[int, float]
- Type: typing.Union[int, float]
port_numberOptional ¶
port_number: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
ports: typing.List[ContainerPort]
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
readiness: Probe
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
resources: ContainerResources
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
restart_policy: ContainerRestartPolicy
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
security_context: ContainerSecurityContextProps
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
startup: Probe
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
volume_mounts: typing.List[VolumeMount]
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
working_dir: str
- Type: str
- Default: The container runtime’s default.
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.
ContainerPort ¶
Represents a network port in a single container.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ContainerPort(
number: typing.Union[int, float],
host_ip: str = None,
host_port: typing.Union[int, float] = None,
name: str = None,
protocol: Protocol = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
number |
typing.Union[int, float] |
Number of port to expose on the pod’s IP address. |
host_ip |
str |
What host IP to bind the external port to. |
host_port |
typing.Union[int, float] |
Number of port to expose on the host. |
name |
str |
If specified, this must be an IANA_SVC_NAME and unique within the pod. |
protocol |
Protocol |
Protocol for port. |
numberRequired ¶
number: typing.Union[int, float]
- Type: typing.Union[int, float]
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
host_ipOptional ¶
host_ip: str
- Type: str
- Default: 127.0.0.1.
What host IP to bind the external port to.
host_portOptional ¶
host_port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: auto generated by kubernetes and might change on restarts.
Number of port to expose on the host.
If specified, this must be a valid port number, 0 < x < 65536. Most containers do not need this.
nameOptional ¶
name: str
- Type: str
- Default: port is not named.
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.
protocolOptional ¶
protocol: Protocol
- Type: Protocol
- Default: Protocol.TCP
Protocol for port.
Must be UDP, TCP, or SCTP. Defaults to “TCP”.
ContainerPort ¶
ContainerPort represents a network port in a single container.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ContainerPort(
container_port: typing.Union[int, float],
host_ip: str = None,
host_port: typing.Union[int, float] = None,
name: str = None,
protocol: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
container_port |
typing.Union[int, float] |
Number of port to expose on the pod’s IP address. |
host_ip |
str |
What host IP to bind the external port to. |
host_port |
typing.Union[int, float] |
Number of port to expose on the host. |
name |
str |
If specified, this must be an IANA_SVC_NAME and unique within the pod. |
protocol |
str |
Protocol for port. |
container_portRequired ¶
container_port: typing.Union[int, float]
- Type: typing.Union[int, float]
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
host_ipOptional ¶
host_ip: str
- Type: str
What host IP to bind the external port to.
host_portOptional ¶
host_port: typing.Union[int, float]
- Type: typing.Union[int, float]
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.
nameOptional ¶
name: str
- Type: str
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.
protocolOptional ¶
protocol: str
- Type: str
- Default: TCP”.
Protocol for port.
Must be UDP, TCP, or SCTP. Defaults to “TCP”.
ContainerProps ¶
Properties for creating a container.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ContainerProps(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
args |
typing.List[str] |
Arguments to the entrypoint. The docker image’s CMD is used if command is not provided. |
command |
typing.List[str] |
Entrypoint array. |
env_from |
typing.List[EnvFrom] |
List of sources to populate environment variables in the container. |
env_variables |
typing.Mapping[EnvValue] |
Environment variables to set in the container. |
image_pull_policy |
ImagePullPolicy |
Image pull policy for this container. |
lifecycle |
ContainerLifecycle |
Describes actions that the management system should take in response to container lifecycle events. |
liveness |
Probe |
Periodic probe of container liveness. |
name |
str |
Name of the container specified as a DNS_LABEL. |
port |
typing.Union[int, float] |
No description. |
port_number |
typing.Union[int, float] |
Number of port to expose on the pod’s IP address. |
ports |
typing.List[ContainerPort] |
List of ports to expose from this container. |
readiness |
Probe |
Determines when the container is ready to serve traffic. |
resources |
ContainerResources |
Compute resources (CPU and memory requests and limits) required by the container. |
restart_policy |
ContainerRestartPolicy |
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always. |
security_context |
ContainerSecurityContextProps |
SecurityContext defines the security options the container should be run with. |
startup |
Probe |
StartupProbe indicates that the Pod has successfully initialized. |
volume_mounts |
typing.List[VolumeMount] |
Pod volumes to mount into the container’s filesystem. |
working_dir |
str |
Container’s working directory. |
image |
str |
Docker image name. |
argsOptional ¶
args: typing.List[str]
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
command: typing.List[str]
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
env_from: typing.List[EnvFrom]
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
env_variables: typing.Mapping[EnvValue]
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
image_pull_policy: ImagePullPolicy
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
lifecycle: ContainerLifecycle
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
liveness: Probe
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
name: str
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
- Deprecated: - use
portNumber.
port: typing.Union[int, float]
- Type: typing.Union[int, float]
port_numberOptional ¶
port_number: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
ports: typing.List[ContainerPort]
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
readiness: Probe
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
resources: ContainerResources
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
restart_policy: ContainerRestartPolicy
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
security_context: ContainerSecurityContextProps
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
startup: Probe
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
volume_mounts: typing.List[VolumeMount]
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
working_dir: str
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
image: str
- Type: str
Docker image name.
ContainerResizePolicy ¶
ContainerResizePolicy represents resource resize policy for the container.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ContainerResizePolicy(
resource_name: str,
restart_policy: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
resource_name |
str |
Name of the resource to which this resource resize policy applies. |
restart_policy |
str |
Restart policy to apply when specified resource is resized. |
resource_nameRequired ¶
resource_name: str
- Type: str
Name of the resource to which this resource resize policy applies.
Supported values: cpu, memory.
restart_policyRequired ¶
restart_policy: str
- Type: str
Restart policy to apply when specified resource is resized.
If not specified, it defaults to NotRequired.
ContainerResourceMetricSourceV2 ¶
ContainerResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source. Only one “target” type should be set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ContainerResourceMetricSourceV2(
container: str,
name: str,
target: MetricTargetV2
)
Properties ¶
| Name | Type | Description |
|---|---|---|
container |
str |
container is the name of the container in the pods of the scaling target. |
name |
str |
name is the name of the resource in question. |
target |
cdk8s_plus_31.k8s.MetricTargetV2 |
target specifies the target value for the given metric. |
containerRequired ¶
container: str
- Type: str
container is the name of the container in the pods of the scaling target.
nameRequired ¶
name: str
- Type: str
name is the name of the resource in question.
targetRequired ¶
target: MetricTargetV2
- Type: cdk8s_plus_31.k8s.MetricTargetV2
target specifies the target value for the given metric.
ContainerResources ¶
CPU and memory compute resources.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ContainerResources(
cpu: CpuResources = None,
ephemeral_storage: EphemeralStorageResources = None,
memory: MemoryResources = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
cpu |
CpuResources |
No description. |
ephemeral_storage |
EphemeralStorageResources |
No description. |
memory |
MemoryResources |
No description. |
cpuOptional ¶
cpu: CpuResources
- Type: CpuResources
ephemeral_storageOptional ¶
ephemeral_storage: EphemeralStorageResources
memoryOptional ¶
memory: MemoryResources
- Type: MemoryResources
ContainerSecurityContextProps ¶
Properties for ContainerSecurityContext.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ContainerSecurityContextProps(
allow_privilege_escalation: bool = None,
capabilities: ContainerSecutiryContextCapabilities = None,
ensure_non_root: bool = None,
group: typing.Union[int, float] = None,
privileged: bool = None,
read_only_root_filesystem: bool = None,
seccomp_profile: SeccompProfile = None,
user: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
allow_privilege_escalation |
bool |
Whether a process can gain more privileges than its parent process. |
capabilities |
ContainerSecutiryContextCapabilities |
POSIX capabilities for running containers. |
ensure_non_root |
bool |
Indicates that the container must run as a non-root user. |
group |
typing.Union[int, float] |
The GID to run the entrypoint of the container process. |
privileged |
bool |
Run container in privileged mode. |
read_only_root_filesystem |
bool |
Whether this container has a read-only root filesystem. |
seccomp_profile |
SeccompProfile |
Container’s seccomp profile settings. |
user |
typing.Union[int, float] |
The UID to run the entrypoint of the container process. |
allow_privilege_escalationOptional ¶
allow_privilege_escalation: bool
- Type: bool
- Default: false
Whether a process can gain more privileges than its parent process.
capabilitiesOptional ¶
capabilities: ContainerSecutiryContextCapabilities
- Type: ContainerSecutiryContextCapabilities
- Default: none
POSIX capabilities for running containers.
ensure_non_rootOptional ¶
ensure_non_root: bool
- Type: bool
- Default: true
Indicates that the container must run as a non-root user.
If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does.
groupOptional ¶
group: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 26000. An arbitrary number bigger than 9999 is selected here. This is so that the container is blocked to access host files even if somehow it manages to get access to host file system.
The GID to run the entrypoint of the container process.
privilegedOptional ¶
privileged: bool
- Type: bool
- Default: false
Run container in privileged mode.
Processes in privileged containers are essentially equivalent to root on the host.
read_only_root_filesystemOptional ¶
read_only_root_filesystem: bool
- Type: bool
- Default: true
Whether this container has a read-only root filesystem.
seccomp_profileOptional ¶
seccomp_profile: SeccompProfile
- Type: SeccompProfile
- Default: none
Container’s seccomp profile settings.
Only one profile source may be set
userOptional ¶
user: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 25000. An arbitrary number bigger than 9999 is selected here. This is so that the container is blocked to access host files even if somehow it manages to get access to host file system.
The UID to run the entrypoint of the container process.
ContainerSecutiryContextCapabilities ¶
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ContainerSecutiryContextCapabilities(
add: typing.List[Capability] = None,
drop: typing.List[Capability] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
add |
typing.List[Capability] |
Added capabilities. |
drop |
typing.List[Capability] |
Removed capabilities. |
addOptional ¶
add: typing.List[Capability]
- Type: typing.List[Capability]
Added capabilities.
dropOptional ¶
drop: typing.List[Capability]
- Type: typing.List[Capability]
Removed capabilities.
CpuResources ¶
CPU request and limit.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.CpuResources(
limit: Cpu = None,
request: Cpu = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
limit |
Cpu |
No description. |
request |
Cpu |
No description. |
limitOptional ¶
limit: Cpu
- Type: Cpu
requestOptional ¶
request: Cpu
- Type: Cpu
CronJobProps ¶
Properties for CronJob.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.CronJobProps(
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
active_deadline: Duration = None,
backoff_limit: typing.Union[int, float] = None,
ttl_after_finished: Duration = None,
schedule: Cron,
concurrency_policy: ConcurrencyPolicy = None,
failed_jobs_retained: typing.Union[int, float] = None,
starting_deadline: Duration = None,
successful_jobs_retained: typing.Union[int, float] = None,
suspend: bool = None,
time_zone: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
active_deadline |
cdk8s.Duration |
Specifies the duration the job may be active before the system tries to terminate it. |
backoff_limit |
typing.Union[int, float] |
Specifies the number of retries before marking this job failed. |
ttl_after_finished |
cdk8s.Duration |
Limits the lifetime of a Job that has finished execution (either Complete or Failed). |
schedule |
cdk8s.Cron |
Specifies the time in which the job would run again. |
concurrency_policy |
ConcurrencyPolicy |
Specifies the concurrency policy for the job. |
failed_jobs_retained |
typing.Union[int, float] |
Specifies the number of failed jobs history retained. |
starting_deadline |
cdk8s.Duration |
Kubernetes attempts to start cron jobs at its schedule time, but this is not guaranteed. |
successful_jobs_retained |
typing.Union[int, float] |
Specifies the number of successful jobs history retained. |
suspend |
bool |
Specifies if the cron job should be suspended. |
time_zone |
str |
Specifies the timezone for the job. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
dns: PodDnsProps
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
host_network: bool
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
init_containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
isolate: bool
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
security_context: PodSecurityContextProps
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
share_process_namespace: bool
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
pod_metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
select: bool
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
spread: bool
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
active_deadlineOptional ¶
active_deadline: Duration
- Type: cdk8s.Duration
- Default: If unset, then there is no deadline.
Specifies the duration the job may be active before the system tries to terminate it.
backoff_limitOptional ¶
backoff_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: If not set, system defaults to 6.
Specifies the number of retries before marking this job failed.
ttl_after_finishedOptional ¶
ttl_after_finished: Duration
- Type: cdk8s.Duration
- Default: If this field is unset, the Job won’t be automatically deleted.
Limits the lifetime of a Job that has finished execution (either Complete or Failed).
If this field is set, after the Job finishes, it is eligible to
be automatically deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored. If this field is set to zero,
the Job becomes eligible to be deleted immediately after it finishes. This
field is alpha-level and is only honored by servers that enable the
TTLAfterFinished feature.
scheduleRequired ¶
schedule: Cron
- Type: cdk8s.Cron
Specifies the time in which the job would run again.
This is defined as a cron expression in the CronJob resource.
concurrency_policyOptional ¶
concurrency_policy: ConcurrencyPolicy
- Type: ConcurrencyPolicy
- Default: ConcurrencyPolicy.Forbid
Specifies the concurrency policy for the job.
failed_jobs_retainedOptional ¶
failed_jobs_retained: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1
Specifies the number of failed jobs history retained.
This would retain the Job and the associated Pod resource and can be useful for debugging.
starting_deadlineOptional ¶
starting_deadline: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(10)
Kubernetes attempts to start cron jobs at its schedule time, but this is not guaranteed.
This deadline specifies how much time can pass after a schedule point, for which kubernetes can still start the job. For example, if this is set to 100 seconds, kubernetes is allowed to start the job at a maximum 100 seconds after the scheduled time.
Note that the Kubernetes CronJobController checks for things every 10 seconds, for this reason, a deadline below 10 seconds is not allowed, as it may cause your job to never be scheduled.
In addition, kubernetes will stop scheduling jobs if more than 100 schedules were missed (for any reason). This property also controls what time interval should kubernetes consider when counting for missed schedules.
For example, suppose a CronJob is set to schedule a new Job every one minute beginning at 08:30:00,
and its startingDeadline field is not set. If the CronJob controller happens to be down from 08:29:00 to 10:21:00,
the job will not start as the number of missed jobs which missed their schedule is greater than 100.
However, if startingDeadline is set to 200 seconds, kubernetes will only count 3 missed schedules, and thus
start a new execution at 10:22:00.
successful_jobs_retainedOptional ¶
successful_jobs_retained: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 3
Specifies the number of successful jobs history retained.
This would retain the Job and the associated Pod resource and can be useful for debugging.
suspendOptional ¶
suspend: bool
- Type: bool
- Default: false
Specifies if the cron job should be suspended.
Only applies to future executions, current ones are remained untouched.
time_zoneOptional ¶
time_zone: str
- Type: str
- Default: Timezone of kube-controller-manager process.
Specifies the timezone for the job.
This helps aligining the schedule to follow the specified timezone.
CronJobSpec ¶
CronJobSpec describes how the job execution will look like and when it will actually run.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CronJobSpec(
job_template: JobTemplateSpec,
schedule: str,
concurrency_policy: str = None,
failed_jobs_history_limit: typing.Union[int, float] = None,
starting_deadline_seconds: typing.Union[int, float] = None,
successful_jobs_history_limit: typing.Union[int, float] = None,
suspend: bool = None,
time_zone: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
job_template |
cdk8s_plus_31.k8s.JobTemplateSpec |
Specifies the job that will be created when executing a CronJob. |
schedule |
str |
The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. |
concurrency_policy |
str |
Specifies how to treat concurrent executions of a Job. Valid values are:. |
failed_jobs_history_limit |
typing.Union[int, float] |
The number of failed finished jobs to retain. |
starting_deadline_seconds |
typing.Union[int, float] |
Optional deadline in seconds for starting the job if it misses scheduled time for any reason. |
successful_jobs_history_limit |
typing.Union[int, float] |
The number of successful finished jobs to retain. |
suspend |
bool |
This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. |
time_zone |
str |
The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will default to the time zone of the kube-controller-manager process. The set of valid time zone names and the time zone offset is loaded from the system-wide time zone database by the API server during CronJob validation and the controller manager during execution. If no system-wide time zone database can be found a bundled version of the database is used instead. If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host configuration, the controller will stop creating new new Jobs and will create a system event with the reason UnknownTimeZone. More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones. |
job_templateRequired ¶
job_template: JobTemplateSpec
- Type: cdk8s_plus_31.k8s.JobTemplateSpec
Specifies the job that will be created when executing a CronJob.
scheduleRequired ¶
schedule: str
- Type: str
The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
concurrency_policyOptional ¶
concurrency_policy: str
- Type: str
Specifies how to treat concurrent executions of a Job. Valid values are:.
- “Allow” (default): allows CronJobs to run concurrently; - “Forbid”: forbids concurrent runs, skipping next run if previous run hasn’t finished yet; - “Replace”: cancels currently running job and replaces it with a new one
failed_jobs_history_limitOptional ¶
failed_jobs_history_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1.
The number of failed finished jobs to retain.
Value must be non-negative integer. Defaults to 1.
starting_deadline_secondsOptional ¶
starting_deadline_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
Optional deadline in seconds for starting the job if it misses scheduled time for any reason.
Missed jobs executions will be counted as failed ones.
successful_jobs_history_limitOptional ¶
successful_jobs_history_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 3.
The number of successful finished jobs to retain.
Value must be non-negative integer. Defaults to 3.
suspendOptional ¶
suspend: bool
- Type: bool
- Default: false.
This flag tells the controller to suspend subsequent executions, it does not apply to already started executions.
Defaults to false.
time_zoneOptional ¶
time_zone: str
- Type: str
The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will default to the time zone of the kube-controller-manager process. The set of valid time zone names and the time zone offset is loaded from the system-wide time zone database by the API server during CronJob validation and the controller manager during execution. If no system-wide time zone database can be found a bundled version of the database is used instead. If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host configuration, the controller will stop creating new new Jobs and will create a system event with the reason UnknownTimeZone. More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones.
CrossVersionObjectReference ¶
CrossVersionObjectReference contains enough information to let you identify the referred resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CrossVersionObjectReference(
kind: str,
name: str,
api_version: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kind |
str |
kind is the kind of the referent; |
name |
str |
name is the name of the referent; |
api_version |
str |
apiVersion is the API version of the referent. |
kindRequired ¶
kind: str
- Type: str
kind is the kind of the referent;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
nameRequired ¶
name: str
- Type: str
name is the name of the referent;
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
api_versionOptional ¶
api_version: str
- Type: str
apiVersion is the API version of the referent.
CrossVersionObjectReferenceV2 ¶
CrossVersionObjectReference contains enough information to let you identify the referred resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CrossVersionObjectReferenceV2(
kind: str,
name: str,
api_version: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kind |
str |
kind is the kind of the referent; |
name |
str |
name is the name of the referent; |
api_version |
str |
apiVersion is the API version of the referent. |
kindRequired ¶
kind: str
- Type: str
kind is the kind of the referent;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
nameRequired ¶
name: str
- Type: str
name is the name of the referent;
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
api_versionOptional ¶
api_version: str
- Type: str
apiVersion is the API version of the referent.
CsiDriverSpec ¶
CSIDriverSpec is the specification of a CSIDriver.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CsiDriverSpec(
attach_required: bool = None,
fs_group_policy: str = None,
pod_info_on_mount: bool = None,
requires_republish: bool = None,
se_linux_mount: bool = None,
storage_capacity: bool = None,
token_requests: typing.List[TokenRequest] = None,
volume_lifecycle_modes: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
attach_required |
bool |
attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting. |
fs_group_policy |
str |
fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted. |
pod_info_on_mount |
bool |
podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false. |
requires_republish |
bool |
requiresRepublish indicates the CSI driver wants NodePublishVolume being periodically called to reflect any possible change in the mounted volume. |
se_linux_mount |
bool |
seLinuxMount specifies if the CSI driver supports “-o context” mount option. |
storage_capacity |
bool |
storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information, if set to true. |
token_requests |
typing.List[cdk8s_plus_31.k8s.TokenRequest] |
tokenRequests indicates the CSI driver needs pods’ service account tokens it is mounting volume for to do necessary authentication. |
volume_lifecycle_modes |
typing.List[str] |
volumeLifecycleModes defines what kind of volumes this CSI volume driver supports. |
attach_requiredOptional ¶
attach_required: bool
- Type: bool
attachRequired indicates this CSI volume driver requires an attach operation (because it implements the CSI ControllerPublishVolume() method), and that the Kubernetes attach detach controller should call the attach volume interface which checks the volumeattachment status and waits until the volume is attached before proceeding to mounting.
The CSI external-attacher coordinates with CSI volume driver and updates the volumeattachment status when the attach operation is complete. If the CSIDriverRegistry feature gate is enabled and the value is specified to false, the attach operation will be skipped. Otherwise the attach operation will be called.
This field is immutable.
fs_group_policyOptional ¶
fs_group_policy: str
- Type: str
- Default: ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume’s access mode contains ReadWriteOnce.
fsGroupPolicy defines if the underlying volume supports changing ownership and permission of the volume before being mounted.
Refer to the specific FSGroupPolicy values for additional details.
This field was immutable in Kubernetes < 1.29 and now is mutable.
Defaults to ReadWriteOnceWithFSType, which will examine each volume to determine if Kubernetes should modify ownership and permissions of the volume. With the default policy the defined fsGroup will only be applied if a fstype is defined and the volume’s access mode contains ReadWriteOnce.
pod_info_on_mountOptional ¶
pod_info_on_mount: bool
- Type: bool
- Default: false.
podInfoOnMount indicates this CSI volume driver requires additional pod information (like podName, podUID, etc.) during mount operations, if set to true. If set to false, pod information will not be passed on mount. Default is false.
The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext.
The following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. “csi.storage.k8s.io/pod.name”: pod.Name “csi.storage.k8s.io/pod.namespace”: pod.Namespace “csi.storage.k8s.io/pod.uid”: string(pod.UID) “csi.storage.k8s.io/ephemeral”: “true” if the volume is an ephemeral inline volume defined by a CSIVolumeSource, otherwise “false”
“csi.storage.k8s.io/ephemeral” is a new feature in Kubernetes 1.16. It is only required for drivers which support both the “Persistent” and “Ephemeral” VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn’t support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver.
This field was immutable in Kubernetes < 1.29 and now is mutable.
requires_republishOptional ¶
requires_republish: bool
- Type: bool
requiresRepublish indicates the CSI driver wants NodePublishVolume being periodically called to reflect any possible change in the mounted volume.
This field defaults to false.
Note: After a successful initial NodePublishVolume call, subsequent calls to NodePublishVolume should only update the contents of the volume. New mount points will not be seen by a running container.
se_linux_mountOptional ¶
se_linux_mount: bool
- Type: bool
- Default: false”.
seLinuxMount specifies if the CSI driver supports “-o context” mount option.
When “true”, the CSI driver must ensure that all volumes provided by this CSI driver can be mounted separately with different -o context options. This is typical for storage backends that provide volumes as filesystems on block devices or as independent shared volumes. Kubernetes will call NodeStage / NodePublish with “-o context=xyz” mount option when mounting a ReadWriteOncePod volume used in Pod that has explicitly set SELinux context. In the future, it may be expanded to other volume AccessModes. In any case, Kubernetes will ensure that the volume is mounted only with a single SELinux context.
When “false”, Kubernetes won’t pass any special SELinux mount options to the driver. This is typical for volumes that represent subdirectories of a bigger shared filesystem.
Default is “false”.
storage_capacityOptional ¶
storage_capacity: bool
- Type: bool
storageCapacity indicates that the CSI volume driver wants pod scheduling to consider the storage capacity that the driver deployment will report by creating CSIStorageCapacity objects with capacity information, if set to true.
The check can be enabled immediately when deploying a driver. In that case, provisioning new volumes with late binding will pause until the driver deployment has published some suitable CSIStorageCapacity object.
Alternatively, the driver can be deployed with the field unset or false and it can be flipped later when storage capacity information has been published.
This field was immutable in Kubernetes <= 1.22 and now is mutable.
token_requestsOptional ¶
token_requests: typing.List[TokenRequest]
- Type: typing.List[cdk8s_plus_31.k8s.TokenRequest]
tokenRequests indicates the CSI driver needs pods’ service account tokens it is mounting volume for to do necessary authentication.
Kubelet will pass the tokens in VolumeContext in the CSI NodePublishVolume calls. The CSI driver should parse and validate the following VolumeContext: “csi.storage.k8s.io/serviceAccount.tokens”: {
“
Note: Audience in each TokenRequest should be different and at most one token is empty string. To receive a new token after expiry, RequiresRepublish can be used to trigger NodePublishVolume periodically.
volume_lifecycle_modesOptional ¶
volume_lifecycle_modes: typing.List[str]
- Type: typing.List[str]
volumeLifecycleModes defines what kind of volumes this CSI volume driver supports.
The default if the list is empty is “Persistent”, which is the usage defined by the CSI specification and implemented in Kubernetes via the usual PV/PVC mechanism.
The other mode is “Ephemeral”. In this mode, volumes are defined inline inside the pod spec with CSIVolumeSource and their lifecycle is tied to the lifecycle of that pod. A driver has to be aware of this because it is only going to get a NodePublishVolume call for such a volume.
For more information about implementing this mode, see https://kubernetes-csi.github.io/docs/ephemeral-local-volumes.html A driver can support one or more of these modes and more modes may be added in the future.
This field is beta. This field is immutable.
CsiNodeDriver ¶
CSINodeDriver holds information about the specification of one CSI driver installed on a node.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CsiNodeDriver(
name: str,
node_id: str,
allocatable: VolumeNodeResources = None,
topology_keys: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name represents the name of the CSI driver that this object refers to. |
node_id |
str |
nodeID of the node from the driver point of view. |
allocatable |
cdk8s_plus_31.k8s.VolumeNodeResources |
allocatable represents the volume resources of a node that are available for scheduling. |
topology_keys |
typing.List[str] |
topologyKeys is the list of keys supported by the driver. |
nameRequired ¶
name: str
- Type: str
name represents the name of the CSI driver that this object refers to.
This MUST be the same name returned by the CSI GetPluginName() call for that driver.
node_idRequired ¶
node_id: str
- Type: str
nodeID of the node from the driver point of view.
This field enables Kubernetes to communicate with storage systems that do not share the same nomenclature for nodes. For example, Kubernetes may refer to a given node as “node1”, but the storage system may refer to the same node as “nodeA”. When Kubernetes issues a command to the storage system to attach a volume to a specific node, it can use this field to refer to the node name using the ID that the storage system will understand, e.g. “nodeA” instead of “node1”. This field is required.
allocatableOptional ¶
allocatable: VolumeNodeResources
- Type: cdk8s_plus_31.k8s.VolumeNodeResources
allocatable represents the volume resources of a node that are available for scheduling.
This field is beta.
topology_keysOptional ¶
topology_keys: typing.List[str]
- Type: typing.List[str]
topologyKeys is the list of keys supported by the driver.
When a driver is initialized on a cluster, it provides a set of topology keys that it understands (e.g. “company.com/zone”, “company.com/region”). When a driver is initialized on a node, it provides the same topology keys along with values. Kubelet will expose these topology keys as labels on its own node object. When Kubernetes does topology aware provisioning, it can use this list to determine which labels it should retrieve from the node object and pass back to the driver. It is possible for different nodes to use different topology keys. This can be empty if driver does not support topology.
CsiNodeSpec ¶
CSINodeSpec holds information about the specification of all CSI drivers installed on a node.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CsiNodeSpec(
drivers: typing.List[CsiNodeDriver]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
drivers |
typing.List[cdk8s_plus_31.k8s.CsiNodeDriver] |
drivers is a list of information of all CSI Drivers existing on a node. |
driversRequired ¶
drivers: typing.List[CsiNodeDriver]
- Type: typing.List[cdk8s_plus_31.k8s.CsiNodeDriver]
drivers is a list of information of all CSI Drivers existing on a node.
If all drivers in the list are uninstalled, this can become empty.
CsiPersistentVolumeSource ¶
Represents storage that is managed by an external CSI volume driver (Beta feature).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CsiPersistentVolumeSource(
driver: str,
volume_handle: str,
controller_expand_secret_ref: SecretReference = None,
controller_publish_secret_ref: SecretReference = None,
fs_type: str = None,
node_expand_secret_ref: SecretReference = None,
node_publish_secret_ref: SecretReference = None,
node_stage_secret_ref: SecretReference = None,
read_only: bool = None,
volume_attributes: typing.Mapping[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
driver |
str |
driver is the name of the driver to use for this volume. |
volume_handle |
str |
volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. |
controller_expand_secret_ref |
cdk8s_plus_31.k8s.SecretReference |
controllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call. |
controller_publish_secret_ref |
cdk8s_plus_31.k8s.SecretReference |
controllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. |
fs_type |
str |
fsType to mount. |
node_expand_secret_ref |
cdk8s_plus_31.k8s.SecretReference |
nodeExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeExpandVolume call. |
node_publish_secret_ref |
cdk8s_plus_31.k8s.SecretReference |
nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. |
node_stage_secret_ref |
cdk8s_plus_31.k8s.SecretReference |
nodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. |
read_only |
bool |
readOnly value to pass to ControllerPublishVolumeRequest. |
volume_attributes |
typing.Mapping[str] |
volumeAttributes of the volume to publish. |
driverRequired ¶
driver: str
- Type: str
driver is the name of the driver to use for this volume.
Required.
volume_handleRequired ¶
volume_handle: str
- Type: str
volumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls.
Required.
controller_expand_secret_refOptional ¶
controller_expand_secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
controllerExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerExpandVolume call.
This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.
controller_publish_secret_refOptional ¶
controller_publish_secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
controllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls.
This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.
fs_typeOptional ¶
fs_type: str
- Type: str
fsType to mount.
Must be a filesystem type supported by the host operating system. Ex. “ext4”, “xfs”, “ntfs”.
node_expand_secret_refOptional ¶
node_expand_secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
nodeExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeExpandVolume call.
This field is optional, may be omitted if no secret is required. If the secret object contains more than one secret, all secrets are passed.
node_publish_secret_refOptional ¶
node_publish_secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls.
This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.
node_stage_secret_refOptional ¶
node_stage_secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
nodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls.
This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false (read/write).
readOnly value to pass to ControllerPublishVolumeRequest.
Defaults to false (read/write).
volume_attributesOptional ¶
volume_attributes: typing.Mapping[str]
- Type: typing.Mapping[str]
volumeAttributes of the volume to publish.
CsiVolumeOptions ¶
Options for the CSI driver based volume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.CsiVolumeOptions(
attributes: typing.Mapping[str] = None,
fs_type: str = None,
name: str = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
attributes |
typing.Mapping[str] |
Any driver-specific attributes to pass to the CSI volume builder. |
fs_type |
str |
The filesystem type to mount. |
name |
str |
The volume name. |
read_only |
bool |
Whether the mounted volume should be read-only or not. |
attributesOptional ¶
attributes: typing.Mapping[str]
- Type: typing.Mapping[str]
- Default: undefined
Any driver-specific attributes to pass to the CSI volume builder.
fs_typeOptional ¶
fs_type: str
- Type: str
- Default: driver-dependent
The filesystem type 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.
nameOptional ¶
name: str
- Type: str
- Default: auto-generated
The volume name.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Whether the mounted volume should be read-only or not.
CsiVolumeSource ¶
Represents a source location of a volume to mount, managed by an external CSI driver.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CsiVolumeSource(
driver: str,
fs_type: str = None,
node_publish_secret_ref: LocalObjectReference = None,
read_only: bool = None,
volume_attributes: typing.Mapping[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
driver |
str |
driver is the name of the CSI driver that handles this volume. |
fs_type |
str |
fsType to mount. |
node_publish_secret_ref |
cdk8s_plus_31.k8s.LocalObjectReference |
nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. |
read_only |
bool |
readOnly specifies a read-only configuration for the volume. |
volume_attributes |
typing.Mapping[str] |
volumeAttributes stores driver-specific properties that are passed to the CSI driver. |
driverRequired ¶
driver: str
- Type: str
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.
fs_typeOptional ¶
fs_type: str
- Type: str
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.
node_publish_secret_refOptional ¶
node_publish_secret_ref: LocalObjectReference
- Type: cdk8s_plus_31.k8s.LocalObjectReference
nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls.
This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false (read/write).
readOnly specifies a read-only configuration for the volume.
Defaults to false (read/write).
volume_attributesOptional ¶
volume_attributes: typing.Mapping[str]
- Type: typing.Mapping[str]
volumeAttributes stores driver-specific properties that are passed to the CSI driver.
Consult your driver’s documentation for supported values.
CustomResourceColumnDefinition ¶
CustomResourceColumnDefinition specifies a column for server side printing.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CustomResourceColumnDefinition(
json_path: str,
name: str,
type: str,
description: str = None,
format: str = None,
priority: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
json_path |
str |
jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column. |
name |
str |
name is a human readable name for the column. |
type |
str |
type is an OpenAPI type definition for this column. |
description |
str |
description is a human readable description of this column. |
format |
str |
format is an optional OpenAPI type definition for this column. |
priority |
typing.Union[int, float] |
priority is an integer defining the relative importance of this column compared to others. |
json_pathRequired ¶
json_path: str
- Type: str
jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against each custom resource to produce the value for this column.
nameRequired ¶
name: str
- Type: str
name is a human readable name for the column.
typeRequired ¶
type: str
- Type: str
type is an OpenAPI type definition for this column.
See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
descriptionOptional ¶
description: str
- Type: str
description is a human readable description of this column.
formatOptional ¶
format: str
- Type: str
format is an optional OpenAPI type definition for this column.
The ‘name’ format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details.
priorityOptional ¶
priority: typing.Union[int, float]
- Type: typing.Union[int, float]
priority is an integer defining the relative importance of this column compared to others.
Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a priority greater than 0.
CustomResourceConversion ¶
CustomResourceConversion describes how to convert different versions of a CR.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CustomResourceConversion(
strategy: str,
webhook: WebhookConversion = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
strategy |
str |
strategy specifies how custom resources are converted between versions. |
webhook |
cdk8s_plus_31.k8s.WebhookConversion |
webhook describes how to call the conversion webhook. |
strategyRequired ¶
strategy: str
- Type: str
strategy specifies how custom resources are converted between versions.
Allowed values are: - "None": The converter only change the apiVersion and would not touch any other field in the custom resource. - "Webhook": API Server will call to an external webhook to do the conversion. Additional information
is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set.
webhookOptional ¶
webhook: WebhookConversion
- Type: cdk8s_plus_31.k8s.WebhookConversion
webhook describes how to call the conversion webhook.
Required when strategy is set to "Webhook".
CustomResourceDefinitionNames ¶
CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CustomResourceDefinitionNames(
kind: str,
plural: str,
categories: typing.List[str] = None,
list_kind: str = None,
short_names: typing.List[str] = None,
singular: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kind |
str |
kind is the serialized kind of the resource. |
plural |
str |
plural is the plural name of the resource to serve. |
categories |
typing.List[str] |
categories is a list of grouped resources this custom resource belongs to (e.g. ‘all’). This is published in API discovery documents, and used by clients to support invocations like kubectl get all. |
list_kind |
str |
listKind is the serialized kind of the list for this resource. |
short_names |
typing.List[str] |
shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like kubectl get <shortname>. |
singular |
str |
singular is the singular name of the resource. |
kindRequired ¶
kind: str
- Type: str
kind is the serialized kind of the resource.
It is normally CamelCase and singular. Custom resource instances will use this value as the kind attribute in API calls.
pluralRequired ¶
plural: str
- Type: str
plural is the plural name of the resource to serve.
The custom resources are served under /apis/<group>/<version>/.../<plural>. Must match the name of the CustomResourceDefinition (in the form <names.plural>.<group>). Must be all lowercase.
categoriesOptional ¶
categories: typing.List[str]
- Type: typing.List[str]
categories is a list of grouped resources this custom resource belongs to (e.g. ‘all’). This is published in API discovery documents, and used by clients to support invocations like kubectl get all.
list_kindOptional ¶
list_kind: str
- Type: str
- Default: kind`List”.
listKind is the serialized kind of the list for this resource.
Defaults to “kindList”.
short_namesOptional ¶
short_names: typing.List[str]
- Type: typing.List[str]
shortNames are short names for the resource, exposed in API discovery documents, and used by clients to support invocations like kubectl get <shortname>.
It must be all lowercase.
singularOptional ¶
singular: str
- Type: str
- Default: lowercased
kind.
singular is the singular name of the resource.
It must be all lowercase. Defaults to lowercased kind.
CustomResourceDefinitionSpec ¶
CustomResourceDefinitionSpec describes how a user wants their resource to appear.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CustomResourceDefinitionSpec(
group: str,
names: CustomResourceDefinitionNames,
scope: str,
versions: typing.List[CustomResourceDefinitionVersion],
conversion: CustomResourceConversion = None,
preserve_unknown_fields: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
group |
str |
group is the API group of the defined custom resource. |
names |
cdk8s_plus_31.k8s.CustomResourceDefinitionNames |
names specify the resource and kind names for the custom resource. |
scope |
str |
scope indicates whether the defined custom resource is cluster- or namespace-scoped. |
versions |
typing.List[cdk8s_plus_31.k8s.CustomResourceDefinitionVersion] |
versions is the list of all API versions of the defined custom resource. |
conversion |
cdk8s_plus_31.k8s.CustomResourceConversion |
conversion defines conversion settings for the CRD. |
preserve_unknown_fields |
bool |
preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. |
groupRequired ¶
group: str
- Type: str
group is the API group of the defined custom resource.
The custom resources are served under /apis/<group>/.... Must match the name of the CustomResourceDefinition (in the form <names.plural>.<group>).
namesRequired ¶
names: CustomResourceDefinitionNames
- Type: cdk8s_plus_31.k8s.CustomResourceDefinitionNames
names specify the resource and kind names for the custom resource.
scopeRequired ¶
scope: str
- Type: str
scope indicates whether the defined custom resource is cluster- or namespace-scoped.
Allowed values are Cluster and Namespaced.
versionsRequired ¶
versions: typing.List[CustomResourceDefinitionVersion]
- Type: typing.List[cdk8s_plus_31.k8s.CustomResourceDefinitionVersion]
versions is the list of all API versions of the defined custom resource.
Version names are used to compute the order in which served versions are listed in API discovery. If the version string is “kube-like”, it will sort above non “kube-like” version strings, which are ordered lexicographically. “Kube-like” versions start with a “v”, then are followed by a number (the major version), then optionally the string “alpha” or “beta” and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
conversionOptional ¶
conversion: CustomResourceConversion
- Type: cdk8s_plus_31.k8s.CustomResourceConversion
conversion defines conversion settings for the CRD.
preserve_unknown_fieldsOptional ¶
preserve_unknown_fields: bool
- Type: bool
preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage.
apiVersion, kind, metadata and known fields inside metadata are always preserved. This field is deprecated in favor of setting x-preserve-unknown-fields to true in spec.versions[*].schema.openAPIV3Schema. See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details.
CustomResourceDefinitionVersion ¶
CustomResourceDefinitionVersion describes a version for CRD.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CustomResourceDefinitionVersion(
name: str,
served: bool,
storage: bool,
additional_printer_columns: typing.List[CustomResourceColumnDefinition] = None,
deprecated: bool = None,
deprecation_warning: str = None,
schema: CustomResourceValidation = None,
selectable_fields: typing.List[SelectableField] = None,
subresources: CustomResourceSubresources = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at /apis/<group>/<version>/... if served is true. |
served |
bool |
served is a flag enabling/disabling this version from being served via REST APIs. |
storage |
bool |
storage indicates this version should be used when persisting custom resources to storage. |
additional_printer_columns |
typing.List[cdk8s_plus_31.k8s.CustomResourceColumnDefinition] |
additionalPrinterColumns specifies additional columns returned in Table output. |
deprecated |
bool |
deprecated indicates this version of the custom resource API is deprecated. |
deprecation_warning |
str |
deprecationWarning overrides the default warning returned to API clients. |
schema |
cdk8s_plus_31.k8s.CustomResourceValidation |
schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. |
selectable_fields |
typing.List[cdk8s_plus_31.k8s.SelectableField] |
selectableFields specifies paths to fields that may be used as field selectors. |
subresources |
cdk8s_plus_31.k8s.CustomResourceSubresources |
subresources specify what subresources this version of the defined custom resource have. |
nameRequired ¶
name: str
- Type: str
name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at /apis/<group>/<version>/... if served is true.
servedRequired ¶
served: bool
- Type: bool
served is a flag enabling/disabling this version from being served via REST APIs.
storageRequired ¶
storage: bool
- Type: bool
storage indicates this version should be used when persisting custom resources to storage.
There must be exactly one version with storage=true.
additional_printer_columnsOptional ¶
additional_printer_columns: typing.List[CustomResourceColumnDefinition]
- Type: typing.List[cdk8s_plus_31.k8s.CustomResourceColumnDefinition]
additionalPrinterColumns specifies additional columns returned in Table output.
See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
deprecatedOptional ¶
deprecated: bool
- Type: bool
- Default: false.
deprecated indicates this version of the custom resource API is deprecated.
When set to true, API requests to this version receive a warning header in the server response. Defaults to false.
deprecation_warningOptional ¶
deprecation_warning: str
- Type: str
deprecationWarning overrides the default warning returned to API clients.
May only be set when deprecated is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.
schemaOptional ¶
schema: CustomResourceValidation
- Type: cdk8s_plus_31.k8s.CustomResourceValidation
schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.
selectable_fieldsOptional ¶
selectable_fields: typing.List[SelectableField]
- Type: typing.List[cdk8s_plus_31.k8s.SelectableField]
selectableFields specifies paths to fields that may be used as field selectors.
A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
subresourcesOptional ¶
subresources: CustomResourceSubresources
- Type: cdk8s_plus_31.k8s.CustomResourceSubresources
subresources specify what subresources this version of the defined custom resource have.
CustomResourceSubresources ¶
CustomResourceSubresources defines the status and scale subresources for CustomResources.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CustomResourceSubresources(
scale: CustomResourceSubresourceScale = None,
status: typing.Any = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
scale |
cdk8s_plus_31.k8s.CustomResourceSubresourceScale |
scale indicates the custom resource should serve a /scale subresource that returns an autoscaling/v1 Scale object. |
status |
typing.Any |
status indicates the custom resource should serve a /status subresource. |
scaleOptional ¶
scale: CustomResourceSubresourceScale
- Type: cdk8s_plus_31.k8s.CustomResourceSubresourceScale
scale indicates the custom resource should serve a /scale subresource that returns an autoscaling/v1 Scale object.
statusOptional ¶
status: typing.Any
- Type: typing.Any
status indicates the custom resource should serve a /status subresource.
When enabled: 1. requests to the custom resource primary endpoint ignore changes to the status stanza of the object. 2. requests to the custom resource /status subresource ignore changes to anything other than the status stanza of the object.
CustomResourceSubresourceScale ¶
CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CustomResourceSubresourceScale(
spec_replicas_path: str,
status_replicas_path: str,
label_selector_path: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec_replicas_path |
str |
specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale spec.replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .spec. If there is no value under the given path in the custom resource, the /scale subresource will return an error on GET. |
status_replicas_path |
str |
statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale status.replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. If there is no value under the given path in the custom resource, the status.replicas value in the /scale subresource will default to 0. |
label_selector_path |
str |
labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale status.selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status or .spec. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the status.selector value in the /scale subresource will default to the empty string. |
spec_replicas_pathRequired ¶
spec_replicas_path: str
- Type: str
specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale spec.replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .spec. If there is no value under the given path in the custom resource, the /scale subresource will return an error on GET.
status_replicas_pathRequired ¶
status_replicas_path: str
- Type: str
statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale status.replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. If there is no value under the given path in the custom resource, the status.replicas value in the /scale subresource will default to 0.
label_selector_pathOptional ¶
label_selector_path: str
- Type: str
labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale status.selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status or .spec. Must be set to work with HorizontalPodAutoscaler. The field pointed by this JSON path must be a string field (not a complex selector struct) which contains a serialized label selector in string form. More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource If there is no value under the given path in the custom resource, the status.selector value in the /scale subresource will default to the empty string.
CustomResourceValidation ¶
CustomResourceValidation is a list of validation methods for CustomResources.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.CustomResourceValidation(
open_apiv3_schema: JsonSchemaProps = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
open_apiv3_schema |
cdk8s_plus_31.k8s.JsonSchemaProps |
openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. |
open_apiv3_schemaOptional ¶
open_apiv3_schema: JsonSchemaProps
- Type: cdk8s_plus_31.k8s.JsonSchemaProps
openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning.
DaemonSetProps ¶
Properties for DaemonSet.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.DaemonSetProps(
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
min_ready_seconds: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
min_ready_seconds |
typing.Union[int, float] |
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
dns: PodDnsProps
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
host_network: bool
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
init_containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
isolate: bool
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
security_context: PodSecurityContextProps
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
share_process_namespace: bool
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
pod_metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
select: bool
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
spread: bool
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
min_ready_secondsOptional ¶
min_ready_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 0
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
DaemonSetSpec ¶
DaemonSetSpec is the specification of a daemon set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DaemonSetSpec(
selector: LabelSelector,
template: PodTemplateSpec,
min_ready_seconds: typing.Union[int, float] = None,
revision_history_limit: typing.Union[int, float] = None,
update_strategy: DaemonSetUpdateStrategy = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
selector |
cdk8s_plus_31.k8s.LabelSelector |
A label query over pods that are managed by the daemon set. |
template |
cdk8s_plus_31.k8s.PodTemplateSpec |
An object that describes the pod that will be created. |
min_ready_seconds |
typing.Union[int, float] |
The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available. |
revision_history_limit |
typing.Union[int, float] |
The number of old history to retain to allow rollback. |
update_strategy |
cdk8s_plus_31.k8s.DaemonSetUpdateStrategy |
An update strategy to replace existing DaemonSet pods with new pods. |
selectorRequired ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
A label query over pods that are managed by the daemon set.
Must match in order to be controlled. It must match the pod template’s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
templateRequired ¶
template: PodTemplateSpec
- Type: cdk8s_plus_31.k8s.PodTemplateSpec
An object that describes the pod that will be created.
The DaemonSet will create exactly one copy of this pod on every node that matches the template’s node selector (or on every node if no node selector is specified). The only allowed template.spec.restartPolicy value is “Always”. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
min_ready_secondsOptional ¶
min_ready_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 0 (pod will be considered available as soon as it is ready).
The minimum number of seconds for which a newly created DaemonSet pod should be ready without any of its container crashing, for it to be considered available.
Defaults to 0 (pod will be considered available as soon as it is ready).
revision_history_limitOptional ¶
revision_history_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 10.
The number of old history to retain to allow rollback.
This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.
update_strategyOptional ¶
update_strategy: DaemonSetUpdateStrategy
- Type: cdk8s_plus_31.k8s.DaemonSetUpdateStrategy
An update strategy to replace existing DaemonSet pods with new pods.
DaemonSetUpdateStrategy ¶
DaemonSetUpdateStrategy is a struct used to control the update strategy for a DaemonSet.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DaemonSetUpdateStrategy(
rolling_update: RollingUpdateDaemonSet = None,
type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
rolling_update |
cdk8s_plus_31.k8s.RollingUpdateDaemonSet |
Rolling update config params. |
type |
str |
Type of daemon set update. |
rolling_updateOptional ¶
rolling_update: RollingUpdateDaemonSet
- Type: cdk8s_plus_31.k8s.RollingUpdateDaemonSet
Rolling update config params.
Present only if type = “RollingUpdate”.
typeOptional ¶
type: str
- Type: str
- Default: RollingUpdate.
Type of daemon set update.
Can be “RollingUpdate” or “OnDelete”. Default is RollingUpdate.
DeleteOptions ¶
DeleteOptions may be provided when deleting an API object.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeleteOptions(
api_version: str = None,
dry_run: typing.List[str] = None,
grace_period_seconds: typing.Union[int, float] = None,
kind: IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind = None,
orphan_dependents: bool = None,
preconditions: Preconditions = None,
propagation_policy: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
APIVersion defines the versioned schema of this representation of an object. |
dry_run |
typing.List[str] |
When present, indicates that modifications should not be persisted. |
grace_period_seconds |
typing.Union[int, float] |
The duration in seconds before the object should be deleted. |
kind |
cdk8s_plus_31.k8s.IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind |
Kind is a string value representing the REST resource this object represents. |
orphan_dependents |
bool |
Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the “orphan” finalizer will be added to/removed from the object’s finalizers list. Either this field or PropagationPolicy may be set, but not both. |
preconditions |
cdk8s_plus_31.k8s.Preconditions |
Must be fulfilled before a deletion is carried out. |
propagation_policy |
str |
Whether and how garbage collection will be performed. |
api_versionOptional ¶
api_version: str
- Type: str
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
dry_runOptional ¶
dry_run: typing.List[str]
- Type: typing.List[str]
When present, indicates that modifications should not be persisted.
An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
grace_period_secondsOptional ¶
grace_period_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: a per object value if not specified. zero means delete immediately.
The duration in seconds before the object should be deleted.
Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately.
kindOptional ¶
kind: IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind
- Type: cdk8s_plus_31.k8s.IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind
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
orphan_dependentsOptional ¶
orphan_dependents: bool
- Type: bool
Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the “orphan” finalizer will be added to/removed from the object’s finalizers list. Either this field or PropagationPolicy may be set, but not both.
preconditionsOptional ¶
preconditions: Preconditions
- Type: cdk8s_plus_31.k8s.Preconditions
Must be fulfilled before a deletion is carried out.
If not possible, a 409 Conflict status will be returned.
propagation_policyOptional ¶
propagation_policy: str
- Type: str
Whether and how garbage collection will be performed.
Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: ‘Orphan’ - orphan the dependents; ‘Background’ - allow the garbage collector to delete the dependents in the background; ‘Foreground’ - a cascading policy that deletes all dependents in the foreground.
DeploymentExposeViaServiceOptions ¶
Options for Deployment.exposeViaService.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.DeploymentExposeViaServiceOptions(
name: str = None,
ports: typing.List[ServicePort] = None,
service_type: ServiceType = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The name of the service to expose. |
ports |
typing.List[ServicePort] |
The ports that the service should bind to. |
service_type |
ServiceType |
The type of the exposed service. |
nameOptional ¶
name: str
- Type: str
- Default: auto generated.
The name of the service to expose.
If you’d like to expose the deployment multiple times, you must explicitly set a name starting from the second expose call.
portsOptional ¶
ports: typing.List[ServicePort]
- Type: typing.List[ServicePort]
- Default: extracted from the deployment.
The ports that the service should bind to.
service_typeOptional ¶
service_type: ServiceType
- Type: ServiceType
- Default: ClusterIP.
The type of the exposed service.
DeploymentProps ¶
Properties for Deployment.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.DeploymentProps(
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
min_ready: Duration = None,
progress_deadline: Duration = None,
replicas: typing.Union[int, float] = None,
revision_history_limit: typing.Union[int, float] = None,
strategy: DeploymentStrategy = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
min_ready |
cdk8s.Duration |
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
progress_deadline |
cdk8s.Duration |
The maximum duration for a deployment to make progress before it is considered to be failed. |
replicas |
typing.Union[int, float] |
Number of desired pods. |
revision_history_limit |
typing.Union[int, float] |
Specify how many old ReplicaSets for this Deployment you want to retain. |
strategy |
DeploymentStrategy |
Specifies the strategy used to replace old Pods by new ones. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
dns: PodDnsProps
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
host_network: bool
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
init_containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
isolate: bool
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
security_context: PodSecurityContextProps
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
share_process_namespace: bool
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
pod_metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
select: bool
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
spread: bool
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
min_readyOptional ¶
min_ready: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(0)
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
Zero means the pod will be considered available as soon as it is ready.
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds
progress_deadlineOptional ¶
progress_deadline: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(600)
The maximum duration for a deployment to make progress before it is considered to be failed.
The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status.
Note that progress will not be estimated during the time a deployment is paused.
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#progress-deadline-seconds
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 2
Number of desired pods.
revision_history_limitOptional ¶
revision_history_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 10
Specify how many old ReplicaSets for this Deployment you want to retain.
The rest will be garbage-collected in the background. By default, it is 10.
strategyOptional ¶
strategy: DeploymentStrategy
- Type: DeploymentStrategy
- Default: RollingUpdate with maxSurge and maxUnavailable set to 25%.
Specifies the strategy used to replace old Pods by new ones.
DeploymentSpec ¶
DeploymentSpec is the specification of the desired behavior of the Deployment.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeploymentSpec(
selector: LabelSelector,
template: PodTemplateSpec,
min_ready_seconds: typing.Union[int, float] = None,
paused: bool = None,
progress_deadline_seconds: typing.Union[int, float] = None,
replicas: typing.Union[int, float] = None,
revision_history_limit: typing.Union[int, float] = None,
strategy: DeploymentStrategy = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
selector |
cdk8s_plus_31.k8s.LabelSelector |
Label selector for pods. |
template |
cdk8s_plus_31.k8s.PodTemplateSpec |
Template describes the pods that will be created. |
min_ready_seconds |
typing.Union[int, float] |
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
paused |
bool |
Indicates that the deployment is paused. |
progress_deadline_seconds |
typing.Union[int, float] |
The maximum time in seconds for a deployment to make progress before it is considered to be failed. |
replicas |
typing.Union[int, float] |
Number of desired pods. |
revision_history_limit |
typing.Union[int, float] |
The number of old ReplicaSets to retain to allow rollback. |
strategy |
cdk8s_plus_31.k8s.DeploymentStrategy |
The deployment strategy to use to replace existing pods with new ones. |
selectorRequired ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
Label selector for pods.
Existing ReplicaSets whose pods are selected by this will be the ones affected by this deployment. It must match the pod template’s labels.
templateRequired ¶
template: PodTemplateSpec
- Type: cdk8s_plus_31.k8s.PodTemplateSpec
Template describes the pods that will be created.
The only allowed template.spec.restartPolicy value is “Always”.
min_ready_secondsOptional ¶
min_ready_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 0 (pod will be considered available as soon as it is ready)
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
Defaults to 0 (pod will be considered available as soon as it is ready)
pausedOptional ¶
paused: bool
- Type: bool
Indicates that the deployment is paused.
progress_deadline_secondsOptional ¶
progress_deadline_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 600s.
The maximum time in seconds for a deployment to make progress before it is considered to be failed.
The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s.
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1.
Number of desired pods.
This is a pointer to distinguish between explicit zero and not specified. Defaults to 1.
revision_history_limitOptional ¶
revision_history_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 10.
The number of old ReplicaSets to retain to allow rollback.
This is a pointer to distinguish between explicit zero and not specified. Defaults to 10.
strategyOptional ¶
strategy: DeploymentStrategy
- Type: cdk8s_plus_31.k8s.DeploymentStrategy
The deployment strategy to use to replace existing pods with new ones.
DeploymentStrategy ¶
DeploymentStrategy describes how to replace existing pods with new ones.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeploymentStrategy(
rolling_update: RollingUpdateDeployment = None,
type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
rolling_update |
cdk8s_plus_31.k8s.RollingUpdateDeployment |
Rolling update config params. |
type |
str |
Type of deployment. |
rolling_updateOptional ¶
rolling_update: RollingUpdateDeployment
- Type: cdk8s_plus_31.k8s.RollingUpdateDeployment
Rolling update config params.
Present only if DeploymentStrategyType = RollingUpdate.
typeOptional ¶
type: str
- Type: str
- Default: RollingUpdate.
Type of deployment.
Can be “Recreate” or “RollingUpdate”. Default is RollingUpdate.
DeploymentStrategyRollingUpdateOptions ¶
Options for DeploymentStrategy.rollingUpdate.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.DeploymentStrategyRollingUpdateOptions(
max_surge: PercentOrAbsolute = None,
max_unavailable: PercentOrAbsolute = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
max_surge |
PercentOrAbsolute |
The maximum number of pods that can be scheduled above the desired number of pods. |
max_unavailable |
PercentOrAbsolute |
The maximum number of pods that can be unavailable during the update. |
max_surgeOptional ¶
max_surge: PercentOrAbsolute
- Type: PercentOrAbsolute
- Default: ‘25%’
The maximum number of pods that can be scheduled above the desired number of pods.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding up.
This can not be 0 if maxUnavailable is 0.
Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.
max_unavailableOptional ¶
max_unavailable: PercentOrAbsolute
- Type: PercentOrAbsolute
- Default: ‘25%’
The maximum number of pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding down.
This can not be 0 if maxSurge is 0.
Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.
DeviceAttributeV1Alpha3 ¶
DeviceAttribute must have exactly one field set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeviceAttributeV1Alpha3(
bool: bool = None,
int: typing.Union[int, float] = None,
string: str = None,
version: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
bool |
bool |
BoolValue is a true/false value. |
int |
typing.Union[int, float] |
IntValue is a number. |
string |
str |
StringValue is a string. |
version |
str |
VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters. |
boolOptional ¶
bool: bool
- Type: bool
BoolValue is a true/false value.
intOptional ¶
int: typing.Union[int, float]
- Type: typing.Union[int, float]
IntValue is a number.
stringOptional ¶
string: str
- Type: str
StringValue is a string.
Must not be longer than 64 characters.
versionOptional ¶
version: str
- Type: str
VersionValue is a semantic version according to semver.org spec 2.0.0. Must not be longer than 64 characters.
DeviceClaimConfigurationV1Alpha3 ¶
DeviceClaimConfiguration is used for configuration parameters in DeviceClaim.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeviceClaimConfigurationV1Alpha3(
opaque: OpaqueDeviceConfigurationV1Alpha3 = None,
requests: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
opaque |
cdk8s_plus_31.k8s.OpaqueDeviceConfigurationV1Alpha3 |
Opaque provides driver-specific configuration parameters. |
requests |
typing.List[str] |
Requests lists the names of requests where the configuration applies. |
opaqueOptional ¶
opaque: OpaqueDeviceConfigurationV1Alpha3
- Type: cdk8s_plus_31.k8s.OpaqueDeviceConfigurationV1Alpha3
Opaque provides driver-specific configuration parameters.
requestsOptional ¶
requests: typing.List[str]
- Type: typing.List[str]
Requests lists the names of requests where the configuration applies.
If empty, it applies to all requests.
DeviceClaimV1Alpha3 ¶
DeviceClaim defines how to request devices with a ResourceClaim.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeviceClaimV1Alpha3(
config: typing.List[DeviceClaimConfigurationV1Alpha3] = None,
constraints: typing.List[DeviceConstraintV1Alpha3] = None,
requests: typing.List[DeviceRequestV1Alpha3] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
config |
typing.List[cdk8s_plus_31.k8s.DeviceClaimConfigurationV1Alpha3] |
This field holds configuration for multiple potential drivers which could satisfy requests in this claim. |
constraints |
typing.List[cdk8s_plus_31.k8s.DeviceConstraintV1Alpha3] |
These constraints must be satisfied by the set of devices that get allocated for the claim. |
requests |
typing.List[cdk8s_plus_31.k8s.DeviceRequestV1Alpha3] |
Requests represent individual requests for distinct devices which must all be satisfied. |
configOptional ¶
config: typing.List[DeviceClaimConfigurationV1Alpha3]
- Type: typing.List[cdk8s_plus_31.k8s.DeviceClaimConfigurationV1Alpha3]
This field holds configuration for multiple potential drivers which could satisfy requests in this claim.
It is ignored while allocating the claim.
constraintsOptional ¶
constraints: typing.List[DeviceConstraintV1Alpha3]
- Type: typing.List[cdk8s_plus_31.k8s.DeviceConstraintV1Alpha3]
These constraints must be satisfied by the set of devices that get allocated for the claim.
requestsOptional ¶
requests: typing.List[DeviceRequestV1Alpha3]
- Type: typing.List[cdk8s_plus_31.k8s.DeviceRequestV1Alpha3]
Requests represent individual requests for distinct devices which must all be satisfied.
If empty, nothing needs to be allocated.
DeviceClassConfigurationV1Alpha3 ¶
DeviceClassConfiguration is used in DeviceClass.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeviceClassConfigurationV1Alpha3(
opaque: OpaqueDeviceConfigurationV1Alpha3 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
opaque |
cdk8s_plus_31.k8s.OpaqueDeviceConfigurationV1Alpha3 |
Opaque provides driver-specific configuration parameters. |
opaqueOptional ¶
opaque: OpaqueDeviceConfigurationV1Alpha3
- Type: cdk8s_plus_31.k8s.OpaqueDeviceConfigurationV1Alpha3
Opaque provides driver-specific configuration parameters.
DeviceClassSpecV1Alpha3 ¶
DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeviceClassSpecV1Alpha3(
config: typing.List[DeviceClassConfigurationV1Alpha3] = None,
selectors: typing.List[DeviceSelectorV1Alpha3] = None,
suitable_nodes: NodeSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
config |
typing.List[cdk8s_plus_31.k8s.DeviceClassConfigurationV1Alpha3] |
Config defines configuration parameters that apply to each device that is claimed via this class. |
selectors |
typing.List[cdk8s_plus_31.k8s.DeviceSelectorV1Alpha3] |
Each selector must be satisfied by a device which is claimed via this class. |
suitable_nodes |
cdk8s_plus_31.k8s.NodeSelector |
Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet and that claim gets allocated through a control plane controller. |
configOptional ¶
config: typing.List[DeviceClassConfigurationV1Alpha3]
- Type: typing.List[cdk8s_plus_31.k8s.DeviceClassConfigurationV1Alpha3]
Config defines configuration parameters that apply to each device that is claimed via this class.
Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
They are passed to the driver, but are not considered while allocating the claim.
selectorsOptional ¶
selectors: typing.List[DeviceSelectorV1Alpha3]
- Type: typing.List[cdk8s_plus_31.k8s.DeviceSelectorV1Alpha3]
Each selector must be satisfied by a device which is claimed via this class.
suitable_nodesOptional ¶
suitable_nodes: NodeSelector
- Type: cdk8s_plus_31.k8s.NodeSelector
Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a claim that has not been allocated yet and that claim gets allocated through a control plane controller.
It is ignored when the claim does not use a control plane controller for allocation.
Setting this field is optional. If unset, all Nodes are candidates.
This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
DeviceConstraintV1Alpha3 ¶
DeviceConstraint must have exactly one field set besides Requests.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeviceConstraintV1Alpha3(
match_attribute: str = None,
requests: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
match_attribute |
str |
MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices. |
requests |
typing.List[str] |
Requests is a list of the one or more requests in this claim which must co-satisfy this constraint. |
match_attributeOptional ¶
match_attribute: str
- Type: str
MatchAttribute requires that all devices in question have this attribute and that its type and value are the same across those devices.
For example, if you specified “dra.example.com/numa” (a hypothetical example!), then only devices in the same NUMA node will be chosen. A device which does not have that attribute will not be chosen. All devices should use a value of the same type for this attribute because that is part of its specification, but if one device doesn’t, then it also will not be chosen.
Must include the domain qualifier.
requestsOptional ¶
requests: typing.List[str]
- Type: typing.List[str]
Requests is a list of the one or more requests in this claim which must co-satisfy this constraint.
If a request is fulfilled by multiple devices, then all of the devices must satisfy the constraint. If this is not specified, this constraint applies to all requests in this claim.
DeviceRequestV1Alpha3 ¶
DeviceRequest is a request for devices required for a claim.
This is typically a request for a single resource like a device, but can also ask for several identical devices.
A DeviceClassName is currently required. Clients must check that it is indeed set. It’s absence indicates that something changed in a way that is not supported by the client yet, in which case it must refuse to handle the request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeviceRequestV1Alpha3(
device_class_name: str,
name: str,
admin_access: bool = None,
allocation_mode: str = None,
count: typing.Union[int, float] = None,
selectors: typing.List[DeviceSelectorV1Alpha3] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
device_class_name |
str |
DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request. |
name |
str |
Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim. |
admin_access |
bool |
AdminAccess indicates that this is a claim for administrative access to the device(s). |
allocation_mode |
str |
AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:. |
count |
typing.Union[int, float] |
Count is used only when the count mode is “ExactCount”. |
selectors |
typing.List[cdk8s_plus_31.k8s.DeviceSelectorV1Alpha3] |
Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request. |
device_class_nameRequired ¶
device_class_name: str
- Type: str
DeviceClassName references a specific DeviceClass, which can define additional configuration and selectors to be inherited by this request.
A class is required. Which classes are available depends on the cluster.
Administrators may use this to restrict which devices may get requested by only installing classes with selectors for permitted devices. If users are free to request anything without restrictions, then administrators can create an empty DeviceClass for users to reference.
nameRequired ¶
name: str
- Type: str
Name can be used to reference this request in a pod.spec.containers[].resources.claims entry and in a constraint of the claim.
Must be a DNS label.
admin_accessOptional ¶
admin_access: bool
- Type: bool
AdminAccess indicates that this is a claim for administrative access to the device(s).
Claims with AdminAccess are expected to be used for monitoring or other management services for a device. They ignore all ordinary claims to the device with respect to access modes and any resource allocations.
allocation_modeOptional ¶
allocation_mode: str
- Type: str
AllocationMode and its related fields define how devices are allocated to satisfy this request. Supported values are:.
- ExactCount: This request is for a specific number of devices. This is the default. The exact number is provided in the count field.
- All: This request is for all of the matching devices in a pool. Allocation will fail if some devices are already allocated, unless adminAccess is requested.
If AlloctionMode is not specified, the default mode is ExactCount. If the mode is ExactCount and count is not specified, the default count is one. Any other requests must specify this field.
More modes may get added in the future. Clients must refuse to handle requests with unknown modes.
countOptional ¶
count: typing.Union[int, float]
- Type: typing.Union[int, float]
Count is used only when the count mode is “ExactCount”.
Must be greater than zero. If AllocationMode is ExactCount and this field is not specified, the default is one.
selectorsOptional ¶
selectors: typing.List[DeviceSelectorV1Alpha3]
- Type: typing.List[cdk8s_plus_31.k8s.DeviceSelectorV1Alpha3]
Selectors define criteria which must be satisfied by a specific device in order for that device to be considered for this request.
All selectors must be satisfied for a device to be considered.
DeviceSelectorV1Alpha3 ¶
DeviceSelector must have exactly one field set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeviceSelectorV1Alpha3(
cel: CelDeviceSelectorV1Alpha3 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
cel |
cdk8s_plus_31.k8s.CelDeviceSelectorV1Alpha3 |
CEL contains a CEL expression for selecting a device. |
celOptional ¶
cel: CelDeviceSelectorV1Alpha3
- Type: cdk8s_plus_31.k8s.CelDeviceSelectorV1Alpha3
CEL contains a CEL expression for selecting a device.
DeviceV1Alpha3 ¶
Device represents one individual hardware instance that can be selected based on its attributes.
Besides the name, exactly one field must be set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DeviceV1Alpha3(
name: str,
basic: BasicDeviceV1Alpha3 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name is unique identifier among all devices managed by the driver in the pool. |
basic |
cdk8s_plus_31.k8s.BasicDeviceV1Alpha3 |
Basic defines one device instance. |
nameRequired ¶
name: str
- Type: str
Name is unique identifier among all devices managed by the driver in the pool.
It must be a DNS label.
basicOptional ¶
basic: BasicDeviceV1Alpha3
- Type: cdk8s_plus_31.k8s.BasicDeviceV1Alpha3
Basic defines one device instance.
DnsOption ¶
Custom DNS option.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.DnsOption(
name: str,
value: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Option name. |
value |
str |
Option value. |
nameRequired ¶
name: str
- Type: str
Option name.
valueOptional ¶
value: str
- Type: str
- Default: No value.
Option value.
DockerConfigSecretProps ¶
Options for DockerConfigSecret.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.DockerConfigSecretProps(
metadata: ApiObjectMetadata = None,
immutable: bool = None,
data: typing.Mapping[typing.Any]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
data |
typing.Mapping[typing.Any] |
JSON content to provide for the ~/.docker/config.json file. This will be stringified and inserted as stringData. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
immutable: bool
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
dataRequired ¶
data: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
JSON content to provide for the ~/.docker/config.json file. This will be stringified and inserted as stringData.
https://docs.docker.com/engine/reference/commandline/cli/#sample-configuration-file
DownwardApiProjection ¶
Represents downward API info for projecting into a projected volume.
Note that this is identical to a downwardAPI volume source without the default mode.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DownwardApiProjection(
items: typing.List[DownwardApiVolumeFile] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.DownwardApiVolumeFile] |
Items is a list of DownwardAPIVolume file. |
itemsOptional ¶
items: typing.List[DownwardApiVolumeFile]
- Type: typing.List[cdk8s_plus_31.k8s.DownwardApiVolumeFile]
Items is a list of DownwardAPIVolume file.
DownwardApiVolumeFile ¶
DownwardAPIVolumeFile represents information to create the file containing the pod field.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DownwardApiVolumeFile(
path: str,
field_ref: ObjectFieldSelector = None,
mode: typing.Union[int, float] = None,
resource_field_ref: ResourceFieldSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
Required: Path is the relative path name of the file to be created. |
field_ref |
cdk8s_plus_31.k8s.ObjectFieldSelector |
Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. |
mode |
typing.Union[int, float] |
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. |
resource_field_ref |
cdk8s_plus_31.k8s.ResourceFieldSelector |
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. |
pathRequired ¶
path: str
- Type: str
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 ‘..’
field_refOptional ¶
field_ref: ObjectFieldSelector
- Type: cdk8s_plus_31.k8s.ObjectFieldSelector
Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.
modeOptional ¶
mode: typing.Union[int, float]
- Type: typing.Union[int, float]
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.
resource_field_refOptional ¶
resource_field_ref: ResourceFieldSelector
- Type: cdk8s_plus_31.k8s.ResourceFieldSelector
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
DownwardApiVolumeSource ¶
DownwardAPIVolumeSource represents a volume containing downward API info.
Downward API volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.DownwardApiVolumeSource(
default_mode: typing.Union[int, float] = None,
items: typing.List[DownwardApiVolumeFile] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
default_mode |
typing.Union[int, float] |
Optional: mode bits to use on created files by default. |
items |
typing.List[cdk8s_plus_31.k8s.DownwardApiVolumeFile] |
Items is a list of downward API volume file. |
default_modeOptional ¶
default_mode: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 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.
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.
itemsOptional ¶
items: typing.List[DownwardApiVolumeFile]
- Type: typing.List[cdk8s_plus_31.k8s.DownwardApiVolumeFile]
Items is a list of downward API volume file.
EmptyDirVolumeOptions ¶
Options for volumes populated with an empty directory.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.EmptyDirVolumeOptions(
medium: EmptyDirMedium = None,
size_limit: Size = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
medium |
EmptyDirMedium |
By default, emptyDir volumes are stored on whatever medium is backing the node - that might be disk or SSD or network storage, depending on your environment. |
size_limit |
cdk8s.Size |
Total amount of local storage required for this EmptyDir volume. |
mediumOptional ¶
medium: EmptyDirMedium
- Type: EmptyDirMedium
- Default: EmptyDirMedium.DEFAULT
By default, emptyDir volumes are stored on whatever medium is backing the node - that might be disk or SSD or network storage, depending on your environment.
However, you can set the emptyDir.medium field to
EmptyDirMedium.MEMORY to tell Kubernetes to mount a tmpfs (RAM-backed
filesystem) for you instead. While tmpfs is very fast, be aware that unlike
disks, tmpfs is cleared on node reboot and any files you write will count
against your Container’s memory limit.
size_limitOptional ¶
size_limit: Size
- Type: cdk8s.Size
- Default: limit is undefined
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.
EmptyDirVolumeSource ¶
Represents an empty directory for a pod.
Empty directory volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EmptyDirVolumeSource(
medium: str = None,
size_limit: Quantity = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
medium |
str |
medium represents what type of storage medium should back this directory. |
size_limit |
cdk8s_plus_31.k8s.Quantity |
sizeLimit is the total amount of local storage required for this EmptyDir volume. |
mediumOptional ¶
medium: str
- Type: str
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
size_limitOptional ¶
size_limit: Quantity
- Type: cdk8s_plus_31.k8s.Quantity
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
Endpoint ¶
Endpoint represents a single logical “backend” implementing a service.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Endpoint(
addresses: typing.List[str],
conditions: EndpointConditions = None,
deprecated_topology: typing.Mapping[str] = None,
hints: EndpointHints = None,
hostname: str = None,
node_name: str = None,
target_ref: ObjectReference = None,
zone: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
addresses |
typing.List[str] |
addresses of this endpoint. |
conditions |
cdk8s_plus_31.k8s.EndpointConditions |
conditions contains information about the current status of the endpoint. |
deprecated_topology |
typing.Mapping[str] |
deprecatedTopology contains topology information part of the v1beta1 API. |
hints |
cdk8s_plus_31.k8s.EndpointHints |
hints contains information associated with how an endpoint should be consumed. |
hostname |
str |
hostname of this endpoint. |
node_name |
str |
nodeName represents the name of the Node hosting this endpoint. |
target_ref |
cdk8s_plus_31.k8s.ObjectReference |
targetRef is a reference to a Kubernetes object that represents this endpoint. |
zone |
str |
zone is the name of the Zone this endpoint exists in. |
addressesRequired ¶
addresses: typing.List[str]
- Type: typing.List[str]
addresses of this endpoint.
The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100. These are all assumed to be fungible and clients may choose to only use the first element. Refer to: https://issue.k8s.io/106267
conditionsOptional ¶
conditions: EndpointConditions
- Type: cdk8s_plus_31.k8s.EndpointConditions
conditions contains information about the current status of the endpoint.
deprecated_topologyOptional ¶
deprecated_topology: typing.Mapping[str]
- Type: typing.Mapping[str]
deprecatedTopology contains topology information part of the v1beta1 API.
This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.
hintsOptional ¶
hints: EndpointHints
- Type: cdk8s_plus_31.k8s.EndpointHints
hints contains information associated with how an endpoint should be consumed.
hostnameOptional ¶
hostname: str
- Type: str
hostname of this endpoint.
This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.
node_nameOptional ¶
node_name: str
- Type: str
nodeName represents the name of the Node hosting this endpoint.
This can be used to determine endpoints local to a Node.
target_refOptional ¶
target_ref: ObjectReference
- Type: cdk8s_plus_31.k8s.ObjectReference
targetRef is a reference to a Kubernetes object that represents this endpoint.
zoneOptional ¶
zone: str
- Type: str
zone is the name of the Zone this endpoint exists in.
EndpointAddress ¶
EndpointAddress is a tuple that describes single IP address.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EndpointAddress(
ip: str,
hostname: str = None,
node_name: str = None,
target_ref: ObjectReference = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ip |
str |
The IP of this endpoint. |
hostname |
str |
The Hostname of this endpoint. |
node_name |
str |
Optional: Node hosting this endpoint. |
target_ref |
cdk8s_plus_31.k8s.ObjectReference |
Reference to object providing the endpoint. |
ipRequired ¶
ip: str
- Type: str
The IP of this endpoint.
May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), or link-local multicast (224.0.0.0/24 or ff02::/16).
hostnameOptional ¶
hostname: str
- Type: str
The Hostname of this endpoint.
node_nameOptional ¶
node_name: str
- Type: str
Optional: Node hosting this endpoint.
This can be used to determine endpoints local to a node.
target_refOptional ¶
target_ref: ObjectReference
- Type: cdk8s_plus_31.k8s.ObjectReference
Reference to object providing the endpoint.
EndpointConditions ¶
EndpointConditions represents the current condition of an endpoint.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EndpointConditions(
ready: bool = None,
serving: bool = None,
terminating: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ready |
bool |
ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. |
serving |
bool |
serving is identical to ready except that it is set regardless of the terminating state of endpoints. |
terminating |
bool |
terminating indicates that this endpoint is terminating. |
readyOptional ¶
ready: bool
- Type: bool
ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint.
A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be “true” for terminating endpoints, except when the normal readiness behavior is being explicitly overridden, for example when the associated Service has set the publishNotReadyAddresses flag.
servingOptional ¶
serving: bool
- Type: bool
serving is identical to ready except that it is set regardless of the terminating state of endpoints.
This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition.
terminatingOptional ¶
terminating: bool
- Type: bool
terminating indicates that this endpoint is terminating.
A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating.
EndpointHints ¶
EndpointHints provides hints describing how an endpoint should be consumed.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EndpointHints(
for_zones: typing.List[ForZone] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
for_zones |
typing.List[cdk8s_plus_31.k8s.ForZone] |
forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing. |
for_zonesOptional ¶
for_zones: typing.List[ForZone]
- Type: typing.List[cdk8s_plus_31.k8s.ForZone]
forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing.
EndpointPort ¶
EndpointPort is a tuple that describes a single port.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EndpointPort(
port: typing.Union[int, float],
app_protocol: str = None,
name: str = None,
protocol: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
port |
typing.Union[int, float] |
The port number of the endpoint. |
app_protocol |
str |
The application protocol for this port. |
name |
str |
The name of this port. |
protocol |
str |
The IP protocol for this port. |
portRequired ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
The port number of the endpoint.
app_protocolOptional ¶
app_protocol: str
- Type: str
The application protocol for this port.
This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:
- Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).
- Kubernetes-defined prefixed names:
- ‘kubernetes.io/h2c’ - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
- ‘kubernetes.io/ws’ - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
- ‘kubernetes.io/wss’ - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
- Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
nameOptional ¶
name: str
- Type: str
The name of this port.
This must match the ‘name’ field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined.
protocolOptional ¶
protocol: str
- Type: str
- Default: TCP.
The IP protocol for this port.
Must be UDP, TCP, or SCTP. Default is TCP.
EndpointSubset ¶
EndpointSubset is a group of addresses with a common set of ports.
The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:
{ Addresses: [{“ip”: “10.10.1.1”}, {“ip”: “10.10.2.2”}], Ports: [{“name”: “a”, “port”: 8675}, {“name”: “b”, “port”: 309}] }
The resulting set of endpoints can be viewed as:
a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ]
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EndpointSubset(
addresses: typing.List[EndpointAddress] = None,
not_ready_addresses: typing.List[EndpointAddress] = None,
ports: typing.List[EndpointPort] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
addresses |
typing.List[cdk8s_plus_31.k8s.EndpointAddress] |
IP addresses which offer the related ports that are marked as ready. |
not_ready_addresses |
typing.List[cdk8s_plus_31.k8s.EndpointAddress] |
IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. |
ports |
typing.List[cdk8s_plus_31.k8s.EndpointPort] |
Port numbers available on the related IP addresses. |
addressesOptional ¶
addresses: typing.List[EndpointAddress]
- Type: typing.List[cdk8s_plus_31.k8s.EndpointAddress]
IP addresses which offer the related ports that are marked as ready.
These endpoints should be considered safe for load balancers and clients to utilize.
not_ready_addressesOptional ¶
not_ready_addresses: typing.List[EndpointAddress]
- Type: typing.List[cdk8s_plus_31.k8s.EndpointAddress]
IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.
portsOptional ¶
ports: typing.List[EndpointPort]
- Type: typing.List[cdk8s_plus_31.k8s.EndpointPort]
Port numbers available on the related IP addresses.
EnvFromSource ¶
EnvFromSource represents the source of a set of ConfigMaps.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EnvFromSource(
config_map_ref: ConfigMapEnvSource = None,
prefix: str = None,
secret_ref: SecretEnvSource = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
config_map_ref |
cdk8s_plus_31.k8s.ConfigMapEnvSource |
The ConfigMap to select from. |
prefix |
str |
An optional identifier to prepend to each key in the ConfigMap. |
secret_ref |
cdk8s_plus_31.k8s.SecretEnvSource |
The Secret to select from. |
config_map_refOptional ¶
config_map_ref: ConfigMapEnvSource
- Type: cdk8s_plus_31.k8s.ConfigMapEnvSource
The ConfigMap to select from.
prefixOptional ¶
prefix: str
- Type: str
An optional identifier to prepend to each key in the ConfigMap.
Must be a C_IDENTIFIER.
secret_refOptional ¶
secret_ref: SecretEnvSource
- Type: cdk8s_plus_31.k8s.SecretEnvSource
The Secret to select from.
EnvValueFromConfigMapOptions ¶
Options to specify an envionment variable value from a ConfigMap key.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValueFromConfigMapOptions(
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
optional |
bool |
Specify whether the ConfigMap or its key must be defined. |
optionalOptional ¶
optional: bool
- Type: bool
- Default: false
Specify whether the ConfigMap or its key must be defined.
EnvValueFromFieldRefOptions ¶
Options to specify an environment variable value from a field reference.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValueFromFieldRefOptions(
api_version: str = None,
key: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
Version of the schema the FieldPath is written in terms of. |
key |
str |
The key to select the pod label or annotation. |
api_versionOptional ¶
api_version: str
- Type: str
Version of the schema the FieldPath is written in terms of.
keyOptional ¶
key: str
- Type: str
The key to select the pod label or annotation.
EnvValueFromProcessOptions ¶
Options to specify an environment variable value from the process environment.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValueFromProcessOptions(
required: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
required |
bool |
Specify whether the key must exist in the environment. |
requiredOptional ¶
required: bool
- Type: bool
- Default: false
Specify whether the key must exist in the environment.
If this is set to true, and the key does not exist, an error will thrown.
EnvValueFromResourceOptions ¶
Options to specify an environment variable value from a resource.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValueFromResourceOptions(
container: Container = None,
divisor: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
container |
Container |
The container to select the value from. |
divisor |
str |
The output format of the exposed resource. |
containerOptional ¶
container: Container
- Type: Container
The container to select the value from.
divisorOptional ¶
divisor: str
- Type: str
The output format of the exposed resource.
EnvValueFromSecretOptions ¶
Options to specify an environment variable value from a Secret.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValueFromSecretOptions(
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
optional |
bool |
Specify whether the Secret or its key must be defined. |
optionalOptional ¶
optional: bool
- Type: bool
- Default: false
Specify whether the Secret or its key must be defined.
EnvVar ¶
EnvVar represents an environment variable present in a Container.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EnvVar(
name: str,
value: str = None,
value_from: EnvVarSource = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name of the environment variable. |
value |
str |
Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. |
value_from |
cdk8s_plus_31.k8s.EnvVarSource |
Source for the environment variable’s value. |
nameRequired ¶
name: str
- Type: str
Name of the environment variable.
Must be a C_IDENTIFIER.
valueOptional ¶
value: str
- Type: str
- Default: .
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 “”.
value_fromOptional ¶
value_from: EnvVarSource
- Type: cdk8s_plus_31.k8s.EnvVarSource
Source for the environment variable’s value.
Cannot be used if value is not empty.
EnvVarSource ¶
EnvVarSource represents a source for the value of an EnvVar.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EnvVarSource(
config_map_key_ref: ConfigMapKeySelector = None,
field_ref: ObjectFieldSelector = None,
resource_field_ref: ResourceFieldSelector = None,
secret_key_ref: SecretKeySelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
config_map_key_ref |
cdk8s_plus_31.k8s.ConfigMapKeySelector |
Selects a key of a ConfigMap. |
field_ref |
cdk8s_plus_31.k8s.ObjectFieldSelector |
Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels['<KEY>'], metadata.annotations['<KEY>'], spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. |
resource_field_ref |
cdk8s_plus_31.k8s.ResourceFieldSelector |
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. |
secret_key_ref |
cdk8s_plus_31.k8s.SecretKeySelector |
Selects a key of a secret in the pod’s namespace. |
config_map_key_refOptional ¶
config_map_key_ref: ConfigMapKeySelector
- Type: cdk8s_plus_31.k8s.ConfigMapKeySelector
Selects a key of a ConfigMap.
field_refOptional ¶
field_ref: ObjectFieldSelector
- Type: cdk8s_plus_31.k8s.ObjectFieldSelector
Selects a field of the pod: supports metadata.name, metadata.namespace, metadata.labels['<KEY>'], metadata.annotations['<KEY>'], spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
resource_field_refOptional ¶
resource_field_ref: ResourceFieldSelector
- Type: cdk8s_plus_31.k8s.ResourceFieldSelector
Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
secret_key_refOptional ¶
secret_key_ref: SecretKeySelector
- Type: cdk8s_plus_31.k8s.SecretKeySelector
Selects a key of a secret in the pod’s namespace.
EphemeralContainer ¶
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.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EphemeralContainer(
name: str,
args: typing.List[str] = None,
command: typing.List[str] = None,
env: typing.List[EnvVar] = None,
env_from: typing.List[EnvFromSource] = None,
image: str = None,
image_pull_policy: str = None,
lifecycle: Lifecycle = None,
liveness_probe: Probe = None,
ports: typing.List[ContainerPort] = None,
readiness_probe: Probe = None,
resize_policy: typing.List[ContainerResizePolicy] = None,
resources: ResourceRequirements = None,
restart_policy: str = None,
security_context: SecurityContext = None,
startup_probe: Probe = None,
stdin: bool = None,
stdin_once: bool = None,
target_container_name: str = None,
termination_message_path: str = None,
termination_message_policy: str = None,
tty: bool = None,
volume_devices: typing.List[VolumeDevice] = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name of the ephemeral container specified as a DNS_LABEL. |
args |
typing.List[str] |
Arguments to the entrypoint. |
command |
typing.List[str] |
Entrypoint array. |
env |
typing.List[cdk8s_plus_31.k8s.EnvVar] |
List of environment variables to set in the container. |
env_from |
typing.List[cdk8s_plus_31.k8s.EnvFromSource] |
List of sources to populate environment variables in the container. |
image |
str |
Container image name. |
image_pull_policy |
str |
Image pull policy. |
lifecycle |
cdk8s_plus_31.k8s.Lifecycle |
Lifecycle is not allowed for ephemeral containers. |
liveness_probe |
cdk8s_plus_31.k8s.Probe |
Probes are not allowed for ephemeral containers. |
ports |
typing.List[cdk8s_plus_31.k8s.ContainerPort] |
Ports are not allowed for ephemeral containers. |
readiness_probe |
cdk8s_plus_31.k8s.Probe |
Probes are not allowed for ephemeral containers. |
resize_policy |
typing.List[cdk8s_plus_31.k8s.ContainerResizePolicy] |
Resources resize policy for the container. |
resources |
cdk8s_plus_31.k8s.ResourceRequirements |
Resources are not allowed for ephemeral containers. |
restart_policy |
str |
Restart policy for the container to manage the restart behavior of each container within a pod. |
security_context |
cdk8s_plus_31.k8s.SecurityContext |
Optional: SecurityContext defines the security options the ephemeral container should be run with. |
startup_probe |
cdk8s_plus_31.k8s.Probe |
Probes are not allowed for ephemeral containers. |
stdin |
bool |
Whether this container should allocate a buffer for stdin in the container runtime. |
stdin_once |
bool |
Whether the container runtime should close the stdin channel after it has been opened by a single attach. |
target_container_name |
str |
If set, the name of the container from PodSpec that this ephemeral container targets. |
termination_message_path |
str |
Optional: Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. |
termination_message_policy |
str |
Indicate how the termination message should be populated. |
tty |
bool |
Whether this container should allocate a TTY for itself, also requires ‘stdin’ to be true. |
volume_devices |
typing.List[cdk8s_plus_31.k8s.VolumeDevice] |
volumeDevices is the list of block devices to be used by the container. |
volume_mounts |
typing.List[cdk8s_plus_31.k8s.VolumeMount] |
Pod volumes to mount into the container’s filesystem. |
working_dir |
str |
Container’s working directory. |
nameRequired ¶
name: str
- Type: str
Name of the ephemeral container specified as a DNS_LABEL.
This name must be unique among all containers, init containers and ephemeral containers.
argsOptional ¶
args: typing.List[str]
- Type: typing.List[str]
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
commandOptional ¶
command: typing.List[str]
- Type: typing.List[str]
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
envOptional ¶
env: typing.List[EnvVar]
- Type: typing.List[cdk8s_plus_31.k8s.EnvVar]
List of environment variables to set in the container.
Cannot be updated.
env_fromOptional ¶
env_from: typing.List[EnvFromSource]
- Type: typing.List[cdk8s_plus_31.k8s.EnvFromSource]
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.
imageOptional ¶
image: str
- Type: str
Container image name.
More info: https://kubernetes.io/docs/concepts/containers/images
image_pull_policyOptional ¶
image_pull_policy: str
- Type: str
- Default: Always if :latest tag is specified, or IfNotPresent otherwise. Cannot be updated. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images
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
lifecycleOptional ¶
lifecycle: Lifecycle
- Type: cdk8s_plus_31.k8s.Lifecycle
Lifecycle is not allowed for ephemeral containers.
liveness_probeOptional ¶
liveness_probe: Probe
- Type: cdk8s_plus_31.k8s.Probe
Probes are not allowed for ephemeral containers.
portsOptional ¶
ports: typing.List[ContainerPort]
- Type: typing.List[cdk8s_plus_31.k8s.ContainerPort]
Ports are not allowed for ephemeral containers.
readiness_probeOptional ¶
readiness_probe: Probe
- Type: cdk8s_plus_31.k8s.Probe
Probes are not allowed for ephemeral containers.
resize_policyOptional ¶
resize_policy: typing.List[ContainerResizePolicy]
- Type: typing.List[cdk8s_plus_31.k8s.ContainerResizePolicy]
Resources resize policy for the container.
resourcesOptional ¶
resources: ResourceRequirements
- Type: cdk8s_plus_31.k8s.ResourceRequirements
Resources are not allowed for ephemeral containers.
Ephemeral containers use spare resources already allocated to the pod.
restart_policyOptional ¶
restart_policy: str
- Type: str
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.
security_contextOptional ¶
security_context: SecurityContext
- Type: cdk8s_plus_31.k8s.SecurityContext
Optional: SecurityContext defines the security options the ephemeral container should be run with.
If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext.
startup_probeOptional ¶
startup_probe: Probe
- Type: cdk8s_plus_31.k8s.Probe
Probes are not allowed for ephemeral containers.
stdinOptional ¶
stdin: bool
- Type: bool
- Default: false.
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_onceOptional ¶
stdin_once: bool
- Type: bool
- Default: false
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
target_container_nameOptional ¶
target_container_name: str
- Type: str
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.
termination_message_pathOptional ¶
termination_message_path: str
- Type: str
- Default: dev/termination-log. Cannot be updated.
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.
termination_message_policyOptional ¶
termination_message_policy: str
- Type: str
- Default: File. Cannot be updated.
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.
ttyOptional ¶
tty: bool
- Type: bool
- Default: false.
Whether this container should allocate a TTY for itself, also requires ‘stdin’ to be true.
Default is false.
volume_devicesOptional ¶
volume_devices: typing.List[VolumeDevice]
- Type: typing.List[cdk8s_plus_31.k8s.VolumeDevice]
volumeDevices is the list of block devices to be used by the container.
volume_mountsOptional ¶
volume_mounts: typing.List[VolumeMount]
- Type: typing.List[cdk8s_plus_31.k8s.VolumeMount]
Pod volumes to mount into the container’s filesystem.
Subpath mounts are not allowed for ephemeral containers. Cannot be updated.
working_dirOptional ¶
working_dir: str
- Type: str
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.
EphemeralStorageResources ¶
Emphemeral storage request and limit.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.EphemeralStorageResources(
limit: Size = None,
request: Size = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
limit |
cdk8s.Size |
No description. |
request |
cdk8s.Size |
No description. |
limitOptional ¶
limit: Size
- Type: cdk8s.Size
requestOptional ¶
request: Size
- Type: cdk8s.Size
EphemeralVolumeSource ¶
Represents an ephemeral volume that is handled by a normal storage driver.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EphemeralVolumeSource(
volume_claim_template: PersistentVolumeClaimTemplate = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
volume_claim_template |
cdk8s_plus_31.k8s.PersistentVolumeClaimTemplate |
Will be used to create a stand-alone PVC to provision the volume. |
volume_claim_templateOptional ¶
volume_claim_template: PersistentVolumeClaimTemplate
- Type: cdk8s_plus_31.k8s.PersistentVolumeClaimTemplate
Will be used to create a stand-alone PVC to provision the volume.
The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be <pod name>-<volume name> where <volume name> is the name from the PodSpec.Volumes array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long).
An existing PVC with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster.
This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created.
Required, must not be nil.
EventSeries ¶
EventSeries contain information on series of events, i.e. thing that was/is happening continuously for some time. How often to update the EventSeries is up to the event reporters. The default event reporter in “k8s.io/client-go/tools/events/event_broadcaster.go” shows how this struct is updated on heartbeats and can guide customized reporter implementations.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EventSeries(
count: typing.Union[int, float],
last_observed_time: datetime.datetime
)
Properties ¶
| Name | Type | Description |
|---|---|---|
count |
typing.Union[int, float] |
count is the number of occurrences in this series up to the last heartbeat time. |
last_observed_time |
datetime.datetime |
lastObservedTime is the time when last Event from the series was seen before last heartbeat. |
countRequired ¶
count: typing.Union[int, float]
- Type: typing.Union[int, float]
count is the number of occurrences in this series up to the last heartbeat time.
last_observed_timeRequired ¶
last_observed_time: datetime.datetime
- Type: datetime.datetime
lastObservedTime is the time when last Event from the series was seen before last heartbeat.
EventSource ¶
EventSource contains information for an event.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.EventSource(
component: str = None,
host: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
component |
str |
Component from which the event is generated. |
host |
str |
Node name on which the event is generated. |
componentOptional ¶
component: str
- Type: str
Component from which the event is generated.
hostOptional ¶
host: str
- Type: str
Node name on which the event is generated.
ExecAction ¶
ExecAction describes a “run in container” action.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ExecAction(
command: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
command |
typing.List[str] |
Command is the command line to execute inside the container, the working directory for the command is root (‘/’) in the container’s filesystem. |
commandOptional ¶
command: typing.List[str]
- Type: typing.List[str]
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.
ExemptPriorityLevelConfiguration ¶
ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests.
In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the spec.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ExemptPriorityLevelConfiguration(
lendable_percent: typing.Union[int, float] = None,
nominal_concurrency_shares: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
lendable_percent |
typing.Union[int, float] |
lendablePercent prescribes the fraction of the level’s NominalCL that can be borrowed by other priority levels. |
nominal_concurrency_shares |
typing.Union[int, float] |
nominalConcurrencyShares (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. |
lendable_percentOptional ¶
lendable_percent: typing.Union[int, float]
- Type: typing.Union[int, float]
lendablePercent prescribes the fraction of the level’s NominalCL that can be borrowed by other priority levels.
This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level’s LendableConcurrencyLimit (LendableCL), is defined as follows.
LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
nominal_concurrency_sharesOptional ¶
nominal_concurrency_shares: typing.Union[int, float]
- Type: typing.Union[int, float]
nominalConcurrencyShares (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level.
This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server’s concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values:
NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)
Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero.
ExemptPriorityLevelConfigurationV1Beta3 ¶
ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests.
In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the spec.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ExemptPriorityLevelConfigurationV1Beta3(
lendable_percent: typing.Union[int, float] = None,
nominal_concurrency_shares: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
lendable_percent |
typing.Union[int, float] |
lendablePercent prescribes the fraction of the level’s NominalCL that can be borrowed by other priority levels. |
nominal_concurrency_shares |
typing.Union[int, float] |
nominalConcurrencyShares (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. |
lendable_percentOptional ¶
lendable_percent: typing.Union[int, float]
- Type: typing.Union[int, float]
lendablePercent prescribes the fraction of the level’s NominalCL that can be borrowed by other priority levels.
This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level’s LendableConcurrencyLimit (LendableCL), is defined as follows.
LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
nominal_concurrency_sharesOptional ¶
nominal_concurrency_shares: typing.Union[int, float]
- Type: typing.Union[int, float]
nominalConcurrencyShares (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level.
This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server’s concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values:
NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)
Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero.
ExposeDeploymentViaIngressOptions ¶
Options for exposing a deployment via an ingress.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ExposeDeploymentViaIngressOptions(
name: str = None,
ports: typing.List[ServicePort] = None,
service_type: ServiceType = None,
ingress: Ingress = None,
path_type: HttpIngressPathType = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The name of the service to expose. |
ports |
typing.List[ServicePort] |
The ports that the service should bind to. |
service_type |
ServiceType |
The type of the exposed service. |
ingress |
Ingress |
The ingress to add rules to. |
path_type |
HttpIngressPathType |
The type of the path. |
nameOptional ¶
name: str
- Type: str
- Default: auto generated.
The name of the service to expose.
If you’d like to expose the deployment multiple times, you must explicitly set a name starting from the second expose call.
portsOptional ¶
ports: typing.List[ServicePort]
- Type: typing.List[ServicePort]
- Default: extracted from the deployment.
The ports that the service should bind to.
service_typeOptional ¶
service_type: ServiceType
- Type: ServiceType
- Default: ClusterIP.
The type of the exposed service.
ingressOptional ¶
ingress: Ingress
- Type: Ingress
- Default: An ingress will be automatically created.
The ingress to add rules to.
path_typeOptional ¶
path_type: HttpIngressPathType
- Type: HttpIngressPathType
- Default: HttpIngressPathType.PREFIX
The type of the path.
ExposeServiceViaIngressOptions ¶
Options for exposing a service using an ingress.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ExposeServiceViaIngressOptions(
ingress: Ingress = None,
path_type: HttpIngressPathType = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ingress |
Ingress |
The ingress to add rules to. |
path_type |
HttpIngressPathType |
The type of the path. |
ingressOptional ¶
ingress: Ingress
- Type: Ingress
- Default: An ingress will be automatically created.
The ingress to add rules to.
path_typeOptional ¶
path_type: HttpIngressPathType
- Type: HttpIngressPathType
- Default: HttpIngressPathType.PREFIX
The type of the path.
ExternalDocumentation ¶
ExternalDocumentation allows referencing an external resource for extended documentation.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ExternalDocumentation(
description: str = None,
url: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
description |
str |
No description. |
url |
str |
No description. |
descriptionOptional ¶
description: str
- Type: str
urlOptional ¶
url: str
- Type: str
ExternalMetricSourceV2 ¶
ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ExternalMetricSourceV2(
metric: MetricIdentifierV2,
target: MetricTargetV2
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metric |
cdk8s_plus_31.k8s.MetricIdentifierV2 |
metric identifies the target metric by name and selector. |
target |
cdk8s_plus_31.k8s.MetricTargetV2 |
target specifies the target value for the given metric. |
metricRequired ¶
metric: MetricIdentifierV2
- Type: cdk8s_plus_31.k8s.MetricIdentifierV2
metric identifies the target metric by name and selector.
targetRequired ¶
target: MetricTargetV2
- Type: cdk8s_plus_31.k8s.MetricTargetV2
target specifies the target value for the given metric.
FcVolumeSource ¶
Represents a Fibre Channel volume.
Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FcVolumeSource(
fs_type: str = None,
lun: typing.Union[int, float] = None,
read_only: bool = None,
target_ww_ns: typing.List[str] = None,
wwids: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
fs_type |
str |
fsType is the filesystem type to mount. |
lun |
typing.Union[int, float] |
lun is Optional: FC target lun number. |
read_only |
bool |
readOnly is Optional: Defaults to false (read/write). |
target_ww_ns |
typing.List[str] |
targetWWNs is Optional: FC target worldwide names (WWNs). |
wwids |
typing.List[str] |
wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. |
fs_typeOptional ¶
fs_type: str
- Type: str
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.
lunOptional ¶
lun: typing.Union[int, float]
- Type: typing.Union[int, float]
lun is Optional: FC target lun number.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
readOnly is Optional: Defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
target_ww_nsOptional ¶
target_ww_ns: typing.List[str]
- Type: typing.List[str]
targetWWNs is Optional: FC target worldwide names (WWNs).
wwidsOptional ¶
wwids: typing.List[str]
- Type: typing.List[str]
wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
FieldSelectorAttributes ¶
FieldSelectorAttributes indicates a field limited access.
Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FieldSelectorAttributes(
raw_selector: str = None,
requirements: typing.List[FieldSelectorRequirement] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
raw_selector |
str |
rawSelector is the serialization of a field selector that would be included in a query parameter. |
requirements |
typing.List[cdk8s_plus_31.k8s.FieldSelectorRequirement] |
requirements is the parsed interpretation of a field selector. |
raw_selectorOptional ¶
raw_selector: str
- Type: str
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.
requirementsOptional ¶
requirements: typing.List[FieldSelectorRequirement]
- Type: typing.List[cdk8s_plus_31.k8s.FieldSelectorRequirement]
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.
FieldSelectorRequirement ¶
FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FieldSelectorRequirement(
key: str,
operator: str,
values: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
key is the field selector key that the requirement applies to. |
operator |
str |
operator represents a key’s relationship to a set of values. |
values |
typing.List[str] |
values is an array of string values. |
keyRequired ¶
key: str
- Type: str
key is the field selector key that the requirement applies to.
operatorRequired ¶
operator: str
- Type: str
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.
valuesOptional ¶
values: typing.List[str]
- Type: typing.List[str]
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.
FlexPersistentVolumeSource ¶
FlexPersistentVolumeSource represents a generic persistent volume resource that is provisioned/attached using an exec based plugin.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FlexPersistentVolumeSource(
driver: str,
fs_type: str = None,
options: typing.Mapping[str] = None,
read_only: bool = None,
secret_ref: SecretReference = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
driver |
str |
driver is the name of the driver to use for this volume. |
fs_type |
str |
fsType is the Filesystem type to mount. |
options |
typing.Mapping[str] |
options is Optional: this field holds extra command options if any. |
read_only |
bool |
readOnly is Optional: defaults to false (read/write). |
secret_ref |
cdk8s_plus_31.k8s.SecretReference |
secretRef is Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. |
driverRequired ¶
driver: str
- Type: str
driver is the name of the driver to use for this volume.
fs_typeOptional ¶
fs_type: str
- Type: str
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.
optionsOptional ¶
options: typing.Mapping[str]
- Type: typing.Mapping[str]
options is Optional: this field holds extra command options if any.
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly is Optional: defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
secret_refOptional ¶
secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
secretRef is Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts.
This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.
FlexVolumeSource ¶
FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FlexVolumeSource(
driver: str,
fs_type: str = None,
options: typing.Mapping[str] = None,
read_only: bool = None,
secret_ref: LocalObjectReference = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
driver |
str |
driver is the name of the driver to use for this volume. |
fs_type |
str |
fsType is the filesystem type to mount. |
options |
typing.Mapping[str] |
options is Optional: this field holds extra command options if any. |
read_only |
bool |
readOnly is Optional: defaults to false (read/write). |
secret_ref |
cdk8s_plus_31.k8s.LocalObjectReference |
secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. |
driverRequired ¶
driver: str
- Type: str
driver is the name of the driver to use for this volume.
fs_typeOptional ¶
fs_type: str
- Type: str
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.
optionsOptional ¶
options: typing.Mapping[str]
- Type: typing.Mapping[str]
options is Optional: this field holds extra command options if any.
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly is Optional: defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
secret_refOptional ¶
secret_ref: LocalObjectReference
- Type: cdk8s_plus_31.k8s.LocalObjectReference
secretRef is Optional: secretRef is reference to the secret object containing sensitive information to pass to the plugin scripts.
This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts.
FlockerVolumeSource ¶
Represents a Flocker volume mounted by the Flocker agent.
One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FlockerVolumeSource(
dataset_name: str = None,
dataset_uuid: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
dataset_name |
str |
datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated. |
dataset_uuid |
str |
datasetUUID is the UUID of the dataset. |
dataset_nameOptional ¶
dataset_name: str
- Type: str
datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated.
dataset_uuidOptional ¶
dataset_uuid: str
- Type: str
datasetUUID is the UUID of the dataset.
This is unique identifier of a Flocker dataset
FlowDistinguisherMethod ¶
FlowDistinguisherMethod specifies the method of a flow distinguisher.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FlowDistinguisherMethod(
type: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type is the type of flow distinguisher method The supported types are “ByUser” and “ByNamespace”. |
typeRequired ¶
type: str
- Type: str
type is the type of flow distinguisher method The supported types are “ByUser” and “ByNamespace”.
Required.
FlowDistinguisherMethodV1Beta3 ¶
FlowDistinguisherMethod specifies the method of a flow distinguisher.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FlowDistinguisherMethodV1Beta3(
type: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type is the type of flow distinguisher method The supported types are “ByUser” and “ByNamespace”. |
typeRequired ¶
type: str
- Type: str
type is the type of flow distinguisher method The supported types are “ByUser” and “ByNamespace”.
Required.
FlowSchemaSpec ¶
FlowSchemaSpec describes how the FlowSchema’s specification looks like.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FlowSchemaSpec(
priority_level_configuration: PriorityLevelConfigurationReference,
distinguisher_method: FlowDistinguisherMethod = None,
matching_precedence: typing.Union[int, float] = None,
rules: typing.List[PolicyRulesWithSubjects] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
priority_level_configuration |
cdk8s_plus_31.k8s.PriorityLevelConfigurationReference |
priorityLevelConfiguration should reference a PriorityLevelConfiguration in the cluster. |
distinguisher_method |
cdk8s_plus_31.k8s.FlowDistinguisherMethod |
distinguisherMethod defines how to compute the flow distinguisher for requests that match this schema. |
matching_precedence |
typing.Union[int, float] |
matchingPrecedence is used to choose among the FlowSchemas that match a given request. |
rules |
typing.List[cdk8s_plus_31.k8s.PolicyRulesWithSubjects] |
rules describes which requests will match this flow schema. |
priority_level_configurationRequired ¶
priority_level_configuration: PriorityLevelConfigurationReference
- Type: cdk8s_plus_31.k8s.PriorityLevelConfigurationReference
priorityLevelConfiguration should reference a PriorityLevelConfiguration in the cluster.
If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.
distinguisher_methodOptional ¶
distinguisher_method: FlowDistinguisherMethod
- Type: cdk8s_plus_31.k8s.FlowDistinguisherMethod
distinguisherMethod defines how to compute the flow distinguisher for requests that match this schema.
nil specifies that the distinguisher is disabled and thus will always be the empty string.
matching_precedenceOptional ¶
matching_precedence: typing.Union[int, float]
- Type: typing.Union[int, float]
matchingPrecedence is used to choose among the FlowSchemas that match a given request.
The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.
rulesOptional ¶
rules: typing.List[PolicyRulesWithSubjects]
- Type: typing.List[cdk8s_plus_31.k8s.PolicyRulesWithSubjects]
rules describes which requests will match this flow schema.
This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
FlowSchemaSpecV1Beta3 ¶
FlowSchemaSpec describes how the FlowSchema’s specification looks like.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.FlowSchemaSpecV1Beta3(
priority_level_configuration: PriorityLevelConfigurationReferenceV1Beta3,
distinguisher_method: FlowDistinguisherMethodV1Beta3 = None,
matching_precedence: typing.Union[int, float] = None,
rules: typing.List[PolicyRulesWithSubjectsV1Beta3] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
priority_level_configuration |
cdk8s_plus_31.k8s.PriorityLevelConfigurationReferenceV1Beta3 |
priorityLevelConfiguration should reference a PriorityLevelConfiguration in the cluster. |
distinguisher_method |
cdk8s_plus_31.k8s.FlowDistinguisherMethodV1Beta3 |
distinguisherMethod defines how to compute the flow distinguisher for requests that match this schema. |
matching_precedence |
typing.Union[int, float] |
matchingPrecedence is used to choose among the FlowSchemas that match a given request. |
rules |
typing.List[cdk8s_plus_31.k8s.PolicyRulesWithSubjectsV1Beta3] |
rules describes which requests will match this flow schema. |
priority_level_configurationRequired ¶
priority_level_configuration: PriorityLevelConfigurationReferenceV1Beta3
- Type: cdk8s_plus_31.k8s.PriorityLevelConfigurationReferenceV1Beta3
priorityLevelConfiguration should reference a PriorityLevelConfiguration in the cluster.
If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.
distinguisher_methodOptional ¶
distinguisher_method: FlowDistinguisherMethodV1Beta3
- Type: cdk8s_plus_31.k8s.FlowDistinguisherMethodV1Beta3
distinguisherMethod defines how to compute the flow distinguisher for requests that match this schema.
nil specifies that the distinguisher is disabled and thus will always be the empty string.
matching_precedenceOptional ¶
matching_precedence: typing.Union[int, float]
- Type: typing.Union[int, float]
matchingPrecedence is used to choose among the FlowSchemas that match a given request.
The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.
rulesOptional ¶
rules: typing.List[PolicyRulesWithSubjectsV1Beta3]
- Type: typing.List[cdk8s_plus_31.k8s.PolicyRulesWithSubjectsV1Beta3]
rules describes which requests will match this flow schema.
This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
ForZone ¶
ForZone provides information about which zones should consume this endpoint.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ForZone(
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name represents the name of the zone. |
nameRequired ¶
name: str
- Type: str
name represents the name of the zone.
FromServiceAccountNameOptions ¶
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.FromServiceAccountNameOptions(
namespace_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
namespace_name |
str |
The name of the namespace the service account belongs to. |
namespace_nameOptional ¶
namespace_name: str
- Type: str
- Default: “default”
The name of the namespace the service account belongs to.
GCEPersistentDiskPersistentVolumeProps ¶
Properties for GCEPersistentDiskPersistentVolume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.GCEPersistentDiskPersistentVolumeProps(
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
claim: IPersistentVolumeClaim = None,
mount_options: typing.List[str] = None,
reclaim_policy: PersistentVolumeReclaimPolicy = None,
storage: Size = None,
storage_class_name: str = None,
volume_mode: PersistentVolumeMode = None,
pd_name: str,
fs_type: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains all ways the volume can be mounted. |
claim |
IPersistentVolumeClaim |
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. |
mount_options |
typing.List[str] |
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. |
storage |
cdk8s.Size |
What is the storage capacity of this volume. |
storage_class_name |
str |
Name of StorageClass to which this persistent volume belongs. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
pd_name |
str |
Unique name of the PD resource in GCE. |
fs_type |
str |
Filesystem type of the volume that you want to mount. |
partition |
typing.Union[int, float] |
The partition in the volume that you want to mount. |
read_only |
bool |
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes.
Contains all ways the volume can be mounted.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
claimOptional ¶
claim: IPersistentVolumeClaim
- Type: IPersistentVolumeClaim
- Default: Not bound to a specific claim.
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
- Default: No options.
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
reclaim_policyOptional ¶
reclaim_policy: PersistentVolumeReclaimPolicy
- Type: PersistentVolumeReclaimPolicy
- Default: PersistentVolumeReclaimPolicy.RETAIN
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
storageOptional ¶
storage: Size
- Type: cdk8s.Size
- Default: No specified.
What is the storage capacity of this volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
- Default: Volume does not belong to any storage class.
Name of StorageClass to which this persistent volume belongs.
volume_modeOptional ¶
volume_mode: PersistentVolumeMode
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
pd_nameRequired ¶
pd_name: str
- Type: str
Unique name of the PD resource in GCE.
Used to identify the disk in GCE.
https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
fs_typeOptional ¶
fs_type: str
- Type: str
- Default: ‘ext4’
Filesystem type of the volume that you want to mount.
Tip: Ensure that the filesystem type is supported by the host operating system.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: No partition.
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).
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
GCEPersistentDiskVolumeOptions ¶
Options of Volume.fromGcePersistentDisk.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.GCEPersistentDiskVolumeOptions(
fs_type: str = None,
name: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
fs_type |
str |
Filesystem type of the volume that you want to mount. |
name |
str |
The volume name. |
partition |
typing.Union[int, float] |
The partition in the volume that you want to mount. |
read_only |
bool |
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”. |
fs_typeOptional ¶
fs_type: str
- Type: str
- Default: ‘ext4’
Filesystem type of the volume that you want to mount.
Tip: Ensure that the filesystem type is supported by the host operating system.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
nameOptional ¶
name: str
- Type: str
- Default: auto-generated
The volume name.
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: No partition.
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).
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Specify “true” to force and set the ReadOnly property in VolumeMounts to “true”.
https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
GcePersistentDiskVolumeSource ¶
Represents a Persistent Disk resource in Google Compute Engine.
A GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.GcePersistentDiskVolumeSource(
pd_name: str,
fs_type: str = None,
partition: typing.Union[int, float] = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
pd_name |
str |
pdName is unique name of the PD resource in GCE. |
fs_type |
str |
fsType is filesystem type of the volume that you want to mount. |
partition |
typing.Union[int, float] |
partition is the partition in the volume that you want to mount. |
read_only |
bool |
readOnly here will force the ReadOnly setting in VolumeMounts. |
pd_nameRequired ¶
pd_name: str
- Type: str
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
fs_typeOptional ¶
fs_type: str
- Type: str
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
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
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
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
readOnly here will force the ReadOnly setting in VolumeMounts.
Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
GitRepoVolumeSource ¶
Represents a volume that is populated with the contents of a git repository.
Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.
DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod’s container.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.GitRepoVolumeSource(
repository: str,
directory: str = None,
revision: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
repository |
str |
repository is the URL. |
directory |
str |
directory is the target directory name. |
revision |
str |
revision is the commit hash for the specified revision. |
repositoryRequired ¶
repository: str
- Type: str
repository is the URL.
directoryOptional ¶
directory: str
- Type: str
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.
revisionOptional ¶
revision: str
- Type: str
revision is the commit hash for the specified revision.
GlusterfsPersistentVolumeSource ¶
Represents a Glusterfs mount that lasts the lifetime of a pod.
Glusterfs volumes do not support ownership management or SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.GlusterfsPersistentVolumeSource(
endpoints: str,
path: str,
endpoints_namespace: str = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
endpoints |
str |
endpoints is the endpoint name that details Glusterfs topology. |
path |
str |
path is the Glusterfs volume path. |
endpoints_namespace |
str |
endpointsNamespace is the namespace that contains Glusterfs endpoint. |
read_only |
bool |
readOnly here will force the Glusterfs volume to be mounted with read-only permissions. |
endpointsRequired ¶
endpoints: str
- Type: str
endpoints is the endpoint name that details Glusterfs topology.
More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
pathRequired ¶
path: str
- Type: str
path is the Glusterfs volume path.
More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
endpoints_namespaceOptional ¶
endpoints_namespace: str
- Type: str
endpointsNamespace is the namespace that contains Glusterfs endpoint.
If this field is empty, the EndpointNamespace defaults to the same namespace as the bound PVC. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
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
GlusterfsVolumeSource ¶
Represents a Glusterfs mount that lasts the lifetime of a pod.
Glusterfs volumes do not support ownership management or SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.GlusterfsVolumeSource(
endpoints: str,
path: str,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
endpoints |
str |
endpoints is the endpoint name that details Glusterfs topology. |
path |
str |
path is the Glusterfs volume path. |
read_only |
bool |
readOnly here will force the Glusterfs volume to be mounted with read-only permissions. |
endpointsRequired ¶
endpoints: str
- Type: str
endpoints is the endpoint name that details Glusterfs topology.
More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
pathRequired ¶
path: str
- Type: str
path is the Glusterfs volume path.
More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod
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
GroupSubjectV1Beta3 ¶
GroupSubject holds detailed information for group-kind subject.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.GroupSubjectV1Beta3(
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the user group that matches, or “*” to match all user groups. |
nameRequired ¶
name: str
- Type: str
name is the user group that matches, or “*” to match all user groups.
See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required.
GroupVersionResourceV1Alpha1 ¶
The names of the group, the version, and the resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.GroupVersionResourceV1Alpha1(
group: str = None,
resource: str = None,
version: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
group |
str |
The name of the group. |
resource |
str |
The name of the resource. |
version |
str |
The name of the version. |
groupOptional ¶
group: str
- Type: str
The name of the group.
resourceOptional ¶
resource: str
- Type: str
The name of the resource.
versionOptional ¶
version: str
- Type: str
The name of the version.
GrpcAction ¶
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.GrpcAction(
port: typing.Union[int, float],
service: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
port |
typing.Union[int, float] |
Port number of the gRPC service. |
service |
str |
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). |
portRequired ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
Port number of the gRPC service.
Number must be in the range 1 to 65535.
serviceOptional ¶
service: str
- Type: str
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.
GrpcProbeOptions ¶
Options for Probe.fromGrpc().
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.GrpcProbeOptions(
failure_threshold: typing.Union[int, float] = None,
initial_delay_seconds: Duration = None,
period_seconds: Duration = None,
success_threshold: typing.Union[int, float] = None,
timeout_seconds: Duration = None,
port: typing.Union[int, float] = None,
service: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
failure_threshold |
typing.Union[int, float] |
Minimum consecutive failures for the probe to be considered failed after having succeeded. |
initial_delay_seconds |
cdk8s.Duration |
Number of seconds after the container has started before liveness probes are initiated. |
period_seconds |
cdk8s.Duration |
How often (in seconds) to perform the probe. |
success_threshold |
typing.Union[int, float] |
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. |
timeout_seconds |
cdk8s.Duration |
Number of seconds after which the probe times out. |
port |
typing.Union[int, float] |
The TCP port to connect to on the container. |
service |
str |
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). |
failure_thresholdOptional ¶
failure_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 3
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
initial_delay_secondsOptional ¶
initial_delay_seconds: Duration
- Type: cdk8s.Duration
- Default: immediate
Number of seconds after the container has started before liveness probes are initiated.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_secondsOptional ¶
period_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(10) Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
success_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1 Must be 1 for liveness and startup. Minimum value is 1.
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.
timeout_secondsOptional ¶
timeout_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(1)
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
portOptional ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to connect to on the container.
serviceOptional ¶
service: str
- Type: str
- Default: If this is not specified, the default behavior is defined by gRPC.
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).
HandlerFromHttpGetOptions ¶
Options for Handler.fromHttpGet.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.HandlerFromHttpGetOptions(
port: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
port |
typing.Union[int, float] |
The TCP port to use when sending the GET request. |
portOptional ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to use when sending the GET request.
HandlerFromTcpSocketOptions ¶
Options for Handler.fromTcpSocket.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.HandlerFromTcpSocketOptions(
host: str = None,
port: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
host |
str |
The host name to connect to on the container. |
port |
typing.Union[int, float] |
The TCP port to connect to on the container. |
hostOptional ¶
host: str
- Type: str
- Default: defaults to the pod IP
The host name to connect to on the container.
portOptional ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to connect to on the container.
HorizontalPodAutoscalerBehaviorV2 ¶
HorizontalPodAutoscalerBehavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HorizontalPodAutoscalerBehaviorV2(
scale_down: HpaScalingRulesV2 = None,
scale_up: HpaScalingRulesV2 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
scale_down |
cdk8s_plus_31.k8s.HpaScalingRulesV2 |
scaleDown is scaling policy for scaling Down. |
scale_up |
cdk8s_plus_31.k8s.HpaScalingRulesV2 |
scaleUp is scaling policy for scaling Up. |
scale_downOptional ¶
scale_down: HpaScalingRulesV2
- Type: cdk8s_plus_31.k8s.HpaScalingRulesV2
scaleDown is scaling policy for scaling Down.
If not set, the default value is to allow to scale down to minReplicas pods, with a 300 second stabilization window (i.e., the highest recommendation for the last 300sec is used).
scale_upOptional ¶
scale_up: HpaScalingRulesV2
- Type: cdk8s_plus_31.k8s.HpaScalingRulesV2
scaleUp is scaling policy for scaling Up.
If not set, the default value is the higher of:
- increase no more than 4 pods per 60 seconds
- double the number of pods per 60 seconds No stabilization is used.
HorizontalPodAutoscalerProps ¶
Properties for HorizontalPodAutoscaler.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.HorizontalPodAutoscalerProps(
metadata: ApiObjectMetadata = None,
max_replicas: typing.Union[int, float],
target: IScalable,
metrics: typing.List[Metric] = None,
min_replicas: typing.Union[int, float] = None,
scale_down: ScalingRules = None,
scale_up: ScalingRules = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
max_replicas |
typing.Union[int, float] |
The maximum number of replicas that can be scaled up to. |
target |
IScalable |
The workload to scale up or down. |
metrics |
typing.List[Metric] |
The metric conditions that trigger a scale up or scale down. |
min_replicas |
typing.Union[int, float] |
The minimum number of replicas that can be scaled down to. |
scale_down |
ScalingRules |
The scaling behavior when scaling down. |
scale_up |
ScalingRules |
The scaling behavior when scaling up. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
max_replicasRequired ¶
max_replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
The maximum number of replicas that can be scaled up to.
targetRequired ¶
target: IScalable
- Type: IScalable
The workload to scale up or down.
Scalable workload types:
- Deployment
- StatefulSet
metricsOptional ¶
metrics: typing.List[Metric]
- Type: typing.List[Metric]
- Default: If metrics are not provided, then the target resource constraints (e.g. cpu limit) will be used as scaling metrics.
The metric conditions that trigger a scale up or scale down.
min_replicasOptional ¶
min_replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1
The minimum number of replicas that can be scaled down to.
Can be set to 0 if the alpha feature gate HPAScaleToZero is enabled and
at least one Object or External metric is configured.
scale_downOptional ¶
scale_down: ScalingRules
- Type: ScalingRules
- Default: Scale down to minReplica count with a 5 minute stabilization window.
The scaling behavior when scaling down.
scale_upOptional ¶
scale_up: ScalingRules
- Type: ScalingRules
- Default: Is the higher of: * Increase no more than 4 pods per 60 seconds * Double the number of pods per 60 seconds
The scaling behavior when scaling up.
HorizontalPodAutoscalerSpec ¶
specification of a horizontal pod autoscaler.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HorizontalPodAutoscalerSpec(
max_replicas: typing.Union[int, float],
scale_target_ref: CrossVersionObjectReference,
min_replicas: typing.Union[int, float] = None,
target_cpu_utilization_percentage: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
max_replicas |
typing.Union[int, float] |
maxReplicas is the upper limit for the number of pods that can be set by the autoscaler; |
scale_target_ref |
cdk8s_plus_31.k8s.CrossVersionObjectReference |
reference to scaled resource; |
min_replicas |
typing.Union[int, float] |
minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. |
target_cpu_utilization_percentage |
typing.Union[int, float] |
targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods; |
max_replicasRequired ¶
max_replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
maxReplicas is the upper limit for the number of pods that can be set by the autoscaler;
cannot be smaller than MinReplicas.
scale_target_refRequired ¶
scale_target_ref: CrossVersionObjectReference
- Type: cdk8s_plus_31.k8s.CrossVersionObjectReference
reference to scaled resource;
horizontal pod autoscaler will learn the current resource consumption and will set the desired number of pods by using its Scale subresource.
min_replicasOptional ¶
min_replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.
target_cpu_utilization_percentageOptional ¶
target_cpu_utilization_percentage: typing.Union[int, float]
- Type: typing.Union[int, float]
targetCPUUtilizationPercentage is the target average CPU utilization (represented as a percentage of requested CPU) over all the pods;
if not specified the default autoscaling policy will be used.
HorizontalPodAutoscalerSpecV2 ¶
HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HorizontalPodAutoscalerSpecV2(
max_replicas: typing.Union[int, float],
scale_target_ref: CrossVersionObjectReferenceV2,
behavior: HorizontalPodAutoscalerBehaviorV2 = None,
metrics: typing.List[MetricSpecV2] = None,
min_replicas: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
max_replicas |
typing.Union[int, float] |
maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. |
scale_target_ref |
cdk8s_plus_31.k8s.CrossVersionObjectReferenceV2 |
scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count. |
behavior |
cdk8s_plus_31.k8s.HorizontalPodAutoscalerBehaviorV2 |
behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively). |
metrics |
typing.List[cdk8s_plus_31.k8s.MetricSpecV2] |
metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). |
min_replicas |
typing.Union[int, float] |
minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. |
max_replicasRequired ¶
max_replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.
It cannot be less that minReplicas.
scale_target_refRequired ¶
scale_target_ref: CrossVersionObjectReferenceV2
- Type: cdk8s_plus_31.k8s.CrossVersionObjectReferenceV2
scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.
behaviorOptional ¶
behavior: HorizontalPodAutoscalerBehaviorV2
- Type: cdk8s_plus_31.k8s.HorizontalPodAutoscalerBehaviorV2
behavior configures the scaling behavior of the target in both Up and Down directions (scaleUp and scaleDown fields respectively).
If not set, the default HPAScalingRules for scale up and scale down are used.
metricsOptional ¶
metrics: typing.List[MetricSpecV2]
- Type: typing.List[cdk8s_plus_31.k8s.MetricSpecV2]
metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used).
The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.
min_replicasOptional ¶
min_replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.
It defaults to 1 pod. minReplicas is allowed to be 0 if the alpha feature gate HPAScaleToZero is enabled and at least one Object or External metric is configured. Scaling is active as long as at least one metric value is available.
HostAlias ¶
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s /etc/hosts file.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.HostAlias(
hostnames: typing.List[str],
ip: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
hostnames |
typing.List[str] |
Hostnames for the chosen IP address. |
ip |
str |
IP address of the host file entry. |
hostnamesRequired ¶
hostnames: typing.List[str]
- Type: typing.List[str]
Hostnames for the chosen IP address.
ipRequired ¶
ip: str
- Type: str
IP address of the host file entry.
HostAlias ¶
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HostAlias(
ip: str,
hostnames: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ip |
str |
IP address of the host file entry. |
hostnames |
typing.List[str] |
Hostnames for the above IP address. |
ipRequired ¶
ip: str
- Type: str
IP address of the host file entry.
hostnamesOptional ¶
hostnames: typing.List[str]
- Type: typing.List[str]
Hostnames for the above IP address.
HostPathVolumeOptions ¶
Options for a HostPathVolume-based volume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.HostPathVolumeOptions(
path: str,
type: HostPathVolumeType = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
The path of the directory on the host. |
type |
HostPathVolumeType |
The expected type of the path found on the host. |
pathRequired ¶
path: str
- Type: str
The path of the directory on the host.
typeOptional ¶
type: HostPathVolumeType
- Type: HostPathVolumeType
- Default: HostPathVolumeType.DEFAULT
The expected type of the path found on the host.
HostPathVolumeSource ¶
Represents a host path mapped into a pod.
Host path volumes do not support ownership management or SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HostPathVolumeSource(
path: str,
type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
path of the directory on the host. |
type |
str |
type for HostPath Volume Defaults to “” More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath. |
pathRequired ¶
path: str
- Type: str
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
typeOptional ¶
type: str
- Type: str
- Default: More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
type for HostPath Volume Defaults to “” More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath.
HpaScalingPolicyV2 ¶
HPAScalingPolicy is a single policy which must hold true for a specified past interval.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HpaScalingPolicyV2(
period_seconds: typing.Union[int, float],
type: str,
value: typing.Union[int, float]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
period_seconds |
typing.Union[int, float] |
periodSeconds specifies the window of time for which the policy should hold true. |
type |
str |
type is used to specify the scaling policy. |
value |
typing.Union[int, float] |
value contains the amount of change which is permitted by the policy. |
period_secondsRequired ¶
period_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
periodSeconds specifies the window of time for which the policy should hold true.
PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min).
typeRequired ¶
type: str
- Type: str
type is used to specify the scaling policy.
valueRequired ¶
value: typing.Union[int, float]
- Type: typing.Union[int, float]
value contains the amount of change which is permitted by the policy.
It must be greater than zero
HpaScalingRulesV2 ¶
HPAScalingRules configures the scaling behavior for one direction.
These Rules are applied after calculating DesiredReplicas from metrics for the HPA. They can limit the scaling velocity by specifying scaling policies. They can prevent flapping by specifying the stabilization window, so that the number of replicas is not set instantly, instead, the safest value from the stabilization window is chosen.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HpaScalingRulesV2(
policies: typing.List[HpaScalingPolicyV2] = None,
select_policy: str = None,
stabilization_window_seconds: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
policies |
typing.List[cdk8s_plus_31.k8s.HpaScalingPolicyV2] |
policies is a list of potential scaling polices which can be used during scaling. |
select_policy |
str |
selectPolicy is used to specify which policy should be used. |
stabilization_window_seconds |
typing.Union[int, float] |
stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down. |
policiesOptional ¶
policies: typing.List[HpaScalingPolicyV2]
- Type: typing.List[cdk8s_plus_31.k8s.HpaScalingPolicyV2]
policies is a list of potential scaling polices which can be used during scaling.
At least one policy must be specified, otherwise the HPAScalingRules will be discarded as invalid
select_policyOptional ¶
select_policy: str
- Type: str
selectPolicy is used to specify which policy should be used.
If not set, the default value Max is used.
stabilization_window_secondsOptional ¶
stabilization_window_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
stabilizationWindowSeconds is the number of seconds for which past recommendations should be considered while scaling up or scaling down.
StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). If not set, use the default values: - For scale up: 0 (i.e. no stabilization is done). - For scale down: 300 (i.e. the stabilization window is 300 seconds long).
HttpGetAction ¶
HTTPGetAction describes an action based on HTTP Get requests.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HttpGetAction(
port: IntOrString,
host: str = None,
http_headers: typing.List[HttpHeader] = None,
path: str = None,
scheme: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
port |
cdk8s_plus_31.k8s.IntOrString |
Name or number of the port to access on the container. |
host |
str |
Host name to connect to, defaults to the pod IP. |
http_headers |
typing.List[cdk8s_plus_31.k8s.HttpHeader] |
Custom headers to set in the request. |
path |
str |
Path to access on the HTTP server. |
scheme |
str |
Scheme to use for connecting to the host. |
portRequired ¶
port: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
Name or number of the port to access on the container.
Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
hostOptional ¶
host: str
- Type: str
Host name to connect to, defaults to the pod IP.
You probably want to set “Host” in httpHeaders instead.
http_headersOptional ¶
http_headers: typing.List[HttpHeader]
- Type: typing.List[cdk8s_plus_31.k8s.HttpHeader]
Custom headers to set in the request.
HTTP allows repeated headers.
pathOptional ¶
path: str
- Type: str
Path to access on the HTTP server.
schemeOptional ¶
scheme: str
- Type: str
- Default: HTTP.
Scheme to use for connecting to the host.
Defaults to HTTP.
HttpGetProbeOptions ¶
Options for Probe.fromHttpGet().
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.HttpGetProbeOptions(
failure_threshold: typing.Union[int, float] = None,
initial_delay_seconds: Duration = None,
period_seconds: Duration = None,
success_threshold: typing.Union[int, float] = None,
timeout_seconds: Duration = None,
host: str = None,
http_headers: typing.List[HttpHeader] = None,
port: typing.Union[int, float] = None,
scheme: ConnectionScheme = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
failure_threshold |
typing.Union[int, float] |
Minimum consecutive failures for the probe to be considered failed after having succeeded. |
initial_delay_seconds |
cdk8s.Duration |
Number of seconds after the container has started before liveness probes are initiated. |
period_seconds |
cdk8s.Duration |
How often (in seconds) to perform the probe. |
success_threshold |
typing.Union[int, float] |
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. |
timeout_seconds |
cdk8s.Duration |
Number of seconds after which the probe times out. |
host |
str |
The host name to connect to on the container. |
http_headers |
typing.List[HttpHeader] |
Custom HTTP headers to set in the probe request. |
port |
typing.Union[int, float] |
The TCP port to use when sending the GET request. |
scheme |
ConnectionScheme |
Scheme to use for connecting to the host (HTTP or HTTPS). |
failure_thresholdOptional ¶
failure_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 3
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
initial_delay_secondsOptional ¶
initial_delay_seconds: Duration
- Type: cdk8s.Duration
- Default: immediate
Number of seconds after the container has started before liveness probes are initiated.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_secondsOptional ¶
period_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(10) Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
success_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1 Must be 1 for liveness and startup. Minimum value is 1.
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.
timeout_secondsOptional ¶
timeout_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(1)
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
hostOptional ¶
host: str
- Type: str
- Default: defaults to the pod IP
The host name to connect to on the container.
http_headersOptional ¶
http_headers: typing.List[HttpHeader]
- Type: typing.List[HttpHeader]
- Default: no custom headers are set
Custom HTTP headers to set in the probe request.
Note that HTTP allows repeated headers.
portOptional ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to use when sending the GET request.
schemeOptional ¶
scheme: ConnectionScheme
- Type: ConnectionScheme
- Default: ConnectionScheme.HTTP
Scheme to use for connecting to the host (HTTP or HTTPS).
HttpHeader ¶
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.HttpHeader(
name: str,
value: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The HTTP Header name to be used. |
value |
str |
The HTTP header value to be set. |
nameRequired ¶
name: str
- Type: str
The HTTP Header name to be used.
valueRequired ¶
value: str
- Type: str
The HTTP header value to be set.
HttpHeader ¶
HTTPHeader describes a custom header to be used in HTTP probes.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HttpHeader(
name: str,
value: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The header field name. |
value |
str |
The header field value. |
nameRequired ¶
name: str
- Type: str
The header field name.
This will be canonicalized upon output, so case-variant names will be understood as the same header.
valueRequired ¶
value: str
- Type: str
The header field value.
HttpIngressPath ¶
HTTPIngressPath associates a path with a backend.
Incoming urls matching the path are forwarded to the backend.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HttpIngressPath(
backend: IngressBackend,
path_type: str,
path: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
backend |
cdk8s_plus_31.k8s.IngressBackend |
backend defines the referenced service endpoint to which the traffic will be forwarded to. |
path_type |
str |
pathType determines the interpretation of the path matching. |
path |
str |
path is matched against the path of an incoming request. |
backendRequired ¶
backend: IngressBackend
- Type: cdk8s_plus_31.k8s.IngressBackend
backend defines the referenced service endpoint to which the traffic will be forwarded to.
path_typeRequired ¶
path_type: str
- Type: str
pathType determines the interpretation of the path matching.
PathType can be one of the following values: * Exact: Matches the URL path exactly. * Prefix: Matches based on a URL path prefix split by ‘/’. Matching is done on a path element by element basis. A path element refers is the list of labels in the path split by the ‘/’ separator. A request is a match for path p if every p is an element-wise prefix of p of the request path. Note that if the last element of the path is a substring of the last element in request path, it is not a match (e.g. /foo/bar matches /foo/bar/baz, but does not match /foo/barbaz).
- ImplementationSpecific: Interpretation of the Path matching is up to the IngressClass. Implementations can treat this as a separate PathType or treat it identically to Prefix or Exact path types. Implementations are required to support all path types.
pathOptional ¶
path: str
- Type: str
path is matched against the path of an incoming request.
Currently it can contain characters disallowed from the conventional “path” part of a URL as defined by RFC 3986. Paths must begin with a ‘/’ and must be present when using PathType with value “Exact” or “Prefix”.
HttpIngressRuleValue ¶
HTTPIngressRuleValue is a list of http selectors pointing to backends.
In the example: http://
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.HttpIngressRuleValue(
paths: typing.List[HttpIngressPath]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
paths |
typing.List[cdk8s_plus_31.k8s.HttpIngressPath] |
paths is a collection of paths that map requests to backends. |
pathsRequired ¶
paths: typing.List[HttpIngressPath]
- Type: typing.List[cdk8s_plus_31.k8s.HttpIngressPath]
paths is a collection of paths that map requests to backends.
ImageVolumeSource ¶
ImageVolumeSource represents a image volume resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ImageVolumeSource(
pull_policy: str = None,
reference: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
pull_policy |
str |
Policy for pulling OCI objects. |
reference |
str |
Required: Image or artifact reference to be used. |
pull_policyOptional ¶
pull_policy: str
- Type: str
- Default: Always if :latest tag is specified, or IfNotPresent otherwise.
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.
referenceOptional ¶
reference: str
- Type: str
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.
IngressBackend ¶
IngressBackend describes all endpoints for a given service and port.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IngressBackend(
resource: TypedLocalObjectReference = None,
service: IngressServiceBackend = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
resource |
cdk8s_plus_31.k8s.TypedLocalObjectReference |
resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. |
service |
cdk8s_plus_31.k8s.IngressServiceBackend |
service references a service as a backend. |
resourceOptional ¶
resource: TypedLocalObjectReference
- Type: cdk8s_plus_31.k8s.TypedLocalObjectReference
resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object.
If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with “Service”.
serviceOptional ¶
service: IngressServiceBackend
- Type: cdk8s_plus_31.k8s.IngressServiceBackend
service references a service as a backend.
This is a mutually exclusive setting with “Resource”.
IngressClassParametersReference ¶
IngressClassParametersReference identifies an API object.
This can be used to specify a cluster or namespace-scoped resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IngressClassParametersReference(
kind: str,
name: str,
api_group: str = None,
namespace: str = None,
scope: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kind |
str |
kind is the type of resource being referenced. |
name |
str |
name is the name of resource being referenced. |
api_group |
str |
apiGroup is the group for the resource being referenced. |
namespace |
str |
namespace is the namespace of the resource being referenced. |
scope |
str |
scope represents if this refers to a cluster or namespace scoped resource. |
kindRequired ¶
kind: str
- Type: str
kind is the type of resource being referenced.
nameRequired ¶
name: str
- Type: str
name is the name of resource being referenced.
api_groupOptional ¶
api_group: str
- Type: str
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.
namespaceOptional ¶
namespace: str
- Type: str
namespace is the namespace of the resource being referenced.
This field is required when scope is set to “Namespace” and must be unset when scope is set to “Cluster”.
scopeOptional ¶
scope: str
- Type: str
scope represents if this refers to a cluster or namespace scoped resource.
This may be set to “Cluster” (default) or “Namespace”.
IngressClassSpec ¶
IngressClassSpec provides information about the class of an Ingress.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IngressClassSpec(
controller: str = None,
parameters: IngressClassParametersReference = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
controller |
str |
controller refers to the name of the controller that should handle this class. |
parameters |
cdk8s_plus_31.k8s.IngressClassParametersReference |
parameters is a link to a custom resource containing additional configuration for the controller. |
controllerOptional ¶
controller: str
- Type: str
controller refers to the name of the controller that should handle this class.
This allows for different “flavors” that are controlled by the same controller. For example, you may have different parameters for the same implementing controller. This should be specified as a domain-prefixed path no more than 250 characters in length, e.g. “acme.io/ingress-controller”. This field is immutable.
parametersOptional ¶
parameters: IngressClassParametersReference
- Type: cdk8s_plus_31.k8s.IngressClassParametersReference
parameters is a link to a custom resource containing additional configuration for the controller.
This is optional if the controller does not require extra parameters.
IngressProps ¶
Properties for Ingress.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.IngressProps(
metadata: ApiObjectMetadata = None,
class_name: str = None,
default_backend: IngressBackend = None,
rules: typing.List[IngressRule] = None,
tls: typing.List[IngressTls] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
class_name |
str |
Class Name for this ingress. |
default_backend |
IngressBackend |
The default backend services requests that do not match any rule. |
rules |
typing.List[IngressRule] |
Routing rules for this ingress. |
tls |
typing.List[IngressTls] |
TLS settings for this ingress. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
class_nameOptional ¶
class_name: str
- Type: str
Class Name for this ingress.
This field is a reference to an IngressClass resource that contains additional Ingress configuration, including the name of the Ingress controller.
default_backendOptional ¶
default_backend: IngressBackend
- Type: IngressBackend
The default backend services requests that do not match any rule.
Using this option or the addDefaultBackend() method is equivalent to
adding a rule with both path and host undefined.
rulesOptional ¶
rules: typing.List[IngressRule]
- Type: typing.List[IngressRule]
Routing rules for this ingress.
Each rule must define an IngressBackend that will receive the requests
that match this rule. If both host and path are not specifiec, this
backend will be used as the default backend of the ingress.
You can also add rules later using addRule(), addHostRule(),
addDefaultBackend() and addHostDefaultBackend().
tlsOptional ¶
tls: typing.List[IngressTls]
- Type: typing.List[IngressTls]
TLS settings for this ingress.
Using this option tells the ingress controller to expose a TLS endpoint. Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
IngressRule ¶
Represents the rules mapping the paths under a specified host to the related backend services.
Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching path.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.IngressRule(
backend: IngressBackend,
host: str = None,
path: str = None,
path_type: HttpIngressPathType = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
backend |
IngressBackend |
Backend defines the referenced service endpoint to which the traffic will be forwarded to. |
host |
str |
Host is the fully qualified domain name of a network host, as defined by RFC 3986. |
path |
str |
Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional “path” part of a URL as defined by RFC 3986. Paths must begin with a ‘/’. |
path_type |
HttpIngressPathType |
Specify how the path is matched against request paths. |
backendRequired ¶
backend: IngressBackend
- Type: IngressBackend
Backend defines the referenced service endpoint to which the traffic will be forwarded to.
hostOptional ¶
host: str
- Type: str
- Default: If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.
Host is the fully qualified domain name of a network host, as defined by RFC 3986.
Note the following deviations from the “host” part of the URI as
defined in the RFC: 1. IPs are not allowed. Currently an IngressRuleValue
can only apply to the IP in the Spec of the parent Ingress. 2. The :
delimiter is not respected because ports are not allowed. Currently the
port of an Ingress is implicitly :80 for http and :443 for https. Both
these may change in the future. Incoming requests are matched against the
host before the IngressRuleValue.
pathOptional ¶
path: str
- Type: str
- Default: If unspecified, the path defaults to a catch all sending traffic to the backend.
Path is an extended POSIX regex as defined by IEEE Std 1003.1, (i.e this follows the egrep/unix syntax, not the perl syntax) matched against the path of an incoming request. Currently it can contain characters disallowed from the conventional “path” part of a URL as defined by RFC 3986. Paths must begin with a ‘/’.
path_typeOptional ¶
path_type: HttpIngressPathType
- Type: HttpIngressPathType
Specify how the path is matched against request paths.
By default, path types will be matched by prefix.
https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types
IngressRule ¶
IngressRule represents the rules mapping the paths under a specified host to the related backend services.
Incoming requests are first evaluated for a host match, then routed to the backend associated with the matching IngressRuleValue.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IngressRule(
host: str = None,
http: HttpIngressRuleValue = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
host |
str |
host is the fully qualified domain name of a network host, as defined by RFC 3986. |
http |
cdk8s_plus_31.k8s.HttpIngressRuleValue |
No description. |
hostOptional ¶
host: str
- Type: str
host is the fully qualified domain name of a network host, as defined by RFC 3986.
Note the following deviations from the “host” part of the URI as defined in RFC 3986: 1. IPs are not allowed. Currently an IngressRuleValue can only apply to
the IP in the Spec of the parent Ingress.
2. The : delimiter is not respected because ports are not allowed.
Currently the port of an Ingress is implicitly :80 for http and
:443 for https.
Both these may change in the future. Incoming requests are matched against the host before the IngressRuleValue. If the host is unspecified, the Ingress routes all traffic based on the specified IngressRuleValue.
host can be “precise” which is a domain name without the terminating dot of a network host (e.g. “foo.bar.com”) or “wildcard”, which is a domain name prefixed with a single wildcard label (e.g. “.foo.com”). The wildcard character ‘’ must appear by itself as the first DNS label and matches only a single label. You cannot have a wildcard label by itself (e.g. Host == “*”). Requests will be matched against the Host field in the following way: 1. If host is precise, the request matches this rule if the http host header is equal to Host. 2. If host is a wildcard, then the request matches this rule if the http host header is to equal to the suffix (removing the first label) of the wildcard rule.
httpOptional ¶
http: HttpIngressRuleValue
- Type: cdk8s_plus_31.k8s.HttpIngressRuleValue
IngressServiceBackend ¶
IngressServiceBackend references a Kubernetes Service as a Backend.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IngressServiceBackend(
name: str,
port: ServiceBackendPort = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the referenced service. |
port |
cdk8s_plus_31.k8s.ServiceBackendPort |
port of the referenced service. |
nameRequired ¶
name: str
- Type: str
name is the referenced service.
The service must exist in the same namespace as the Ingress object.
portOptional ¶
port: ServiceBackendPort
- Type: cdk8s_plus_31.k8s.ServiceBackendPort
port of the referenced service.
A port name or port number is required for a IngressServiceBackend.
IngressSpec ¶
IngressSpec describes the Ingress the user wishes to exist.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IngressSpec(
default_backend: IngressBackend = None,
ingress_class_name: str = None,
rules: typing.List[IngressRule] = None,
tls: typing.List[IngressTls] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
default_backend |
cdk8s_plus_31.k8s.IngressBackend |
defaultBackend is the backend that should handle requests that don’t match any rule. |
ingress_class_name |
str |
ingressClassName is the name of an IngressClass cluster resource. |
rules |
typing.List[cdk8s_plus_31.k8s.IngressRule] |
rules is a list of host rules used to configure the Ingress. |
tls |
typing.List[cdk8s_plus_31.k8s.IngressTls] |
tls represents the TLS configuration. |
default_backendOptional ¶
default_backend: IngressBackend
- Type: cdk8s_plus_31.k8s.IngressBackend
defaultBackend is the backend that should handle requests that don’t match any rule.
If Rules are not specified, DefaultBackend must be specified. If DefaultBackend is not set, the handling of requests that do not match any of the rules will be up to the Ingress controller.
ingress_class_nameOptional ¶
ingress_class_name: str
- Type: str
ingressClassName is the name of an IngressClass cluster resource.
Ingress controller implementations use this field to know whether they should be serving this Ingress resource, by a transitive connection (controller -> IngressClass -> Ingress resource). Although the kubernetes.io/ingress.class annotation (simple constant name) was never formally defined, it was widely supported by Ingress controllers to create a direct binding between Ingress controller and Ingress resources. Newly created Ingress resources should prefer using the field. However, even though the annotation is officially deprecated, for backwards compatibility reasons, ingress controllers should still honor that annotation if present.
rulesOptional ¶
rules: typing.List[IngressRule]
- Type: typing.List[cdk8s_plus_31.k8s.IngressRule]
rules is a list of host rules used to configure the Ingress.
If unspecified, or no rule matches, all traffic is sent to the default backend.
tlsOptional ¶
tls: typing.List[IngressTls]
- Type: typing.List[cdk8s_plus_31.k8s.IngressTls]
tls represents the TLS configuration.
Currently the Ingress only supports a single TLS port, 443. If multiple members of this list specify different hosts, they will be multiplexed on the same port according to the hostname specified through the SNI TLS extension, if the ingress controller fulfilling the ingress supports SNI.
IngressTls ¶
Represents the TLS configuration mapping that is passed to the ingress controller for SSL termination.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.IngressTls(
hosts: typing.List[str] = None,
secret: ISecret = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
hosts |
typing.List[str] |
Hosts are a list of hosts included in the TLS certificate. |
secret |
ISecret |
Secret is the secret that contains the certificate and key used to terminate SSL traffic on 443. |
hostsOptional ¶
hosts: typing.List[str]
- Type: typing.List[str]
- Default: If unspecified, it defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress.
Hosts are a list of hosts included in the TLS certificate.
The values in this list must match the name/s used in the TLS Secret.
secretOptional ¶
secret: ISecret
- Type: ISecret
- Default: If unspecified, it allows SSL routing based on SNI hostname.
Secret is the secret that contains the certificate and key used to terminate SSL traffic on 443.
If the SNI host in a listener conflicts with the “Host” header field used by an IngressRule, the SNI host is used for termination and value of the Host header is used for routing.
IngressTls ¶
IngressTLS describes the transport layer security associated with an ingress.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IngressTls(
hosts: typing.List[str] = None,
secret_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
hosts |
typing.List[str] |
hosts is a list of hosts included in the TLS certificate. |
secret_name |
str |
secretName is the name of the secret used to terminate TLS traffic on port 443. |
hostsOptional ¶
hosts: typing.List[str]
- Type: typing.List[str]
- Default: the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
hosts is a list of hosts included in the TLS certificate.
The values in this list must match the name/s used in the tlsSecret. Defaults to the wildcard host setting for the loadbalancer controller fulfilling this Ingress, if left unspecified.
secret_nameOptional ¶
secret_name: str
- Type: str
secretName is the name of the secret used to terminate TLS traffic on port 443.
Field is left optional to allow TLS routing based on SNI hostname alone. If the SNI host in a listener conflicts with the “Host” header field used by an IngressRule, the SNI host is used for termination and value of the “Host” header is used for routing.
IpAddressSpecV1Beta1 ¶
IPAddressSpec describe the attributes in an IP Address.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IpAddressSpecV1Beta1(
parent_ref: ParentReferenceV1Beta1
)
Properties ¶
| Name | Type | Description |
|---|---|---|
parent_ref |
cdk8s_plus_31.k8s.ParentReferenceV1Beta1 |
ParentRef references the resource that an IPAddress is attached to. |
parent_refRequired ¶
parent_ref: ParentReferenceV1Beta1
- Type: cdk8s_plus_31.k8s.ParentReferenceV1Beta1
ParentRef references the resource that an IPAddress is attached to.
An IPAddress must reference a parent object.
IpBlock ¶
IPBlock describes a particular CIDR (Ex.
“192.168.1.0/24”,”2001:db8::/64”) that is allowed to the pods matched by a NetworkPolicySpec’s podSelector. The except entry describes CIDRs that should not be included within this rule.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IpBlock(
cidr: str,
except: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
cidr |
str |
cidr is a string representing the IPBlock Valid examples are “192.168.1.0/24” or “2001:db8::/64”. |
except |
typing.List[str] |
except is a slice of CIDRs that should not be included within an IPBlock Valid examples are “192.168.1.0/24” or “2001:db8::/64” Except values will be rejected if they are outside the cidr range. |
cidrRequired ¶
cidr: str
- Type: str
cidr is a string representing the IPBlock Valid examples are “192.168.1.0/24” or “2001:db8::/64”.
exceptOptional ¶
except: typing.List[str]
- Type: typing.List[str]
except is a slice of CIDRs that should not be included within an IPBlock Valid examples are “192.168.1.0/24” or “2001:db8::/64” Except values will be rejected if they are outside the cidr range.
IscsiPersistentVolumeSource ¶
ISCSIPersistentVolumeSource represents an ISCSI disk.
ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IscsiPersistentVolumeSource(
iqn: str,
lun: typing.Union[int, float],
target_portal: str,
chap_auth_discovery: bool = None,
chap_auth_session: bool = None,
fs_type: str = None,
initiator_name: str = None,
iscsi_interface: str = None,
portals: typing.List[str] = None,
read_only: bool = None,
secret_ref: SecretReference = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
iqn |
str |
iqn is Target iSCSI Qualified Name. |
lun |
typing.Union[int, float] |
lun is iSCSI Target Lun number. |
target_portal |
str |
targetPortal is iSCSI Target Portal. |
chap_auth_discovery |
bool |
chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication. |
chap_auth_session |
bool |
chapAuthSession defines whether support iSCSI Session CHAP authentication. |
fs_type |
str |
fsType is the filesystem type of the volume that you want to mount. |
initiator_name |
str |
initiatorName is the custom iSCSI Initiator Name. |
iscsi_interface |
str |
iscsiInterface is the interface Name that uses an iSCSI transport. |
portals |
typing.List[str] |
portals is the iSCSI Target Portal List. |
read_only |
bool |
readOnly here will force the ReadOnly setting in VolumeMounts. |
secret_ref |
cdk8s_plus_31.k8s.SecretReference |
secretRef is the CHAP Secret for iSCSI target and initiator authentication. |
iqnRequired ¶
iqn: str
- Type: str
iqn is Target iSCSI Qualified Name.
lunRequired ¶
lun: typing.Union[int, float]
- Type: typing.Union[int, float]
lun is iSCSI Target Lun number.
target_portalRequired ¶
target_portal: str
- Type: str
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).
chap_auth_discoveryOptional ¶
chap_auth_discovery: bool
- Type: bool
chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication.
chap_auth_sessionOptional ¶
chap_auth_session: bool
- Type: bool
chapAuthSession defines whether support iSCSI Session CHAP authentication.
fs_typeOptional ¶
fs_type: str
- Type: str
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
initiator_nameOptional ¶
initiator_name: str
- Type: str
initiatorName is the custom iSCSI Initiator Name.
If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
iscsi_interfaceOptional ¶
iscsi_interface: str
- Type: str
- Default: default’ (tcp).
iscsiInterface is the interface Name that uses an iSCSI transport.
Defaults to ‘default’ (tcp).
portalsOptional ¶
portals: typing.List[str]
- Type: typing.List[str]
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).
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false.
readOnly here will force the ReadOnly setting in VolumeMounts.
Defaults to false.
secret_refOptional ¶
secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
secretRef is the CHAP Secret for iSCSI target and initiator authentication.
IscsiVolumeSource ¶
Represents an ISCSI disk.
ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.IscsiVolumeSource(
iqn: str,
lun: typing.Union[int, float],
target_portal: str,
chap_auth_discovery: bool = None,
chap_auth_session: bool = None,
fs_type: str = None,
initiator_name: str = None,
iscsi_interface: str = None,
portals: typing.List[str] = None,
read_only: bool = None,
secret_ref: LocalObjectReference = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
iqn |
str |
iqn is the target iSCSI Qualified Name. |
lun |
typing.Union[int, float] |
lun represents iSCSI Target Lun number. |
target_portal |
str |
targetPortal is iSCSI Target Portal. |
chap_auth_discovery |
bool |
chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication. |
chap_auth_session |
bool |
chapAuthSession defines whether support iSCSI Session CHAP authentication. |
fs_type |
str |
fsType is the filesystem type of the volume that you want to mount. |
initiator_name |
str |
initiatorName is the custom iSCSI Initiator Name. |
iscsi_interface |
str |
iscsiInterface is the interface Name that uses an iSCSI transport. |
portals |
typing.List[str] |
portals is the iSCSI Target Portal List. |
read_only |
bool |
readOnly here will force the ReadOnly setting in VolumeMounts. |
secret_ref |
cdk8s_plus_31.k8s.LocalObjectReference |
secretRef is the CHAP Secret for iSCSI target and initiator authentication. |
iqnRequired ¶
iqn: str
- Type: str
iqn is the target iSCSI Qualified Name.
lunRequired ¶
lun: typing.Union[int, float]
- Type: typing.Union[int, float]
lun represents iSCSI Target Lun number.
target_portalRequired ¶
target_portal: str
- Type: str
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).
chap_auth_discoveryOptional ¶
chap_auth_discovery: bool
- Type: bool
chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication.
chap_auth_sessionOptional ¶
chap_auth_session: bool
- Type: bool
chapAuthSession defines whether support iSCSI Session CHAP authentication.
fs_typeOptional ¶
fs_type: str
- Type: str
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
initiator_nameOptional ¶
initiator_name: str
- Type: str
initiatorName is the custom iSCSI Initiator Name.
If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
iscsi_interfaceOptional ¶
iscsi_interface: str
- Type: str
- Default: default’ (tcp).
iscsiInterface is the interface Name that uses an iSCSI transport.
Defaults to ‘default’ (tcp).
portalsOptional ¶
portals: typing.List[str]
- Type: typing.List[str]
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).
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false.
readOnly here will force the ReadOnly setting in VolumeMounts.
Defaults to false.
secret_refOptional ¶
secret_ref: LocalObjectReference
- Type: cdk8s_plus_31.k8s.LocalObjectReference
secretRef is the CHAP Secret for iSCSI target and initiator authentication.
JobProps ¶
Properties for Job.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.JobProps(
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
active_deadline: Duration = None,
backoff_limit: typing.Union[int, float] = None,
ttl_after_finished: Duration = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
active_deadline |
cdk8s.Duration |
Specifies the duration the job may be active before the system tries to terminate it. |
backoff_limit |
typing.Union[int, float] |
Specifies the number of retries before marking this job failed. |
ttl_after_finished |
cdk8s.Duration |
Limits the lifetime of a Job that has finished execution (either Complete or Failed). |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
dns: PodDnsProps
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
host_network: bool
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
init_containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
isolate: bool
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
security_context: PodSecurityContextProps
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
share_process_namespace: bool
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
pod_metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
select: bool
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
spread: bool
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
active_deadlineOptional ¶
active_deadline: Duration
- Type: cdk8s.Duration
- Default: If unset, then there is no deadline.
Specifies the duration the job may be active before the system tries to terminate it.
backoff_limitOptional ¶
backoff_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: If not set, system defaults to 6.
Specifies the number of retries before marking this job failed.
ttl_after_finishedOptional ¶
ttl_after_finished: Duration
- Type: cdk8s.Duration
- Default: If this field is unset, the Job won’t be automatically deleted.
Limits the lifetime of a Job that has finished execution (either Complete or Failed).
If this field is set, after the Job finishes, it is eligible to
be automatically deleted. When the Job is being deleted, its lifecycle
guarantees (e.g. finalizers) will be honored. If this field is set to zero,
the Job becomes eligible to be deleted immediately after it finishes. This
field is alpha-level and is only honored by servers that enable the
TTLAfterFinished feature.
JobSpec ¶
JobSpec describes how the job execution will look like.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.JobSpec(
template: PodTemplateSpec,
active_deadline_seconds: typing.Union[int, float] = None,
backoff_limit: typing.Union[int, float] = None,
backoff_limit_per_index: typing.Union[int, float] = None,
completion_mode: str = None,
completions: typing.Union[int, float] = None,
managed_by: str = None,
manual_selector: bool = None,
max_failed_indexes: typing.Union[int, float] = None,
parallelism: typing.Union[int, float] = None,
pod_failure_policy: PodFailurePolicy = None,
pod_replacement_policy: str = None,
selector: LabelSelector = None,
success_policy: SuccessPolicy = None,
suspend: bool = None,
ttl_seconds_after_finished: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
template |
cdk8s_plus_31.k8s.PodTemplateSpec |
Describes the pod that will be created when executing a job. |
active_deadline_seconds |
typing.Union[int, float] |
Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it; |
backoff_limit |
typing.Union[int, float] |
Specifies the number of retries before marking this job failed. |
backoff_limit_per_index |
typing.Union[int, float] |
Specifies the limit for the number of retries within an index before marking this index as failed. |
completion_mode |
str |
completionMode specifies how Pod completions are tracked. It can be NonIndexed (default) or Indexed. |
completions |
typing.Union[int, float] |
Specifies the desired number of successfully finished pods the job should be run with. |
managed_by |
str |
ManagedBy field indicates the controller that manages a Job. |
manual_selector |
bool |
manualSelector controls generation of pod labels and pod selectors. |
max_failed_indexes |
typing.Union[int, float] |
Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. |
parallelism |
typing.Union[int, float] |
Specifies the maximum desired number of pods the job should run at any given time. |
pod_failure_policy |
cdk8s_plus_31.k8s.PodFailurePolicy |
Specifies the policy of handling failed pods. |
pod_replacement_policy |
str |
podReplacementPolicy specifies when to create replacement Pods. |
selector |
cdk8s_plus_31.k8s.LabelSelector |
A label query over pods that should match the pod count. |
success_policy |
cdk8s_plus_31.k8s.SuccessPolicy |
successPolicy specifies the policy when the Job can be declared as succeeded. |
suspend |
bool |
suspend specifies whether the Job controller should create Pods or not. |
ttl_seconds_after_finished |
typing.Union[int, float] |
ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). |
templateRequired ¶
template: PodTemplateSpec
- Type: cdk8s_plus_31.k8s.PodTemplateSpec
Describes the pod that will be created when executing a job.
The only allowed template.spec.restartPolicy values are “Never” or “OnFailure”. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
active_deadline_secondsOptional ¶
active_deadline_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
Specifies the duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it;
value must be positive integer. If a Job is suspended (at creation or through an update), this timer will effectively be stopped and reset when the Job is resumed again.
backoff_limitOptional ¶
backoff_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 6
Specifies the number of retries before marking this job failed.
Defaults to 6
backoff_limit_per_indexOptional ¶
backoff_limit_per_index: typing.Union[int, float]
- Type: typing.Union[int, float]
Specifies the limit for the number of retries within an index before marking this index as failed.
When enabled the number of failures per index is kept in the pod’s batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job’s completionMode=Indexed, and the Pod’s restart policy is Never. The field is immutable. This field is beta-level. It can be used when the JobBackoffLimitPerIndex feature gate is enabled (enabled by default).
completion_modeOptional ¶
completion_mode: str
- Type: str
completionMode specifies how Pod completions are tracked. It can be NonIndexed (default) or Indexed.
NonIndexed means that the Job is considered complete when there have been .spec.completions successfully completed Pods. Each Pod completion is homologous to each other.
Indexed means that the Pods of a Job get an associated completion index from 0 to (.spec.completions - 1), available in the annotation batch.kubernetes.io/job-completion-index. The Job is considered complete when there is one successfully completed Pod for each index. When value is Indexed, .spec.completions must be specified and .spec.parallelism must be less than or equal to 10^5. In addition, The Pod name takes the form $(job-name)-$(index)-$(random-string), the Pod hostname takes the form $(job-name)-$(index).
More completion modes can be added in the future. If the Job controller observes a mode that it doesn’t recognize, which is possible during upgrades due to version skew, the controller skips updates for the Job.
completionsOptional ¶
completions: typing.Union[int, float]
- Type: typing.Union[int, float]
Specifies the desired number of successfully finished pods the job should be run with.
Setting to null means that the success of any pod signals the success of all pods, and allows parallelism to have any positive value. Setting to 1 means that parallelism is limited to 1 and the success of that pod signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
managed_byOptional ¶
managed_by: str
- Type: str
ManagedBy field indicates the controller that manages a Job.
The k8s Job controller reconciles jobs which don’t have this field at all or the field value is the reserved string kubernetes.io/job-controller, but skips reconciling Jobs with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first “/” must be a valid subdomain as defined by RFC 1123. All characters trailing the first “/” must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. This field is immutable.
This field is alpha-level. The job controller accepts setting the field when the feature gate JobManagedBy is enabled (disabled by default).
manual_selectorOptional ¶
manual_selector: bool
- Type: bool
manualSelector controls generation of pod labels and pod selectors.
Leave manualSelector unset unless you are certain what you are doing. When false or unset, the system pick labels unique to this job and appends those labels to the pod template. When true, the user is responsible for picking unique labels and specifying the selector. Failure to pick a unique label may cause this and other jobs to not function correctly. However, You may see manualSelector=true in jobs that were created with the old extensions/v1beta1 API. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#specifying-your-own-pod-selector
max_failed_indexesOptional ¶
max_failed_indexes: typing.Union[int, float]
- Type: typing.Union[int, float]
Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set.
Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the Complete Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is beta-level. It can be used when the JobBackoffLimitPerIndex feature gate is enabled (enabled by default).
parallelismOptional ¶
parallelism: typing.Union[int, float]
- Type: typing.Union[int, float]
Specifies the maximum desired number of pods the job should run at any given time.
The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
pod_failure_policyOptional ¶
pod_failure_policy: PodFailurePolicy
- Type: cdk8s_plus_31.k8s.PodFailurePolicy
Specifies the policy of handling failed pods.
In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs’s .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure.
pod_replacement_policyOptional ¶
pod_replacement_policy: str
- Type: str
podReplacementPolicy specifies when to create replacement Pods.
Possible values are: - TerminatingOrFailed means that we recreate pods when they are terminating (has a metadata.deletionTimestamp) or failed.
- Failed means to wait until a previously created Pod is fully terminated (has phase Failed or Succeeded) before creating a replacement Pod.
When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default.
selectorOptional ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
A label query over pods that should match the pod count.
Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
success_policyOptional ¶
success_policy: SuccessPolicy
- Type: cdk8s_plus_31.k8s.SuccessPolicy
successPolicy specifies the policy when the Job can be declared as succeeded.
If empty, the default behavior applies - the Job is declared as succeeded only when the number of succeeded pods equals to the completions. When the field is specified, it must be immutable and works only for the Indexed Jobs. Once the Job meets the SuccessPolicy, the lingering pods are terminated.
This field is beta-level. To use this field, you must enable the JobSuccessPolicy feature gate (enabled by default).
suspendOptional ¶
suspend: bool
- Type: bool
- Default: false.
suspend specifies whether the Job controller should create Pods or not.
If a Job is created with suspend set to true, no Pods are created by the Job controller. If a Job is suspended after creation (i.e. the flag goes from false to true), the Job controller will delete all active Pods associated with this Job. Users must design their workload to gracefully handle this. Suspending a Job will reset the StartTime field of the Job, effectively resetting the ActiveDeadlineSeconds timer too. Defaults to false.
ttl_seconds_after_finishedOptional ¶
ttl_seconds_after_finished: typing.Union[int, float]
- Type: typing.Union[int, float]
ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed).
If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the Job won’t be automatically deleted. If this field is set to zero, the Job becomes eligible to be deleted immediately after it finishes.
JobTemplateSpec ¶
JobTemplateSpec describes the data a Job should have when created from a template.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.JobTemplateSpec(
metadata: ObjectMeta = None,
spec: JobSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata of the jobs created from this template. |
spec |
cdk8s_plus_31.k8s.JobSpec |
Specification of the desired behavior of the job. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata of the jobs created from this template.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: JobSpec
- Type: cdk8s_plus_31.k8s.JobSpec
Specification of the desired behavior of the job.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
JsonSchemaProps ¶
JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.JsonSchemaProps(
additional_items: typing.Any = None,
additional_properties: typing.Any = None,
all_of: typing.List[JsonSchemaProps] = None,
any_of: typing.List[JsonSchemaProps] = None,
default: typing.Any = None,
definitions: typing.Mapping[JsonSchemaProps] = None,
dependencies: typing.Mapping[typing.Any] = None,
description: str = None,
enum: typing.List[typing.Any] = None,
example: typing.Any = None,
exclusive_maximum: bool = None,
exclusive_minimum: bool = None,
external_docs: ExternalDocumentation = None,
format: str = None,
id: str = None,
items: typing.Any = None,
maximum: typing.Union[int, float] = None,
max_items: typing.Union[int, float] = None,
max_length: typing.Union[int, float] = None,
max_properties: typing.Union[int, float] = None,
minimum: typing.Union[int, float] = None,
min_items: typing.Union[int, float] = None,
min_length: typing.Union[int, float] = None,
min_properties: typing.Union[int, float] = None,
multiple_of: typing.Union[int, float] = None,
not: JsonSchemaProps = None,
nullable: bool = None,
one_of: typing.List[JsonSchemaProps] = None,
pattern: str = None,
pattern_properties: typing.Mapping[JsonSchemaProps] = None,
properties: typing.Mapping[JsonSchemaProps] = None,
ref: str = None,
required: typing.List[str] = None,
schema: str = None,
title: str = None,
type: str = None,
unique_items: bool = None,
x_kubernetes_embedded_resource: bool = None,
x_kubernetes_int_or_string: bool = None,
x_kubernetes_list_map_keys: typing.List[str] = None,
x_kubernetes_list_type: str = None,
x_kubernetes_map_type: str = None,
x_kubernetes_preserve_unknown_fields: bool = None,
x_kubernetes_validations: typing.List[ValidationRule] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
additional_items |
typing.Any |
No description. |
additional_properties |
typing.Any |
No description. |
all_of |
typing.List[cdk8s_plus_31.k8s.JsonSchemaProps] |
No description. |
any_of |
typing.List[cdk8s_plus_31.k8s.JsonSchemaProps] |
No description. |
default |
typing.Any |
default is a default value for undefined object fields. |
definitions |
typing.Mapping[cdk8s_plus_31.k8s.JsonSchemaProps] |
No description. |
dependencies |
typing.Mapping[typing.Any] |
No description. |
description |
str |
No description. |
enum |
typing.List[typing.Any] |
No description. |
example |
typing.Any |
No description. |
exclusive_maximum |
bool |
No description. |
exclusive_minimum |
bool |
No description. |
external_docs |
cdk8s_plus_31.k8s.ExternalDocumentation |
No description. |
format |
str |
format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:. |
id |
str |
No description. |
items |
typing.Any |
No description. |
maximum |
typing.Union[int, float] |
No description. |
max_items |
typing.Union[int, float] |
No description. |
max_length |
typing.Union[int, float] |
No description. |
max_properties |
typing.Union[int, float] |
No description. |
minimum |
typing.Union[int, float] |
No description. |
min_items |
typing.Union[int, float] |
No description. |
min_length |
typing.Union[int, float] |
No description. |
min_properties |
typing.Union[int, float] |
No description. |
multiple_of |
typing.Union[int, float] |
No description. |
not |
cdk8s_plus_31.k8s.JsonSchemaProps |
No description. |
nullable |
bool |
No description. |
one_of |
typing.List[cdk8s_plus_31.k8s.JsonSchemaProps] |
No description. |
pattern |
str |
No description. |
pattern_properties |
typing.Mapping[cdk8s_plus_31.k8s.JsonSchemaProps] |
No description. |
properties |
typing.Mapping[cdk8s_plus_31.k8s.JsonSchemaProps] |
No description. |
ref |
str |
No description. |
required |
typing.List[str] |
No description. |
schema |
str |
No description. |
title |
str |
No description. |
type |
str |
No description. |
unique_items |
bool |
No description. |
x_kubernetes_embedded_resource |
bool |
x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata). |
x_kubernetes_int_or_string |
bool |
x-kubernetes-int-or-string specifies that this value is either an integer or a string. |
x_kubernetes_list_map_keys |
typing.List[str] |
x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type map by specifying the keys used as the index of the map. |
x_kubernetes_list_type |
str |
x-kubernetes-list-type annotates an array to further describe its topology. |
x_kubernetes_map_type |
str |
x-kubernetes-map-type annotates an object to further describe its topology. |
x_kubernetes_preserve_unknown_fields |
bool |
x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema. |
x_kubernetes_validations |
typing.List[cdk8s_plus_31.k8s.ValidationRule] |
x-kubernetes-validations describes a list of validation rules written in the CEL expression language. |
additional_itemsOptional ¶
additional_items: typing.Any
- Type: typing.Any
additional_propertiesOptional ¶
additional_properties: typing.Any
- Type: typing.Any
all_ofOptional ¶
all_of: typing.List[JsonSchemaProps]
- Type: typing.List[cdk8s_plus_31.k8s.JsonSchemaProps]
any_ofOptional ¶
any_of: typing.List[JsonSchemaProps]
- Type: typing.List[cdk8s_plus_31.k8s.JsonSchemaProps]
defaultOptional ¶
default: typing.Any
- Type: typing.Any
default is a default value for undefined object fields.
Defaulting is a beta feature under the CustomResourceDefaulting feature gate. Defaulting requires spec.preserveUnknownFields to be false.
definitionsOptional ¶
definitions: typing.Mapping[JsonSchemaProps]
- Type: typing.Mapping[cdk8s_plus_31.k8s.JsonSchemaProps]
dependenciesOptional ¶
dependencies: typing.Mapping[typing.Any]
- Type: typing.Mapping[typing.Any]
descriptionOptional ¶
description: str
- Type: str
enumOptional ¶
enum: typing.List[typing.Any]
- Type: typing.List[typing.Any]
exampleOptional ¶
example: typing.Any
- Type: typing.Any
exclusive_maximumOptional ¶
exclusive_maximum: bool
- Type: bool
exclusive_minimumOptional ¶
exclusive_minimum: bool
- Type: bool
external_docsOptional ¶
external_docs: ExternalDocumentation
- Type: cdk8s_plus_31.k8s.ExternalDocumentation
formatOptional ¶
format: str
- Type: str
format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated:.
- bsonobjectid: a bson object ID, i.e. a 24 characters hex string - uri: an URI as parsed by Golang net/url.ParseRequestURI - email: an email address as parsed by Golang net/mail.ParseAddress - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - cidr: a CIDR as parsed by Golang net.ParseCIDR - mac: a MAC address as parsed by Golang net.ParseMAC - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - isbn: an ISBN10 or ISBN13 number string like “0321751043” or “978-0321751041” - isbn10: an ISBN10 number string like “0321751043” - isbn13: an ISBN13 number string like “978-0321751041” - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$ with any non digit characters mixed in - ssn: a U.S. social security number following the regex ^\d{3}[- ]?\d{2}[- ]?\d{4}$ - hexcolor: an hexadecimal color code like “#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - rgbcolor: an RGB color code like rgb like “rgb(255,255,2559” - byte: base64 encoded binary data - password: any kind of string - date: a date string like “2006-01-02” as defined by full-date in RFC3339 - duration: a duration string like “22 ns” as parsed by Golang time.ParseDuration or compatible with Scala duration format - datetime: a date time string like “2014-12-15T19:30:20.000Z” as defined by date-time in RFC3339.
idOptional ¶
id: str
- Type: str
itemsOptional ¶
items: typing.Any
- Type: typing.Any
maximumOptional ¶
maximum: typing.Union[int, float]
- Type: typing.Union[int, float]
max_itemsOptional ¶
max_items: typing.Union[int, float]
- Type: typing.Union[int, float]
max_lengthOptional ¶
max_length: typing.Union[int, float]
- Type: typing.Union[int, float]
max_propertiesOptional ¶
max_properties: typing.Union[int, float]
- Type: typing.Union[int, float]
minimumOptional ¶
minimum: typing.Union[int, float]
- Type: typing.Union[int, float]
min_itemsOptional ¶
min_items: typing.Union[int, float]
- Type: typing.Union[int, float]
min_lengthOptional ¶
min_length: typing.Union[int, float]
- Type: typing.Union[int, float]
min_propertiesOptional ¶
min_properties: typing.Union[int, float]
- Type: typing.Union[int, float]
multiple_ofOptional ¶
multiple_of: typing.Union[int, float]
- Type: typing.Union[int, float]
notOptional ¶
not: JsonSchemaProps
- Type: cdk8s_plus_31.k8s.JsonSchemaProps
nullableOptional ¶
nullable: bool
- Type: bool
one_ofOptional ¶
one_of: typing.List[JsonSchemaProps]
- Type: typing.List[cdk8s_plus_31.k8s.JsonSchemaProps]
patternOptional ¶
pattern: str
- Type: str
pattern_propertiesOptional ¶
pattern_properties: typing.Mapping[JsonSchemaProps]
- Type: typing.Mapping[cdk8s_plus_31.k8s.JsonSchemaProps]
propertiesOptional ¶
properties: typing.Mapping[JsonSchemaProps]
- Type: typing.Mapping[cdk8s_plus_31.k8s.JsonSchemaProps]
refOptional ¶
ref: str
- Type: str
requiredOptional ¶
required: typing.List[str]
- Type: typing.List[str]
schemaOptional ¶
schema: str
- Type: str
titleOptional ¶
title: str
- Type: str
typeOptional ¶
type: str
- Type: str
unique_itemsOptional ¶
unique_items: bool
- Type: bool
x_kubernetes_embedded_resourceOptional ¶
x_kubernetes_embedded_resource: bool
- Type: bool
x-kubernetes-embedded-resource defines that the value is an embedded Kubernetes runtime.Object, with TypeMeta and ObjectMeta. The type must be object. It is allowed to further restrict the embedded object. kind, apiVersion and metadata are validated automatically. x-kubernetes-preserve-unknown-fields is allowed to be true, but does not have to be if the object is fully specified (up to kind, apiVersion, metadata).
x_kubernetes_int_or_stringOptional ¶
x_kubernetes_int_or_string: bool
- Type: bool
x-kubernetes-int-or-string specifies that this value is either an integer or a string.
If this is true, an empty type is allowed and type as child of anyOf is permitted if following one of the following patterns:
1) anyOf:
- type: integer
- type: string
1) allOf:
- anyOf:
- type: integer
- type: string
- … zero or more
x_kubernetes_list_map_keysOptional ¶
x_kubernetes_list_map_keys: typing.List[str]
- Type: typing.List[str]
x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type map by specifying the keys used as the index of the map.
This tag MUST only be used on lists that have the “x-kubernetes-list-type” extension set to “map”. Also, the values specified for this attribute must be a scalar typed field of the child structure (no nesting is supported).
The properties specified must either be required or have a default value, to ensure those properties are present for all list items.
x_kubernetes_list_typeOptional ¶
x_kubernetes_list_type: str
- Type: str
- Default: atomic for arrays.
x-kubernetes-list-type annotates an array to further describe its topology.
This extension must only be used on lists and may have 3 possible values:
1) atomic: the list is treated as a single entity, like a scalar.
Atomic lists will be entirely replaced when updated. This extension
may be used on any type of list (struct, scalar, …).
2) set:
Sets are lists that must not have multiple items with the same value. Each
value must be a scalar, an object with x-kubernetes-map-type atomic or an
array with x-kubernetes-list-type atomic.
3) map:
These lists are like maps in that their elements have a non-index key
used to identify them. Order is preserved upon merge. The map tag
must only be used on a list with elements of type object.
Defaults to atomic for arrays.
x_kubernetes_map_typeOptional ¶
x_kubernetes_map_type: str
- Type: str
x-kubernetes-map-type annotates an object to further describe its topology.
This extension must only be used when type is object and may have 2 possible values:
1) granular:
These maps are actual maps (key-value pairs) and each fields are independent
from each other (they can each be manipulated by separate actors). This is
the default behaviour for all maps.
2) atomic: the list is treated as a single entity, like a scalar.
Atomic maps will be entirely replaced when updated.
x_kubernetes_preserve_unknown_fieldsOptional ¶
x_kubernetes_preserve_unknown_fields: bool
- Type: bool
x-kubernetes-preserve-unknown-fields stops the API server decoding step from pruning fields which are not specified in the validation schema.
This affects fields recursively, but switches back to normal pruning behaviour if nested properties or additionalProperties are specified in the schema. This can either be true or undefined. False is forbidden.
x_kubernetes_validationsOptional ¶
x_kubernetes_validations: typing.List[ValidationRule]
- Type: typing.List[cdk8s_plus_31.k8s.ValidationRule]
x-kubernetes-validations describes a list of validation rules written in the CEL expression language.
KeyToPath ¶
Maps a string key to a path within a volume.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KeyToPath(
key: str,
path: str,
mode: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
key is the key to project. |
path |
str |
path is the relative path of the file to map the key to. |
mode |
typing.Union[int, float] |
mode is Optional: mode bits used to set permissions on this file. |
keyRequired ¶
key: str
- Type: str
key is the key to project.
pathRequired ¶
path: str
- Type: str
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 ‘..’.
modeOptional ¶
mode: typing.Union[int, float]
- Type: typing.Union[int, float]
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.
KubeApiServiceListProps ¶
APIServiceList is a list of APIService objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiServiceListProps(
items: typing.List[KubeApiServiceProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeApiServiceProps] |
Items is the list of APIService. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeApiServiceProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeApiServiceProps]
Items is the list of APIService.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeApiServiceProps ¶
APIService represents a server for a particular GroupVersion.
Name must be “version.group”.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeApiServiceProps(
metadata: ObjectMeta = None,
spec: ApiServiceSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.ApiServiceSpec |
Spec contains information for locating and communicating with a server. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: ApiServiceSpec
- Type: cdk8s_plus_31.k8s.ApiServiceSpec
Spec contains information for locating and communicating with a server.
KubeBindingProps ¶
Binding ties one object to another;
for example, a pod is bound to a node by a scheduler. Deprecated in 1.7, please use the bindings subresource of pods instead.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeBindingProps(
target: ObjectReference,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
target |
cdk8s_plus_31.k8s.ObjectReference |
The target object that you want to bind to the standard object. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
targetRequired ¶
target: ObjectReference
- Type: cdk8s_plus_31.k8s.ObjectReference
The target object that you want to bind to the standard object.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeCertificateSigningRequestListProps ¶
CertificateSigningRequestList is a collection of CertificateSigningRequest objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequestListProps(
items: typing.List[KubeCertificateSigningRequestProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeCertificateSigningRequestProps] |
items is a collection of CertificateSigningRequest objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
No description. |
itemsRequired ¶
items: typing.List[KubeCertificateSigningRequestProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeCertificateSigningRequestProps]
items is a collection of CertificateSigningRequest objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
KubeCertificateSigningRequestProps ¶
CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued.
Kubelets use this API to obtain:
- client certificates to authenticate to kube-apiserver (with the “kubernetes.io/kube-apiserver-client-kubelet” signerName).
- serving certificates for TLS endpoints kube-apiserver can connect to securely (with the “kubernetes.io/kubelet-serving” signerName).
This API can be used to request client certificates to authenticate to kube-apiserver (with the “kubernetes.io/kube-apiserver-client” signerName), or to obtain certificates from custom non-Kubernetes signers.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCertificateSigningRequestProps(
spec: CertificateSigningRequestSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.CertificateSigningRequestSpec |
spec contains the certificate request, and is immutable after creation. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
No description. |
specRequired ¶
spec: CertificateSigningRequestSpec
- Type: cdk8s_plus_31.k8s.CertificateSigningRequestSpec
spec contains the certificate request, and is immutable after creation.
Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
KubeClusterRoleBindingListProps ¶
ClusterRoleBindingList is a collection of ClusterRoleBindings.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBindingListProps(
items: typing.List[KubeClusterRoleBindingProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeClusterRoleBindingProps] |
Items is a list of ClusterRoleBindings. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubeClusterRoleBindingProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeClusterRoleBindingProps]
Items is a list of ClusterRoleBindings.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
KubeClusterRoleBindingProps ¶
ClusterRoleBinding references a ClusterRole, but not contain it.
It can reference a ClusterRole in the global namespace, and adds who information via Subject.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleBindingProps(
role_ref: RoleRef,
metadata: ObjectMeta = None,
subjects: typing.List[Subject] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
role_ref |
cdk8s_plus_31.k8s.RoleRef |
RoleRef can only reference a ClusterRole in the global namespace. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
subjects |
typing.List[cdk8s_plus_31.k8s.Subject] |
Subjects holds references to the objects the role applies to. |
role_refRequired ¶
role_ref: RoleRef
- Type: cdk8s_plus_31.k8s.RoleRef
RoleRef can only reference a ClusterRole in the global namespace.
If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
subjects: typing.List[Subject]
- Type: typing.List[cdk8s_plus_31.k8s.Subject]
Subjects holds references to the objects the role applies to.
KubeClusterRoleListProps ¶
ClusterRoleList is a collection of ClusterRoles.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleListProps(
items: typing.List[KubeClusterRoleProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeClusterRoleProps] |
Items is a list of ClusterRoles. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubeClusterRoleProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeClusterRoleProps]
Items is a list of ClusterRoles.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
KubeClusterRoleProps ¶
ClusterRole is a cluster level, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding or ClusterRoleBinding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterRoleProps(
aggregation_rule: AggregationRule = None,
metadata: ObjectMeta = None,
rules: typing.List[PolicyRule] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
aggregation_rule |
cdk8s_plus_31.k8s.AggregationRule |
AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
rules |
typing.List[cdk8s_plus_31.k8s.PolicyRule] |
Rules holds all the PolicyRules for this ClusterRole. |
aggregation_ruleOptional ¶
aggregation_rule: AggregationRule
- Type: cdk8s_plus_31.k8s.AggregationRule
AggregationRule is an optional field that describes how to build the Rules for this ClusterRole.
If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
rules: typing.List[PolicyRule]
- Type: typing.List[cdk8s_plus_31.k8s.PolicyRule]
Rules holds all the PolicyRules for this ClusterRole.
KubeClusterTrustBundleListV1Alpha1Props ¶
ClusterTrustBundleList is a collection of ClusterTrustBundle objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleListV1Alpha1Props(
items: typing.List[KubeClusterTrustBundleV1Alpha1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeClusterTrustBundleV1Alpha1Props] |
items is a collection of ClusterTrustBundle objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata contains the list metadata. |
itemsRequired ¶
items: typing.List[KubeClusterTrustBundleV1Alpha1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeClusterTrustBundleV1Alpha1Props]
items is a collection of ClusterTrustBundle objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
metadata contains the list metadata.
KubeClusterTrustBundleV1Alpha1Props ¶
ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors (root certificates).
ClusterTrustBundle objects are considered to be readable by any authenticated user in the cluster, because they can be mounted by pods using the clusterTrustBundle projection. All service accounts have read access to ClusterTrustBundles by default. Users who only have namespace-level access to a cluster can read ClusterTrustBundles by impersonating a serviceaccount that they have access to.
It can be optionally associated with a particular assigner, in which case it contains one valid set of trust anchors for that signer. Signers may have multiple associated ClusterTrustBundles; each is an independent set of trust anchors for that signer. Admission control is used to enforce that only users with permissions on the signer can create or modify the corresponding bundle.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeClusterTrustBundleV1Alpha1Props(
spec: ClusterTrustBundleSpecV1Alpha1,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.ClusterTrustBundleSpecV1Alpha1 |
spec contains the signer (if any) and trust anchors. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata contains the object metadata. |
specRequired ¶
spec: ClusterTrustBundleSpecV1Alpha1
- Type: cdk8s_plus_31.k8s.ClusterTrustBundleSpecV1Alpha1
spec contains the signer (if any) and trust anchors.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata contains the object metadata.
KubeComponentStatusListProps ¶
Status of all the conditions for the component as a list of ComponentStatus objects.
Deprecated: This API is deprecated in v1.19+
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatusListProps(
items: typing.List[KubeComponentStatusProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeComponentStatusProps] |
List of ComponentStatus objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeComponentStatusProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeComponentStatusProps]
List of ComponentStatus objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeComponentStatusProps ¶
ComponentStatus (and ComponentStatusList) holds the cluster validation info.
Deprecated: This API is deprecated in v1.19+
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeComponentStatusProps(
conditions: typing.List[ComponentCondition] = None,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
conditions |
typing.List[cdk8s_plus_31.k8s.ComponentCondition] |
List of component conditions observed. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
conditionsOptional ¶
conditions: typing.List[ComponentCondition]
- Type: typing.List[cdk8s_plus_31.k8s.ComponentCondition]
List of component conditions observed.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeConfigMapListProps ¶
ConfigMapList is a resource containing a list of ConfigMap objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMapListProps(
items: typing.List[KubeConfigMapProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeConfigMapProps] |
Items is the list of ConfigMaps. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeConfigMapProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeConfigMapProps]
Items is the list of ConfigMaps.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeConfigMapProps ¶
ConfigMap holds configuration data for pods to consume.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeConfigMapProps(
binary_data: typing.Mapping[str] = None,
data: typing.Mapping[str] = None,
immutable: bool = None,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
binary_data |
typing.Mapping[str] |
BinaryData contains the binary data. |
data |
typing.Mapping[str] |
Data contains the configuration data. |
immutable |
bool |
Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
binary_dataOptional ¶
binary_data: typing.Mapping[str]
- Type: typing.Mapping[str]
BinaryData contains the binary data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.
dataOptional ¶
data: typing.Mapping[str]
- Type: typing.Mapping[str]
Data contains the configuration data.
Each key must consist of alphanumeric characters, ‘-‘, ‘_’ or ‘.’. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.
immutableOptional ¶
immutable: bool
- Type: bool
Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time. Defaulted to nil.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeControllerRevisionListProps ¶
ControllerRevisionList is a resource containing a list of ControllerRevision objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevisionListProps(
items: typing.List[KubeControllerRevisionProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeControllerRevisionProps] |
Items is the list of ControllerRevisions. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeControllerRevisionProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeControllerRevisionProps]
Items is the list of ControllerRevisions.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeControllerRevisionProps ¶
ControllerRevision implements an immutable snapshot of state data.
Clients are responsible for serializing and deserializing the objects that contain their internal state. Once a ControllerRevision has been successfully created, it can not be updated. The API Server will fail validation of all requests that attempt to mutate the Data field. ControllerRevisions may, however, be deleted. Note that, due to its use by both the DaemonSet and StatefulSet controllers for update and rollback, this object is beta. However, it may be subject to name and representation changes in future releases, and clients should not depend on its stability. It is primarily for internal use by controllers.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeControllerRevisionProps(
revision: typing.Union[int, float],
data: typing.Any = None,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
revision |
typing.Union[int, float] |
Revision indicates the revision of the state represented by Data. |
data |
typing.Any |
Data is the serialized representation of the state. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
revisionRequired ¶
revision: typing.Union[int, float]
- Type: typing.Union[int, float]
Revision indicates the revision of the state represented by Data.
dataOptional ¶
data: typing.Any
- Type: typing.Any
Data is the serialized representation of the state.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeCronJobListProps ¶
CronJobList is a collection of cron jobs.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJobListProps(
items: typing.List[KubeCronJobProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeCronJobProps] |
items is the list of CronJobs. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeCronJobProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeCronJobProps]
items is the list of CronJobs.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeCronJobProps ¶
CronJob represents the configuration of a single cron job.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCronJobProps(
metadata: ObjectMeta = None,
spec: CronJobSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.CronJobSpec |
Specification of the desired behavior of a cron job, including the schedule. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: CronJobSpec
- Type: cdk8s_plus_31.k8s.CronJobSpec
Specification of the desired behavior of a cron job, including the schedule.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeCsiDriverListProps ¶
CSIDriverList is a collection of CSIDriver objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriverListProps(
items: typing.List[KubeCsiDriverProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeCsiDriverProps] |
items is the list of CSIDriver. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeCsiDriverProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeCsiDriverProps]
items is the list of CSIDriver.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeCsiDriverProps ¶
CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster.
Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiDriverProps(
spec: CsiDriverSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.CsiDriverSpec |
spec represents the specification of the CSI Driver. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
specRequired ¶
spec: CsiDriverSpec
- Type: cdk8s_plus_31.k8s.CsiDriverSpec
spec represents the specification of the CSI Driver.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeCsiNodeListProps ¶
CSINodeList is a collection of CSINode objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNodeListProps(
items: typing.List[KubeCsiNodeProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeCsiNodeProps] |
items is the list of CSINode. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeCsiNodeProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeCsiNodeProps]
items is the list of CSINode.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeCsiNodeProps ¶
CSINode holds information about all CSI drivers installed on a node.
CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn’t create this object. CSINode has an OwnerReference that points to the corresponding node object.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiNodeProps(
spec: CsiNodeSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.CsiNodeSpec |
spec is the specification of CSINode. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
specRequired ¶
spec: CsiNodeSpec
- Type: cdk8s_plus_31.k8s.CsiNodeSpec
spec is the specification of CSINode.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
metadata.name must be the Kubernetes node name.
KubeCsiStorageCapacityListProps ¶
CSIStorageCapacityList is a collection of CSIStorageCapacity objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacityListProps(
items: typing.List[KubeCsiStorageCapacityProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeCsiStorageCapacityProps] |
items is the list of CSIStorageCapacity objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeCsiStorageCapacityProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeCsiStorageCapacityProps]
items is the list of CSIStorageCapacity objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeCsiStorageCapacityProps ¶
CSIStorageCapacity stores the result of one CSI GetCapacity call.
For a given StorageClass, this describes the available capacity in a particular topology segment. This can be used when considering where to instantiate new PersistentVolumes.
For example this can express things like: - StorageClass “standard” has “1234 GiB” available in “topology.kubernetes.io/zone=us-east1” - StorageClass “localssd” has “10 GiB” available in “kubernetes.io/hostname=knode-abc123”
The following three cases all imply that no capacity is available for a certain combination: - no object exists with suitable topology and storage class name - such an object exists, but the capacity is unset - such an object exists, but the capacity is zero
The producer of these objects can decide which approach is more suitable.
They are consumed by the kube-scheduler when a CSI driver opts into capacity-aware scheduling with CSIDriverSpec.StorageCapacity. The scheduler compares the MaximumVolumeSize against the requested size of pending volumes to filter out unsuitable nodes. If MaximumVolumeSize is unset, it falls back to a comparison against the less precise Capacity. If that is also unset, the scheduler assumes that capacity is insufficient and tries some other node.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCsiStorageCapacityProps(
storage_class_name: str,
capacity: Quantity = None,
maximum_volume_size: Quantity = None,
metadata: ObjectMeta = None,
node_topology: LabelSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
storage_class_name |
str |
storageClassName represents the name of the StorageClass that the reported capacity applies to. |
capacity |
cdk8s_plus_31.k8s.Quantity |
capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. |
maximum_volume_size |
cdk8s_plus_31.k8s.Quantity |
maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
node_topology |
cdk8s_plus_31.k8s.LabelSelector |
nodeTopology defines which nodes have access to the storage for which capacity was reported. |
storage_class_nameRequired ¶
storage_class_name: str
- Type: str
storageClassName represents the name of the StorageClass that the reported capacity applies to.
It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable.
capacityOptional ¶
capacity: Quantity
- Type: cdk8s_plus_31.k8s.Quantity
capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.
The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable.
maximum_volume_sizeOptional ¶
maximum_volume_size: Quantity
- Type: cdk8s_plus_31.k8s.Quantity
maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields.
This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
The name has no particular meaning. It must be a DNS subdomain (dots allowed, 253 characters). To ensure that there are no conflicts with other CSI drivers on the cluster, the recommendation is to use csisc-
Objects are namespaced.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
node_topologyOptional ¶
node_topology: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
nodeTopology defines which nodes have access to the storage for which capacity was reported.
If not set, the storage is not accessible from any node in the cluster. If empty, the storage is accessible from all nodes. This field is immutable.
KubeCustomResourceDefinitionListProps ¶
CustomResourceDefinitionList is a list of CustomResourceDefinition objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinitionListProps(
items: typing.List[KubeCustomResourceDefinitionProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeCustomResourceDefinitionProps] |
items list individual CustomResourceDefinition objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeCustomResourceDefinitionProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeCustomResourceDefinitionProps]
items list individual CustomResourceDefinition objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeCustomResourceDefinitionProps ¶
CustomResourceDefinition represents a resource that should be exposed on the API server.
Its name MUST be in the format <.spec.name>.<.spec.group>.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeCustomResourceDefinitionProps(
spec: CustomResourceDefinitionSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.CustomResourceDefinitionSpec |
spec describes how the user wants the resources to appear. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
specRequired ¶
spec: CustomResourceDefinitionSpec
- Type: cdk8s_plus_31.k8s.CustomResourceDefinitionSpec
spec describes how the user wants the resources to appear.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeDaemonSetListProps ¶
DaemonSetList is a collection of daemon sets.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSetListProps(
items: typing.List[KubeDaemonSetProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeDaemonSetProps] |
A list of daemon sets. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeDaemonSetProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeDaemonSetProps]
A list of daemon sets.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeDaemonSetProps ¶
DaemonSet represents the configuration of a daemon set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeDaemonSetProps(
metadata: ObjectMeta = None,
spec: DaemonSetSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.DaemonSetSpec |
The desired behavior of this daemon set. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: DaemonSetSpec
- Type: cdk8s_plus_31.k8s.DaemonSetSpec
The desired behavior of this daemon set.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeDeploymentListProps ¶
DeploymentList is a list of Deployments.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeploymentListProps(
items: typing.List[KubeDeploymentProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeDeploymentProps] |
Items is the list of Deployments. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeDeploymentProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeDeploymentProps]
Items is the list of Deployments.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
KubeDeploymentProps ¶
Deployment enables declarative updates for Pods and ReplicaSets.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeploymentProps(
metadata: ObjectMeta = None,
spec: DeploymentSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.DeploymentSpec |
Specification of the desired behavior of the Deployment. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: DeploymentSpec
- Type: cdk8s_plus_31.k8s.DeploymentSpec
Specification of the desired behavior of the Deployment.
KubeDeviceClassListV1Alpha3Props ¶
DeviceClassList is a collection of classes.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassListV1Alpha3Props(
items: typing.List[KubeDeviceClassV1Alpha3Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeDeviceClassV1Alpha3Props] |
Items is the list of resource classes. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeDeviceClassV1Alpha3Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeDeviceClassV1Alpha3Props]
Items is the list of resource classes.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
KubeDeviceClassV1Alpha3Props ¶
DeviceClass is a vendor- or admin-provided resource that contains device configuration and selectors.
It can be referenced in the device requests of a claim to apply these presets. Cluster scoped.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeDeviceClassV1Alpha3Props(
spec: DeviceClassSpecV1Alpha3,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.DeviceClassSpecV1Alpha3 |
Spec defines what can be allocated and how to configure it. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
specRequired ¶
spec: DeviceClassSpecV1Alpha3
- Type: cdk8s_plus_31.k8s.DeviceClassSpecV1Alpha3
Spec defines what can be allocated and how to configure it.
This is mutable. Consumers have to be prepared for classes changing at any time, either because they get updated or replaced. Claim allocations are done once based on whatever was set in classes at the time of allocation.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
KubeEndpointSliceListProps ¶
EndpointSliceList represents a list of endpoint slices.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSliceListProps(
items: typing.List[KubeEndpointSliceProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeEndpointSliceProps] |
items is the list of endpoint slices. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeEndpointSliceProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeEndpointSliceProps]
items is the list of endpoint slices.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
KubeEndpointSliceProps ¶
EndpointSlice represents a subset of the endpoints that implement a service.
For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointSliceProps(
address_type: str,
endpoints: typing.List[Endpoint],
metadata: ObjectMeta = None,
ports: typing.List[EndpointPort] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
address_type |
str |
addressType specifies the type of address carried by this EndpointSlice. |
endpoints |
typing.List[cdk8s_plus_31.k8s.Endpoint] |
endpoints is a list of unique endpoints in this slice. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
ports |
typing.List[cdk8s_plus_31.k8s.EndpointPort] |
ports specifies the list of network ports exposed by each endpoint in this slice. |
address_typeRequired ¶
address_type: str
- Type: str
addressType specifies the type of address carried by this EndpointSlice.
All addresses in this slice must be the same type. This field is immutable after creation. The following address types are currently supported: * IPv4: Represents an IPv4 Address. * IPv6: Represents an IPv6 Address. * FQDN: Represents a Fully Qualified Domain Name.
endpointsRequired ¶
endpoints: typing.List[Endpoint]
- Type: typing.List[cdk8s_plus_31.k8s.Endpoint]
endpoints is a list of unique endpoints in this slice.
Each slice may include a maximum of 1000 endpoints.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
portsOptional ¶
ports: typing.List[EndpointPort]
- Type: typing.List[cdk8s_plus_31.k8s.EndpointPort]
ports specifies the list of network ports exposed by each endpoint in this slice.
Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates “all ports”. Each slice may include a maximum of 100 ports.
KubeEndpointsListProps ¶
EndpointsList is a list of endpoints.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointsListProps(
items: typing.List[KubeEndpointsProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeEndpointsProps] |
List of endpoints. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeEndpointsProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeEndpointsProps]
List of endpoints.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeEndpointsProps ¶
Endpoints is a collection of endpoints that implement the actual service. Example:.
Name: “mysvc”, Subsets: [ { Addresses: [{“ip”: “10.10.1.1”}, {“ip”: “10.10.2.2”}], Ports: [{“name”: “a”, “port”: 8675}, {“name”: “b”, “port”: 309}] }, { Addresses: [{“ip”: “10.10.3.3”}], Ports: [{“name”: “a”, “port”: 93}, {“name”: “b”, “port”: 76}] }, ]
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeEndpointsProps(
metadata: ObjectMeta = None,
subsets: typing.List[EndpointSubset] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
subsets |
typing.List[cdk8s_plus_31.k8s.EndpointSubset] |
The set of all endpoints is the union of all subsets. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
subsetsOptional ¶
subsets: typing.List[EndpointSubset]
- Type: typing.List[cdk8s_plus_31.k8s.EndpointSubset]
The set of all endpoints is the union of all subsets.
Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.
KubeEventListProps ¶
EventList is a list of Event objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeEventListProps(
items: typing.List[KubeEventProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeEventProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeEventProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeEventProps]
items is a list of schema objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeEventProps ¶
Event is a report of an event somewhere in the cluster.
It generally denotes some state change in the system. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeEventProps(
event_time: datetime.datetime,
action: str = None,
deprecated_count: typing.Union[int, float] = None,
deprecated_first_timestamp: datetime.datetime = None,
deprecated_last_timestamp: datetime.datetime = None,
deprecated_source: EventSource = None,
metadata: ObjectMeta = None,
note: str = None,
reason: str = None,
regarding: ObjectReference = None,
related: ObjectReference = None,
reporting_controller: str = None,
reporting_instance: str = None,
series: EventSeries = None,
type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
event_time |
datetime.datetime |
eventTime is the time when this Event was first observed. |
action |
str |
action is what action was taken/failed regarding to the regarding object. |
deprecated_count |
typing.Union[int, float] |
deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type. |
deprecated_first_timestamp |
datetime.datetime |
deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. |
deprecated_last_timestamp |
datetime.datetime |
deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type. |
deprecated_source |
cdk8s_plus_31.k8s.EventSource |
deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
note |
str |
note is a human-readable description of the status of this operation. |
reason |
str |
reason is why the action was taken. |
regarding |
cdk8s_plus_31.k8s.ObjectReference |
regarding contains the object this Event is about. |
related |
cdk8s_plus_31.k8s.ObjectReference |
related is the optional secondary object for more complex actions. |
reporting_controller |
str |
reportingController is the name of the controller that emitted this Event, e.g. kubernetes.io/kubelet. This field cannot be empty for new Events. |
reporting_instance |
str |
reportingInstance is the ID of the controller instance, e.g. kubelet-xyzf. This field cannot be empty for new Events and it can have at most 128 characters. |
series |
cdk8s_plus_31.k8s.EventSeries |
series is data about the Event series this event represents or nil if it’s a singleton Event. |
type |
str |
type is the type of this event (Normal, Warning), new types could be added in the future. |
event_timeRequired ¶
event_time: datetime.datetime
- Type: datetime.datetime
eventTime is the time when this Event was first observed.
It is required.
actionOptional ¶
action: str
- Type: str
action is what action was taken/failed regarding to the regarding object.
It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
deprecated_countOptional ¶
deprecated_count: typing.Union[int, float]
- Type: typing.Union[int, float]
deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.
deprecated_first_timestampOptional ¶
deprecated_first_timestamp: datetime.datetime
- Type: datetime.datetime
deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
deprecated_last_timestampOptional ¶
deprecated_last_timestamp: datetime.datetime
- Type: datetime.datetime
deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.
deprecated_sourceOptional ¶
deprecated_source: EventSource
- Type: cdk8s_plus_31.k8s.EventSource
deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
noteOptional ¶
note: str
- Type: str
note is a human-readable description of the status of this operation.
Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
reasonOptional ¶
reason: str
- Type: str
reason is why the action was taken.
It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
regardingOptional ¶
regarding: ObjectReference
- Type: cdk8s_plus_31.k8s.ObjectReference
regarding contains the object this Event is about.
In most cases it’s an Object reporting controller implements, e.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
relatedOptional ¶
related: ObjectReference
- Type: cdk8s_plus_31.k8s.ObjectReference
related is the optional secondary object for more complex actions.
E.g. when regarding object triggers a creation or deletion of related object.
reporting_controllerOptional ¶
reporting_controller: str
- Type: str
reportingController is the name of the controller that emitted this Event, e.g. kubernetes.io/kubelet. This field cannot be empty for new Events.
reporting_instanceOptional ¶
reporting_instance: str
- Type: str
reportingInstance is the ID of the controller instance, e.g. kubelet-xyzf. This field cannot be empty for new Events and it can have at most 128 characters.
seriesOptional ¶
series: EventSeries
- Type: cdk8s_plus_31.k8s.EventSeries
series is data about the Event series this event represents or nil if it’s a singleton Event.
typeOptional ¶
type: str
- Type: str
type is the type of this event (Normal, Warning), new types could be added in the future.
It is machine-readable. This field cannot be empty for new Events.
KubeEvictionProps ¶
Eviction evicts a pod from its node subject to certain policies and safety constraints.
This is a subresource of Pod. A request to cause such an eviction is created by POSTing to …/pods/
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeEvictionProps(
delete_options: DeleteOptions = None,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
delete_options |
cdk8s_plus_31.k8s.DeleteOptions |
DeleteOptions may be provided. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
ObjectMeta describes the pod that is being evicted. |
delete_optionsOptional ¶
delete_options: DeleteOptions
- Type: cdk8s_plus_31.k8s.DeleteOptions
DeleteOptions may be provided.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
ObjectMeta describes the pod that is being evicted.
KubeFlowSchemaListProps ¶
FlowSchemaList is a list of FlowSchema objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaListProps(
items: typing.List[KubeFlowSchemaProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaProps] |
items is a list of FlowSchemas. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard list metadata. |
itemsRequired ¶
items: typing.List[KubeFlowSchemaProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaProps]
items is a list of FlowSchemas.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeFlowSchemaListV1Beta3Props ¶
FlowSchemaList is a list of FlowSchema objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaListV1Beta3Props(
items: typing.List[KubeFlowSchemaV1Beta3Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaV1Beta3Props] |
items is a list of FlowSchemas. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard list metadata. |
itemsRequired ¶
items: typing.List[KubeFlowSchemaV1Beta3Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeFlowSchemaV1Beta3Props]
items is a list of FlowSchemas.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeFlowSchemaProps ¶
FlowSchema defines the schema of a group of flows.
Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a “flow distinguisher”.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaProps(
metadata: ObjectMeta = None,
spec: FlowSchemaSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.FlowSchemaSpec |
spec is the specification of the desired behavior of a FlowSchema. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: FlowSchemaSpec
- Type: cdk8s_plus_31.k8s.FlowSchemaSpec
spec is the specification of the desired behavior of a FlowSchema.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeFlowSchemaV1Beta3Props ¶
FlowSchema defines the schema of a group of flows.
Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a “flow distinguisher”.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeFlowSchemaV1Beta3Props(
metadata: ObjectMeta = None,
spec: FlowSchemaSpecV1Beta3 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.FlowSchemaSpecV1Beta3 |
spec is the specification of the desired behavior of a FlowSchema. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: FlowSchemaSpecV1Beta3
- Type: cdk8s_plus_31.k8s.FlowSchemaSpecV1Beta3
spec is the specification of the desired behavior of a FlowSchema.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeHorizontalPodAutoscalerListProps ¶
list of horizontal pod autoscaler objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerListProps(
items: typing.List[KubeHorizontalPodAutoscalerProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerProps] |
items is the list of horizontal pod autoscaler objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeHorizontalPodAutoscalerProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerProps]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
KubeHorizontalPodAutoscalerListV2Props ¶
HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerListV2Props(
items: typing.List[KubeHorizontalPodAutoscalerV2Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerV2Props] |
items is the list of horizontal pod autoscaler objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard list metadata. |
itemsRequired ¶
items: typing.List[KubeHorizontalPodAutoscalerV2Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeHorizontalPodAutoscalerV2Props]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard list metadata.
KubeHorizontalPodAutoscalerProps ¶
configuration of a horizontal pod autoscaler.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerProps(
metadata: ObjectMeta = None,
spec: HorizontalPodAutoscalerSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
spec |
cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpec |
spec defines the behaviour of autoscaler. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: HorizontalPodAutoscalerSpec
- Type: cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpec
spec defines the behaviour of autoscaler.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
KubeHorizontalPodAutoscalerV2Props ¶
HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeHorizontalPodAutoscalerV2Props(
metadata: ObjectMeta = None,
spec: HorizontalPodAutoscalerSpecV2 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object metadata. |
spec |
cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpecV2 |
spec is the specification for the behaviour of the autoscaler. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: HorizontalPodAutoscalerSpecV2
- Type: cdk8s_plus_31.k8s.HorizontalPodAutoscalerSpecV2
spec is the specification for the behaviour of the autoscaler.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
KubeIngressClassListProps ¶
IngressClassList is a collection of IngressClasses.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClassListProps(
items: typing.List[KubeIngressClassProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeIngressClassProps] |
items is the list of IngressClasses. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeIngressClassProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeIngressClassProps]
items is the list of IngressClasses.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
KubeIngressClassProps ¶
IngressClass represents the class of the Ingress, referenced by the Ingress Spec.
The ingressclass.kubernetes.io/is-default-class annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressClassProps(
metadata: ObjectMeta = None,
spec: IngressClassSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.IngressClassSpec |
spec is the desired state of the IngressClass. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: IngressClassSpec
- Type: cdk8s_plus_31.k8s.IngressClassSpec
spec is the desired state of the IngressClass.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeIngressListProps ¶
IngressList is a collection of Ingress.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressListProps(
items: typing.List[KubeIngressProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeIngressProps] |
items is the list of Ingress. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubeIngressProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeIngressProps]
items is the list of Ingress.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeIngressProps ¶
Ingress is a collection of rules that allow inbound connections to reach the endpoints defined by a backend.
An Ingress can be configured to give services externally-reachable urls, load balance traffic, terminate SSL, offer name based virtual hosting etc.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeIngressProps(
metadata: ObjectMeta = None,
spec: IngressSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.IngressSpec |
spec is the desired state of the Ingress. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: IngressSpec
- Type: cdk8s_plus_31.k8s.IngressSpec
spec is the desired state of the Ingress.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeIpAddressListV1Beta1Props ¶
IPAddressList contains a list of IPAddress.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressListV1Beta1Props(
items: typing.List[KubeIpAddressV1Beta1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeIpAddressV1Beta1Props] |
items is the list of IPAddresses. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubeIpAddressV1Beta1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeIpAddressV1Beta1Props]
items is the list of IPAddresses.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeIpAddressV1Beta1Props ¶
IPAddress represents a single IP of a single IP Family.
The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeIpAddressV1Beta1Props(
metadata: ObjectMeta = None,
spec: IpAddressSpecV1Beta1 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.IpAddressSpecV1Beta1 |
spec is the desired state of the IPAddress. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: IpAddressSpecV1Beta1
- Type: cdk8s_plus_31.k8s.IpAddressSpecV1Beta1
spec is the desired state of the IPAddress.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeJobListProps ¶
JobList is a collection of jobs.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeJobListProps(
items: typing.List[KubeJobProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeJobProps] |
items is the list of Jobs. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeJobProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeJobProps]
items is the list of Jobs.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeJobProps ¶
Job represents the configuration of a single job.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeJobProps(
metadata: ObjectMeta = None,
spec: JobSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.JobSpec |
Specification of the desired behavior of a job. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: JobSpec
- Type: cdk8s_plus_31.k8s.JobSpec
Specification of the desired behavior of a job.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeLeaseCandidateListV1Alpha1Props ¶
LeaseCandidateList is a list of Lease objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateListV1Alpha1Props(
items: typing.List[KubeLeaseCandidateV1Alpha1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeLeaseCandidateV1Alpha1Props] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeLeaseCandidateV1Alpha1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeLeaseCandidateV1Alpha1Props]
items is a list of schema objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeLeaseCandidateV1Alpha1Props ¶
LeaseCandidate defines a candidate for a Lease object.
Candidates are created such that coordinated leader election will pick the best leader from the list of candidates.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseCandidateV1Alpha1Props(
metadata: ObjectMeta = None,
spec: LeaseCandidateSpecV1Alpha1 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
spec |
cdk8s_plus_31.k8s.LeaseCandidateSpecV1Alpha1 |
spec contains the specification of the Lease. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
spec: LeaseCandidateSpecV1Alpha1
- Type: cdk8s_plus_31.k8s.LeaseCandidateSpecV1Alpha1
spec contains the specification of the Lease.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeLeaseListProps ¶
LeaseList is a list of Lease objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseListProps(
items: typing.List[KubeLeaseProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeLeaseProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeLeaseProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeLeaseProps]
items is a list of schema objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeLeaseProps ¶
Lease defines a lease concept.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeLeaseProps(
metadata: ObjectMeta = None,
spec: LeaseSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
spec |
cdk8s_plus_31.k8s.LeaseSpec |
spec contains the specification of the Lease. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
spec: LeaseSpec
- Type: cdk8s_plus_31.k8s.LeaseSpec
spec contains the specification of the Lease.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeLimitRangeListProps ¶
LimitRangeList is a list of LimitRange items.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRangeListProps(
items: typing.List[KubeLimitRangeProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeLimitRangeProps] |
Items is a list of LimitRange objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeLimitRangeProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeLimitRangeProps]
Items is a list of LimitRange objects.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeLimitRangeProps ¶
LimitRange sets resource usage limits for each kind of resource in a Namespace.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeLimitRangeProps(
metadata: ObjectMeta = None,
spec: LimitRangeSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.LimitRangeSpec |
Spec defines the limits enforced. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: LimitRangeSpec
- Type: cdk8s_plus_31.k8s.LimitRangeSpec
Spec defines the limits enforced.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeLocalSubjectAccessReviewProps ¶
LocalSubjectAccessReview checks whether or not a user or group can perform an action in a given namespace.
Having a namespace scoped resource makes it much easier to grant namespace scoped policy that includes permissions checking.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeLocalSubjectAccessReviewProps(
spec: SubjectAccessReviewSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.SubjectAccessReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard list metadata. |
specRequired ¶
spec: SubjectAccessReviewSpec
- Type: cdk8s_plus_31.k8s.SubjectAccessReviewSpec
Spec holds information about the request being evaluated.
spec.namespace must be equal to the namespace you made the request against. If empty, it is defaulted.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeMutatingWebhookConfigurationListProps ¶
MutatingWebhookConfigurationList is a list of MutatingWebhookConfiguration.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfigurationListProps(
items: typing.List[KubeMutatingWebhookConfigurationProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeMutatingWebhookConfigurationProps] |
List of MutatingWebhookConfiguration. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeMutatingWebhookConfigurationProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeMutatingWebhookConfigurationProps]
List of MutatingWebhookConfiguration.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeMutatingWebhookConfigurationProps ¶
MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeMutatingWebhookConfigurationProps(
metadata: ObjectMeta = None,
webhooks: typing.List[MutatingWebhook] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
webhooks |
typing.List[cdk8s_plus_31.k8s.MutatingWebhook] |
Webhooks is a list of webhooks and the affected resources and operations. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
webhooksOptional ¶
webhooks: typing.List[MutatingWebhook]
- Type: typing.List[cdk8s_plus_31.k8s.MutatingWebhook]
Webhooks is a list of webhooks and the affected resources and operations.
KubeNamespaceListProps ¶
NamespaceList is a list of Namespaces.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespaceListProps(
items: typing.List[KubeNamespaceProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeNamespaceProps] |
Items is the list of Namespace objects in the list. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeNamespaceProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeNamespaceProps]
Items is the list of Namespace objects in the list.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeNamespaceProps ¶
Namespace provides a scope for Names.
Use of multiple namespaces is optional.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeNamespaceProps(
metadata: ObjectMeta = None,
spec: NamespaceSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.NamespaceSpec |
Spec defines the behavior of the Namespace. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: NamespaceSpec
- Type: cdk8s_plus_31.k8s.NamespaceSpec
Spec defines the behavior of the Namespace.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeNetworkPolicyListProps ¶
NetworkPolicyList is a list of NetworkPolicy objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicyListProps(
items: typing.List[KubeNetworkPolicyProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeNetworkPolicyProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeNetworkPolicyProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeNetworkPolicyProps]
items is a list of schema objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeNetworkPolicyProps ¶
NetworkPolicy describes what network traffic is allowed for a set of Pods.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeNetworkPolicyProps(
metadata: ObjectMeta = None,
spec: NetworkPolicySpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.NetworkPolicySpec |
spec represents the specification of the desired behavior for this NetworkPolicy. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: NetworkPolicySpec
- Type: cdk8s_plus_31.k8s.NetworkPolicySpec
spec represents the specification of the desired behavior for this NetworkPolicy.
KubeNodeListProps ¶
NodeList is the whole list of all Nodes which have been registered with master.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeNodeListProps(
items: typing.List[KubeNodeProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeNodeProps] |
List of nodes. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeNodeProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeNodeProps]
List of nodes.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeNodeProps ¶
Node is a worker node in Kubernetes.
Each node will have a unique identifier in the cache (i.e. in etcd).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeNodeProps(
metadata: ObjectMeta = None,
spec: NodeSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.NodeSpec |
Spec defines the behavior of a node. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: NodeSpec
- Type: cdk8s_plus_31.k8s.NodeSpec
Spec defines the behavior of a node.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubePersistentVolumeClaimListProps ¶
PersistentVolumeClaimList is a list of PersistentVolumeClaim items.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaimListProps(
items: typing.List[KubePersistentVolumeClaimProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeClaimProps] |
items is a list of persistent volume claims. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubePersistentVolumeClaimProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeClaimProps]
items is a list of persistent volume claims.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubePersistentVolumeClaimProps ¶
PersistentVolumeClaim is a user’s request for and claim to a persistent volume.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeClaimProps(
metadata: ObjectMeta = None,
spec: PersistentVolumeClaimSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PersistentVolumeClaimSpec |
spec defines the desired characteristics of a volume requested by a pod author. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: PersistentVolumeClaimSpec
- Type: cdk8s_plus_31.k8s.PersistentVolumeClaimSpec
spec defines the desired characteristics of a volume requested by a pod author.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
KubePersistentVolumeListProps ¶
PersistentVolumeList is a list of PersistentVolume items.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeListProps(
items: typing.List[KubePersistentVolumeProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeProps] |
items is a list of persistent volumes. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubePersistentVolumeProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeProps]
items is a list of persistent volumes.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubePersistentVolumeProps ¶
PersistentVolume (PV) is a storage resource provisioned by an administrator.
It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePersistentVolumeProps(
metadata: ObjectMeta = None,
spec: PersistentVolumeSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PersistentVolumeSpec |
spec defines a specification of a persistent volume owned by the cluster. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: PersistentVolumeSpec
- Type: cdk8s_plus_31.k8s.PersistentVolumeSpec
spec defines a specification of a persistent volume owned by the cluster.
Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes
KubePodDisruptionBudgetListProps ¶
PodDisruptionBudgetList is a collection of PodDisruptionBudgets.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudgetListProps(
items: typing.List[KubePodDisruptionBudgetProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubePodDisruptionBudgetProps] |
Items is a list of PodDisruptionBudgets. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubePodDisruptionBudgetProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubePodDisruptionBudgetProps]
Items is a list of PodDisruptionBudgets.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubePodDisruptionBudgetProps ¶
PodDisruptionBudget is an object to define the max disruption that can be caused to a collection of pods.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePodDisruptionBudgetProps(
metadata: ObjectMeta = None,
spec: PodDisruptionBudgetSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PodDisruptionBudgetSpec |
Specification of the desired behavior of the PodDisruptionBudget. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: PodDisruptionBudgetSpec
- Type: cdk8s_plus_31.k8s.PodDisruptionBudgetSpec
Specification of the desired behavior of the PodDisruptionBudget.
KubePodListProps ¶
PodList is a list of Pods.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePodListProps(
items: typing.List[KubePodProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubePodProps] |
List of pods. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubePodProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubePodProps]
List of pods.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubePodProps ¶
Pod is a collection of containers that can run on a host.
This resource is created by clients and scheduled onto hosts.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePodProps(
metadata: ObjectMeta = None,
spec: PodSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PodSpec |
Specification of the desired behavior of the pod. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: PodSpec
- Type: cdk8s_plus_31.k8s.PodSpec
Specification of the desired behavior of the pod.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubePodSchedulingContextListV1Alpha3Props ¶
PodSchedulingContextList is a collection of Pod scheduling objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextListV1Alpha3Props(
items: typing.List[KubePodSchedulingContextV1Alpha3Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubePodSchedulingContextV1Alpha3Props] |
Items is the list of PodSchedulingContext objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubePodSchedulingContextV1Alpha3Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubePodSchedulingContextV1Alpha3Props]
Items is the list of PodSchedulingContext objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
KubePodSchedulingContextV1Alpha3Props ¶
PodSchedulingContext objects hold information that is needed to schedule a Pod with ResourceClaims that use “WaitForFirstConsumer” allocation mode.
This is an alpha type and requires enabling the DRAControlPlaneController feature gate.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePodSchedulingContextV1Alpha3Props(
spec: PodSchedulingContextSpecV1Alpha3,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.PodSchedulingContextSpecV1Alpha3 |
Spec describes where resources for the Pod are needed. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
specRequired ¶
spec: PodSchedulingContextSpecV1Alpha3
- Type: cdk8s_plus_31.k8s.PodSchedulingContextSpecV1Alpha3
Spec describes where resources for the Pod are needed.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
KubePodTemplateListProps ¶
PodTemplateList is a list of PodTemplates.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplateListProps(
items: typing.List[KubePodTemplateProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubePodTemplateProps] |
List of pod templates. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubePodTemplateProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubePodTemplateProps]
List of pod templates.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubePodTemplateProps ¶
PodTemplate describes a template for creating copies of a predefined pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePodTemplateProps(
metadata: ObjectMeta = None,
template: PodTemplateSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
template |
cdk8s_plus_31.k8s.PodTemplateSpec |
Template defines the pods that will be created from this pod template. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
templateOptional ¶
template: PodTemplateSpec
- Type: cdk8s_plus_31.k8s.PodTemplateSpec
Template defines the pods that will be created from this pod template.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubePriorityClassListProps ¶
PriorityClassList is a collection of priority classes.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClassListProps(
items: typing.List[KubePriorityClassProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubePriorityClassProps] |
items is the list of PriorityClasses. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubePriorityClassProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubePriorityClassProps]
items is the list of PriorityClasses.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubePriorityClassProps ¶
PriorityClass defines mapping from a priority class name to the priority integer value.
The value can be any valid integer.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityClassProps(
value: typing.Union[int, float],
description: str = None,
global_default: bool = None,
metadata: ObjectMeta = None,
preemption_policy: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
value |
typing.Union[int, float] |
value represents the integer value of this priority class. |
description |
str |
description is an arbitrary string that usually provides guidelines on when this priority class should be used. |
global_default |
bool |
globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
preemption_policy |
str |
preemptionPolicy is the Policy for preempting pods with lower priority. |
valueRequired ¶
value: typing.Union[int, float]
- Type: typing.Union[int, float]
value represents the integer value of this priority class.
This is the actual priority that pods receive when they have the name of this class in their pod spec.
descriptionOptional ¶
description: str
- Type: str
description is an arbitrary string that usually provides guidelines on when this priority class should be used.
global_defaultOptional ¶
global_default: bool
- Type: bool
globalDefault specifies whether this PriorityClass should be considered as the default priority for pods that do not have any priority class.
Only one PriorityClass can be marked as globalDefault. However, if more than one PriorityClasses exists with their globalDefault field set to true, the smallest value of such global default PriorityClasses will be used as the default priority.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
preemption_policyOptional ¶
preemption_policy: str
- Type: str
- Default: PreemptLowerPriority if unset.
preemptionPolicy is the Policy for preempting pods with lower priority.
One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
KubePriorityLevelConfigurationListProps ¶
PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationListProps(
items: typing.List[KubePriorityLevelConfigurationProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationProps] |
items is a list of request-priorities. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubePriorityLevelConfigurationProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationProps]
items is a list of request-priorities.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubePriorityLevelConfigurationListV1Beta3Props ¶
PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationListV1Beta3Props(
items: typing.List[KubePriorityLevelConfigurationV1Beta3Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationV1Beta3Props] |
items is a list of request-priorities. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
metadata is the standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubePriorityLevelConfigurationV1Beta3Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubePriorityLevelConfigurationV1Beta3Props]
items is a list of request-priorities.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubePriorityLevelConfigurationProps ¶
PriorityLevelConfiguration represents the configuration of a priority level.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationProps(
metadata: ObjectMeta = None,
spec: PriorityLevelConfigurationSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PriorityLevelConfigurationSpec |
spec is the specification of the desired behavior of a “request-priority”. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: PriorityLevelConfigurationSpec
- Type: cdk8s_plus_31.k8s.PriorityLevelConfigurationSpec
spec is the specification of the desired behavior of a “request-priority”.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubePriorityLevelConfigurationV1Beta3Props ¶
PriorityLevelConfiguration represents the configuration of a priority level.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubePriorityLevelConfigurationV1Beta3Props(
metadata: ObjectMeta = None,
spec: PriorityLevelConfigurationSpecV1Beta3 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PriorityLevelConfigurationSpecV1Beta3 |
spec is the specification of the desired behavior of a “request-priority”. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
metadata is the standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: PriorityLevelConfigurationSpecV1Beta3
- Type: cdk8s_plus_31.k8s.PriorityLevelConfigurationSpecV1Beta3
spec is the specification of the desired behavior of a “request-priority”.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeReplicaSetListProps ¶
ReplicaSetList is a collection of ReplicaSets.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSetListProps(
items: typing.List[KubeReplicaSetProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeReplicaSetProps] |
List of ReplicaSets. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeReplicaSetProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeReplicaSetProps]
List of ReplicaSets.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeReplicaSetProps ¶
ReplicaSet ensures that a specified number of pod replicas are running at any given time.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicaSetProps(
metadata: ObjectMeta = None,
spec: ReplicaSetSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. |
spec |
cdk8s_plus_31.k8s.ReplicaSetSpec |
Spec defines the specification of the desired behavior of the ReplicaSet. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages.
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: ReplicaSetSpec
- Type: cdk8s_plus_31.k8s.ReplicaSetSpec
Spec defines the specification of the desired behavior of the ReplicaSet.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeReplicationControllerListProps ¶
ReplicationControllerList is a collection of replication controllers.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationControllerListProps(
items: typing.List[KubeReplicationControllerProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeReplicationControllerProps] |
List of replication controllers. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeReplicationControllerProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeReplicationControllerProps]
List of replication controllers.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeReplicationControllerProps ¶
ReplicationController represents the configuration of a replication controller.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeReplicationControllerProps(
metadata: ObjectMeta = None,
spec: ReplicationControllerSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. |
spec |
cdk8s_plus_31.k8s.ReplicationControllerSpec |
Spec defines the specification of the desired behavior of the replication controller. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages.
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: ReplicationControllerSpec
- Type: cdk8s_plus_31.k8s.ReplicationControllerSpec
Spec defines the specification of the desired behavior of the replication controller.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeResourceClaimListV1Alpha3Props ¶
ResourceClaimList is a collection of claims.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimListV1Alpha3Props(
items: typing.List[KubeResourceClaimV1Alpha3Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeResourceClaimV1Alpha3Props] |
Items is the list of resource claims. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeResourceClaimV1Alpha3Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeResourceClaimV1Alpha3Props]
Items is the list of resource claims.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
KubeResourceClaimTemplateListV1Alpha3Props ¶
ResourceClaimTemplateList is a collection of claim templates.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateListV1Alpha3Props(
items: typing.List[KubeResourceClaimTemplateV1Alpha3Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeResourceClaimTemplateV1Alpha3Props] |
Items is the list of resource claim templates. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeResourceClaimTemplateV1Alpha3Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeResourceClaimTemplateV1Alpha3Props]
Items is the list of resource claim templates.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
KubeResourceClaimTemplateV1Alpha3Props ¶
ResourceClaimTemplate is used to produce ResourceClaim objects.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimTemplateV1Alpha3Props(
spec: ResourceClaimTemplateSpecV1Alpha3,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.ResourceClaimTemplateSpecV1Alpha3 |
Describes the ResourceClaim that is to be generated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
specRequired ¶
spec: ResourceClaimTemplateSpecV1Alpha3
- Type: cdk8s_plus_31.k8s.ResourceClaimTemplateSpecV1Alpha3
Describes the ResourceClaim that is to be generated.
This field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
KubeResourceClaimV1Alpha3Props ¶
ResourceClaim describes a request for access to resources in the cluster, for use by workloads.
For example, if a workload needs an accelerator device with specific properties, this is how that request is expressed. The status stanza tracks whether this claim has been satisfied and what specific resources have been allocated.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceClaimV1Alpha3Props(
spec: ResourceClaimSpecV1Alpha3,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.ResourceClaimSpecV1Alpha3 |
Spec describes what is being requested and how to configure it. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
specRequired ¶
spec: ResourceClaimSpecV1Alpha3
- Type: cdk8s_plus_31.k8s.ResourceClaimSpecV1Alpha3
Spec describes what is being requested and how to configure it.
The spec is immutable.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
KubeResourceQuotaListProps ¶
ResourceQuotaList is a list of ResourceQuota items.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuotaListProps(
items: typing.List[KubeResourceQuotaProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeResourceQuotaProps] |
Items is a list of ResourceQuota objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeResourceQuotaProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeResourceQuotaProps]
Items is a list of ResourceQuota objects.
More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeResourceQuotaProps ¶
ResourceQuota sets aggregate quota restrictions enforced per namespace.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceQuotaProps(
metadata: ObjectMeta = None,
spec: ResourceQuotaSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.ResourceQuotaSpec |
Spec defines the desired quota. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: ResourceQuotaSpec
- Type: cdk8s_plus_31.k8s.ResourceQuotaSpec
Spec defines the desired quota.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeResourceSliceV1Alpha3Props ¶
ResourceSlice represents one or more resources in a pool of similar resources, managed by a common driver.
A pool may span more than one ResourceSlice, and exactly how many ResourceSlices comprise a pool is determined by the driver.
At the moment, the only supported resources are devices with attributes and capacities. Each device in a given pool, regardless of how many ResourceSlices, must have a unique name. The ResourceSlice in which a device gets published may change over time. The unique identifier for a device is the tuple
Whenever a driver needs to update a pool, it increments the pool.Spec.Pool.Generation number and updates all ResourceSlices with that new number and new resource definitions. A consumer must only use ResourceSlices with the highest generation number and ignore all others.
When allocating all resources in a pool matching certain criteria or when looking for the best solution among several different alternatives, a consumer should check the number of ResourceSlices in a pool (included in each ResourceSlice) to determine whether its view of a pool is complete and if not, should wait until the driver has completed updating the pool.
For resources that are not local to a node, the node name is not set. Instead, the driver may use a node selector to specify where the devices are available.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeResourceSliceV1Alpha3Props(
spec: ResourceSliceSpecV1Alpha3,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.ResourceSliceSpecV1Alpha3 |
Contains the information published by the driver. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
specRequired ¶
spec: ResourceSliceSpecV1Alpha3
- Type: cdk8s_plus_31.k8s.ResourceSliceSpecV1Alpha3
Contains the information published by the driver.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
KubeRoleBindingListProps ¶
RoleBindingList is a collection of RoleBindings.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBindingListProps(
items: typing.List[KubeRoleBindingProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeRoleBindingProps] |
Items is a list of RoleBindings. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubeRoleBindingProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeRoleBindingProps]
Items is a list of RoleBindings.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
KubeRoleBindingProps ¶
RoleBinding references a role, but does not contain it.
It can reference a Role in the same namespace or a ClusterRole in the global namespace. It adds who information via Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleBindingProps(
role_ref: RoleRef,
metadata: ObjectMeta = None,
subjects: typing.List[Subject] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
role_ref |
cdk8s_plus_31.k8s.RoleRef |
RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
subjects |
typing.List[cdk8s_plus_31.k8s.Subject] |
Subjects holds references to the objects the role applies to. |
role_refRequired ¶
role_ref: RoleRef
- Type: cdk8s_plus_31.k8s.RoleRef
RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace.
If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
subjects: typing.List[Subject]
- Type: typing.List[cdk8s_plus_31.k8s.Subject]
Subjects holds references to the objects the role applies to.
KubeRoleListProps ¶
RoleList is a collection of Roles.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleListProps(
items: typing.List[KubeRoleProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeRoleProps] |
Items is a list of Roles. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubeRoleProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeRoleProps]
Items is a list of Roles.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
KubeRoleProps ¶
Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeRoleProps(
metadata: ObjectMeta = None,
rules: typing.List[PolicyRule] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
rules |
typing.List[cdk8s_plus_31.k8s.PolicyRule] |
Rules holds all the PolicyRules for this Role. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
rules: typing.List[PolicyRule]
- Type: typing.List[cdk8s_plus_31.k8s.PolicyRule]
Rules holds all the PolicyRules for this Role.
KubeRuntimeClassListProps ¶
RuntimeClassList is a list of RuntimeClass objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClassListProps(
items: typing.List[KubeRuntimeClassProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeRuntimeClassProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeRuntimeClassProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeRuntimeClassProps]
items is a list of schema objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeRuntimeClassProps ¶
RuntimeClass defines a class of container runtime supported in the cluster.
The RuntimeClass is used to determine which container runtime is used to run all containers in a pod. RuntimeClasses are manually defined by a user or cluster provisioner, and referenced in the PodSpec. The Kubelet is responsible for resolving the RuntimeClassName reference before running the pod. For more details, see https://kubernetes.io/docs/concepts/containers/runtime-class/
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeRuntimeClassProps(
handler: str,
metadata: ObjectMeta = None,
overhead: Overhead = None,
scheduling: Scheduling = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
handler |
str |
handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
overhead |
cdk8s_plus_31.k8s.Overhead |
overhead represents the resource overhead associated with running a pod for a given RuntimeClass. |
scheduling |
cdk8s_plus_31.k8s.Scheduling |
scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it. |
handlerRequired ¶
handler: str
- Type: str
handler specifies the underlying runtime and configuration that the CRI implementation will use to handle pods of this class.
The possible values are specific to the node & CRI configuration. It is assumed that all handlers are available on every node, and handlers of the same name are equivalent on every node. For example, a handler called “runc” might specify that the runc OCI runtime (using native Linux containers) will be used to run the containers in a pod. The Handler must be lowercase, conform to the DNS Label (RFC 1123) requirements, and is immutable.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
overheadOptional ¶
overhead: Overhead
- Type: cdk8s_plus_31.k8s.Overhead
overhead represents the resource overhead associated with running a pod for a given RuntimeClass.
For more details, see https://kubernetes.io/docs/concepts/scheduling-eviction/pod-overhead/
schedulingOptional ¶
scheduling: Scheduling
- Type: cdk8s_plus_31.k8s.Scheduling
scheduling holds the scheduling constraints to ensure that pods running with this RuntimeClass are scheduled to nodes that support it.
If scheduling is nil, this RuntimeClass is assumed to be supported by all nodes.
KubeScaleProps ¶
Scale represents a scaling request for a resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeScaleProps(
metadata: ObjectMeta = None,
spec: ScaleSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ScaleSpec |
spec defines the behavior of the scale. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
spec: ScaleSpec
- Type: cdk8s_plus_31.k8s.ScaleSpec
spec defines the behavior of the scale.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.
KubeSecretListProps ¶
SecretList is a list of Secret.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecretListProps(
items: typing.List[KubeSecretProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeSecretProps] |
Items is a list of secret objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeSecretProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeSecretProps]
Items is a list of secret objects.
More info: https://kubernetes.io/docs/concepts/configuration/secret
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeSecretProps ¶
Secret holds secret data of a certain type.
The total bytes of the values in the Data field must be less than MaxSecretSize bytes.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeSecretProps(
data: typing.Mapping[str] = None,
immutable: bool = None,
metadata: ObjectMeta = None,
string_data: typing.Mapping[str] = None,
type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
data |
typing.Mapping[str] |
Data contains the secret data. |
immutable |
bool |
Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
string_data |
typing.Mapping[str] |
stringData allows specifying non-binary secret data in string form. |
type |
str |
Used to facilitate programmatic handling of secret data. |
dataOptional ¶
data: typing.Mapping[str]
- Type: typing.Mapping[str]
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
immutableOptional ¶
immutable: bool
- Type: bool
Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time. Defaulted to nil.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
string_dataOptional ¶
string_data: typing.Mapping[str]
- Type: typing.Mapping[str]
stringData allows specifying non-binary secret data in string form.
It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.
typeOptional ¶
type: str
- Type: str
Used to facilitate programmatic handling of secret data.
More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
KubeSelfSubjectAccessReviewProps ¶
SelfSubjectAccessReview checks whether or the current user can perform an action.
Not filling in a spec.namespace means “in all namespaces”. Self is a special case, because users should always be able to check whether they can perform an action
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectAccessReviewProps(
spec: SelfSubjectAccessReviewSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.SelfSubjectAccessReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard list metadata. |
specRequired ¶
spec: SelfSubjectAccessReviewSpec
- Type: cdk8s_plus_31.k8s.SelfSubjectAccessReviewSpec
Spec holds information about the request being evaluated.
user and groups must be empty
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeSelfSubjectReviewProps ¶
SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewProps(
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeSelfSubjectReviewV1Alpha1Props ¶
SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Alpha1Props(
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeSelfSubjectReviewV1Beta1Props ¶
SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request.
When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectReviewV1Beta1Props(
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeSelfSubjectRulesReviewProps ¶
SelfSubjectRulesReview enumerates the set of actions the current user can perform within a namespace.
The returned list of actions may be incomplete depending on the server’s authorization mode, and any errors experienced during the evaluation. SelfSubjectRulesReview should be used by UIs to show/hide actions, or to quickly let an end user reason about their permissions. It should NOT Be used by external systems to drive authorization decisions as this raises confused deputy, cache lifetime/revocation, and correctness concerns. SubjectAccessReview, and LocalAccessReview are the correct way to defer authorization decisions to the API server.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeSelfSubjectRulesReviewProps(
spec: SelfSubjectRulesReviewSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.SelfSubjectRulesReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard list metadata. |
specRequired ¶
spec: SelfSubjectRulesReviewSpec
- Type: cdk8s_plus_31.k8s.SelfSubjectRulesReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeServiceAccountListProps ¶
ServiceAccountList is a list of ServiceAccount objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccountListProps(
items: typing.List[KubeServiceAccountProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeServiceAccountProps] |
List of ServiceAccounts. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeServiceAccountProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeServiceAccountProps]
List of ServiceAccounts.
More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeServiceAccountProps ¶
ServiceAccount binds together: * a name, understood by users, and perhaps by peripheral systems, for an identity * a principal that can be authenticated and authorized * a set of secrets.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceAccountProps(
automount_service_account_token: bool = None,
image_pull_secrets: typing.List[LocalObjectReference] = None,
metadata: ObjectMeta = None,
secrets: typing.List[ObjectReference] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
automount_service_account_token |
bool |
AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted. |
image_pull_secrets |
typing.List[cdk8s_plus_31.k8s.LocalObjectReference] |
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
secrets |
typing.List[cdk8s_plus_31.k8s.ObjectReference] |
Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use. |
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
AutomountServiceAccountToken indicates whether pods running as this service account should have an API token automatically mounted.
Can be overridden at the pod level.
image_pull_secretsOptional ¶
image_pull_secrets: typing.List[LocalObjectReference]
- Type: typing.List[cdk8s_plus_31.k8s.LocalObjectReference]
ImagePullSecrets is a list of references to secrets in the same namespace to use for pulling any images in pods that reference this ServiceAccount.
ImagePullSecrets are distinct from Secrets because Secrets can be mounted in the pod, but ImagePullSecrets are only accessed by the kubelet. More info: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
secretsOptional ¶
secrets: typing.List[ObjectReference]
- Type: typing.List[cdk8s_plus_31.k8s.ObjectReference]
Secrets is a list of the secrets in the same namespace that pods running using this ServiceAccount are allowed to use.
Pods are only limited to this list if this service account has a “kubernetes.io/enforce-mountable-secrets” annotation set to “true”. This field should not be used to find auto-generated service account token secrets for use outside of pods. Instead, tokens can be requested directly using the TokenRequest API, or service account token secrets can be manually created. More info: https://kubernetes.io/docs/concepts/configuration/secret
KubeServiceCidrListV1Beta1Props ¶
ServiceCIDRList contains a list of ServiceCIDR objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrListV1Beta1Props(
items: typing.List[KubeServiceCidrv1Beta1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeServiceCidrv1Beta1Props] |
items is the list of ServiceCIDRs. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard object’s metadata. |
itemsRequired ¶
items: typing.List[KubeServiceCidrv1Beta1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeServiceCidrv1Beta1Props]
items is the list of ServiceCIDRs.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeServiceCidrv1Beta1Props ¶
ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceCidrv1Beta1Props(
metadata: ObjectMeta = None,
spec: ServiceCidrSpecV1Beta1 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.ServiceCidrSpecV1Beta1 |
spec is the desired state of the ServiceCIDR. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: ServiceCidrSpecV1Beta1
- Type: cdk8s_plus_31.k8s.ServiceCidrSpecV1Beta1
spec is the desired state of the ServiceCIDR.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeServiceListProps ¶
ServiceList holds a list of services.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceListProps(
items: typing.List[KubeServiceProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeServiceProps] |
List of services. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeServiceProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeServiceProps]
List of services.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeServiceProps ¶
Service is a named abstraction of software service (for example, mysql) consisting of local port (for example 3306) that the proxy listens on, and the selector that determines which pods will answer requests sent through the proxy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeServiceProps(
metadata: ObjectMeta = None,
spec: ServiceSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.ServiceSpec |
Spec defines the behavior of a service. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: ServiceSpec
- Type: cdk8s_plus_31.k8s.ServiceSpec
Spec defines the behavior of a service.
https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
KubeStatefulSetListProps ¶
StatefulSetList is a collection of StatefulSets.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSetListProps(
items: typing.List[KubeStatefulSetProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeStatefulSetProps] |
Items is the list of stateful sets. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list’s metadata. |
itemsRequired ¶
items: typing.List[KubeStatefulSetProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeStatefulSetProps]
Items is the list of stateful sets.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeStatefulSetProps ¶
StatefulSet represents a set of pods with consistent identities.
Identities are defined as:
- Network: A single stable DNS and hostname.
- Storage: As many VolumeClaims as requested.
The StatefulSet guarantees that a given network identity will always map to the same storage identity.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatefulSetProps(
metadata: ObjectMeta = None,
spec: StatefulSetSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.StatefulSetSpec |
Spec defines the desired identities of pods in this set. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: StatefulSetSpec
- Type: cdk8s_plus_31.k8s.StatefulSetSpec
Spec defines the desired identities of pods in this set.
KubeStatusProps ¶
Status is a return value for calls that don’t return other objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeStatusProps(
code: typing.Union[int, float] = None,
details: StatusDetails = None,
message: str = None,
metadata: ListMeta = None,
reason: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
code |
typing.Union[int, float] |
Suggested HTTP return code for this status, 0 if not set. |
details |
cdk8s_plus_31.k8s.StatusDetails |
Extended data associated with the reason. |
message |
str |
A human-readable description of the status of this operation. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
reason |
str |
A machine-readable description of why this operation is in the “Failure” status. |
codeOptional ¶
code: typing.Union[int, float]
- Type: typing.Union[int, float]
Suggested HTTP return code for this status, 0 if not set.
detailsOptional ¶
details: StatusDetails
- Type: cdk8s_plus_31.k8s.StatusDetails
Extended data associated with the reason.
Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
messageOptional ¶
message: str
- Type: str
A human-readable description of the status of this operation.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
reasonOptional ¶
reason: str
- Type: str
A machine-readable description of why this operation is in the “Failure” status.
If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
KubeStorageClassListProps ¶
StorageClassList is a collection of storage classes.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClassListProps(
items: typing.List[KubeStorageClassProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeStorageClassProps] |
items is the list of StorageClasses. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeStorageClassProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeStorageClassProps]
items is the list of StorageClasses.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeStorageClassProps ¶
StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned.
StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageClassProps(
provisioner: str,
allowed_topologies: typing.List[TopologySelectorTerm] = None,
allow_volume_expansion: bool = None,
metadata: ObjectMeta = None,
mount_options: typing.List[str] = None,
parameters: typing.Mapping[str] = None,
reclaim_policy: str = None,
volume_binding_mode: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
provisioner |
str |
provisioner indicates the type of the provisioner. |
allowed_topologies |
typing.List[cdk8s_plus_31.k8s.TopologySelectorTerm] |
allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. |
allow_volume_expansion |
bool |
allowVolumeExpansion shows whether the storage class allow volume expand. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
mount_options |
typing.List[str] |
mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. |
parameters |
typing.Mapping[str] |
parameters holds the parameters for the provisioner that should create volumes of this storage class. |
reclaim_policy |
str |
reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. |
volume_binding_mode |
str |
volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. |
provisionerRequired ¶
provisioner: str
- Type: str
provisioner indicates the type of the provisioner.
allowed_topologiesOptional ¶
allowed_topologies: typing.List[TopologySelectorTerm]
- Type: typing.List[cdk8s_plus_31.k8s.TopologySelectorTerm]
allowedTopologies restrict the node topologies where volumes can be dynamically provisioned.
Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
allow_volume_expansionOptional ¶
allow_volume_expansion: bool
- Type: bool
allowVolumeExpansion shows whether the storage class allow volume expand.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class.
e.g. [“ro”, “soft”]. Not validated - mount of the PVs will simply fail if one is invalid.
parametersOptional ¶
parameters: typing.Mapping[str]
- Type: typing.Mapping[str]
parameters holds the parameters for the provisioner that should create volumes of this storage class.
reclaim_policyOptional ¶
reclaim_policy: str
- Type: str
- Default: Delete.
reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class.
Defaults to Delete.
volume_binding_modeOptional ¶
volume_binding_mode: str
- Type: str
volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.
When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
KubeStorageVersionListV1Alpha1Props ¶
A list of StorageVersions.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionListV1Alpha1Props(
items: typing.List[KubeStorageVersionV1Alpha1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeStorageVersionV1Alpha1Props] |
Items holds a list of StorageVersion. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeStorageVersionV1Alpha1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeStorageVersionV1Alpha1Props]
Items holds a list of StorageVersion.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeStorageVersionMigrationListV1Alpha1Props ¶
StorageVersionMigrationList is a collection of storage version migrations.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationListV1Alpha1Props(
items: typing.List[KubeStorageVersionMigrationV1Alpha1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeStorageVersionMigrationV1Alpha1Props] |
Items is the list of StorageVersionMigration. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeStorageVersionMigrationV1Alpha1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeStorageVersionMigrationV1Alpha1Props]
Items is the list of StorageVersionMigration.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeStorageVersionMigrationV1Alpha1Props ¶
StorageVersionMigration represents a migration of stored data to the latest storage version.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionMigrationV1Alpha1Props(
metadata: ObjectMeta = None,
spec: StorageVersionMigrationSpecV1Alpha1 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
spec |
cdk8s_plus_31.k8s.StorageVersionMigrationSpecV1Alpha1 |
Specification of the migration. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: StorageVersionMigrationSpecV1Alpha1
- Type: cdk8s_plus_31.k8s.StorageVersionMigrationSpecV1Alpha1
Specification of the migration.
KubeStorageVersionV1Alpha1Props ¶
Storage version of a specific resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeStorageVersionV1Alpha1Props(
spec: typing.Any,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
typing.Any |
Spec is an empty spec. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
The name is |
specRequired ¶
spec: typing.Any
- Type: typing.Any
Spec is an empty spec.
It is here to comply with Kubernetes API style.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
The name is
KubeSubjectAccessReviewProps ¶
SubjectAccessReview checks whether or not a user or group can perform an action.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeSubjectAccessReviewProps(
spec: SubjectAccessReviewSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.SubjectAccessReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard list metadata. |
specRequired ¶
spec: SubjectAccessReviewSpec
- Type: cdk8s_plus_31.k8s.SubjectAccessReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeTokenRequestProps ¶
TokenRequest requests a token for a given service account.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenRequestProps(
spec: TokenRequestSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.TokenRequestSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
specRequired ¶
spec: TokenRequestSpec
- Type: cdk8s_plus_31.k8s.TokenRequestSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeTokenReviewProps ¶
TokenReview attempts to authenticate a token to a known user.
Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeTokenReviewProps(
spec: TokenReviewSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.TokenReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
specRequired ¶
spec: TokenReviewSpec
- Type: cdk8s_plus_31.k8s.TokenReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeValidatingAdmissionPolicyBindingListProps ¶
ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListProps(
items: typing.List[KubeValidatingAdmissionPolicyBindingProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingProps] |
List of PolicyBinding. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeValidatingAdmissionPolicyBindingProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingProps]
List of PolicyBinding.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeValidatingAdmissionPolicyBindingListV1Alpha1Props ¶
ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Alpha1Props(
items: typing.List[KubeValidatingAdmissionPolicyBindingV1Alpha1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1Props] |
List of PolicyBinding. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeValidatingAdmissionPolicyBindingV1Alpha1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1Props]
List of PolicyBinding.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeValidatingAdmissionPolicyBindingListV1Beta1Props ¶
ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingListV1Beta1Props(
items: typing.List[KubeValidatingAdmissionPolicyBindingV1Beta1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Beta1Props] |
List of PolicyBinding. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeValidatingAdmissionPolicyBindingV1Beta1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyBindingV1Beta1Props]
List of PolicyBinding.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeValidatingAdmissionPolicyBindingProps ¶
ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources.
ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don’t use params, otherwise N is the number of parameters selected by the binding.
The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingProps(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicyBindingSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpec |
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
spec: ValidatingAdmissionPolicyBindingSpec
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpec
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
KubeValidatingAdmissionPolicyBindingV1Alpha1Props ¶
ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources.
ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don’t use params, otherwise N is the number of parameters selected by the binding.
The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Alpha1Props(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicyBindingSpecV1Alpha1 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Alpha1 |
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
spec: ValidatingAdmissionPolicyBindingSpecV1Alpha1
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Alpha1
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
KubeValidatingAdmissionPolicyBindingV1Beta1Props ¶
ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources.
ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters.
For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don’t use params, otherwise N is the number of parameters selected by the binding.
The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyBindingV1Beta1Props(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicyBindingSpecV1Beta1 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Beta1 |
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
spec: ValidatingAdmissionPolicyBindingSpecV1Beta1
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicyBindingSpecV1Beta1
Specification of the desired behavior of the ValidatingAdmissionPolicyBinding.
KubeValidatingAdmissionPolicyListProps ¶
ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListProps(
items: typing.List[KubeValidatingAdmissionPolicyProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyProps] |
List of ValidatingAdmissionPolicy. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeValidatingAdmissionPolicyProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyProps]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeValidatingAdmissionPolicyListV1Alpha1Props ¶
ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Alpha1Props(
items: typing.List[KubeValidatingAdmissionPolicyV1Alpha1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Alpha1Props] |
List of ValidatingAdmissionPolicy. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeValidatingAdmissionPolicyV1Alpha1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Alpha1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeValidatingAdmissionPolicyListV1Beta1Props ¶
ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyListV1Beta1Props(
items: typing.List[KubeValidatingAdmissionPolicyV1Beta1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Beta1Props] |
List of ValidatingAdmissionPolicy. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeValidatingAdmissionPolicyV1Beta1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingAdmissionPolicyV1Beta1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeValidatingAdmissionPolicyProps ¶
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyProps(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicySpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpec |
Specification of the desired behavior of the ValidatingAdmissionPolicy. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
spec: ValidatingAdmissionPolicySpec
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpec
Specification of the desired behavior of the ValidatingAdmissionPolicy.
KubeValidatingAdmissionPolicyV1Alpha1Props ¶
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Alpha1Props(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicySpecV1Alpha1 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Alpha1 |
Specification of the desired behavior of the ValidatingAdmissionPolicy. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
spec: ValidatingAdmissionPolicySpecV1Alpha1
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Alpha1
Specification of the desired behavior of the ValidatingAdmissionPolicy.
KubeValidatingAdmissionPolicyV1Beta1Props ¶
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingAdmissionPolicyV1Beta1Props(
metadata: ObjectMeta = None,
spec: ValidatingAdmissionPolicySpecV1Beta1 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Beta1 |
Specification of the desired behavior of the ValidatingAdmissionPolicy. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
spec: ValidatingAdmissionPolicySpecV1Beta1
- Type: cdk8s_plus_31.k8s.ValidatingAdmissionPolicySpecV1Beta1
Specification of the desired behavior of the ValidatingAdmissionPolicy.
KubeValidatingWebhookConfigurationListProps ¶
ValidatingWebhookConfigurationList is a list of ValidatingWebhookConfiguration.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfigurationListProps(
items: typing.List[KubeValidatingWebhookConfigurationProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeValidatingWebhookConfigurationProps] |
List of ValidatingWebhookConfiguration. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata. |
itemsRequired ¶
items: typing.List[KubeValidatingWebhookConfigurationProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeValidatingWebhookConfigurationProps]
List of ValidatingWebhookConfiguration.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
KubeValidatingWebhookConfigurationProps ¶
ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeValidatingWebhookConfigurationProps(
metadata: ObjectMeta = None,
webhooks: typing.List[ValidatingWebhook] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata; |
webhooks |
typing.List[cdk8s_plus_31.k8s.ValidatingWebhook] |
Webhooks is a list of webhooks and the affected resources and operations. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
webhooksOptional ¶
webhooks: typing.List[ValidatingWebhook]
- Type: typing.List[cdk8s_plus_31.k8s.ValidatingWebhook]
Webhooks is a list of webhooks and the affected resources and operations.
KubeVolumeAttachmentListProps ¶
VolumeAttachmentList is a collection of VolumeAttachment objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachmentListProps(
items: typing.List[KubeVolumeAttachmentProps],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeVolumeAttachmentProps] |
items is the list of VolumeAttachments. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeVolumeAttachmentProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubeVolumeAttachmentProps]
items is the list of VolumeAttachments.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeVolumeAttachmentProps ¶
VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.
VolumeAttachment objects are non-namespaced.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttachmentProps(
spec: VolumeAttachmentSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.VolumeAttachmentSpec |
spec represents specification of the desired attach/detach volume behavior. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object metadata. |
specRequired ¶
spec: VolumeAttachmentSpec
- Type: cdk8s_plus_31.k8s.VolumeAttachmentSpec
spec represents specification of the desired attach/detach volume behavior.
Populated by the Kubernetes system.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
KubeVolumeAttributesClassListV1Alpha1Props ¶
VolumeAttributesClassList is a collection of VolumeAttributesClass objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Alpha1Props(
items: typing.List[KubeVolumeAttributesClassV1Alpha1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Alpha1Props] |
items is the list of VolumeAttributesClass objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeVolumeAttributesClassV1Alpha1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Alpha1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeVolumeAttributesClassListV1Beta1Props ¶
VolumeAttributesClassList is a collection of VolumeAttributesClass objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassListV1Beta1Props(
items: typing.List[KubeVolumeAttributesClassV1Beta1Props],
metadata: ListMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Beta1Props] |
items is the list of VolumeAttributesClass objects. |
metadata |
cdk8s_plus_31.k8s.ListMeta |
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
itemsRequired ¶
items: typing.List[KubeVolumeAttributesClassV1Beta1Props]
- Type: typing.List[cdk8s_plus_31.k8s.KubeVolumeAttributesClassV1Beta1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
metadata: ListMeta
- Type: cdk8s_plus_31.k8s.ListMeta
Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
KubeVolumeAttributesClassV1Alpha1Props ¶
VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver.
The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Alpha1Props(
driver_name: str,
metadata: ObjectMeta = None,
parameters: typing.Mapping[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
driver_name |
str |
Name of the CSI driver This field is immutable. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
parameters |
typing.Mapping[str] |
parameters hold volume attributes defined by the CSI driver. |
driver_nameRequired ¶
driver_name: str
- Type: str
Name of the CSI driver This field is immutable.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
parametersOptional ¶
parameters: typing.Mapping[str]
- Type: typing.Mapping[str]
parameters hold volume attributes defined by the CSI driver.
These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.
This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an “Infeasible” state in the modifyVolumeStatus field.
KubeVolumeAttributesClassV1Beta1Props ¶
VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver.
The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.KubeVolumeAttributesClassV1Beta1Props(
driver_name: str,
metadata: ObjectMeta = None,
parameters: typing.Mapping[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
driver_name |
str |
Name of the CSI driver This field is immutable. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
parameters |
typing.Mapping[str] |
parameters hold volume attributes defined by the CSI driver. |
driver_nameRequired ¶
driver_name: str
- Type: str
Name of the CSI driver This field is immutable.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
parametersOptional ¶
parameters: typing.Mapping[str]
- Type: typing.Mapping[str]
parameters hold volume attributes defined by the CSI driver.
These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.
This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an “Infeasible” state in the modifyVolumeStatus field.
LabelSelector ¶
A label selector is a label query over a set of resources.
The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LabelSelector(
match_expressions: typing.List[LabelSelectorRequirement] = None,
match_labels: typing.Mapping[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
match_expressions |
typing.List[cdk8s_plus_31.k8s.LabelSelectorRequirement] |
matchExpressions is a list of label selector requirements. |
match_labels |
typing.Mapping[str] |
matchLabels is a map of {key,value} pairs. |
match_expressionsOptional ¶
match_expressions: typing.List[LabelSelectorRequirement]
- Type: typing.List[cdk8s_plus_31.k8s.LabelSelectorRequirement]
matchExpressions is a list of label selector requirements.
The requirements are ANDed.
match_labelsOptional ¶
match_labels: typing.Mapping[str]
- Type: typing.Mapping[str]
matchLabels is a map of {key,value} pairs.
A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is “key”, the operator is “In”, and the values array contains only “value”. The requirements are ANDed.
LabelSelectorAttributes ¶
LabelSelectorAttributes indicates a label limited access.
Webhook authors are encouraged to * ensure rawSelector and requirements are not both set * consider the requirements field if set * not try to parse or consider the rawSelector field if set. This is to avoid another CVE-2022-2880 (i.e. getting different systems to agree on how exactly to parse a query is not something we want), see https://www.oxeye.io/resources/golang-parameter-smuggling-attack for more details. For the *SubjectAccessReview endpoints of the kube-apiserver: * If rawSelector is empty and requirements are empty, the request is not limited. * If rawSelector is present and requirements are empty, the rawSelector will be parsed and limited if the parsing succeeds. * If rawSelector is empty and requirements are present, the requirements should be honored * If rawSelector is present and requirements are present, the request is invalid.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LabelSelectorAttributes(
raw_selector: str = None,
requirements: typing.List[LabelSelectorRequirement] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
raw_selector |
str |
rawSelector is the serialization of a field selector that would be included in a query parameter. |
requirements |
typing.List[cdk8s_plus_31.k8s.LabelSelectorRequirement] |
requirements is the parsed interpretation of a label selector. |
raw_selectorOptional ¶
raw_selector: str
- Type: str
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.
requirementsOptional ¶
requirements: typing.List[LabelSelectorRequirement]
- Type: typing.List[cdk8s_plus_31.k8s.LabelSelectorRequirement]
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.
LabelSelectorOptions ¶
Options for LabelSelector.of.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.LabelSelectorOptions(
expressions: typing.List[LabelExpression] = None,
labels: typing.Mapping[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expressions |
typing.List[LabelExpression] |
Expression based label matchers. |
labels |
typing.Mapping[str] |
Strict label matchers. |
expressionsOptional ¶
expressions: typing.List[LabelExpression]
- Type: typing.List[LabelExpression]
Expression based label matchers.
labelsOptional ¶
labels: typing.Mapping[str]
- Type: typing.Mapping[str]
Strict label matchers.
LabelSelectorRequirement ¶
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.LabelSelectorRequirement(
key: str,
operator: str,
values: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
The label key that the selector applies to. |
operator |
str |
Represents a key’s relationship to a set of values. |
values |
typing.List[str] |
An array of string values. |
keyRequired ¶
key: str
- Type: str
The label key that the selector applies to.
operatorRequired ¶
operator: str
- Type: str
Represents a key’s relationship to a set of values.
valuesOptional ¶
values: typing.List[str]
- Type: typing.List[str]
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. This array is replaced during a strategic merge patch.
LabelSelectorRequirement ¶
A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LabelSelectorRequirement(
key: str,
operator: str,
values: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
key is the label key that the selector applies to. |
operator |
str |
operator represents a key’s relationship to a set of values. |
values |
typing.List[str] |
values is an array of string values. |
keyRequired ¶
key: str
- Type: str
key is the label key that the selector applies to.
operatorRequired ¶
operator: str
- Type: str
operator represents a key’s relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
valuesOptional ¶
values: typing.List[str]
- Type: typing.List[str]
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. This array is replaced during a strategic merge patch.
LeaseCandidateSpecV1Alpha1 ¶
LeaseCandidateSpec is a specification of a Lease.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LeaseCandidateSpecV1Alpha1(
lease_name: str,
preferred_strategies: typing.List[str],
binary_version: str = None,
emulation_version: str = None,
ping_time: datetime.datetime = None,
renew_time: datetime.datetime = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
lease_name |
str |
LeaseName is the name of the lease for which this candidate is contending. |
preferred_strategies |
typing.List[str] |
PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. |
binary_version |
str |
BinaryVersion is the binary version. |
emulation_version |
str |
EmulationVersion is the emulation version. |
ping_time |
datetime.datetime |
PingTime is the last time that the server has requested the LeaseCandidate to renew. |
renew_time |
datetime.datetime |
RenewTime is the time that the LeaseCandidate was last updated. |
lease_nameRequired ¶
lease_name: str
- Type: str
LeaseName is the name of the lease for which this candidate is contending.
This field is immutable.
preferred_strategiesRequired ¶
preferred_strategies: typing.List[str]
- Type: typing.List[str]
PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election.
The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated leader election to make a decision about the final election strategy. This follows as - If all clients have strategy X as the first element in this list, strategy X will be used. - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y will be used.
- If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
binary_versionOptional ¶
binary_version: str
- Type: str
BinaryVersion is the binary version.
It must be in a semver format without leading v. This field is required when strategy is “OldestEmulationVersion”
emulation_versionOptional ¶
emulation_version: str
- Type: str
EmulationVersion is the emulation version.
It must be in a semver format without leading v. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is “OldestEmulationVersion”
ping_timeOptional ¶
ping_time: datetime.datetime
- Type: datetime.datetime
PingTime is the last time that the server has requested the LeaseCandidate to renew.
It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.
renew_timeOptional ¶
renew_time: datetime.datetime
- Type: datetime.datetime
RenewTime is the time that the LeaseCandidate was last updated.
Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.
LeaseSpec ¶
LeaseSpec is a specification of a Lease.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LeaseSpec(
acquire_time: datetime.datetime = None,
holder_identity: str = None,
lease_duration_seconds: typing.Union[int, float] = None,
lease_transitions: typing.Union[int, float] = None,
preferred_holder: str = None,
renew_time: datetime.datetime = None,
strategy: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
acquire_time |
datetime.datetime |
acquireTime is a time when the current lease was acquired. |
holder_identity |
str |
holderIdentity contains the identity of the holder of a current lease. |
lease_duration_seconds |
typing.Union[int, float] |
leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it. |
lease_transitions |
typing.Union[int, float] |
leaseTransitions is the number of transitions of a lease between holders. |
preferred_holder |
str |
PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up. |
renew_time |
datetime.datetime |
renewTime is a time when the current holder of a lease has last updated the lease. |
strategy |
str |
Strategy indicates the strategy for picking the leader for coordinated leader election. |
acquire_timeOptional ¶
acquire_time: datetime.datetime
- Type: datetime.datetime
acquireTime is a time when the current lease was acquired.
holder_identityOptional ¶
holder_identity: str
- Type: str
holderIdentity contains the identity of the holder of a current lease.
If Coordinated Leader Election is used, the holder identity must be equal to the elected LeaseCandidate.metadata.name field.
lease_duration_secondsOptional ¶
lease_duration_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
leaseDurationSeconds is a duration that candidates for a lease need to wait to force acquire it.
This is measured against the time of last observed renewTime.
lease_transitionsOptional ¶
lease_transitions: typing.Union[int, float]
- Type: typing.Union[int, float]
leaseTransitions is the number of transitions of a lease between holders.
preferred_holderOptional ¶
preferred_holder: str
- Type: str
PreferredHolder signals to a lease holder that the lease has a more optimal holder and should be given up.
This field can only be set if Strategy is also set.
renew_timeOptional ¶
renew_time: datetime.datetime
- Type: datetime.datetime
renewTime is a time when the current holder of a lease has last updated the lease.
strategyOptional ¶
strategy: str
- Type: str
Strategy indicates the strategy for picking the leader for coordinated leader election.
If the field is not specified, there is no active coordination for this lease. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.
Lifecycle ¶
Lifecycle describes actions that the management system should take in response to container lifecycle events.
For the PostStart and PreStop lifecycle handlers, management of the container blocks until the action is complete, unless the container process fails, in which case the handler is aborted.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Lifecycle(
post_start: LifecycleHandler = None,
pre_stop: LifecycleHandler = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
post_start |
cdk8s_plus_31.k8s.LifecycleHandler |
PostStart is called immediately after a container is created. |
pre_stop |
cdk8s_plus_31.k8s.LifecycleHandler |
PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc. |
post_startOptional ¶
post_start: LifecycleHandler
- Type: cdk8s_plus_31.k8s.LifecycleHandler
PostStart is called immediately after a container is created.
If the handler fails, the container is terminated and restarted according to its restart policy. Other management of the container blocks until the hook completes. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
pre_stopOptional ¶
pre_stop: LifecycleHandler
- Type: cdk8s_plus_31.k8s.LifecycleHandler
PreStop is called immediately before a container is terminated due to an API request or management event such as liveness/startup probe failure, preemption, resource contention, etc.
The handler is not called if the container crashes or exits. The Pod’s termination grace period countdown begins before the PreStop hook is executed. Regardless of the outcome of the handler, the container will eventually terminate within the Pod’s termination grace period (unless delayed by finalizers). Other management of the container blocks until the hook completes or until the termination grace period is reached. More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
LifecycleHandler ¶
LifecycleHandler defines a specific action that should be taken in a lifecycle hook.
One and only one of the fields, except TCPSocket must be specified.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LifecycleHandler(
exec: ExecAction = None,
http_get: HttpGetAction = None,
sleep: SleepAction = None,
tcp_socket: TcpSocketAction = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
exec |
cdk8s_plus_31.k8s.ExecAction |
Exec specifies the action to take. |
http_get |
cdk8s_plus_31.k8s.HttpGetAction |
HTTPGet specifies the http request to perform. |
sleep |
cdk8s_plus_31.k8s.SleepAction |
Sleep represents the duration that the container should sleep before being terminated. |
tcp_socket |
cdk8s_plus_31.k8s.TcpSocketAction |
Deprecated. |
execOptional ¶
exec: ExecAction
- Type: cdk8s_plus_31.k8s.ExecAction
Exec specifies the action to take.
http_getOptional ¶
http_get: HttpGetAction
- Type: cdk8s_plus_31.k8s.HttpGetAction
HTTPGet specifies the http request to perform.
sleepOptional ¶
sleep: SleepAction
- Type: cdk8s_plus_31.k8s.SleepAction
Sleep represents the duration that the container should sleep before being terminated.
tcp_socketOptional ¶
tcp_socket: TcpSocketAction
- Type: cdk8s_plus_31.k8s.TcpSocketAction
Deprecated.
TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified.
LimitedPriorityLevelConfiguration ¶
LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits.
It addresses two issues:
- How are requests for this priority level limited?
- What should be done with requests that exceed the limit?
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LimitedPriorityLevelConfiguration(
borrowing_limit_percent: typing.Union[int, float] = None,
lendable_percent: typing.Union[int, float] = None,
limit_response: LimitResponse = None,
nominal_concurrency_shares: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
borrowing_limit_percent |
typing.Union[int, float] |
borrowingLimitPercent, if present, configures a limit on how many seats this priority level can borrow from other priority levels. |
lendable_percent |
typing.Union[int, float] |
lendablePercent prescribes the fraction of the level’s NominalCL that can be borrowed by other priority levels. |
limit_response |
cdk8s_plus_31.k8s.LimitResponse |
limitResponse indicates what to do with requests that can not be executed right now. |
nominal_concurrency_shares |
typing.Union[int, float] |
nominalConcurrencyShares (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. |
borrowing_limit_percentOptional ¶
borrowing_limit_percent: typing.Union[int, float]
- Type: typing.Union[int, float]
borrowingLimitPercent, if present, configures a limit on how many seats this priority level can borrow from other priority levels.
The limit is known as this level’s BorrowingConcurrencyLimit (BorrowingCL) and is a limit on the total number of seats that this level may borrow at any one time. This field holds the ratio of that limit to the level’s nominal concurrency limit. When this field is non-nil, it must hold a non-negative integer and the limit is calculated as follows.
BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )
The value of this field can be more than 100, implying that this priority level can borrow a number of seats that is greater than its own nominal concurrency limit (NominalCL). When this field is left nil, the limit is effectively infinite.
lendable_percentOptional ¶
lendable_percent: typing.Union[int, float]
- Type: typing.Union[int, float]
lendablePercent prescribes the fraction of the level’s NominalCL that can be borrowed by other priority levels.
The value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level’s LendableConcurrencyLimit (LendableCL), is defined as follows.
LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
limit_responseOptional ¶
limit_response: LimitResponse
- Type: cdk8s_plus_31.k8s.LimitResponse
limitResponse indicates what to do with requests that can not be executed right now.
nominal_concurrency_sharesOptional ¶
nominal_concurrency_shares: typing.Union[int, float]
- Type: typing.Union[int, float]
nominalConcurrencyShares (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level.
This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server’s concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values:
NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)
Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level.
If not specified, this field defaults to a value of 30.
Setting this field to zero supports the construction of a “jail” for this priority level that is used to hold some request(s)
LimitedPriorityLevelConfigurationV1Beta3 ¶
LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits.
It addresses two issues:
- How are requests for this priority level limited?
- What should be done with requests that exceed the limit?
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LimitedPriorityLevelConfigurationV1Beta3(
borrowing_limit_percent: typing.Union[int, float] = None,
lendable_percent: typing.Union[int, float] = None,
limit_response: LimitResponseV1Beta3 = None,
nominal_concurrency_shares: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
borrowing_limit_percent |
typing.Union[int, float] |
borrowingLimitPercent, if present, configures a limit on how many seats this priority level can borrow from other priority levels. |
lendable_percent |
typing.Union[int, float] |
lendablePercent prescribes the fraction of the level’s NominalCL that can be borrowed by other priority levels. |
limit_response |
cdk8s_plus_31.k8s.LimitResponseV1Beta3 |
limitResponse indicates what to do with requests that can not be executed right now. |
nominal_concurrency_shares |
typing.Union[int, float] |
nominalConcurrencyShares (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. |
borrowing_limit_percentOptional ¶
borrowing_limit_percent: typing.Union[int, float]
- Type: typing.Union[int, float]
borrowingLimitPercent, if present, configures a limit on how many seats this priority level can borrow from other priority levels.
The limit is known as this level’s BorrowingConcurrencyLimit (BorrowingCL) and is a limit on the total number of seats that this level may borrow at any one time. This field holds the ratio of that limit to the level’s nominal concurrency limit. When this field is non-nil, it must hold a non-negative integer and the limit is calculated as follows.
BorrowingCL(i) = round( NominalCL(i) * borrowingLimitPercent(i)/100.0 )
The value of this field can be more than 100, implying that this priority level can borrow a number of seats that is greater than its own nominal concurrency limit (NominalCL). When this field is left nil, the limit is effectively infinite.
lendable_percentOptional ¶
lendable_percent: typing.Union[int, float]
- Type: typing.Union[int, float]
lendablePercent prescribes the fraction of the level’s NominalCL that can be borrowed by other priority levels.
The value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level’s LendableConcurrencyLimit (LendableCL), is defined as follows.
LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 )
limit_responseOptional ¶
limit_response: LimitResponseV1Beta3
- Type: cdk8s_plus_31.k8s.LimitResponseV1Beta3
limitResponse indicates what to do with requests that can not be executed right now.
nominal_concurrency_sharesOptional ¶
nominal_concurrency_shares: typing.Union[int, float]
- Type: typing.Union[int, float]
nominalConcurrencyShares (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level.
This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server’s concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values:
NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k)
Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of 30.
LimitRangeItem ¶
LimitRangeItem defines a min/max usage limit for any resource that matches on kind.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LimitRangeItem(
type: str,
default: typing.Mapping[Quantity] = None,
default_request: typing.Mapping[Quantity] = None,
max: typing.Mapping[Quantity] = None,
max_limit_request_ratio: typing.Mapping[Quantity] = None,
min: typing.Mapping[Quantity] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
Type of resource that this limit applies to. |
default |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
Default resource requirement limit value by resource name if resource limit is omitted. |
default_request |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
DefaultRequest is the default resource requirement request value by resource name if resource request is omitted. |
max |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
Max usage constraints on this kind by resource name. |
max_limit_request_ratio |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value; |
min |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
Min usage constraints on this kind by resource name. |
typeRequired ¶
type: str
- Type: str
Type of resource that this limit applies to.
defaultOptional ¶
default: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
Default resource requirement limit value by resource name if resource limit is omitted.
default_requestOptional ¶
default_request: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
DefaultRequest is the default resource requirement request value by resource name if resource request is omitted.
maxOptional ¶
max: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
Max usage constraints on this kind by resource name.
max_limit_request_ratioOptional ¶
max_limit_request_ratio: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
MaxLimitRequestRatio if specified, the named resource must have a request and limit that are both non-zero where limit divided by request is less than or equal to the enumerated value;
this represents the max burst for the named resource.
minOptional ¶
min: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
Min usage constraints on this kind by resource name.
LimitRangeSpec ¶
LimitRangeSpec defines a min/max usage limit for resources that match on kind.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LimitRangeSpec(
limits: typing.List[LimitRangeItem]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
limits |
typing.List[cdk8s_plus_31.k8s.LimitRangeItem] |
Limits is the list of LimitRangeItem objects that are enforced. |
limitsRequired ¶
limits: typing.List[LimitRangeItem]
- Type: typing.List[cdk8s_plus_31.k8s.LimitRangeItem]
Limits is the list of LimitRangeItem objects that are enforced.
LimitResponse ¶
LimitResponse defines how to handle requests that can not be executed right now.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LimitResponse(
type: str,
queuing: QueuingConfiguration = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type is “Queue” or “Reject”. |
queuing |
cdk8s_plus_31.k8s.QueuingConfiguration |
queuing holds the configuration parameters for queuing. |
typeRequired ¶
type: str
- Type: str
type is “Queue” or “Reject”.
“Queue” means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. “Reject” means that requests that can not be executed upon arrival are rejected. Required.
queuingOptional ¶
queuing: QueuingConfiguration
- Type: cdk8s_plus_31.k8s.QueuingConfiguration
queuing holds the configuration parameters for queuing.
This field may be non-empty only if type is "Queue".
LimitResponseV1Beta3 ¶
LimitResponse defines how to handle requests that can not be executed right now.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LimitResponseV1Beta3(
type: str,
queuing: QueuingConfigurationV1Beta3 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type is “Queue” or “Reject”. |
queuing |
cdk8s_plus_31.k8s.QueuingConfigurationV1Beta3 |
queuing holds the configuration parameters for queuing. |
typeRequired ¶
type: str
- Type: str
type is “Queue” or “Reject”.
“Queue” means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. “Reject” means that requests that can not be executed upon arrival are rejected. Required.
queuingOptional ¶
queuing: QueuingConfigurationV1Beta3
- Type: cdk8s_plus_31.k8s.QueuingConfigurationV1Beta3
queuing holds the configuration parameters for queuing.
This field may be non-empty only if type is "Queue".
ListMeta ¶
ListMeta describes metadata that synthetic resources must have, including lists and various status objects.
A resource may have only one of {ObjectMeta, ListMeta}.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ListMeta(
continue: str = None,
remaining_item_count: typing.Union[int, float] = None,
resource_version: str = None,
self_link: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
continue |
str |
continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. |
remaining_item_count |
typing.Union[int, float] |
remainingItemCount is the number of subsequent items in the list which are not included in this list response. |
resource_version |
str |
String that identifies the server’s internal version of this object that can be used by clients to determine when objects have changed. |
self_link |
str |
Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. |
continueOptional ¶
continue: str
- Type: str
continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available.
The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a consistent list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response, unless you have received this token from an error message.
remaining_item_countOptional ¶
remaining_item_count: typing.Union[int, float]
- Type: typing.Union[int, float]
remainingItemCount is the number of subsequent items in the list which are not included in this list response.
If the list request contained label or field selectors, then the number of remaining items is unknown and the field will be left unset and omitted during serialization. If the list is complete (either because it is not chunking or because this is the last chunk), then there are no more remaining items and this field will be left unset and omitted during serialization. Servers older than v1.15 do not set this field. The intended use of the remainingItemCount is estimating the size of a collection. Clients should not rely on the remainingItemCount to be set or to be exact.
resource_versionOptional ¶
resource_version: str
- Type: str
String that identifies the server’s internal version of this object that can be used by clients to determine when objects have changed.
Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
self_linkOptional ¶
self_link: str
- Type: str
Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.
LocalObjectReference ¶
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LocalObjectReference(
name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name of the referent. |
nameOptional ¶
name: str
- Type: str
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
LocalVolumeSource ¶
Local represents directly-attached storage with node affinity (Beta feature).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.LocalVolumeSource(
path: str,
fs_type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
path of the full path to the volume on the node. |
fs_type |
str |
fsType is the filesystem type to mount. |
pathRequired ¶
path: str
- Type: str
path of the full path to the volume on the node.
It can be either a directory or block device (disk, partition, …).
fs_typeOptional ¶
fs_type: str
- Type: str
fsType is the filesystem type to mount.
It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. “ext4”, “xfs”, “ntfs”. The default value is to auto-select a filesystem if unspecified.
ManagedFieldsEntry ¶
ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ManagedFieldsEntry(
api_version: str = None,
fields_type: str = None,
fields_v1: typing.Any = None,
manager: str = None,
operation: str = None,
subresource: str = None,
time: datetime.datetime = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
APIVersion defines the version of this resource that this field set applies to. |
fields_type |
str |
FieldsType is the discriminator for the different fields format and version. |
fields_v1 |
typing.Any |
FieldsV1 holds the first JSON version format as described in the “FieldsV1” type. |
manager |
str |
Manager is an identifier of the workflow managing these fields. |
operation |
str |
Operation is the type of operation which lead to this ManagedFieldsEntry being created. |
subresource |
str |
Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. |
time |
datetime.datetime |
Time is the timestamp of when the ManagedFields entry was added. |
api_versionOptional ¶
api_version: str
- Type: str
APIVersion defines the version of this resource that this field set applies to.
The format is “group/version” just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.
fields_typeOptional ¶
fields_type: str
- Type: str
FieldsType is the discriminator for the different fields format and version.
There is currently only one possible value: “FieldsV1”
fields_v1Optional ¶
fields_v1: typing.Any
- Type: typing.Any
FieldsV1 holds the first JSON version format as described in the “FieldsV1” type.
managerOptional ¶
manager: str
- Type: str
Manager is an identifier of the workflow managing these fields.
operationOptional ¶
operation: str
- Type: str
Operation is the type of operation which lead to this ManagedFieldsEntry being created.
The only valid values for this field are ‘Apply’ and ‘Update’.
subresourceOptional ¶
subresource: str
- Type: str
Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource.
The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.
timeOptional ¶
time: datetime.datetime
- Type: datetime.datetime
Time is the timestamp of when the ManagedFields entry was added.
The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.
MatchCondition ¶
MatchCondition represents a condition which must by fulfilled for a request to be sent to a webhook.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MatchCondition(
expression: str,
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression represents the expression which will be evaluated by CEL. |
name |
str |
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. |
expressionRequired ¶
expression: str
- Type: str
Expression represents the expression which will be evaluated by CEL.
Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
‘object’ - The object from the incoming request. The value is null for DELETE requests. ‘oldObject’ - The existing object. The value is null for CREATE requests. ‘request’ - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). ‘authorizer’ - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz ‘authorizer.requestResource’ - A CEL ResourceCheck constructed from the ‘authorizer’ and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
Required.
nameRequired ¶
name: str
- Type: str
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes.
A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, ‘-‘, ‘’ or ‘.’, and must start and end with an alphanumeric character (e.g. ‘MyName’, or ‘my.name’, or ‘123-abc’, regex used for validation is ‘([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9]’) with an optional DNS subdomain prefix and ‘/’ (e.g. ‘example.com/MyName’)
Required.
MatchConditionV1Alpha1 ¶
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MatchConditionV1Alpha1(
expression: str,
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression represents the expression which will be evaluated by CEL. |
name |
str |
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. |
expressionRequired ¶
expression: str
- Type: str
Expression represents the expression which will be evaluated by CEL.
Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
‘object’ - The object from the incoming request. The value is null for DELETE requests. ‘oldObject’ - The existing object. The value is null for CREATE requests. ‘request’ - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). ‘authorizer’ - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz ‘authorizer.requestResource’ - A CEL ResourceCheck constructed from the ‘authorizer’ and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
Required.
nameRequired ¶
name: str
- Type: str
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes.
A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, ‘-‘, ‘’ or ‘.’, and must start and end with an alphanumeric character (e.g. ‘MyName’, or ‘my.name’, or ‘123-abc’, regex used for validation is ‘([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9]’) with an optional DNS subdomain prefix and ‘/’ (e.g. ‘example.com/MyName’)
Required.
MatchConditionV1Beta1 ¶
MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MatchConditionV1Beta1(
expression: str,
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression represents the expression which will be evaluated by CEL. |
name |
str |
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. |
expressionRequired ¶
expression: str
- Type: str
Expression represents the expression which will be evaluated by CEL.
Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables:
‘object’ - The object from the incoming request. The value is null for DELETE requests. ‘oldObject’ - The existing object. The value is null for CREATE requests. ‘request’ - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). ‘authorizer’ - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz ‘authorizer.requestResource’ - A CEL ResourceCheck constructed from the ‘authorizer’ and configured with the request resource. Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/
Required.
nameRequired ¶
name: str
- Type: str
Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes.
A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, ‘-‘, ‘’ or ‘.’, and must start and end with an alphanumeric character (e.g. ‘MyName’, or ‘my.name’, or ‘123-abc’, regex used for validation is ‘([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9]’) with an optional DNS subdomain prefix and ‘/’ (e.g. ‘example.com/MyName’)
Required.
MatchResources ¶
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria.
The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MatchResources(
exclude_resource_rules: typing.List[NamedRuleWithOperations] = None,
match_policy: str = None,
namespace_selector: LabelSelector = None,
object_selector: LabelSelector = None,
resource_rules: typing.List[NamedRuleWithOperations] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
exclude_resource_rules |
typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperations] |
ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. |
match_policy |
str |
matchPolicy defines how the “MatchResources” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”. |
namespace_selector |
cdk8s_plus_31.k8s.LabelSelector |
NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. |
object_selector |
cdk8s_plus_31.k8s.LabelSelector |
ObjectSelector decides whether to run the validation based on if the object has matching labels. |
resource_rules |
typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperations] |
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. |
exclude_resource_rulesOptional ¶
exclude_resource_rules: typing.List[NamedRuleWithOperations]
- Type: typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperations]
ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
match_policyOptional ¶
match_policy: str
- Type: str
- Default: Equivalent”
matchPolicy defines how the “MatchResources” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”.
- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.
Defaults to “Equivalent”
namespace_selectorOptional ¶
namespace_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector.
If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.
For example, to run the webhook on any objects whose namespace is not associated with “runlevel” of “0” or “1”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “runlevel”, “operator”: “NotIn”, “values”: [ “0”, “1” ] } ] }
If instead you want to only run the policy on any objects whose namespace is associated with the “environment” of “prod” or “staging”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “environment”, “operator”: “In”, “values”: [ “prod”, “staging” ] } ] }
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
Default to the empty LabelSelector, which matches everything.
object_selectorOptional ¶
object_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
ObjectSelector decides whether to run the validation based on if the object has matching labels.
objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.
resource_rulesOptional ¶
resource_rules: typing.List[NamedRuleWithOperations]
- Type: typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperations]
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
The policy cares about an operation if it matches any Rule.
MatchResourcesV1Alpha1 ¶
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria.
The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MatchResourcesV1Alpha1(
exclude_resource_rules: typing.List[NamedRuleWithOperationsV1Alpha1] = None,
match_policy: str = None,
namespace_selector: LabelSelector = None,
object_selector: LabelSelector = None,
resource_rules: typing.List[NamedRuleWithOperationsV1Alpha1] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
exclude_resource_rules |
typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperationsV1Alpha1] |
ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. |
match_policy |
str |
matchPolicy defines how the “MatchResources” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”. |
namespace_selector |
cdk8s_plus_31.k8s.LabelSelector |
NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. |
object_selector |
cdk8s_plus_31.k8s.LabelSelector |
ObjectSelector decides whether to run the validation based on if the object has matching labels. |
resource_rules |
typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperationsV1Alpha1] |
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. |
exclude_resource_rulesOptional ¶
exclude_resource_rules: typing.List[NamedRuleWithOperationsV1Alpha1]
- Type: typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperationsV1Alpha1]
ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
match_policyOptional ¶
match_policy: str
- Type: str
- Default: Equivalent”
matchPolicy defines how the “MatchResources” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”.
- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.
Defaults to “Equivalent”
namespace_selectorOptional ¶
namespace_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector.
If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.
For example, to run the webhook on any objects whose namespace is not associated with “runlevel” of “0” or “1”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “runlevel”, “operator”: “NotIn”, “values”: [ “0”, “1” ] } ] }
If instead you want to only run the policy on any objects whose namespace is associated with the “environment” of “prod” or “staging”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “environment”, “operator”: “In”, “values”: [ “prod”, “staging” ] } ] }
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
Default to the empty LabelSelector, which matches everything.
object_selectorOptional ¶
object_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
ObjectSelector decides whether to run the validation based on if the object has matching labels.
objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.
resource_rulesOptional ¶
resource_rules: typing.List[NamedRuleWithOperationsV1Alpha1]
- Type: typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperationsV1Alpha1]
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
The policy cares about an operation if it matches any Rule.
MatchResourcesV1Beta1 ¶
MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria.
The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MatchResourcesV1Beta1(
exclude_resource_rules: typing.List[NamedRuleWithOperationsV1Beta1] = None,
match_policy: str = None,
namespace_selector: LabelSelector = None,
object_selector: LabelSelector = None,
resource_rules: typing.List[NamedRuleWithOperationsV1Beta1] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
exclude_resource_rules |
typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperationsV1Beta1] |
ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. |
match_policy |
str |
matchPolicy defines how the “MatchResources” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”. |
namespace_selector |
cdk8s_plus_31.k8s.LabelSelector |
NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. |
object_selector |
cdk8s_plus_31.k8s.LabelSelector |
ObjectSelector decides whether to run the validation based on if the object has matching labels. |
resource_rules |
typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperationsV1Beta1] |
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. |
exclude_resource_rulesOptional ¶
exclude_resource_rules: typing.List[NamedRuleWithOperationsV1Beta1]
- Type: typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperationsV1Beta1]
ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about.
The exclude rules take precedence over include rules (if a resource matches both, it is excluded)
match_policyOptional ¶
match_policy: str
- Type: str
- Default: Equivalent”
matchPolicy defines how the “MatchResources” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”.
- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy.
Defaults to “Equivalent”
namespace_selectorOptional ¶
namespace_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector.
If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy.
For example, to run the webhook on any objects whose namespace is not associated with “runlevel” of “0” or “1”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “runlevel”, “operator”: “NotIn”, “values”: [ “0”, “1” ] } ] }
If instead you want to only run the policy on any objects whose namespace is associated with the “environment” of “prod” or “staging”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “environment”, “operator”: “In”, “values”: [ “prod”, “staging” ] } ] }
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
Default to the empty LabelSelector, which matches everything.
object_selectorOptional ¶
object_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
ObjectSelector decides whether to run the validation based on if the object has matching labels.
objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.
resource_rulesOptional ¶
resource_rules: typing.List[NamedRuleWithOperationsV1Beta1]
- Type: typing.List[cdk8s_plus_31.k8s.NamedRuleWithOperationsV1Beta1]
ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches.
The policy cares about an operation if it matches any Rule.
MemoryResources ¶
Memory request and limit.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.MemoryResources(
limit: Size = None,
request: Size = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
limit |
cdk8s.Size |
No description. |
request |
cdk8s.Size |
No description. |
limitOptional ¶
limit: Size
- Type: cdk8s.Size
requestOptional ¶
request: Size
- Type: cdk8s.Size
MetricContainerResourceOptions ¶
Options for Metric.containerResource().
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.MetricContainerResourceOptions(
container: Container,
target: MetricTarget
)
Properties ¶
| Name | Type | Description |
|---|---|---|
container |
Container |
Container where the metric can be found. |
target |
MetricTarget |
Target metric value that will trigger scaling. |
containerRequired ¶
container: Container
- Type: Container
Container where the metric can be found.
targetRequired ¶
target: MetricTarget
- Type: MetricTarget
Target metric value that will trigger scaling.
MetricIdentifierV2 ¶
MetricIdentifier defines the name and optionally selector for a metric.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MetricIdentifierV2(
name: str,
selector: LabelSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of the given metric. |
selector |
cdk8s_plus_31.k8s.LabelSelector |
selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. |
nameRequired ¶
name: str
- Type: str
name is the name of the given metric.
selectorOptional ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
When unset, just the metricName will be used to gather metrics.
MetricObjectOptions ¶
Options for Metric.object().
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.MetricObjectOptions(
name: str,
target: MetricTarget,
label_selector: LabelSelector = None,
object: IResource
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The name of the metric to scale on. |
target |
MetricTarget |
The target metric value that will trigger scaling. |
label_selector |
LabelSelector |
A selector to find a metric by label. |
object |
IResource |
Resource where the metric can be found. |
nameRequired ¶
name: str
- Type: str
The name of the metric to scale on.
targetRequired ¶
target: MetricTarget
- Type: MetricTarget
The target metric value that will trigger scaling.
label_selectorOptional ¶
label_selector: LabelSelector
- Type: LabelSelector
- Default: Just the metric ‘name’ will be used to gather metrics.
A selector to find a metric by label.
When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
objectRequired ¶
object: IResource
- Type: IResource
Resource where the metric can be found.
MetricOptions ¶
Base options for a Metric.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.MetricOptions(
name: str,
target: MetricTarget,
label_selector: LabelSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The name of the metric to scale on. |
target |
MetricTarget |
The target metric value that will trigger scaling. |
label_selector |
LabelSelector |
A selector to find a metric by label. |
nameRequired ¶
name: str
- Type: str
The name of the metric to scale on.
targetRequired ¶
target: MetricTarget
- Type: MetricTarget
The target metric value that will trigger scaling.
label_selectorOptional ¶
label_selector: LabelSelector
- Type: LabelSelector
- Default: Just the metric ‘name’ will be used to gather metrics.
A selector to find a metric by label.
When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
MetricSpecV2 ¶
MetricSpec specifies how to scale based on a single metric (only type and one other matching field should be set at once).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MetricSpecV2(
type: str,
container_resource: ContainerResourceMetricSourceV2 = None,
external: ExternalMetricSourceV2 = None,
object: ObjectMetricSourceV2 = None,
pods: PodsMetricSourceV2 = None,
resource: ResourceMetricSourceV2 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type is the type of metric source. |
container_resource |
cdk8s_plus_31.k8s.ContainerResourceMetricSourceV2 |
containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag. |
external |
cdk8s_plus_31.k8s.ExternalMetricSourceV2 |
external refers to a global metric that is not associated with any Kubernetes object. |
object |
cdk8s_plus_31.k8s.ObjectMetricSourceV2 |
object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object). |
pods |
cdk8s_plus_31.k8s.PodsMetricSourceV2 |
pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). |
resource |
cdk8s_plus_31.k8s.ResourceMetricSourceV2 |
resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source. |
typeRequired ¶
type: str
- Type: str
type is the type of metric source.
It should be one of “ContainerResource”, “External”, “Object”, “Pods” or “Resource”, each mapping to a matching field in the object. Note: “ContainerResource” type is available on when the feature-gate HPAContainerMetrics is enabled
container_resourceOptional ¶
container_resource: ContainerResourceMetricSourceV2
- Type: cdk8s_plus_31.k8s.ContainerResourceMetricSourceV2
containerResource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing a single container in each pod of the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source. This is an alpha feature and can be enabled by the HPAContainerMetrics feature flag.
externalOptional ¶
external: ExternalMetricSourceV2
- Type: cdk8s_plus_31.k8s.ExternalMetricSourceV2
external refers to a global metric that is not associated with any Kubernetes object.
It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).
objectOptional ¶
object: ObjectMetricSourceV2
- Type: cdk8s_plus_31.k8s.ObjectMetricSourceV2
object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).
podsOptional ¶
pods: PodsMetricSourceV2
- Type: cdk8s_plus_31.k8s.PodsMetricSourceV2
pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second).
The values will be averaged together before being compared to the target value.
resourceOptional ¶
resource: ResourceMetricSourceV2
- Type: cdk8s_plus_31.k8s.ResourceMetricSourceV2
resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source.
MetricTargetV2 ¶
MetricTarget defines the target value, average value, or average utilization of a specific metric.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MetricTargetV2(
type: str,
average_utilization: typing.Union[int, float] = None,
average_value: Quantity = None,
value: Quantity = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type represents whether the metric type is Utilization, Value, or AverageValue. |
average_utilization |
typing.Union[int, float] |
averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. |
average_value |
cdk8s_plus_31.k8s.Quantity |
averageValue is the target value of the average of the metric across all relevant pods (as a quantity). |
value |
cdk8s_plus_31.k8s.Quantity |
value is the target value of the metric (as a quantity). |
typeRequired ¶
type: str
- Type: str
type represents whether the metric type is Utilization, Value, or AverageValue.
average_utilizationOptional ¶
average_utilization: typing.Union[int, float]
- Type: typing.Union[int, float]
averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.
Currently only valid for Resource metric source type
average_valueOptional ¶
average_value: Quantity
- Type: cdk8s_plus_31.k8s.Quantity
averageValue is the target value of the average of the metric across all relevant pods (as a quantity).
valueOptional ¶
value: Quantity
- Type: cdk8s_plus_31.k8s.Quantity
value is the target value of the metric (as a quantity).
MountOptions ¶
Options for mounts.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.MountOptions(
propagation: MountPropagation = None,
read_only: bool = None,
sub_path: str = None,
sub_path_expr: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
propagation |
MountPropagation |
Determines how mounts are propagated from the host to container and the other way around. |
read_only |
bool |
Mounted read-only if true, read-write otherwise (false or unspecified). |
sub_path |
str |
Path within the volume from which the container’s volume should be mounted.). |
sub_path_expr |
str |
Expanded path within the volume from which the container’s volume should be mounted. |
propagationOptional ¶
propagation: MountPropagation
- Type: MountPropagation
- Default: MountPropagation.NONE
Determines how mounts are propagated from the host to container and the other way around.
When not set, MountPropagationNone is used.
Mount propagation allows for sharing volumes mounted by a Container to other Containers in the same Pod, or even to other Pods on the same node.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Mounted read-only if true, read-write otherwise (false or unspecified).
Defaults to false.
sub_pathOptional ¶
sub_path: str
- Type: str
- Default: “” the volume’s root
Path within the volume from which the container’s volume should be mounted.).
sub_path_exprOptional ¶
sub_path_expr: str
- Type: str
- Default: “” volume’s root.
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.
MutatingWebhook ¶
MutatingWebhook describes an admission webhook and the resources and operations it applies to.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.MutatingWebhook(
admission_review_versions: typing.List[str],
client_config: WebhookClientConfig,
name: str,
side_effects: str,
failure_policy: str = None,
match_conditions: typing.List[MatchCondition] = None,
match_policy: str = None,
namespace_selector: LabelSelector = None,
object_selector: LabelSelector = None,
reinvocation_policy: str = None,
rules: typing.List[RuleWithOperations] = None,
timeout_seconds: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
admission_review_versions |
typing.List[str] |
AdmissionReviewVersions is an ordered list of preferred AdmissionReview versions the Webhook expects. |
client_config |
cdk8s_plus_31.k8s.WebhookClientConfig |
ClientConfig defines how to communicate with the hook. |
name |
str |
The name of the admission webhook. |
side_effects |
str |
SideEffects states whether this webhook has side effects. |
failure_policy |
str |
FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. |
match_conditions |
typing.List[cdk8s_plus_31.k8s.MatchCondition] |
MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. |
match_policy |
str |
matchPolicy defines how the “rules” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”. |
namespace_selector |
cdk8s_plus_31.k8s.LabelSelector |
NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. |
object_selector |
cdk8s_plus_31.k8s.LabelSelector |
ObjectSelector decides whether to run the webhook based on if the object has matching labels. |
reinvocation_policy |
str |
reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation. |
rules |
typing.List[cdk8s_plus_31.k8s.RuleWithOperations] |
Rules describes what operations on what resources/subresources the webhook cares about. |
timeout_seconds |
typing.Union[int, float] |
TimeoutSeconds specifies the timeout for this webhook. |
admission_review_versionsRequired ¶
admission_review_versions: typing.List[str]
- Type: typing.List[str]
AdmissionReviewVersions is an ordered list of preferred AdmissionReview versions the Webhook expects.
API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.
client_configRequired ¶
client_config: WebhookClientConfig
- Type: cdk8s_plus_31.k8s.WebhookClientConfig
ClientConfig defines how to communicate with the hook.
Required
nameRequired ¶
name: str
- Type: str
The name of the admission webhook.
Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where “imagepolicy” is the name of the webhook, and kubernetes.io is the name of the organization. Required.
side_effectsRequired ¶
side_effects: str
- Type: str
SideEffects states whether this webhook has side effects.
Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
failure_policyOptional ¶
failure_policy: str
- Type: str
- Default: Fail.
FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail.
Defaults to Fail.
match_conditionsOptional ¶
match_conditions: typing.List[MatchCondition]
- Type: typing.List[cdk8s_plus_31.k8s.MatchCondition]
MatchConditions is a list of conditions that must be met for a request to be sent to this webhook.
Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
The exact matching logic is (in order):
- If ANY matchCondition evaluates to FALSE, the webhook is skipped.
- If ALL matchConditions evaluate to TRUE, the webhook is called.
-
If any matchCondition evaluates to an error (but none are FALSE):
-
If failurePolicy=Fail, reject the request
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
match_policyOptional ¶
match_policy: str
- Type: str
- Default: Equivalent”
matchPolicy defines how the “rules” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”.
- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
Defaults to “Equivalent”
namespace_selectorOptional ¶
namespace_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector.
If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.
For example, to run the webhook on any objects whose namespace is not associated with “runlevel” of “0” or “1”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “runlevel”, “operator”: “NotIn”, “values”: [ “0”, “1” ] } ] }
If instead you want to only run the webhook on any objects whose namespace is associated with the “environment” of “prod” or “staging”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “environment”, “operator”: “In”, “values”: [ “prod”, “staging” ] } ] }
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors.
Default to the empty LabelSelector, which matches everything.
object_selectorOptional ¶
object_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
ObjectSelector decides whether to run the webhook based on if the object has matching labels.
objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.
reinvocation_policyOptional ¶
reinvocation_policy: str
- Type: str
- Default: Never”.
reinvocationPolicy indicates whether this webhook should be called multiple times as part of a single admission evaluation.
Allowed values are “Never” and “IfNeeded”.
Never: the webhook will not be called more than once in a single admission evaluation.
IfNeeded: the webhook will be called at least one additional time as part of the admission evaluation if the object being admitted is modified by other admission plugins after the initial webhook call. Webhooks that specify this option must be idempotent, able to process objects they previously admitted. Note: * the number of additional invocations is not guaranteed to be exactly one. * if additional invocations result in further modifications to the object, webhooks are not guaranteed to be invoked again. * webhooks that use this option may be reordered to minimize the number of additional invocations. * to validate an object after all mutations are guaranteed complete, use a validating admission webhook instead.
Defaults to “Never”.
rulesOptional ¶
rules: typing.List[RuleWithOperations]
- Type: typing.List[cdk8s_plus_31.k8s.RuleWithOperations]
Rules describes what operations on what resources/subresources the webhook cares about.
The webhook cares about an operation if it matches any Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
timeout_secondsOptional ¶
timeout_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 10 seconds.
TimeoutSeconds specifies the timeout for this webhook.
After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.
NamedRuleWithOperations ¶
NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NamedRuleWithOperations(
api_groups: typing.List[str] = None,
api_versions: typing.List[str] = None,
operations: typing.List[str] = None,
resource_names: typing.List[str] = None,
resources: typing.List[str] = None,
scope: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_groups |
typing.List[str] |
APIGroups is the API groups the resources belong to. |
api_versions |
typing.List[str] |
APIVersions is the API versions the resources belong to. |
operations |
typing.List[str] |
Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. |
resource_names |
typing.List[str] |
ResourceNames is an optional white list of names that the rule applies to. |
resources |
typing.List[str] |
Resources is a list of resources this rule applies to. |
scope |
str |
scope specifies the scope of this rule. |
api_groupsOptional ¶
api_groups: typing.List[str]
- Type: typing.List[str]
APIGroups is the API groups the resources belong to.
‘’ is all groups. If ‘’ is present, the length of the slice must be one. Required.
api_versionsOptional ¶
api_versions: typing.List[str]
- Type: typing.List[str]
APIVersions is the API versions the resources belong to.
‘’ is all versions. If ‘’ is present, the length of the slice must be one. Required.
operationsOptional ¶
operations: typing.List[str]
- Type: typing.List[str]
Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added.
If ‘*’ is present, the length of the slice must be one. Required.
resource_namesOptional ¶
resource_names: typing.List[str]
- Type: typing.List[str]
ResourceNames is an optional white list of names that the rule applies to.
An empty set means that everything is allowed.
resourcesOptional ¶
resources: typing.List[str]
- Type: typing.List[str]
Resources is a list of resources this rule applies to.
For example: ‘pods’ means pods. ‘pods/log’ means the log subresource of pods. ‘’ means all resources, but not subresources. ‘pods/’ means all subresources of pods. ‘/scale’ means all scale subresources. ‘/*’ means all resources and their subresources.
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
Depending on the enclosing object, subresources might not be allowed. Required.
scopeOptional ¶
scope: str
- Type: str
- Default: .
scope specifies the scope of this rule.
Valid values are “Cluster”, “Namespaced”, and ““ “Cluster” means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. “Namespaced” means that only namespaced resources will match this rule. “” means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is “*”.
NamedRuleWithOperationsV1Alpha1 ¶
NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NamedRuleWithOperationsV1Alpha1(
api_groups: typing.List[str] = None,
api_versions: typing.List[str] = None,
operations: typing.List[str] = None,
resource_names: typing.List[str] = None,
resources: typing.List[str] = None,
scope: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_groups |
typing.List[str] |
APIGroups is the API groups the resources belong to. |
api_versions |
typing.List[str] |
APIVersions is the API versions the resources belong to. |
operations |
typing.List[str] |
Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. |
resource_names |
typing.List[str] |
ResourceNames is an optional white list of names that the rule applies to. |
resources |
typing.List[str] |
Resources is a list of resources this rule applies to. |
scope |
str |
scope specifies the scope of this rule. |
api_groupsOptional ¶
api_groups: typing.List[str]
- Type: typing.List[str]
APIGroups is the API groups the resources belong to.
‘’ is all groups. If ‘’ is present, the length of the slice must be one. Required.
api_versionsOptional ¶
api_versions: typing.List[str]
- Type: typing.List[str]
APIVersions is the API versions the resources belong to.
‘’ is all versions. If ‘’ is present, the length of the slice must be one. Required.
operationsOptional ¶
operations: typing.List[str]
- Type: typing.List[str]
Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added.
If ‘*’ is present, the length of the slice must be one. Required.
resource_namesOptional ¶
resource_names: typing.List[str]
- Type: typing.List[str]
ResourceNames is an optional white list of names that the rule applies to.
An empty set means that everything is allowed.
resourcesOptional ¶
resources: typing.List[str]
- Type: typing.List[str]
Resources is a list of resources this rule applies to.
For example: ‘pods’ means pods. ‘pods/log’ means the log subresource of pods. ‘’ means all resources, but not subresources. ‘pods/’ means all subresources of pods. ‘/scale’ means all scale subresources. ‘/*’ means all resources and their subresources.
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
Depending on the enclosing object, subresources might not be allowed. Required.
scopeOptional ¶
scope: str
- Type: str
- Default: .
scope specifies the scope of this rule.
Valid values are “Cluster”, “Namespaced”, and ““ “Cluster” means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. “Namespaced” means that only namespaced resources will match this rule. “” means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is “*”.
NamedRuleWithOperationsV1Beta1 ¶
NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NamedRuleWithOperationsV1Beta1(
api_groups: typing.List[str] = None,
api_versions: typing.List[str] = None,
operations: typing.List[str] = None,
resource_names: typing.List[str] = None,
resources: typing.List[str] = None,
scope: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_groups |
typing.List[str] |
APIGroups is the API groups the resources belong to. |
api_versions |
typing.List[str] |
APIVersions is the API versions the resources belong to. |
operations |
typing.List[str] |
Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. |
resource_names |
typing.List[str] |
ResourceNames is an optional white list of names that the rule applies to. |
resources |
typing.List[str] |
Resources is a list of resources this rule applies to. |
scope |
str |
scope specifies the scope of this rule. |
api_groupsOptional ¶
api_groups: typing.List[str]
- Type: typing.List[str]
APIGroups is the API groups the resources belong to.
‘’ is all groups. If ‘’ is present, the length of the slice must be one. Required.
api_versionsOptional ¶
api_versions: typing.List[str]
- Type: typing.List[str]
APIVersions is the API versions the resources belong to.
‘’ is all versions. If ‘’ is present, the length of the slice must be one. Required.
operationsOptional ¶
operations: typing.List[str]
- Type: typing.List[str]
Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added.
If ‘*’ is present, the length of the slice must be one. Required.
resource_namesOptional ¶
resource_names: typing.List[str]
- Type: typing.List[str]
ResourceNames is an optional white list of names that the rule applies to.
An empty set means that everything is allowed.
resourcesOptional ¶
resources: typing.List[str]
- Type: typing.List[str]
Resources is a list of resources this rule applies to.
For example: ‘pods’ means pods. ‘pods/log’ means the log subresource of pods. ‘’ means all resources, but not subresources. ‘pods/’ means all subresources of pods. ‘/scale’ means all scale subresources. ‘/*’ means all resources and their subresources.
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
Depending on the enclosing object, subresources might not be allowed. Required.
scopeOptional ¶
scope: str
- Type: str
- Default: .
scope specifies the scope of this rule.
Valid values are “Cluster”, “Namespaced”, and ““ “Cluster” means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. “Namespaced” means that only namespaced resources will match this rule. “” means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is “*”.
NamespaceProps ¶
Properties for Namespace.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NamespaceProps(
metadata: ApiObjectMetadata = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
NamespaceSelectorConfig ¶
Configuration for selecting namespaces.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NamespaceSelectorConfig(
label_selector: LabelSelector = None,
names: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
label_selector |
LabelSelector |
A selector to select namespaces by labels. |
names |
typing.List[str] |
A list of names to select namespaces by names. |
label_selectorOptional ¶
label_selector: LabelSelector
- Type: LabelSelector
A selector to select namespaces by labels.
namesOptional ¶
names: typing.List[str]
- Type: typing.List[str]
A list of names to select namespaces by names.
NamespaceSpec ¶
NamespaceSpec describes the attributes on a Namespace.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NamespaceSpec(
finalizers: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
finalizers |
typing.List[str] |
Finalizers is an opaque list of values that must be empty to permanently remove object from storage. |
finalizersOptional ¶
finalizers: typing.List[str]
- Type: typing.List[str]
Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
More info: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
NamespacesSelectOptions ¶
Options for Namespaces.select.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NamespacesSelectOptions(
expressions: typing.List[LabelExpression] = None,
labels: typing.Mapping[str] = None,
names: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expressions |
typing.List[LabelExpression] |
Namespaces must satisfy these selectors. |
labels |
typing.Mapping[str] |
Labels the namespaces must have. |
names |
typing.List[str] |
Namespaces names must be one of these. |
expressionsOptional ¶
expressions: typing.List[LabelExpression]
- Type: typing.List[LabelExpression]
- Default: no selector requirements.
Namespaces must satisfy these selectors.
The selectors query labels, just like the labels property, but they
provide a more advanced matching mechanism.
labelsOptional ¶
labels: typing.Mapping[str]
- Type: typing.Mapping[str]
- Default: no strict labels requirements.
Labels the namespaces must have.
This is equivalent to using an ‘Is’ selector.
namesOptional ¶
names: typing.List[str]
- Type: typing.List[str]
- Default: no name requirements.
Namespaces names must be one of these.
NetworkPolicyAddEgressRuleOptions ¶
Options for NetworkPolicy.addEgressRule.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyAddEgressRuleOptions(
ports: typing.List[NetworkPolicyPort] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ports |
typing.List[NetworkPolicyPort] |
Ports the rule should allow outgoing traffic to. |
portsOptional ¶
ports: typing.List[NetworkPolicyPort]
- Type: typing.List[NetworkPolicyPort]
- Default: If the peer is a managed pod, take its ports. Otherwise, all ports are allowed.
Ports the rule should allow outgoing traffic to.
NetworkPolicyEgressRule ¶
NetworkPolicyEgressRule describes a particular set of traffic that is allowed out of pods matched by a NetworkPolicySpec’s podSelector.
The traffic must match both ports and to. This type is beta-level in 1.8
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NetworkPolicyEgressRule(
ports: typing.List[NetworkPolicyPort] = None,
to: typing.List[NetworkPolicyPeer] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ports |
typing.List[cdk8s_plus_31.k8s.NetworkPolicyPort] |
ports is a list of destination ports for outgoing traffic. |
to |
typing.List[cdk8s_plus_31.k8s.NetworkPolicyPeer] |
to is a list of destinations for outgoing traffic of pods selected for this rule. |
portsOptional ¶
ports: typing.List[NetworkPolicyPort]
- Type: typing.List[cdk8s_plus_31.k8s.NetworkPolicyPort]
ports is a list of destination ports for outgoing traffic.
Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
toOptional ¶
to: typing.List[NetworkPolicyPeer]
- Type: typing.List[cdk8s_plus_31.k8s.NetworkPolicyPeer]
to is a list of destinations for outgoing traffic of pods selected for this rule.
Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all destinations (traffic not restricted by destination). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the to list.
NetworkPolicyIngressRule ¶
NetworkPolicyIngressRule describes a particular set of traffic that is allowed to the pods matched by a NetworkPolicySpec’s podSelector.
The traffic must match both ports and from.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NetworkPolicyIngressRule(
from: typing.List[NetworkPolicyPeer] = None,
ports: typing.List[NetworkPolicyPort] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
from |
typing.List[cdk8s_plus_31.k8s.NetworkPolicyPeer] |
from is a list of sources which should be able to access the pods selected for this rule. |
ports |
typing.List[cdk8s_plus_31.k8s.NetworkPolicyPort] |
ports is a list of ports which should be made accessible on the pods selected for this rule. |
fromOptional ¶
from: typing.List[NetworkPolicyPeer]
- Type: typing.List[cdk8s_plus_31.k8s.NetworkPolicyPeer]
from is a list of sources which should be able to access the pods selected for this rule.
Items in this list are combined using a logical OR operation. If this field is empty or missing, this rule matches all sources (traffic not restricted by source). If this field is present and contains at least one item, this rule allows traffic only if the traffic matches at least one item in the from list.
portsOptional ¶
ports: typing.List[NetworkPolicyPort]
- Type: typing.List[cdk8s_plus_31.k8s.NetworkPolicyPort]
ports is a list of ports which should be made accessible on the pods selected for this rule.
Each item in this list is combined using a logical OR. If this field is empty or missing, this rule matches all ports (traffic not restricted by port). If this field is present and contains at least one item, then this rule allows traffic only if the traffic matches at least one port in the list.
NetworkPolicyPeer ¶
NetworkPolicyPeer describes a peer to allow traffic to/from.
Only certain combinations of fields are allowed
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NetworkPolicyPeer(
ip_block: IpBlock = None,
namespace_selector: LabelSelector = None,
pod_selector: LabelSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ip_block |
cdk8s_plus_31.k8s.IpBlock |
ipBlock defines policy on a particular IPBlock. |
namespace_selector |
cdk8s_plus_31.k8s.LabelSelector |
namespaceSelector selects namespaces using cluster-scoped labels. |
pod_selector |
cdk8s_plus_31.k8s.LabelSelector |
podSelector is a label selector which selects pods. |
ip_blockOptional ¶
ip_block: IpBlock
- Type: cdk8s_plus_31.k8s.IpBlock
ipBlock defines policy on a particular IPBlock.
If this field is set then neither of the other fields can be.
namespace_selectorOptional ¶
namespace_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
namespaceSelector selects namespaces using cluster-scoped labels.
This field follows standard label selector semantics; if present but empty, it selects all namespaces.
If podSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the namespaces selected by namespaceSelector. Otherwise it selects all pods in the namespaces selected by namespaceSelector.
pod_selectorOptional ¶
pod_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
podSelector is a label selector which selects pods.
This field follows standard label selector semantics; if present but empty, it selects all pods.
If namespaceSelector is also set, then the NetworkPolicyPeer as a whole selects the pods matching podSelector in the Namespaces selected by NamespaceSelector. Otherwise it selects the pods matching podSelector in the policy’s own namespace.
NetworkPolicyPeerConfig ¶
Configuration for network peers.
A peer can either by an ip block, or a selection of pods, not both.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyPeerConfig(
ip_block: NetworkPolicyIpBlock = None,
pod_selector: PodSelectorConfig = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ip_block |
NetworkPolicyIpBlock |
The ip block this peer represents. |
pod_selector |
PodSelectorConfig |
The pod selector this peer represents. |
ip_blockOptional ¶
ip_block: NetworkPolicyIpBlock
- Type: NetworkPolicyIpBlock
The ip block this peer represents.
pod_selectorOptional ¶
pod_selector: PodSelectorConfig
- Type: PodSelectorConfig
The pod selector this peer represents.
NetworkPolicyPort ¶
NetworkPolicyPort describes a port to allow traffic on.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NetworkPolicyPort(
end_port: typing.Union[int, float] = None,
port: IntOrString = None,
protocol: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
end_port |
typing.Union[int, float] |
endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy. |
port |
cdk8s_plus_31.k8s.IntOrString |
port represents the port on the given protocol. |
protocol |
str |
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match. |
end_portOptional ¶
end_port: typing.Union[int, float]
- Type: typing.Union[int, float]
endPort indicates that the range of ports from port to endPort if set, inclusive, should be allowed by the policy.
This field cannot be defined if the port field is not defined or if the port field is defined as a named (string) port. The endPort must be equal or greater than port.
portOptional ¶
port: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
port represents the port on the given protocol.
This can either be a numerical or named port on a pod. If this field is not provided, this matches all port names and numbers. If present, only traffic on the specified protocol AND port will be matched.
protocolOptional ¶
protocol: str
- Type: str
protocol represents the protocol (TCP, UDP, or SCTP) which traffic must match.
If not specified, this field defaults to TCP.
NetworkPolicyPortProps ¶
Properties for NetworkPolicyPort.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyPortProps(
end_port: typing.Union[int, float] = None,
port: typing.Union[int, float] = None,
protocol: NetworkProtocol = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
end_port |
typing.Union[int, float] |
End port (relative to port). |
port |
typing.Union[int, float] |
Specific port number. |
protocol |
NetworkProtocol |
Protocol. |
end_portOptional ¶
end_port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: not a port range.
End port (relative to port).
Only applies if port is defined.
Use this to specify a port range, rather that a specific one.
portOptional ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: all ports are allowed.
Specific port number.
protocolOptional ¶
protocol: NetworkProtocol
- Type: NetworkProtocol
- Default: NetworkProtocol.TCP
Protocol.
NetworkPolicyProps ¶
Properties for NetworkPolicy.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyProps(
metadata: ApiObjectMetadata = None,
egress: NetworkPolicyTraffic = None,
ingress: NetworkPolicyTraffic = None,
selector: IPodSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
egress |
NetworkPolicyTraffic |
Egress traffic configuration. |
ingress |
NetworkPolicyTraffic |
Ingress traffic configuration. |
selector |
IPodSelector |
Which pods does this policy object applies to. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
egressOptional ¶
egress: NetworkPolicyTraffic
- Type: NetworkPolicyTraffic
- Default: the policy doesn’t change egress behavior of the pods it selects.
Egress traffic configuration.
ingressOptional ¶
ingress: NetworkPolicyTraffic
- Type: NetworkPolicyTraffic
- Default: the policy doesn’t change ingress behavior of the pods it selects.
Ingress traffic configuration.
selectorOptional ¶
selector: IPodSelector
- Type: IPodSelector
- Default: will select all pods in the namespace of the policy.
Which pods does this policy object applies to.
This can either be a single pod / workload, or a grouping of pods selected
via the Pods.select function. Rules is applied to any pods selected by this property.
Multiple network policies can select the same set of pods.
In this case, the rules for each are combined additively.
Note that
NetworkPolicyRule ¶
Describes a rule allowing traffic from / to pods matched by a network policy selector.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyRule(
peer: INetworkPolicyPeer,
ports: typing.List[NetworkPolicyPort] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
peer |
INetworkPolicyPeer |
Peer this rule interacts with. |
ports |
typing.List[NetworkPolicyPort] |
The ports of the rule. |
peerRequired ¶
peer: INetworkPolicyPeer
- Type: INetworkPolicyPeer
Peer this rule interacts with.
portsOptional ¶
ports: typing.List[NetworkPolicyPort]
- Type: typing.List[NetworkPolicyPort]
- Default: traffic is allowed on all ports.
The ports of the rule.
NetworkPolicySpec ¶
NetworkPolicySpec provides the specification of a NetworkPolicy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NetworkPolicySpec(
pod_selector: LabelSelector,
egress: typing.List[NetworkPolicyEgressRule] = None,
ingress: typing.List[NetworkPolicyIngressRule] = None,
policy_types: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
pod_selector |
cdk8s_plus_31.k8s.LabelSelector |
podSelector selects the pods to which this NetworkPolicy object applies. |
egress |
typing.List[cdk8s_plus_31.k8s.NetworkPolicyEgressRule] |
egress is a list of egress rules to be applied to the selected pods. |
ingress |
typing.List[cdk8s_plus_31.k8s.NetworkPolicyIngressRule] |
ingress is a list of ingress rules to be applied to the selected pods. |
policy_types |
typing.List[str] |
policyTypes is a list of rule types that the NetworkPolicy relates to. |
pod_selectorRequired ¶
pod_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
podSelector selects the pods to which this NetworkPolicy object applies.
The array of ingress rules is applied to any pods selected by this field. Multiple network policies can select the same set of pods. In this case, the ingress rules for each are combined additively. This field is NOT optional and follows standard label selector semantics. An empty podSelector matches all pods in this namespace.
egressOptional ¶
egress: typing.List[NetworkPolicyEgressRule]
- Type: typing.List[cdk8s_plus_31.k8s.NetworkPolicyEgressRule]
egress is a list of egress rules to be applied to the selected pods.
Outgoing traffic is allowed if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic matches at least one egress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy limits all outgoing traffic (and serves solely to ensure that the pods it selects are isolated by default). This field is beta-level in 1.8
ingressOptional ¶
ingress: typing.List[NetworkPolicyIngressRule]
- Type: typing.List[cdk8s_plus_31.k8s.NetworkPolicyIngressRule]
ingress is a list of ingress rules to be applied to the selected pods.
Traffic is allowed to a pod if there are no NetworkPolicies selecting the pod (and cluster policy otherwise allows the traffic), OR if the traffic source is the pod’s local node, OR if the traffic matches at least one ingress rule across all of the NetworkPolicy objects whose podSelector matches the pod. If this field is empty then this NetworkPolicy does not allow any traffic (and serves solely to ensure that the pods it selects are isolated by default)
policy_typesOptional ¶
policy_types: typing.List[str]
- Type: typing.List[str]
policyTypes is a list of rule types that the NetworkPolicy relates to.
Valid options are [“Ingress”], [“Egress”], or [“Ingress”, “Egress”]. If this field is not specified, it will default based on the existence of ingress or egress rules; policies that contain an egress section are assumed to affect egress, and all policies (whether or not they contain an ingress section) are assumed to affect ingress. If you want to write an egress-only policy, you must explicitly specify policyTypes [ “Egress” ]. Likewise, if you want to write a policy that specifies that no egress is allowed, you must specify a policyTypes value that include “Egress” (since such a policy would not include an egress section and would otherwise default to just [ “Ingress” ]). This field is beta-level in 1.8
NetworkPolicyTraffic ¶
Describes how the network policy should configure egress / ingress traffic.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyTraffic(
default: NetworkPolicyTrafficDefault = None,
rules: typing.List[NetworkPolicyRule] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
default |
NetworkPolicyTrafficDefault |
Specifies the default behavior of the policy when no rules are defined. |
rules |
typing.List[NetworkPolicyRule] |
List of rules to be applied to the selected pods. |
defaultOptional ¶
default: NetworkPolicyTrafficDefault
- Type: NetworkPolicyTrafficDefault
- Default: unset, the policy does not change the behavior.
Specifies the default behavior of the policy when no rules are defined.
rulesOptional ¶
rules: typing.List[NetworkPolicyRule]
- Type: typing.List[NetworkPolicyRule]
- Default: no rules
List of rules to be applied to the selected pods.
If empty, the behavior of the policy is dictated by the default property.
NfsVolumeOptions ¶
Options for the NFS based volume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NfsVolumeOptions(
path: str,
server: str,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
Path that is exported by the NFS server. |
server |
str |
Server is the hostname or IP address of the NFS server. |
read_only |
bool |
If set to true, will force the NFS export to be mounted with read-only permissions. |
pathRequired ¶
path: str
- Type: str
Path that is exported by the NFS server.
serverRequired ¶
server: str
- Type: str
Server is the hostname or IP address of the NFS server.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
If set to true, will force the NFS export to be mounted with read-only permissions.
NfsVolumeSource ¶
Represents an NFS mount that lasts the lifetime of a pod.
NFS volumes do not support ownership management or SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NfsVolumeSource(
path: str,
server: str,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
path that is exported by the NFS server. |
server |
str |
server is the hostname or IP address of the NFS server. |
read_only |
bool |
readOnly here will force the NFS export to be mounted with read-only permissions. |
pathRequired ¶
path: str
- Type: str
path that is exported by the NFS server.
More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
serverRequired ¶
server: str
- Type: str
server is the hostname or IP address of the NFS server.
More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
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
NodeAffinity ¶
Node affinity is a group of node affinity scheduling rules.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NodeAffinity(
preferred_during_scheduling_ignored_during_execution: typing.List[PreferredSchedulingTerm] = None,
required_during_scheduling_ignored_during_execution: NodeSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
preferred_during_scheduling_ignored_during_execution |
typing.List[cdk8s_plus_31.k8s.PreferredSchedulingTerm] |
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. |
required_during_scheduling_ignored_during_execution |
cdk8s_plus_31.k8s.NodeSelector |
If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. |
preferred_during_scheduling_ignored_during_executionOptional ¶
preferred_during_scheduling_ignored_during_execution: typing.List[PreferredSchedulingTerm]
- Type: typing.List[cdk8s_plus_31.k8s.PreferredSchedulingTerm]
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.
required_during_scheduling_ignored_during_executionOptional ¶
required_during_scheduling_ignored_during_execution: NodeSelector
- Type: cdk8s_plus_31.k8s.NodeSelector
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 an update), the system may or may not try to eventually evict the pod from its node.
NodeConfigSource ¶
NodeConfigSource specifies a source of node configuration.
Exactly one subfield (excluding metadata) must be non-nil. This API is deprecated since 1.22
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NodeConfigSource(
config_map: ConfigMapNodeConfigSource = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
config_map |
cdk8s_plus_31.k8s.ConfigMapNodeConfigSource |
ConfigMap is a reference to a Node’s ConfigMap. |
config_mapOptional ¶
config_map: ConfigMapNodeConfigSource
- Type: cdk8s_plus_31.k8s.ConfigMapNodeConfigSource
ConfigMap is a reference to a Node’s ConfigMap.
NodeSelector ¶
A node selector represents the union of the results of one or more label queries over a set of nodes;
that is, it represents the OR of the selectors represented by the node selector terms.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NodeSelector(
node_selector_terms: typing.List[NodeSelectorTerm]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
node_selector_terms |
typing.List[cdk8s_plus_31.k8s.NodeSelectorTerm] |
Required. |
node_selector_termsRequired ¶
node_selector_terms: typing.List[NodeSelectorTerm]
- Type: typing.List[cdk8s_plus_31.k8s.NodeSelectorTerm]
Required.
A list of node selector terms. The terms are ORed.
NodeSelectorRequirement ¶
A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NodeSelectorRequirement(
key: str,
operator: str,
values: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
The label key that the selector applies to. |
operator |
str |
Represents a key’s relationship to a set of values. |
values |
typing.List[str] |
An array of string values. |
keyRequired ¶
key: str
- Type: str
The label key that the selector applies to.
operatorRequired ¶
operator: str
- Type: str
Represents a key’s relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
valuesOptional ¶
values: typing.List[str]
- Type: typing.List[str]
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.
NodeSelectorTerm ¶
A null or empty node selector term matches no objects.
The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NodeSelectorTerm(
match_expressions: typing.List[NodeSelectorRequirement] = None,
match_fields: typing.List[NodeSelectorRequirement] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
match_expressions |
typing.List[cdk8s_plus_31.k8s.NodeSelectorRequirement] |
A list of node selector requirements by node’s labels. |
match_fields |
typing.List[cdk8s_plus_31.k8s.NodeSelectorRequirement] |
A list of node selector requirements by node’s fields. |
match_expressionsOptional ¶
match_expressions: typing.List[NodeSelectorRequirement]
- Type: typing.List[cdk8s_plus_31.k8s.NodeSelectorRequirement]
A list of node selector requirements by node’s labels.
match_fieldsOptional ¶
match_fields: typing.List[NodeSelectorRequirement]
- Type: typing.List[cdk8s_plus_31.k8s.NodeSelectorRequirement]
A list of node selector requirements by node’s fields.
NodeSpec ¶
NodeSpec describes the attributes that a node is created with.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NodeSpec(
config_source: NodeConfigSource = None,
external_id: str = None,
pod_cidr: str = None,
pod_cid_rs: typing.List[str] = None,
provider_id: str = None,
taints: typing.List[Taint] = None,
unschedulable: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
config_source |
cdk8s_plus_31.k8s.NodeConfigSource |
Deprecated: Previously used to specify the source of the node’s configuration for the DynamicKubeletConfig feature. |
external_id |
str |
Deprecated. |
pod_cidr |
str |
PodCIDR represents the pod IP range assigned to the node. |
pod_cid_rs |
typing.List[str] |
podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. |
provider_id |
str |
ID of the node assigned by the cloud provider in the format: |
taints |
typing.List[cdk8s_plus_31.k8s.Taint] |
If specified, the node’s taints. |
unschedulable |
bool |
Unschedulable controls node schedulability of new pods. |
config_sourceOptional ¶
config_source: NodeConfigSource
- Type: cdk8s_plus_31.k8s.NodeConfigSource
Deprecated: Previously used to specify the source of the node’s configuration for the DynamicKubeletConfig feature.
This feature is removed.
external_idOptional ¶
external_id: str
- Type: str
Deprecated.
Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966
pod_cidrOptional ¶
pod_cidr: str
- Type: str
PodCIDR represents the pod IP range assigned to the node.
pod_cid_rsOptional ¶
pod_cid_rs: typing.List[str]
- Type: typing.List[str]
podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node.
If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6.
provider_idOptional ¶
provider_id: str
- Type: str
ID of the node assigned by the cloud provider in the format:
taintsOptional ¶
taints: typing.List[Taint]
- Type: typing.List[cdk8s_plus_31.k8s.Taint]
If specified, the node’s taints.
unschedulableOptional ¶
unschedulable: bool
- Type: bool
Unschedulable controls node schedulability of new pods.
By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration
NodeTaintQueryOptions ¶
Options for NodeTaintQuery.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeTaintQueryOptions(
effect: TaintEffect = None,
evict_after: Duration = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
effect |
TaintEffect |
The taint effect to match. |
evict_after |
cdk8s.Duration |
How much time should a pod that tolerates the NO_EXECUTE effect be bound to the node. |
effectOptional ¶
effect: TaintEffect
- Type: TaintEffect
- Default: all effects are matched.
The taint effect to match.
evict_afterOptional ¶
evict_after: Duration
- Type: cdk8s.Duration
- Default: bound forever.
How much time should a pod that tolerates the NO_EXECUTE effect be bound to the node.
Only applies for the NO_EXECUTE effect.
NonResourceAttributes ¶
NonResourceAttributes includes the authorization attributes available for non-resource requests to the Authorizer interface.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NonResourceAttributes(
path: str = None,
verb: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
Path is the URL path of the request. |
verb |
str |
Verb is the standard HTTP verb. |
pathOptional ¶
path: str
- Type: str
Path is the URL path of the request.
verbOptional ¶
verb: str
- Type: str
Verb is the standard HTTP verb.
NonResourcePolicyRule ¶
NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL.
A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NonResourcePolicyRule(
non_resource_ur_ls: typing.List[str],
verbs: typing.List[str]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
non_resource_ur_ls |
typing.List[str] |
nonResourceURLs is a set of url prefixes that a user should have access to and may not be empty. |
verbs |
typing.List[str] |
verbs is a list of matching verbs and may not be empty. |
non_resource_ur_lsRequired ¶
non_resource_ur_ls: typing.List[str]
- Type: typing.List[str]
nonResourceURLs is a set of url prefixes that a user should have access to and may not be empty.
For example:
- “/healthz” is legal
- “/hea*” is illegal
- “/hea” is legal but matches nothing
- “/hea/*” also matches nothing
- “/healthz/” matches all per-component health checks. “” matches all non-resource urls. if it is present, it must be the only entry. Required.
verbsRequired ¶
verbs: typing.List[str]
- Type: typing.List[str]
verbs is a list of matching verbs and may not be empty.
”*” matches all verbs. If it is present, it must be the only entry. Required.
NonResourcePolicyRuleV1Beta3 ¶
NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL.
A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.NonResourcePolicyRuleV1Beta3(
non_resource_ur_ls: typing.List[str],
verbs: typing.List[str]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
non_resource_ur_ls |
typing.List[str] |
nonResourceURLs is a set of url prefixes that a user should have access to and may not be empty. |
verbs |
typing.List[str] |
verbs is a list of matching verbs and may not be empty. |
non_resource_ur_lsRequired ¶
non_resource_ur_ls: typing.List[str]
- Type: typing.List[str]
nonResourceURLs is a set of url prefixes that a user should have access to and may not be empty.
For example:
- “/healthz” is legal
- “/hea*” is illegal
- “/hea” is legal but matches nothing
- “/hea/*” also matches nothing
- “/healthz/” matches all per-component health checks. “” matches all non-resource urls. if it is present, it must be the only entry. Required.
verbsRequired ¶
verbs: typing.List[str]
- Type: typing.List[str]
verbs is a list of matching verbs and may not be empty.
”*” matches all verbs. If it is present, it must be the only entry. Required.
ObjectFieldSelector ¶
ObjectFieldSelector selects an APIVersioned field of an object.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ObjectFieldSelector(
field_path: str,
api_version: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
field_path |
str |
Path of the field to select in the specified API version. |
api_version |
str |
Version of the schema the FieldPath is written in terms of, defaults to “v1”. |
field_pathRequired ¶
field_path: str
- Type: str
Path of the field to select in the specified API version.
api_versionOptional ¶
api_version: str
- Type: str
Version of the schema the FieldPath is written in terms of, defaults to “v1”.
ObjectMeta ¶
ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ObjectMeta(
annotations: typing.Mapping[str] = None,
creation_timestamp: datetime.datetime = None,
deletion_grace_period_seconds: typing.Union[int, float] = None,
deletion_timestamp: datetime.datetime = None,
finalizers: typing.List[str] = None,
generate_name: str = None,
generation: typing.Union[int, float] = None,
labels: typing.Mapping[str] = None,
managed_fields: typing.List[ManagedFieldsEntry] = None,
name: str = None,
namespace: str = None,
owner_references: typing.List[OwnerReference] = None,
resource_version: str = None,
self_link: str = None,
uid: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
annotations |
typing.Mapping[str] |
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. |
creation_timestamp |
datetime.datetime |
CreationTimestamp is a timestamp representing the server time when this object was created. |
deletion_grace_period_seconds |
typing.Union[int, float] |
Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. |
deletion_timestamp |
datetime.datetime |
DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. |
finalizers |
typing.List[str] |
Must be empty before the object is deleted from the registry. |
generate_name |
str |
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. |
generation |
typing.Union[int, float] |
A sequence number representing a specific generation of the desired state. |
labels |
typing.Mapping[str] |
Map of string keys and values that can be used to organize and categorize (scope and select) objects. |
managed_fields |
typing.List[cdk8s_plus_31.k8s.ManagedFieldsEntry] |
ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. |
name |
str |
Name must be unique within a namespace. |
namespace |
str |
Namespace defines the space within which each name must be unique. |
owner_references |
typing.List[cdk8s_plus_31.k8s.OwnerReference] |
List of objects depended by this object. |
resource_version |
str |
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. |
self_link |
str |
Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. |
uid |
str |
UID is the unique in time and space value for this object. |
annotationsOptional ¶
annotations: typing.Mapping[str]
- Type: typing.Mapping[str]
Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata.
They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
creation_timestampOptional ¶
creation_timestamp: datetime.datetime
- Type: datetime.datetime
CreationTimestamp is a timestamp representing the server time when this object was created.
It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
deletion_grace_period_secondsOptional ¶
deletion_grace_period_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
Number of seconds allowed for this object to gracefully terminate before it will be removed from the system.
Only set when deletionTimestamp is also set. May only be shortened. Read-only.
deletion_timestampOptional ¶
deletion_timestamp: datetime.datetime
- Type: datetime.datetime
DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted.
This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested.
Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
finalizersOptional ¶
finalizers: typing.List[str]
- Type: typing.List[str]
Must be empty before the object is deleted from the registry.
Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list.
generate_nameOptional ¶
generate_name: str
- Type: str
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided.
If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.
If this field is specified and the generated name exists, the server will return a 409.
Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency
generationOptional ¶
generation: typing.Union[int, float]
- Type: typing.Union[int, float]
A sequence number representing a specific generation of the desired state.
Populated by the system. Read-only.
labelsOptional ¶
labels: typing.Mapping[str]
- Type: typing.Mapping[str]
Map of string keys and values that can be used to organize and categorize (scope and select) objects.
May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
managed_fieldsOptional ¶
managed_fields: typing.List[ManagedFieldsEntry]
- Type: typing.List[cdk8s_plus_31.k8s.ManagedFieldsEntry]
ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow.
This is mostly for internal housekeeping, and users typically shouldn’t need to set or understand this field. A workflow can be the user’s name, a controller’s name, or the name of a specific apply path like “ci-cd”. The set of fields is always in the version that the workflow used when modifying the object.
nameOptional ¶
name: str
- Type: str
Name must be unique within a namespace.
Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
namespaceOptional ¶
namespace: str
- Type: str
Namespace defines the space within which each name must be unique.
An empty namespace is equivalent to the “default” namespace, but “default” is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.
Must be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces
owner_referencesOptional ¶
owner_references: typing.List[OwnerReference]
- Type: typing.List[cdk8s_plus_31.k8s.OwnerReference]
List of objects depended by this object.
If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.
resource_versionOptional ¶
resource_version: str
- Type: str
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed.
May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.
Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
self_linkOptional ¶
self_link: str
- Type: str
Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.
uidOptional ¶
uid: str
- Type: str
UID is the unique in time and space value for this object.
It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.
Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
ObjectMetricSourceV2 ¶
ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ObjectMetricSourceV2(
described_object: CrossVersionObjectReferenceV2,
metric: MetricIdentifierV2,
target: MetricTargetV2
)
Properties ¶
| Name | Type | Description |
|---|---|---|
described_object |
cdk8s_plus_31.k8s.CrossVersionObjectReferenceV2 |
describedObject specifies the descriptions of a object,such as kind,name apiVersion. |
metric |
cdk8s_plus_31.k8s.MetricIdentifierV2 |
metric identifies the target metric by name and selector. |
target |
cdk8s_plus_31.k8s.MetricTargetV2 |
target specifies the target value for the given metric. |
described_objectRequired ¶
described_object: CrossVersionObjectReferenceV2
- Type: cdk8s_plus_31.k8s.CrossVersionObjectReferenceV2
describedObject specifies the descriptions of a object,such as kind,name apiVersion.
metricRequired ¶
metric: MetricIdentifierV2
- Type: cdk8s_plus_31.k8s.MetricIdentifierV2
metric identifies the target metric by name and selector.
targetRequired ¶
target: MetricTargetV2
- Type: cdk8s_plus_31.k8s.MetricTargetV2
target specifies the target value for the given metric.
ObjectReference ¶
ObjectReference contains enough information to let you inspect or modify the referred object.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ObjectReference(
api_version: str = None,
field_path: str = None,
kind: str = None,
name: str = None,
namespace: str = None,
resource_version: str = None,
uid: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
API version of the referent. |
field_path |
str |
If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: “spec.containers{name}” (where “name” refers to the name of the container that triggered the event) or if no container name is specified “spec.containers[2]” (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. |
kind |
str |
Kind of the referent. |
name |
str |
Name of the referent. |
namespace |
str |
Namespace of the referent. |
resource_version |
str |
Specific resourceVersion to which this reference is made, if any. |
uid |
str |
UID of the referent. |
api_versionOptional ¶
api_version: str
- Type: str
API version of the referent.
field_pathOptional ¶
field_path: str
- Type: str
If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: “spec.containers{name}” (where “name” refers to the name of the container that triggered the event) or if no container name is specified “spec.containers[2]” (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.
kindOptional ¶
kind: str
- Type: str
Kind of the referent.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
nameOptional ¶
name: str
- Type: str
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
namespaceOptional ¶
namespace: str
- Type: str
Namespace of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
resource_versionOptional ¶
resource_version: str
- Type: str
Specific resourceVersion to which this reference is made, if any.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
uidOptional ¶
uid: str
- Type: str
UID of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
OpaqueDeviceConfigurationV1Alpha3 ¶
OpaqueDeviceConfiguration contains configuration parameters for a driver in a format defined by the driver vendor.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.OpaqueDeviceConfigurationV1Alpha3(
driver: str,
parameters: typing.Any
)
Properties ¶
| Name | Type | Description |
|---|---|---|
driver |
str |
Driver is used to determine which kubelet plugin needs to be passed these configuration parameters. |
parameters |
typing.Any |
Parameters can contain arbitrary data. |
driverRequired ¶
driver: str
- Type: str
Driver is used to determine which kubelet plugin needs to be passed these configuration parameters.
An admission policy provided by the driver developer could use this to decide whether it needs to validate them.
Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
parametersRequired ¶
parameters: typing.Any
- Type: typing.Any
Parameters can contain arbitrary data.
It is the responsibility of the driver developer to handle validation and versioning. Typically this includes self-identification and a version (“kind” + “apiVersion” for Kubernetes types), with conversion between different versions.
Overhead ¶
Overhead structure represents the resource overhead associated with running a pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Overhead(
pod_fixed: typing.Mapping[Quantity] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
pod_fixed |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
podFixed represents the fixed resource overhead associated with running a pod. |
pod_fixedOptional ¶
pod_fixed: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
podFixed represents the fixed resource overhead associated with running a pod.
OwnerReference ¶
OwnerReference contains enough information to let you identify an owning object.
An owning object must be in the same namespace as the dependent, or be cluster-scoped, so there is no namespace field.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.OwnerReference(
api_version: str,
kind: str,
name: str,
uid: str,
block_owner_deletion: bool = None,
controller: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
API version of the referent. |
kind |
str |
Kind of the referent. |
name |
str |
Name of the referent. |
uid |
str |
UID of the referent. |
block_owner_deletion |
bool |
If true, AND if the owner has the “foregroundDeletion” finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. |
controller |
bool |
If true, this reference points to the managing controller. |
api_versionRequired ¶
api_version: str
- Type: str
API version of the referent.
kindRequired ¶
kind: str
- Type: str
Kind of the referent.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
nameRequired ¶
name: str
- Type: str
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
uidRequired ¶
uid: str
- Type: str
UID of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
block_owner_deletionOptional ¶
block_owner_deletion: bool
- Type: bool
- Default: false. To set this field, a user needs “delete” permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.
If true, AND if the owner has the “foregroundDeletion” finalizer, then the owner cannot be deleted from the key-value store until this reference is removed.
See https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion for how the garbage collector interacts with this field and enforces the foreground deletion. Defaults to false. To set this field, a user needs “delete” permission of the owner, otherwise 422 (Unprocessable Entity) will be returned.
controllerOptional ¶
controller: bool
- Type: bool
If true, this reference points to the managing controller.
ParamKind ¶
ParamKind is a tuple of Group Kind and Version.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ParamKind(
api_version: str = None,
kind: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
APIVersion is the API group version the resources belong to. |
kind |
str |
Kind is the API kind the resources belong to. |
api_versionOptional ¶
api_version: str
- Type: str
APIVersion is the API group version the resources belong to.
In format of “group/version”. Required.
kindOptional ¶
kind: str
- Type: str
Kind is the API kind the resources belong to.
Required.
ParamKindV1Alpha1 ¶
ParamKind is a tuple of Group Kind and Version.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ParamKindV1Alpha1(
api_version: str = None,
kind: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
APIVersion is the API group version the resources belong to. |
kind |
str |
Kind is the API kind the resources belong to. |
api_versionOptional ¶
api_version: str
- Type: str
APIVersion is the API group version the resources belong to.
In format of “group/version”. Required.
kindOptional ¶
kind: str
- Type: str
Kind is the API kind the resources belong to.
Required.
ParamKindV1Beta1 ¶
ParamKind is a tuple of Group Kind and Version.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ParamKindV1Beta1(
api_version: str = None,
kind: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
APIVersion is the API group version the resources belong to. |
kind |
str |
Kind is the API kind the resources belong to. |
api_versionOptional ¶
api_version: str
- Type: str
APIVersion is the API group version the resources belong to.
In format of “group/version”. Required.
kindOptional ¶
kind: str
- Type: str
Kind is the API kind the resources belong to.
Required.
ParamRef ¶
ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ParamRef(
name: str = None,
namespace: str = None,
parameter_not_found_action: str = None,
selector: LabelSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of the resource being referenced. |
namespace |
str |
namespace is the namespace of the referenced resource. |
parameter_not_found_action |
str |
parameterNotFoundAction controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. |
selector |
cdk8s_plus_31.k8s.LabelSelector |
selector can be used to match multiple param objects based on their labels. |
nameOptional ¶
name: str
- Type: str
name is the name of the resource being referenced.
One of name or selector must be set, but name and selector are mutually exclusive properties. If one is set, the other must be unset.
A single parameter used for all admission requests can be configured by setting the name field, leaving selector blank, and setting namespace if paramKind is namespace-scoped.
namespaceOptional ¶
namespace: str
- Type: str
namespace is the namespace of the referenced resource.
Allows limiting the search for params to a specific namespace. Applies to both name and selector fields.
A per-namespace parameter may be used by specifying a namespace-scoped paramKind in the policy and leaving this field empty.
- If
paramKindis cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If
paramKindis namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
parameter_not_found_actionOptional ¶
parameter_not_found_action: str
- Type: str
parameterNotFoundAction controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding.
If the value is set to Allow, then no matched parameters will be treated as successful validation by the binding. If set to Deny, then no matched parameters will be subject to the failurePolicy of the policy.
Allowed values are Allow or Deny
Required
selectorOptional ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
selector can be used to match multiple param objects based on their labels.
Supply selector: {} to match all resources of the ParamKind.
If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.
One of name or selector must be set, but name and selector are mutually exclusive properties. If one is set, the other must be unset.
ParamRefV1Alpha1 ¶
ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ParamRefV1Alpha1(
name: str = None,
namespace: str = None,
parameter_not_found_action: str = None,
selector: LabelSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of the resource being referenced. |
namespace |
str |
namespace is the namespace of the referenced resource. |
parameter_not_found_action |
str |
parameterNotFoundAction controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. |
selector |
cdk8s_plus_31.k8s.LabelSelector |
selector can be used to match multiple param objects based on their labels. |
nameOptional ¶
name: str
- Type: str
name is the name of the resource being referenced.
name and selector are mutually exclusive properties. If one is set, the other must be unset.
namespaceOptional ¶
namespace: str
- Type: str
namespace is the namespace of the referenced resource.
Allows limiting the search for params to a specific namespace. Applies to both name and selector fields.
A per-namespace parameter may be used by specifying a namespace-scoped paramKind in the policy and leaving this field empty.
- If
paramKindis cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If
paramKindis namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
parameter_not_found_actionOptional ¶
parameter_not_found_action: str
- Type: str
- Default: Deny`
parameterNotFoundAction controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding.
If the value is set to Allow, then no matched parameters will be treated as successful validation by the binding. If set to Deny, then no matched parameters will be subject to the failurePolicy of the policy.
Allowed values are Allow or Deny Default to Deny
selectorOptional ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
selector can be used to match multiple param objects based on their labels.
Supply selector: {} to match all resources of the ParamKind.
If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.
One of name or selector must be set, but name and selector are mutually exclusive properties. If one is set, the other must be unset.
ParamRefV1Beta1 ¶
ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ParamRefV1Beta1(
name: str = None,
namespace: str = None,
parameter_not_found_action: str = None,
selector: LabelSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of the resource being referenced. |
namespace |
str |
namespace is the namespace of the referenced resource. |
parameter_not_found_action |
str |
parameterNotFoundAction controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. |
selector |
cdk8s_plus_31.k8s.LabelSelector |
selector can be used to match multiple param objects based on their labels. |
nameOptional ¶
name: str
- Type: str
name is the name of the resource being referenced.
One of name or selector must be set, but name and selector are mutually exclusive properties. If one is set, the other must be unset.
A single parameter used for all admission requests can be configured by setting the name field, leaving selector blank, and setting namespace if paramKind is namespace-scoped.
namespaceOptional ¶
namespace: str
- Type: str
namespace is the namespace of the referenced resource.
Allows limiting the search for params to a specific namespace. Applies to both name and selector fields.
A per-namespace parameter may be used by specifying a namespace-scoped paramKind in the policy and leaving this field empty.
- If
paramKindis cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. - If
paramKindis namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error.
parameter_not_found_actionOptional ¶
parameter_not_found_action: str
- Type: str
parameterNotFoundAction controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding.
If the value is set to Allow, then no matched parameters will be treated as successful validation by the binding. If set to Deny, then no matched parameters will be subject to the failurePolicy of the policy.
Allowed values are Allow or Deny
Required
selectorOptional ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
selector can be used to match multiple param objects based on their labels.
Supply selector: {} to match all resources of the ParamKind.
If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together.
One of name or selector must be set, but name and selector are mutually exclusive properties. If one is set, the other must be unset.
ParentReferenceV1Beta1 ¶
ParentReference describes a reference to a parent object.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ParentReferenceV1Beta1(
name: str,
resource: str,
group: str = None,
namespace: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name is the name of the object being referenced. |
resource |
str |
Resource is the resource of the object being referenced. |
group |
str |
Group is the group of the object being referenced. |
namespace |
str |
Namespace is the namespace of the object being referenced. |
nameRequired ¶
name: str
- Type: str
Name is the name of the object being referenced.
resourceRequired ¶
resource: str
- Type: str
Resource is the resource of the object being referenced.
groupOptional ¶
group: str
- Type: str
Group is the group of the object being referenced.
namespaceOptional ¶
namespace: str
- Type: str
Namespace is the namespace of the object being referenced.
PathMapping ¶
Maps a string key to a path within a volume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PathMapping(
path: str,
mode: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
The relative path of the file to map the key to. |
mode |
typing.Union[int, float] |
Optional: mode bits to use on this file, must be a value between 0 and 0777. |
pathRequired ¶
path: str
- Type: str
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 ‘..’.
modeOptional ¶
mode: typing.Union[int, float]
- Type: typing.Union[int, float]
Optional: mode bits to use on this file, must be a value between 0 and 0777.
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.
PersistentVolumeClaimProps ¶
Properties for PersistentVolumeClaim.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolumeClaimProps(
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
storage: Size = None,
storage_class_name: str = None,
volume: IPersistentVolume = None,
volume_mode: PersistentVolumeMode = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains the access modes the volume should support. |
storage |
cdk8s.Size |
Minimum storage size the volume should have. |
storage_class_name |
str |
Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:. |
volume |
IPersistentVolume |
The PersistentVolume backing this claim. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes requirement.
Contains the access modes the volume should support.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
storageOptional ¶
storage: Size
- Type: cdk8s.Size
- Default: No storage requirement.
Minimum storage size the volume should have.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
- Default: Not set.
Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:.
- If the admission plugin is turned on, the storage class marked as default will be used.
- If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
volumeOptional ¶
volume: IPersistentVolume
- Type: IPersistentVolume
- Default: No specific volume binding.
The PersistentVolume backing this claim.
The control plane still checks that storage class, access modes, and requested storage size on the volume are valid.
Note that in order to guarantee a proper binding, the volume should
also define a claimRef referring to this claim. Otherwise, the volume may be
claimed be other pvc’s before it gets a chance to bind to this one.
If the volume is managed (i.e not imported), you can use pv.claim() to easily
create a bi-directional bounded claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding.
volume_modeOptional ¶
volume_mode: PersistentVolumeMode
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
PersistentVolumeClaimSpec ¶
PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PersistentVolumeClaimSpec(
access_modes: typing.List[str] = None,
data_source: TypedLocalObjectReference = None,
data_source_ref: TypedObjectReference = None,
resources: VolumeResourceRequirements = None,
selector: LabelSelector = None,
storage_class_name: str = None,
volume_attributes_class_name: str = None,
volume_mode: str = None,
volume_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
access_modes |
typing.List[str] |
accessModes contains the desired access modes the volume should have. |
data_source |
cdk8s_plus_31.k8s.TypedLocalObjectReference |
dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource. |
data_source_ref |
cdk8s_plus_31.k8s.TypedObjectReference |
dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired. |
resources |
cdk8s_plus_31.k8s.VolumeResourceRequirements |
resources represents the minimum resources the volume should have. |
selector |
cdk8s_plus_31.k8s.LabelSelector |
selector is a label query over volumes to consider for binding. |
storage_class_name |
str |
storageClassName is the name of the StorageClass required by the claim. |
volume_attributes_class_name |
str |
volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. |
volume_mode |
str |
volumeMode defines what type of volume is required by the claim. |
volume_name |
str |
volumeName is the binding reference to the PersistentVolume backing this claim. |
access_modesOptional ¶
access_modes: typing.List[str]
- Type: typing.List[str]
accessModes contains the desired access modes the volume should have.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
data_sourceOptional ¶
data_source: TypedLocalObjectReference
- Type: cdk8s_plus_31.k8s.TypedLocalObjectReference
dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. If the namespace is specified, then dataSourceRef will not be copied to dataSource.
data_source_refOptional ¶
data_source_ref: TypedObjectReference
- Type: cdk8s_plus_31.k8s.TypedObjectReference
dataSourceRef specifies the object from which to populate the volume with data, if a non-empty volume is desired.
This may be any object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the dataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, when namespace isn’t specified in dataSourceRef, both fields (dataSource and dataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. When namespace is specified in dataSourceRef, dataSource isn’t set to the same value and must be empty. There are three important differences between dataSource and dataSourceRef: * While dataSource only allows two specific types of objects, dataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects.
- While dataSource ignores disallowed values (dropping them), dataSourceRef preserves all values, and generates an error if a disallowed value is specified.
- While dataSource only allows local objects, dataSourceRef allows objects in any namespaces. (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
resourcesOptional ¶
resources: VolumeResourceRequirements
- Type: cdk8s_plus_31.k8s.VolumeResourceRequirements
resources represents the minimum resources the volume should have.
If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
selectorOptional ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
selector is a label query over volumes to consider for binding.
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
storageClassName is the name of the StorageClass required by the claim.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
volume_attributes_class_nameOptional ¶
volume_attributes_class_name: str
- Type: str
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).
volume_modeOptional ¶
volume_mode: str
- Type: str
volumeMode defines what type of volume is required by the claim.
Value of Filesystem is implied when not included in claim spec.
volume_nameOptional ¶
volume_name: str
- Type: str
volumeName is the binding reference to the PersistentVolume backing this claim.
PersistentVolumeClaimTemplate ¶
PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PersistentVolumeClaimTemplate(
spec: PersistentVolumeClaimSpec,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.PersistentVolumeClaimSpec |
The specification for the PersistentVolumeClaim. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
May contain labels and annotations that will be copied into the PVC when creating it. |
specRequired ¶
spec: PersistentVolumeClaimSpec
- Type: cdk8s_plus_31.k8s.PersistentVolumeClaimSpec
The specification for the PersistentVolumeClaim.
The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
May contain labels and annotations that will be copied into the PVC when creating it.
No other fields are allowed and will be rejected during validation.
PersistentVolumeClaimTemplateProps ¶
A PersistentVolumeClaim template for StatefulSets.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolumeClaimTemplateProps(
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
storage: Size = None,
storage_class_name: str = None,
volume: IPersistentVolume = None,
volume_mode: PersistentVolumeMode = None,
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains the access modes the volume should support. |
storage |
cdk8s.Size |
Minimum storage size the volume should have. |
storage_class_name |
str |
Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:. |
volume |
IPersistentVolume |
The PersistentVolume backing this claim. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
name |
str |
The name of the claim that the StatefulSet controller will create for each pod. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes requirement.
Contains the access modes the volume should support.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1
storageOptional ¶
storage: Size
- Type: cdk8s.Size
- Default: No storage requirement.
Minimum storage size the volume should have.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
- Default: Not set.
Name of the StorageClass required by the claim. When this property is not set, the behavior is as follows:.
- If the admission plugin is turned on, the storage class marked as default will be used.
- If the admission plugin is turned off, the pvc can only be bound to volumes without a storage class.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1
volumeOptional ¶
volume: IPersistentVolume
- Type: IPersistentVolume
- Default: No specific volume binding.
The PersistentVolume backing this claim.
The control plane still checks that storage class, access modes, and requested storage size on the volume are valid.
Note that in order to guarantee a proper binding, the volume should
also define a claimRef referring to this claim. Otherwise, the volume may be
claimed be other pvc’s before it gets a chance to bind to this one.
If the volume is managed (i.e not imported), you can use pv.claim() to easily
create a bi-directional bounded claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding.
volume_modeOptional ¶
volume_mode: PersistentVolumeMode
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
nameRequired ¶
name: str
- Type: str
The name of the claim that the StatefulSet controller will create for each pod.
This will be used to name the created PVC in the format
This name should match the name of a volume mount in one of the containers.
PersistentVolumeClaimVolumeOptions ¶
Options for a PersistentVolumeClaim-based volume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolumeClaimVolumeOptions(
name: str = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The volume name. |
read_only |
bool |
Will force the ReadOnly setting in VolumeMounts. |
nameOptional ¶
name: str
- Type: str
- Default: Derived from the PVC name.
The volume name.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Will force the ReadOnly setting in VolumeMounts.
PersistentVolumeClaimVolumeSource ¶
PersistentVolumeClaimVolumeSource references the user’s PVC in the same namespace.
This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PersistentVolumeClaimVolumeSource(
claim_name: str,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
claim_name |
str |
claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. |
read_only |
bool |
readOnly Will force the ReadOnly setting in VolumeMounts. |
claim_nameRequired ¶
claim_name: str
- Type: str
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
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly Will force the ReadOnly setting in VolumeMounts.
Default false.
PersistentVolumeProps ¶
Properties for PersistentVolume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PersistentVolumeProps(
metadata: ApiObjectMetadata = None,
access_modes: typing.List[PersistentVolumeAccessMode] = None,
claim: IPersistentVolumeClaim = None,
mount_options: typing.List[str] = None,
reclaim_policy: PersistentVolumeReclaimPolicy = None,
storage: Size = None,
storage_class_name: str = None,
volume_mode: PersistentVolumeMode = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
access_modes |
typing.List[PersistentVolumeAccessMode] |
Contains all ways the volume can be mounted. |
claim |
IPersistentVolumeClaim |
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. |
mount_options |
typing.List[str] |
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. |
reclaim_policy |
PersistentVolumeReclaimPolicy |
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. |
storage |
cdk8s.Size |
What is the storage capacity of this volume. |
storage_class_name |
str |
Name of StorageClass to which this persistent volume belongs. |
volume_mode |
PersistentVolumeMode |
Defines what type of volume is required by the claim. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
access_modesOptional ¶
access_modes: typing.List[PersistentVolumeAccessMode]
- Type: typing.List[PersistentVolumeAccessMode]
- Default: No access modes.
Contains all ways the volume can be mounted.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
claimOptional ¶
claim: IPersistentVolumeClaim
- Type: IPersistentVolumeClaim
- Default: Not bound to a specific claim.
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
- Default: No options.
A list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid.
https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
reclaim_policyOptional ¶
reclaim_policy: PersistentVolumeReclaimPolicy
- Type: PersistentVolumeReclaimPolicy
- Default: PersistentVolumeReclaimPolicy.RETAIN
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.
The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
storageOptional ¶
storage: Size
- Type: cdk8s.Size
- Default: No specified.
What is the storage capacity of this volume.
https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
- Default: Volume does not belong to any storage class.
Name of StorageClass to which this persistent volume belongs.
volume_modeOptional ¶
volume_mode: PersistentVolumeMode
- Type: PersistentVolumeMode
- Default: VolumeMode.FILE_SYSTEM
Defines what type of volume is required by the claim.
PersistentVolumeSpec ¶
PersistentVolumeSpec is the specification of a persistent volume.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PersistentVolumeSpec(
access_modes: typing.List[str] = None,
aws_elastic_block_store: AwsElasticBlockStoreVolumeSource = None,
azure_disk: AzureDiskVolumeSource = None,
azure_file: AzureFilePersistentVolumeSource = None,
capacity: typing.Mapping[Quantity] = None,
cephfs: CephFsPersistentVolumeSource = None,
cinder: CinderPersistentVolumeSource = None,
claim_ref: ObjectReference = None,
csi: CsiPersistentVolumeSource = None,
fc: FcVolumeSource = None,
flex_volume: FlexPersistentVolumeSource = None,
flocker: FlockerVolumeSource = None,
gce_persistent_disk: GcePersistentDiskVolumeSource = None,
glusterfs: GlusterfsPersistentVolumeSource = None,
host_path: HostPathVolumeSource = None,
iscsi: IscsiPersistentVolumeSource = None,
local: LocalVolumeSource = None,
mount_options: typing.List[str] = None,
nfs: NfsVolumeSource = None,
node_affinity: VolumeNodeAffinity = None,
persistent_volume_reclaim_policy: str = None,
photon_persistent_disk: PhotonPersistentDiskVolumeSource = None,
portworx_volume: PortworxVolumeSource = None,
quobyte: QuobyteVolumeSource = None,
rbd: RbdPersistentVolumeSource = None,
scale_io: ScaleIoPersistentVolumeSource = None,
storage_class_name: str = None,
storageos: StorageOsPersistentVolumeSource = None,
volume_attributes_class_name: str = None,
volume_mode: str = None,
vsphere_volume: VsphereVirtualDiskVolumeSource = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
access_modes |
typing.List[str] |
accessModes contains all ways the volume can be mounted. |
aws_elastic_block_store |
cdk8s_plus_31.k8s.AwsElasticBlockStoreVolumeSource |
awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. |
azure_disk |
cdk8s_plus_31.k8s.AzureDiskVolumeSource |
azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. |
azure_file |
cdk8s_plus_31.k8s.AzureFilePersistentVolumeSource |
azureFile represents an Azure File Service mount on the host and bind mount to the pod. |
capacity |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
capacity is the description of the persistent volume’s resources and capacity. |
cephfs |
cdk8s_plus_31.k8s.CephFsPersistentVolumeSource |
cephFS represents a Ceph FS mount on the host that shares a pod’s lifetime. |
cinder |
cdk8s_plus_31.k8s.CinderPersistentVolumeSource |
cinder represents a cinder volume attached and mounted on kubelets host machine. |
claim_ref |
cdk8s_plus_31.k8s.ObjectReference |
claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. |
csi |
cdk8s_plus_31.k8s.CsiPersistentVolumeSource |
csi represents storage that is handled by an external CSI driver (Beta feature). |
fc |
cdk8s_plus_31.k8s.FcVolumeSource |
fc represents a Fibre Channel resource that is attached to a kubelet’s host machine and then exposed to the pod. |
flex_volume |
cdk8s_plus_31.k8s.FlexPersistentVolumeSource |
flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. |
flocker |
cdk8s_plus_31.k8s.FlockerVolumeSource |
flocker represents a Flocker volume attached to a kubelet’s host machine and exposed to the pod for its usage. |
gce_persistent_disk |
cdk8s_plus_31.k8s.GcePersistentDiskVolumeSource |
gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. |
glusterfs |
cdk8s_plus_31.k8s.GlusterfsPersistentVolumeSource |
glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod. |
host_path |
cdk8s_plus_31.k8s.HostPathVolumeSource |
hostPath represents a directory on the host. |
iscsi |
cdk8s_plus_31.k8s.IscsiPersistentVolumeSource |
iscsi represents an ISCSI Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. |
local |
cdk8s_plus_31.k8s.LocalVolumeSource |
local represents directly-attached storage with node affinity. |
mount_options |
typing.List[str] |
mountOptions is the list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options. |
nfs |
cdk8s_plus_31.k8s.NfsVolumeSource |
nfs represents an NFS mount on the host. |
node_affinity |
cdk8s_plus_31.k8s.VolumeNodeAffinity |
nodeAffinity defines constraints that limit what nodes this volume can be accessed from. |
persistent_volume_reclaim_policy |
str |
persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim. |
photon_persistent_disk |
cdk8s_plus_31.k8s.PhotonPersistentDiskVolumeSource |
photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. |
portworx_volume |
cdk8s_plus_31.k8s.PortworxVolumeSource |
portworxVolume represents a portworx volume attached and mounted on kubelets host machine. |
quobyte |
cdk8s_plus_31.k8s.QuobyteVolumeSource |
quobyte represents a Quobyte mount on the host that shares a pod’s lifetime. |
rbd |
cdk8s_plus_31.k8s.RbdPersistentVolumeSource |
rbd represents a Rados Block Device mount on the host that shares a pod’s lifetime. |
scale_io |
cdk8s_plus_31.k8s.ScaleIoPersistentVolumeSource |
scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. |
storage_class_name |
str |
storageClassName is the name of StorageClass to which this persistent volume belongs. |
storageos |
cdk8s_plus_31.k8s.StorageOsPersistentVolumeSource |
storageOS represents a StorageOS volume that is attached to the kubelet’s host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md. |
volume_attributes_class_name |
str |
Name of VolumeAttributesClass to which this persistent volume belongs. |
volume_mode |
str |
volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. |
vsphere_volume |
cdk8s_plus_31.k8s.VsphereVirtualDiskVolumeSource |
vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. |
access_modesOptional ¶
access_modes: typing.List[str]
- Type: typing.List[str]
accessModes contains all ways the volume can be mounted.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
aws_elastic_block_storeOptional ¶
aws_elastic_block_store: AwsElasticBlockStoreVolumeSource
- Type: cdk8s_plus_31.k8s.AwsElasticBlockStoreVolumeSource
awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet’s host machine and then exposed to the pod.
More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
azure_diskOptional ¶
azure_disk: AzureDiskVolumeSource
- Type: cdk8s_plus_31.k8s.AzureDiskVolumeSource
azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
azure_fileOptional ¶
azure_file: AzureFilePersistentVolumeSource
- Type: cdk8s_plus_31.k8s.AzureFilePersistentVolumeSource
azureFile represents an Azure File Service mount on the host and bind mount to the pod.
capacityOptional ¶
capacity: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
capacity is the description of the persistent volume’s resources and capacity.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
cephfsOptional ¶
cephfs: CephFsPersistentVolumeSource
- Type: cdk8s_plus_31.k8s.CephFsPersistentVolumeSource
cephFS represents a Ceph FS mount on the host that shares a pod’s lifetime.
cinderOptional ¶
cinder: CinderPersistentVolumeSource
- Type: cdk8s_plus_31.k8s.CinderPersistentVolumeSource
cinder represents a cinder volume attached and mounted on kubelets host machine.
More info: https://examples.k8s.io/mysql-cinder-pd/README.md
claim_refOptional ¶
claim_ref: ObjectReference
- Type: cdk8s_plus_31.k8s.ObjectReference
claimRef is part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.
Expected to be non-nil when bound. claim.VolumeName is the authoritative bind between PV and PVC. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
csiOptional ¶
csi: CsiPersistentVolumeSource
- Type: cdk8s_plus_31.k8s.CsiPersistentVolumeSource
csi represents storage that is handled by an external CSI driver (Beta feature).
fcOptional ¶
fc: FcVolumeSource
- Type: cdk8s_plus_31.k8s.FcVolumeSource
fc represents a Fibre Channel resource that is attached to a kubelet’s host machine and then exposed to the pod.
flex_volumeOptional ¶
flex_volume: FlexPersistentVolumeSource
- Type: cdk8s_plus_31.k8s.FlexPersistentVolumeSource
flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
flockerOptional ¶
flocker: FlockerVolumeSource
- Type: cdk8s_plus_31.k8s.FlockerVolumeSource
flocker represents a Flocker volume attached to a kubelet’s host machine and exposed to the pod for its usage.
This depends on the Flocker control service being running
gce_persistent_diskOptional ¶
gce_persistent_disk: GcePersistentDiskVolumeSource
- Type: cdk8s_plus_31.k8s.GcePersistentDiskVolumeSource
gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet’s host machine and then exposed to the pod.
Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
glusterfsOptional ¶
glusterfs: GlusterfsPersistentVolumeSource
- Type: cdk8s_plus_31.k8s.GlusterfsPersistentVolumeSource
glusterfs represents a Glusterfs volume that is attached to a host and exposed to the pod.
Provisioned by an admin. More info: https://examples.k8s.io/volumes/glusterfs/README.md
host_pathOptional ¶
host_path: HostPathVolumeSource
- Type: cdk8s_plus_31.k8s.HostPathVolumeSource
hostPath represents a directory on the host.
Provisioned by a developer or tester. This is useful for single-node development and testing only! On-host storage is not supported in any way and WILL NOT WORK in a multi-node cluster. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
iscsiOptional ¶
iscsi: IscsiPersistentVolumeSource
- Type: cdk8s_plus_31.k8s.IscsiPersistentVolumeSource
iscsi represents an ISCSI Disk resource that is attached to a kubelet’s host machine and then exposed to the pod.
Provisioned by an admin.
localOptional ¶
local: LocalVolumeSource
- Type: cdk8s_plus_31.k8s.LocalVolumeSource
local represents directly-attached storage with node affinity.
mount_optionsOptional ¶
mount_options: typing.List[str]
- Type: typing.List[str]
mountOptions is the list of mount options, e.g. [“ro”, “soft”]. Not validated - mount will simply fail if one is invalid. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options.
nfsOptional ¶
nfs: NfsVolumeSource
- Type: cdk8s_plus_31.k8s.NfsVolumeSource
nfs represents an NFS mount on the host.
Provisioned by an admin. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs
node_affinityOptional ¶
node_affinity: VolumeNodeAffinity
- Type: cdk8s_plus_31.k8s.VolumeNodeAffinity
nodeAffinity defines constraints that limit what nodes this volume can be accessed from.
This field influences the scheduling of pods that use this volume.
persistent_volume_reclaim_policyOptional ¶
persistent_volume_reclaim_policy: str
- Type: str
persistentVolumeReclaimPolicy defines what happens to a persistent volume when released from its claim.
Valid options are Retain (default for manually created PersistentVolumes), Delete (default for dynamically provisioned PersistentVolumes), and Recycle (deprecated). Recycle must be supported by the volume plugin underlying this PersistentVolume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
photon_persistent_diskOptional ¶
photon_persistent_disk: PhotonPersistentDiskVolumeSource
- Type: cdk8s_plus_31.k8s.PhotonPersistentDiskVolumeSource
photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine.
portworx_volumeOptional ¶
portworx_volume: PortworxVolumeSource
- Type: cdk8s_plus_31.k8s.PortworxVolumeSource
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
quobyteOptional ¶
quobyte: QuobyteVolumeSource
- Type: cdk8s_plus_31.k8s.QuobyteVolumeSource
quobyte represents a Quobyte mount on the host that shares a pod’s lifetime.
rbdOptional ¶
rbd: RbdPersistentVolumeSource
- Type: cdk8s_plus_31.k8s.RbdPersistentVolumeSource
rbd represents a Rados Block Device mount on the host that shares a pod’s lifetime.
More info: https://examples.k8s.io/volumes/rbd/README.md
scale_ioOptional ¶
scale_io: ScaleIoPersistentVolumeSource
- Type: cdk8s_plus_31.k8s.ScaleIoPersistentVolumeSource
scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
storage_class_nameOptional ¶
storage_class_name: str
- Type: str
storageClassName is the name of StorageClass to which this persistent volume belongs.
Empty value means that this volume does not belong to any StorageClass.
storageosOptional ¶
storageos: StorageOsPersistentVolumeSource
- Type: cdk8s_plus_31.k8s.StorageOsPersistentVolumeSource
storageOS represents a StorageOS volume that is attached to the kubelet’s host machine and mounted into the pod More info: https://examples.k8s.io/volumes/storageos/README.md.
volume_attributes_class_nameOptional ¶
volume_attributes_class_name: str
- Type: str
Name of VolumeAttributesClass to which this persistent volume belongs.
Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is a beta field and requires enabling VolumeAttributesClass feature (off by default).
volume_modeOptional ¶
volume_mode: str
- Type: str
volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state.
Value of Filesystem is implied when not included in spec.
vsphere_volumeOptional ¶
vsphere_volume: VsphereVirtualDiskVolumeSource
- Type: cdk8s_plus_31.k8s.VsphereVirtualDiskVolumeSource
vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine.
PhotonPersistentDiskVolumeSource ¶
Represents a Photon Controller persistent disk resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PhotonPersistentDiskVolumeSource(
pd_id: str,
fs_type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
pd_id |
str |
pdID is the ID that identifies Photon Controller persistent disk. |
fs_type |
str |
fsType is the filesystem type to mount. |
pd_idRequired ¶
pd_id: str
- Type: str
pdID is the ID that identifies Photon Controller persistent disk.
fs_typeOptional ¶
fs_type: str
- Type: str
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.
PodAffinity ¶
Pod affinity is a group of inter pod affinity scheduling rules.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodAffinity(
preferred_during_scheduling_ignored_during_execution: typing.List[WeightedPodAffinityTerm] = None,
required_during_scheduling_ignored_during_execution: typing.List[PodAffinityTerm] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
preferred_during_scheduling_ignored_during_execution |
typing.List[cdk8s_plus_31.k8s.WeightedPodAffinityTerm] |
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. |
required_during_scheduling_ignored_during_execution |
typing.List[cdk8s_plus_31.k8s.PodAffinityTerm] |
If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. |
preferred_during_scheduling_ignored_during_executionOptional ¶
preferred_during_scheduling_ignored_during_execution: typing.List[WeightedPodAffinityTerm]
- Type: typing.List[cdk8s_plus_31.k8s.WeightedPodAffinityTerm]
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.
required_during_scheduling_ignored_during_executionOptional ¶
required_during_scheduling_ignored_during_execution: typing.List[PodAffinityTerm]
- Type: typing.List[cdk8s_plus_31.k8s.PodAffinityTerm]
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.
PodAffinityTerm ¶
Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodAffinityTerm(
topology_key: str,
label_selector: LabelSelector = None,
match_label_keys: typing.List[str] = None,
mismatch_label_keys: typing.List[str] = None,
namespaces: typing.List[str] = None,
namespace_selector: LabelSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
topology_key |
str |
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. |
label_selector |
cdk8s_plus_31.k8s.LabelSelector |
A label query over a set of resources, in this case pods. |
match_label_keys |
typing.List[str] |
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. |
mismatch_label_keys |
typing.List[str] |
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. |
namespaces |
typing.List[str] |
namespaces specifies a static list of namespace names that the term applies to. |
namespace_selector |
cdk8s_plus_31.k8s.LabelSelector |
A label query over the set of namespaces that the term applies to. |
topology_keyRequired ¶
topology_key: str
- Type: str
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.
label_selectorOptional ¶
label_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
A label query over a set of resources, in this case pods.
If it’s null, this PodAffinityTerm matches with no Pods.
match_label_keysOptional ¶
match_label_keys: typing.List[str]
- Type: typing.List[str]
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).
mismatch_label_keysOptional ¶
mismatch_label_keys: typing.List[str]
- Type: typing.List[str]
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).
namespacesOptional ¶
namespaces: typing.List[str]
- Type: typing.List[str]
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”.
namespace_selectorOptional ¶
namespace_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
A label query over the set of namespaces that the term applies to.
The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means “this pod’s namespace”. An empty selector ({}) matches all namespaces.
PodAntiAffinity ¶
Pod anti affinity is a group of inter pod anti affinity scheduling rules.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodAntiAffinity(
preferred_during_scheduling_ignored_during_execution: typing.List[WeightedPodAffinityTerm] = None,
required_during_scheduling_ignored_during_execution: typing.List[PodAffinityTerm] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
preferred_during_scheduling_ignored_during_execution |
typing.List[cdk8s_plus_31.k8s.WeightedPodAffinityTerm] |
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. |
required_during_scheduling_ignored_during_execution |
typing.List[cdk8s_plus_31.k8s.PodAffinityTerm] |
If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. |
preferred_during_scheduling_ignored_during_executionOptional ¶
preferred_during_scheduling_ignored_during_execution: typing.List[WeightedPodAffinityTerm]
- Type: typing.List[cdk8s_plus_31.k8s.WeightedPodAffinityTerm]
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.
required_during_scheduling_ignored_during_executionOptional ¶
required_during_scheduling_ignored_during_execution: typing.List[PodAffinityTerm]
- Type: typing.List[cdk8s_plus_31.k8s.PodAffinityTerm]
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.
PodConnectionsAllowFromOptions ¶
Options for PodConnections.allowFrom.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodConnectionsAllowFromOptions(
isolation: PodConnectionsIsolation = None,
ports: typing.List[NetworkPolicyPort] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
isolation |
PodConnectionsIsolation |
Which isolation should be applied to establish the connection. |
ports |
typing.List[NetworkPolicyPort] |
Ports to allow incoming traffic to. |
isolationOptional ¶
isolation: PodConnectionsIsolation
- Type: PodConnectionsIsolation
- Default: unset, isolates both the pod and the peer.
Which isolation should be applied to establish the connection.
portsOptional ¶
ports: typing.List[NetworkPolicyPort]
- Type: typing.List[NetworkPolicyPort]
- Default: The pod ports.
Ports to allow incoming traffic to.
PodConnectionsAllowToOptions ¶
Options for PodConnections.allowTo.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodConnectionsAllowToOptions(
isolation: PodConnectionsIsolation = None,
ports: typing.List[NetworkPolicyPort] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
isolation |
PodConnectionsIsolation |
Which isolation should be applied to establish the connection. |
ports |
typing.List[NetworkPolicyPort] |
Ports to allow outgoing traffic to. |
isolationOptional ¶
isolation: PodConnectionsIsolation
- Type: PodConnectionsIsolation
- Default: unset, isolates both the pod and the peer.
Which isolation should be applied to establish the connection.
portsOptional ¶
ports: typing.List[NetworkPolicyPort]
- Type: typing.List[NetworkPolicyPort]
- Default: If the peer is a managed pod, take its ports. Otherwise, all ports are allowed.
Ports to allow outgoing traffic to.
PodDisruptionBudgetSpec ¶
PodDisruptionBudgetSpec is a description of a PodDisruptionBudget.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodDisruptionBudgetSpec(
max_unavailable: IntOrString = None,
min_available: IntOrString = None,
selector: LabelSelector = None,
unhealthy_pod_eviction_policy: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
max_unavailable |
cdk8s_plus_31.k8s.IntOrString |
An eviction is allowed if at most “maxUnavailable” pods selected by “selector” are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with “minAvailable”. |
min_available |
cdk8s_plus_31.k8s.IntOrString |
An eviction is allowed if at least “minAvailable” pods selected by “selector” will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying “100%”. |
selector |
cdk8s_plus_31.k8s.LabelSelector |
Label query over pods whose evictions are managed by the disruption budget. |
unhealthy_pod_eviction_policy |
str |
UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction. |
max_unavailableOptional ¶
max_unavailable: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
An eviction is allowed if at most “maxUnavailable” pods selected by “selector” are unavailable after the eviction, i.e. even in absence of the evicted pod. For example, one can prevent all voluntary evictions by specifying 0. This is a mutually exclusive setting with “minAvailable”.
min_availableOptional ¶
min_available: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
An eviction is allowed if at least “minAvailable” pods selected by “selector” will still be available after the eviction, i.e. even in the absence of the evicted pod. So for example you can prevent all voluntary evictions by specifying “100%”.
selectorOptional ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
Label query over pods whose evictions are managed by the disruption budget.
A null selector will match no pods, while an empty ({}) selector will select all pods within the namespace.
unhealthy_pod_eviction_policyOptional ¶
unhealthy_pod_eviction_policy: str
- Type: str
UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods should be considered for eviction.
Current implementation considers healthy pods, as pods that have status.conditions item with type=”Ready”,status=”True”.
Valid policies are IfHealthyBudget and AlwaysAllow. If no policy is specified, the default behavior will be used, which corresponds to the IfHealthyBudget policy.
IfHealthyBudget policy means that running pods (status.phase=”Running”), but not yet healthy can be evicted only if the guarded application is not disrupted (status.currentHealthy is at least equal to status.desiredHealthy). Healthy pods will be subject to the PDB for eviction.
AlwaysAllow policy means that all running pods (status.phase=”Running”), but not yet healthy are considered disrupted and can be evicted regardless of whether the criteria in a PDB is met. This means perspective running pods of a disrupted application might not get a chance to become healthy. Healthy pods will be subject to the PDB for eviction.
Additional policies may be added in the future. Clients making eviction decisions should disallow eviction of unhealthy pods if they encounter an unrecognized policy in this field.
This field is beta-level. The eviction API uses this field when the feature gate PDBUnhealthyPodEvictionPolicy is enabled (enabled by default).
PodDnsConfig ¶
PodDNSConfig defines the DNS parameters of a pod in addition to those generated from DNSPolicy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodDnsConfig(
nameservers: typing.List[str] = None,
options: typing.List[PodDnsConfigOption] = None,
searches: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
nameservers |
typing.List[str] |
A list of DNS name server IP addresses. |
options |
typing.List[cdk8s_plus_31.k8s.PodDnsConfigOption] |
A list of DNS resolver options. |
searches |
typing.List[str] |
A list of DNS search domains for host-name lookup. |
nameserversOptional ¶
nameservers: typing.List[str]
- Type: typing.List[str]
A list of DNS name server IP addresses.
This will be appended to the base nameservers generated from DNSPolicy. Duplicated nameservers will be removed.
optionsOptional ¶
options: typing.List[PodDnsConfigOption]
- Type: typing.List[cdk8s_plus_31.k8s.PodDnsConfigOption]
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.
searchesOptional ¶
searches: typing.List[str]
- Type: typing.List[str]
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.
PodDnsConfigOption ¶
PodDNSConfigOption defines DNS resolver options of a pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodDnsConfigOption(
name: str = None,
value: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Required. |
value |
str |
No description. |
nameOptional ¶
name: str
- Type: str
Required.
valueOptional ¶
value: str
- Type: str
PodDnsProps ¶
Properties for PodDns.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodDnsProps(
hostname: str = None,
hostname_as_fqd_n: bool = None,
nameservers: typing.List[str] = None,
options: typing.List[DnsOption] = None,
policy: DnsPolicy = None,
searches: typing.List[str] = None,
subdomain: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
hostname |
str |
Specifies the hostname of the Pod. |
hostname_as_fqd_n |
bool |
If true the pod’s hostname will be configured as the pod’s FQDN, rather than the leaf name (the default). |
nameservers |
typing.List[str] |
A list of IP addresses that will be used as DNS servers for the Pod. |
options |
typing.List[DnsOption] |
List of objects where each object may have a name property (required) and a value property (optional). |
policy |
DnsPolicy |
Set DNS policy for the pod. |
searches |
typing.List[str] |
A list of DNS search domains for hostname lookup in the Pod. |
subdomain |
str |
If specified, the fully qualified Pod hostname will be “ |
hostnameOptional ¶
hostname: str
- Type: str
- Default: Set to a system-defined value.
Specifies the hostname of the Pod.
hostname_as_fqd_nOptional ¶
hostname_as_fqd_n: bool
- Type: bool
- Default: false
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.
nameserversOptional ¶
nameservers: typing.List[str]
- Type: typing.List[str]
A list of IP addresses that will be used as DNS servers for the Pod.
There can be at most 3 IP addresses specified. When the policy is set to “NONE”, the list must contain at least one IP address, otherwise this property is optional. The servers listed will be combined to the base nameservers generated from the specified DNS policy with duplicate addresses removed.
optionsOptional ¶
options: typing.List[DnsOption]
- Type: typing.List[DnsOption]
List of objects where each object may have a name property (required) and a value property (optional).
The contents in this property will be merged to the options generated from the specified DNS policy. Duplicate entries are removed.
policyOptional ¶
policy: DnsPolicy
- Type: DnsPolicy
- Default: DnsPolicy.CLUSTER_FIRST
Set DNS policy for the pod.
If policy is set to None, other configuration must be supplied.
searchesOptional ¶
searches: typing.List[str]
- Type: typing.List[str]
A list of DNS search domains for hostname lookup in the Pod.
When specified, the provided list will be merged into the base search domain names generated from the chosen DNS policy. Duplicate domain names are removed.
Kubernetes allows for at most 6 search domains.
subdomainOptional ¶
subdomain: str
- Type: str
- Default: No subdomain.
If specified, the fully qualified Pod hostname will be “
PodFailurePolicy ¶
PodFailurePolicy describes how failed pods influence the backoffLimit.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodFailurePolicy(
rules: typing.List[PodFailurePolicyRule]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
rules |
typing.List[cdk8s_plus_31.k8s.PodFailurePolicyRule] |
A list of pod failure policy rules. |
rulesRequired ¶
rules: typing.List[PodFailurePolicyRule]
- Type: typing.List[cdk8s_plus_31.k8s.PodFailurePolicyRule]
A list of pod failure policy rules.
The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
PodFailurePolicyOnExitCodesRequirement ¶
PodFailurePolicyOnExitCodesRequirement describes the requirement for handling a failed pod based on its container exit codes.
In particular, it lookups the .state.terminated.exitCode for each app container and init container status, represented by the .status.containerStatuses and .status.initContainerStatuses fields in the Pod status, respectively. Containers completed with success (exit code 0) are excluded from the requirement check.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodFailurePolicyOnExitCodesRequirement(
operator: str,
values: typing.List[typing.Union[int, float]],
container_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
operator |
str |
Represents the relationship between the container exit code(s) and the specified values. |
values |
typing.List[typing.Union[int, float]] |
Specifies the set of values. |
container_name |
str |
Restricts the check for exit codes to the container with the specified name. |
operatorRequired ¶
operator: str
- Type: str
Represents the relationship between the container exit code(s) and the specified values.
Containers completed with success (exit code 0) are excluded from the requirement check. Possible values are:
- In: the requirement is satisfied if at least one container exit code (might be multiple if there are multiple containers not restricted by the ‘containerName’ field) is in the set of specified values.
- NotIn: the requirement is satisfied if at least one container exit code (might be multiple if there are multiple containers not restricted by the ‘containerName’ field) is not in the set of specified values. Additional values are considered to be added in the future. Clients should react to an unknown operator by assuming the requirement is not satisfied.
valuesRequired ¶
values: typing.List[typing.Union[int, float]]
- Type: typing.List[typing.Union[int, float]]
Specifies the set of values.
Each returned container exit code (might be multiple in case of multiple containers) is checked against this set of values with respect to the operator. The list of values must be ordered and must not contain duplicates. Value ‘0’ cannot be used for the In operator. At least one element is required. At most 255 elements are allowed.
container_nameOptional ¶
container_name: str
- Type: str
Restricts the check for exit codes to the container with the specified name.
When null, the rule applies to all containers. When specified, it should match one the container or initContainer names in the pod template.
PodFailurePolicyOnPodConditionsPattern ¶
PodFailurePolicyOnPodConditionsPattern describes a pattern for matching an actual pod condition type.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodFailurePolicyOnPodConditionsPattern(
status: str,
type: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
status |
str |
Specifies the required Pod condition status. |
type |
str |
Specifies the required Pod condition type. |
statusRequired ¶
status: str
- Type: str
- Default: True.
Specifies the required Pod condition status.
To match a pod condition it is required that the specified status equals the pod condition status. Defaults to True.
typeRequired ¶
type: str
- Type: str
Specifies the required Pod condition type.
To match a pod condition it is required that specified type equals the pod condition type.
PodFailurePolicyRule ¶
PodFailurePolicyRule describes how a pod failure is handled when the requirements are met.
One of onExitCodes and onPodConditions, but not both, can be used in each rule.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodFailurePolicyRule(
action: str,
on_exit_codes: PodFailurePolicyOnExitCodesRequirement = None,
on_pod_conditions: typing.List[PodFailurePolicyOnPodConditionsPattern] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
action |
str |
Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:. |
on_exit_codes |
cdk8s_plus_31.k8s.PodFailurePolicyOnExitCodesRequirement |
Represents the requirement on the container exit codes. |
on_pod_conditions |
typing.List[cdk8s_plus_31.k8s.PodFailurePolicyOnPodConditionsPattern] |
Represents the requirement on the pod conditions. |
actionRequired ¶
action: str
- Type: str
Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:.
- FailJob: indicates that the pod’s job is marked as Failed and all running pods are terminated.
- FailIndex: indicates that the pod’s index is marked as Failed and will
not be restarted.
This value is beta-level. It can be used when the
JobBackoffLimitPerIndexfeature gate is enabled (enabled by default). - Ignore: indicates that the counter towards the .backoffLimit is not incremented and a replacement pod is created.
- Count: indicates that the pod is handled in the default way - the counter towards the .backoffLimit is incremented. Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.
on_exit_codesOptional ¶
on_exit_codes: PodFailurePolicyOnExitCodesRequirement
- Type: cdk8s_plus_31.k8s.PodFailurePolicyOnExitCodesRequirement
Represents the requirement on the container exit codes.
on_pod_conditionsOptional ¶
on_pod_conditions: typing.List[PodFailurePolicyOnPodConditionsPattern]
- Type: typing.List[cdk8s_plus_31.k8s.PodFailurePolicyOnPodConditionsPattern]
Represents the requirement on the pod conditions.
The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed.
PodOs ¶
PodOS defines the OS parameters of a pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodOs(
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name is the name of the operating system. |
nameRequired ¶
name: str
- Type: str
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
PodProps ¶
Properties for Pod.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodProps(
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
dns: PodDnsProps
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
host_network: bool
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
init_containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
isolate: bool
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
security_context: PodSecurityContextProps
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
share_process_namespace: bool
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
PodReadinessGate ¶
PodReadinessGate contains the reference to a pod condition.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodReadinessGate(
condition_type: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
condition_type |
str |
ConditionType refers to a condition in the pod’s condition list with matching type. |
condition_typeRequired ¶
condition_type: str
- Type: str
ConditionType refers to a condition in the pod’s condition list with matching type.
PodResourceClaim ¶
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.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodResourceClaim(
name: str,
resource_claim_name: str = None,
resource_claim_template_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name uniquely identifies this resource claim inside the pod. |
resource_claim_name |
str |
ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod. |
resource_claim_template_name |
str |
ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. |
nameRequired ¶
name: str
- Type: str
Name uniquely identifies this resource claim inside the pod.
This must be a DNS_LABEL.
resource_claim_nameOptional ¶
resource_claim_name: str
- Type: str
ResourceClaimName is the name of a ResourceClaim object in the same namespace as this pod.
Exactly one of ResourceClaimName and ResourceClaimTemplateName must be set.
resource_claim_template_nameOptional ¶
resource_claim_template_name: str
- Type: str
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.
PodsAllOptions ¶
Options for Pods.all.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodsAllOptions(
namespaces: Namespaces = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
namespaces |
Namespaces |
Namespaces the pods are allowed to be in. |
namespacesOptional ¶
namespaces: Namespaces
- Type: Namespaces
- Default: unset, implies the namespace of the resource this selection is used in.
Namespaces the pods are allowed to be in.
Use Namespaces.all() to allow all namespaces.
PodSchedulingAttractOptions ¶
Options for PodScheduling.attract.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodSchedulingAttractOptions(
weight: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
weight |
typing.Union[int, float] |
Indicates the attraction is optional (soft), with this weight score. |
weightOptional ¶
weight: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: no weight. assignment is assumed to be required (hard).
Indicates the attraction is optional (soft), with this weight score.
PodSchedulingColocateOptions ¶
Options for PodScheduling.colocate.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodSchedulingColocateOptions(
topology: Topology = None,
weight: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
topology |
Topology |
Which topology to coloate on. |
weight |
typing.Union[int, float] |
Indicates the co-location is optional (soft), with this weight score. |
topologyOptional ¶
topology: Topology
- Type: Topology
- Default: Topology.HOSTNAME
Which topology to coloate on.
weightOptional ¶
weight: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: no weight. co-location is assumed to be required (hard).
Indicates the co-location is optional (soft), with this weight score.
PodSchedulingContextSpecV1Alpha3 ¶
PodSchedulingContextSpec describes where resources for the Pod are needed.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodSchedulingContextSpecV1Alpha3(
potential_nodes: typing.List[str] = None,
selected_node: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
potential_nodes |
typing.List[str] |
PotentialNodes lists nodes where the Pod might be able to run. |
selected_node |
str |
SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use “WaitForFirstConsumer” allocation is to be attempted. |
potential_nodesOptional ¶
potential_nodes: typing.List[str]
- Type: typing.List[str]
PotentialNodes lists nodes where the Pod might be able to run.
The size of this field is limited to 128. This is large enough for many clusters. Larger clusters may need more attempts to find a node that suits all pending resources. This may get increased in the future, but not reduced.
selected_nodeOptional ¶
selected_node: str
- Type: str
SelectedNode is the node for which allocation of ResourceClaims that are referenced by the Pod and that use “WaitForFirstConsumer” allocation is to be attempted.
PodSchedulingGate ¶
PodSchedulingGate is associated to a Pod to guard its scheduling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodSchedulingGate(
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name of the scheduling gate. |
nameRequired ¶
name: str
- Type: str
Name of the scheduling gate.
Each scheduling gate must have a unique name field.
PodSchedulingSeparateOptions ¶
Options for PodScheduling.separate.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodSchedulingSeparateOptions(
topology: Topology = None,
weight: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
topology |
Topology |
Which topology to separate on. |
weight |
typing.Union[int, float] |
Indicates the separation is optional (soft), with this weight score. |
topologyOptional ¶
topology: Topology
- Type: Topology
- Default: Topology.HOSTNAME
Which topology to separate on.
weightOptional ¶
weight: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: no weight. separation is assumed to be required (hard).
Indicates the separation is optional (soft), with this weight score.
PodSecurityContext ¶
PodSecurityContext holds pod-level security attributes and common container settings.
Some fields are also present in container.securityContext. Field values of container.securityContext take precedence over field values of PodSecurityContext.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodSecurityContext(
app_armor_profile: AppArmorProfile = None,
fs_group: typing.Union[int, float] = None,
fs_group_change_policy: str = None,
run_as_group: typing.Union[int, float] = None,
run_as_non_root: bool = None,
run_as_user: typing.Union[int, float] = None,
seccomp_profile: SeccompProfile = None,
se_linux_options: SeLinuxOptions = None,
supplemental_groups: typing.List[typing.Union[int, float]] = None,
supplemental_groups_policy: str = None,
sysctls: typing.List[Sysctl] = None,
windows_options: WindowsSecurityContextOptions = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
app_armor_profile |
cdk8s_plus_31.k8s.AppArmorProfile |
appArmorProfile is the AppArmor options to use by the containers in this pod. |
fs_group |
typing.Union[int, float] |
A special supplemental group that applies to all containers in a pod. |
fs_group_change_policy |
str |
fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod. |
run_as_group |
typing.Union[int, float] |
The GID to run the entrypoint of the container process. |
run_as_non_root |
bool |
Indicates that the container must run as a non-root user. |
run_as_user |
typing.Union[int, float] |
The UID to run the entrypoint of the container process. |
seccomp_profile |
cdk8s_plus_31.k8s.SeccompProfile |
The seccomp options to use by the containers in this pod. |
se_linux_options |
cdk8s_plus_31.k8s.SeLinuxOptions |
The SELinux context to be applied to all containers. |
supplemental_groups |
typing.List[typing.Union[int, float]] |
A list of groups applied to the first process run in each container, in addition to the container’s primary GID and fsGroup (if specified). |
supplemental_groups_policy |
str |
Defines how supplemental groups of the first container processes are calculated. |
sysctls |
typing.List[cdk8s_plus_31.k8s.Sysctl] |
Sysctls hold a list of namespaced sysctls used for the pod. |
windows_options |
cdk8s_plus_31.k8s.WindowsSecurityContextOptions |
The Windows specific settings applied to all containers. |
app_armor_profileOptional ¶
app_armor_profile: AppArmorProfile
- Type: cdk8s_plus_31.k8s.AppArmorProfile
appArmorProfile is the AppArmor options to use by the containers in this pod.
Note that this field cannot be set when spec.os.name is windows.
fs_groupOptional ¶
fs_group: typing.Union[int, float]
- Type: typing.Union[int, float]
A special supplemental group that applies to all containers in a pod.
Some volume types allow the Kubelet to change the ownership of that volume to be owned by the pod:
- The owning GID will be the FSGroup 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR’d with rw-rw----
If unset, the Kubelet will not modify the ownership and permissions of any volume. Note that this field cannot be set when spec.os.name is windows.
fs_group_change_policyOptional ¶
fs_group_change_policy: str
- Type: str
fsGroupChangePolicy defines behavior of changing ownership and permission of the volume before being exposed inside Pod.
This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are “OnRootMismatch” and “Always”. If not specified, “Always” is used. Note that this field cannot be set when spec.os.name is windows.
run_as_groupOptional ¶
run_as_group: typing.Union[int, float]
- Type: typing.Union[int, float]
The GID to run the entrypoint of the container process.
Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
run_as_non_rootOptional ¶
run_as_non_root: bool
- Type: bool
Indicates that the container must run as a non-root user.
If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
run_as_userOptional ¶
run_as_user: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
The UID to run the entrypoint of the container process.
Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
seccomp_profileOptional ¶
seccomp_profile: SeccompProfile
- Type: cdk8s_plus_31.k8s.SeccompProfile
The seccomp options to use by the containers in this pod.
Note that this field cannot be set when spec.os.name is windows.
se_linux_optionsOptional ¶
se_linux_options: SeLinuxOptions
- Type: cdk8s_plus_31.k8s.SeLinuxOptions
The SELinux context to be applied to all containers.
If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. Note that this field cannot be set when spec.os.name is windows.
supplemental_groupsOptional ¶
supplemental_groups: typing.List[typing.Union[int, float]]
- Type: typing.List[typing.Union[int, float]]
A list of groups applied to the first process run in each container, in addition to the container’s primary GID and fsGroup (if specified).
If the SupplementalGroupsPolicy feature is enabled, the supplementalGroupsPolicy field determines whether these are in addition to or instead of any group memberships defined in the container image. If unspecified, no additional groups are added, though group memberships defined in the container image may still be used, depending on the supplementalGroupsPolicy field. Note that this field cannot be set when spec.os.name is windows.
supplemental_groups_policyOptional ¶
supplemental_groups_policy: str
- Type: str
Defines how supplemental groups of the first container processes are calculated.
Valid values are “Merge” and “Strict”. If not specified, “Merge” is used. (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled and the container runtime must implement support for this feature. Note that this field cannot be set when spec.os.name is windows.
sysctlsOptional ¶
sysctls: typing.List[Sysctl]
- Type: typing.List[cdk8s_plus_31.k8s.Sysctl]
Sysctls hold a list of namespaced sysctls used for the pod.
Pods with unsupported sysctls (by the container runtime) might fail to launch. Note that this field cannot be set when spec.os.name is windows.
windows_optionsOptional ¶
windows_options: WindowsSecurityContextOptions
- Type: cdk8s_plus_31.k8s.WindowsSecurityContextOptions
The Windows specific settings applied to all containers.
If unspecified, the options within a container’s SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
PodSecurityContextProps ¶
Properties for PodSecurityContext.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodSecurityContextProps(
ensure_non_root: bool = None,
fs_group: typing.Union[int, float] = None,
fs_group_change_policy: FsGroupChangePolicy = None,
group: typing.Union[int, float] = None,
sysctls: typing.List[Sysctl] = None,
user: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ensure_non_root |
bool |
Indicates that the container must run as a non-root user. |
fs_group |
typing.Union[int, float] |
Modify the ownership and permissions of pod volumes to this GID. |
fs_group_change_policy |
FsGroupChangePolicy |
Defines behavior of changing ownership and permission of the volume before being exposed inside Pod. |
group |
typing.Union[int, float] |
The GID to run the entrypoint of the container process. |
sysctls |
typing.List[Sysctl] |
Sysctls hold a list of namespaced sysctls used for the pod. |
user |
typing.Union[int, float] |
The UID to run the entrypoint of the container process. |
ensure_non_rootOptional ¶
ensure_non_root: bool
- Type: bool
- Default: true
Indicates that the container must run as a non-root user.
If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does.
fs_groupOptional ¶
fs_group: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: Volume ownership is not changed.
Modify the ownership and permissions of pod volumes to this GID.
fs_group_change_policyOptional ¶
fs_group_change_policy: FsGroupChangePolicy
- Type: FsGroupChangePolicy
- Default: FsGroupChangePolicy.ALWAYS
Defines behavior of changing ownership and permission of the volume before being exposed inside Pod.
This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir.
groupOptional ¶
group: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: Group configured by container runtime
The GID to run the entrypoint of the container process.
sysctlsOptional ¶
sysctls: typing.List[Sysctl]
- Type: typing.List[Sysctl]
- Default: No sysctls
Sysctls hold a list of namespaced sysctls used for the pod.
Pods with unsupported sysctls (by the container runtime) might fail to launch.
userOptional ¶
user: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: User specified in image metadata
The UID to run the entrypoint of the container process.
PodSelectorConfig ¶
Configuration for selecting pods, optionally in particular namespaces.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodSelectorConfig(
label_selector: LabelSelector,
namespaces: NamespaceSelectorConfig = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
label_selector |
LabelSelector |
A selector to select pods by labels. |
namespaces |
NamespaceSelectorConfig |
Configuration for selecting which namepsaces are the pods allowed to be in. |
label_selectorRequired ¶
label_selector: LabelSelector
- Type: LabelSelector
A selector to select pods by labels.
namespacesOptional ¶
namespaces: NamespaceSelectorConfig
- Type: NamespaceSelectorConfig
Configuration for selecting which namepsaces are the pods allowed to be in.
PodsMetricSourceV2 ¶
PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second).
The values will be averaged together before being compared to the target value.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodsMetricSourceV2(
metric: MetricIdentifierV2,
target: MetricTargetV2
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metric |
cdk8s_plus_31.k8s.MetricIdentifierV2 |
metric identifies the target metric by name and selector. |
target |
cdk8s_plus_31.k8s.MetricTargetV2 |
target specifies the target value for the given metric. |
metricRequired ¶
metric: MetricIdentifierV2
- Type: cdk8s_plus_31.k8s.MetricIdentifierV2
metric identifies the target metric by name and selector.
targetRequired ¶
target: MetricTargetV2
- Type: cdk8s_plus_31.k8s.MetricTargetV2
target specifies the target value for the given metric.
PodSpec ¶
PodSpec is a description of a pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodSpec(
containers: typing.List[Container],
active_deadline_seconds: typing.Union[int, float] = None,
affinity: Affinity = None,
automount_service_account_token: bool = None,
dns_config: PodDnsConfig = None,
dns_policy: str = None,
enable_service_links: bool = None,
ephemeral_containers: typing.List[EphemeralContainer] = None,
host_aliases: typing.List[HostAlias] = None,
host_ipc: bool = None,
hostname: str = None,
host_network: bool = None,
host_pid: bool = None,
host_users: bool = None,
image_pull_secrets: typing.List[LocalObjectReference] = None,
init_containers: typing.List[Container] = None,
node_name: str = None,
node_selector: typing.Mapping[str] = None,
os: PodOs = None,
overhead: typing.Mapping[Quantity] = None,
preemption_policy: str = None,
priority: typing.Union[int, float] = None,
priority_class_name: str = None,
readiness_gates: typing.List[PodReadinessGate] = None,
resource_claims: typing.List[PodResourceClaim] = None,
restart_policy: str = None,
runtime_class_name: str = None,
scheduler_name: str = None,
scheduling_gates: typing.List[PodSchedulingGate] = None,
security_context: PodSecurityContext = None,
service_account: str = None,
service_account_name: str = None,
set_hostname_as_fqdn: bool = None,
share_process_namespace: bool = None,
subdomain: str = None,
termination_grace_period_seconds: typing.Union[int, float] = None,
tolerations: typing.List[Toleration] = None,
topology_spread_constraints: typing.List[TopologySpreadConstraint] = None,
volumes: typing.List[Volume] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
containers |
typing.List[cdk8s_plus_31.k8s.Container] |
List of containers belonging to the pod. |
active_deadline_seconds |
typing.Union[int, float] |
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. |
affinity |
cdk8s_plus_31.k8s.Affinity |
If specified, the pod’s scheduling constraints. |
automount_service_account_token |
bool |
AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. |
dns_config |
cdk8s_plus_31.k8s.PodDnsConfig |
Specifies the DNS parameters of a pod. |
dns_policy |
str |
Set DNS policy for the pod. |
enable_service_links |
bool |
EnableServiceLinks indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
ephemeral_containers |
typing.List[cdk8s_plus_31.k8s.EphemeralContainer] |
List of ephemeral containers run in this pod. |
host_aliases |
typing.List[cdk8s_plus_31.k8s.HostAlias] |
HostAliases is an optional list of hosts and IPs that will be injected into the pod’s hosts file if specified. |
host_ipc |
bool |
Use the host’s ipc namespace. |
hostname |
str |
Specifies the hostname of the Pod If not specified, the pod’s hostname will be set to a system-defined value. |
host_network |
bool |
Host networking requested for this pod. |
host_pid |
bool |
Use the host’s pid namespace. |
host_users |
bool |
Use the host’s user namespace. |
image_pull_secrets |
typing.List[cdk8s_plus_31.k8s.LocalObjectReference] |
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. |
init_containers |
typing.List[cdk8s_plus_31.k8s.Container] |
List of initialization containers belonging to the pod. |
node_name |
str |
NodeName indicates in which node this pod is scheduled. |
node_selector |
typing.Mapping[str] |
NodeSelector is a selector which must be true for the pod to fit on a node. |
os |
cdk8s_plus_31.k8s.PodOs |
Specifies the OS of the containers in the pod. |
overhead |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. |
preemption_policy |
str |
PreemptionPolicy is the Policy for preempting pods with lower priority. |
priority |
typing.Union[int, float] |
The priority value. |
priority_class_name |
str |
If specified, indicates the pod’s priority. |
readiness_gates |
typing.List[cdk8s_plus_31.k8s.PodReadinessGate] |
If specified, all readiness gates will be evaluated for pod readiness. |
resource_claims |
typing.List[cdk8s_plus_31.k8s.PodResourceClaim] |
ResourceClaims defines which ResourceClaims must be allocated and reserved before the Pod is allowed to start. |
restart_policy |
str |
Restart policy for all containers within the pod. |
runtime_class_name |
str |
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. |
scheduler_name |
str |
If specified, the pod will be dispatched by specified scheduler. |
scheduling_gates |
typing.List[cdk8s_plus_31.k8s.PodSchedulingGate] |
SchedulingGates is an opaque list of values that if specified will block scheduling the pod. |
security_context |
cdk8s_plus_31.k8s.PodSecurityContext |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
str |
DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. |
service_account_name |
str |
ServiceAccountName is the name of the ServiceAccount to use to run this pod. |
set_hostname_as_fqdn |
bool |
If true the pod’s hostname will be configured as the pod’s FQDN, rather than the leaf name (the default). |
share_process_namespace |
bool |
Share a single process namespace between all of the containers in a pod. |
subdomain |
str |
If specified, the fully qualified Pod hostname will be “ |
termination_grace_period_seconds |
typing.Union[int, float] |
Optional duration in seconds the pod needs to terminate gracefully. |
tolerations |
typing.List[cdk8s_plus_31.k8s.Toleration] |
If specified, the pod’s tolerations. |
topology_spread_constraints |
typing.List[cdk8s_plus_31.k8s.TopologySpreadConstraint] |
TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. |
volumes |
typing.List[cdk8s_plus_31.k8s.Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[cdk8s_plus_31.k8s.Container]
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.
active_deadline_secondsOptional ¶
active_deadline_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
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.
affinityOptional ¶
affinity: Affinity
- Type: cdk8s_plus_31.k8s.Affinity
If specified, the pod’s scheduling constraints.
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
AutomountServiceAccountToken indicates whether a service account token should be automatically mounted.
dns_configOptional ¶
dns_config: PodDnsConfig
- Type: cdk8s_plus_31.k8s.PodDnsConfig
Specifies the DNS parameters of a pod.
Parameters specified here will be merged to the generated DNS configuration based on DNSPolicy.
dns_policyOptional ¶
dns_policy: str
- Type: str
- Default: 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’.
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’.
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
- Default: true.
EnableServiceLinks indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
Optional: Defaults to true.
ephemeral_containersOptional ¶
ephemeral_containers: typing.List[EphemeralContainer]
- Type: typing.List[cdk8s_plus_31.k8s.EphemeralContainer]
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.
host_aliasesOptional ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[cdk8s_plus_31.k8s.HostAlias]
HostAliases is an optional list of hosts and IPs that will be injected into the pod’s hosts file if specified.
host_ipcOptional ¶
host_ipc: bool
- Type: bool
- Default: false.
Use the host’s ipc namespace.
Optional: Default to false.
hostnameOptional ¶
hostname: str
- Type: str
Specifies the hostname of the Pod If not specified, the pod’s hostname will be set to a system-defined value.
host_networkOptional ¶
host_network: bool
- Type: bool
- Default: false.
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.
host_pidOptional ¶
host_pid: bool
- Type: bool
- Default: false.
Use the host’s pid namespace.
Optional: Default to false.
host_usersOptional ¶
host_users: bool
- Type: bool
- Default: 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.
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.
image_pull_secretsOptional ¶
image_pull_secrets: typing.List[LocalObjectReference]
- Type: typing.List[cdk8s_plus_31.k8s.LocalObjectReference]
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
init_containersOptional ¶
init_containers: typing.List[Container]
- Type: typing.List[cdk8s_plus_31.k8s.Container]
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/
node_nameOptional ¶
node_name: str
- Type: str
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
node_selectorOptional ¶
node_selector: typing.Mapping[str]
- Type: typing.Mapping[str]
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/
osOptional ¶
os: PodOs
- Type: cdk8s_plus_31.k8s.PodOs
Specifies the OS of the containers in the pod.
Some pod and container fields are restricted if this is set.
If the OS field is set to linux, the following fields must be unset: -securityContext.windowsOptions
If the OS field is set to windows, following fields must be unset: - spec.hostPID - spec.hostIPC - spec.hostUsers - spec.securityContext.appArmorProfile - spec.securityContext.seLinuxOptions - spec.securityContext.seccompProfile - spec.securityContext.fsGroup - spec.securityContext.fsGroupChangePolicy - spec.securityContext.sysctls - spec.shareProcessNamespace - spec.securityContext.runAsUser - spec.securityContext.runAsGroup - spec.securityContext.supplementalGroups - spec.securityContext.supplementalGroupsPolicy - spec.containers[].securityContext.appArmorProfile - spec.containers[].securityContext.seLinuxOptions - spec.containers[].securityContext.seccompProfile - spec.containers[].securityContext.capabilities - spec.containers[].securityContext.readOnlyRootFilesystem - spec.containers[].securityContext.privileged - spec.containers[].securityContext.allowPrivilegeEscalation - spec.containers[].securityContext.procMount - spec.containers[].securityContext.runAsUser - spec.containers[].securityContext.runAsGroup
overheadOptional ¶
overhead: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
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
preemption_policyOptional ¶
preemption_policy: str
- Type: str
- Default: PreemptLowerPriority if unset.
PreemptionPolicy is the Policy for preempting pods with lower priority.
One of Never, PreemptLowerPriority. Defaults to PreemptLowerPriority if unset.
priorityOptional ¶
priority: typing.Union[int, float]
- Type: typing.Union[int, float]
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_class_nameOptional ¶
priority_class_name: str
- Type: str
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.
readiness_gatesOptional ¶
readiness_gates: typing.List[PodReadinessGate]
- Type: typing.List[cdk8s_plus_31.k8s.PodReadinessGate]
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
resource_claimsOptional ¶
resource_claims: typing.List[PodResourceClaim]
- Type: typing.List[cdk8s_plus_31.k8s.PodResourceClaim]
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.
restart_policyOptional ¶
restart_policy: str
- Type: str
- Default: Always. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
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
runtime_class_nameOptional ¶
runtime_class_name: str
- Type: str
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.
scheduler_nameOptional ¶
scheduler_name: str
- Type: str
If specified, the pod will be dispatched by specified scheduler.
If not specified, the pod will be dispatched by default scheduler.
scheduling_gatesOptional ¶
scheduling_gates: typing.List[PodSchedulingGate]
- Type: typing.List[cdk8s_plus_31.k8s.PodSchedulingGate]
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.
security_contextOptional ¶
security_context: PodSecurityContext
- Type: cdk8s_plus_31.k8s.PodSecurityContext
- Default: empty. See type description for default values of each field.
SecurityContext holds pod-level security attributes and common container settings.
Optional: Defaults to empty. See type description for default values of each field.
service_accountOptional ¶
service_account: str
- Type: str
DeprecatedServiceAccount is a deprecated alias for ServiceAccountName.
Deprecated: Use serviceAccountName instead.
service_account_nameOptional ¶
service_account_name: str
- Type: str
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/
set_hostname_as_fqdnOptional ¶
set_hostname_as_fqdn: bool
- Type: bool
- Default: false.
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.
share_process_namespaceOptional ¶
share_process_namespace: bool
- Type: bool
- Default: false.
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.
subdomainOptional ¶
subdomain: str
- Type: str
If specified, the fully qualified Pod hostname will be “
termination_grace_period_secondsOptional ¶
termination_grace_period_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 30 seconds.
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.
tolerationsOptional ¶
tolerations: typing.List[Toleration]
- Type: typing.List[cdk8s_plus_31.k8s.Toleration]
If specified, the pod’s tolerations.
topology_spread_constraintsOptional ¶
topology_spread_constraints: typing.List[TopologySpreadConstraint]
- Type: typing.List[cdk8s_plus_31.k8s.TopologySpreadConstraint]
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.
volumesOptional ¶
volumes: typing.List[Volume]
- Type: typing.List[cdk8s_plus_31.k8s.Volume]
List of volumes that can be mounted by containers belonging to the pod.
More info: https://kubernetes.io/docs/concepts/storage/volumes
PodsSelectOptions ¶
Options for Pods.select.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.PodsSelectOptions(
expressions: typing.List[LabelExpression] = None,
labels: typing.Mapping[str] = None,
namespaces: Namespaces = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expressions |
typing.List[LabelExpression] |
Expressions the pods must satisify. |
labels |
typing.Mapping[str] |
Labels the pods must have. |
namespaces |
Namespaces |
Namespaces the pods are allowed to be in. |
expressionsOptional ¶
expressions: typing.List[LabelExpression]
- Type: typing.List[LabelExpression]
- Default: no expressions requirements.
Expressions the pods must satisify.
labelsOptional ¶
labels: typing.Mapping[str]
- Type: typing.Mapping[str]
- Default: no strict labels requirements.
Labels the pods must have.
namespacesOptional ¶
namespaces: Namespaces
- Type: Namespaces
- Default: unset, implies the namespace of the resource this selection is used in.
Namespaces the pods are allowed to be in.
Use Namespaces.all() to allow all namespaces.
PodTemplateSpec ¶
PodTemplateSpec describes the data a pod should have when created from a template.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PodTemplateSpec(
metadata: ObjectMeta = None,
spec: PodSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_31.k8s.PodSpec |
Specification of the desired behavior of the pod. |
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
Standard object’s metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
spec: PodSpec
- Type: cdk8s_plus_31.k8s.PodSpec
Specification of the desired behavior of the pod.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
PolicyRule ¶
PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PolicyRule(
verbs: typing.List[str],
api_groups: typing.List[str] = None,
non_resource_ur_ls: typing.List[str] = None,
resource_names: typing.List[str] = None,
resources: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
verbs |
typing.List[str] |
Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule. |
api_groups |
typing.List[str] |
APIGroups is the name of the APIGroup that contains the resources. |
non_resource_ur_ls |
typing.List[str] |
NonResourceURLs is a set of partial urls that a user should have access to. |
resource_names |
typing.List[str] |
ResourceNames is an optional white list of names that the rule applies to. |
resources |
typing.List[str] |
Resources is a list of resources this rule applies to. |
verbsRequired ¶
verbs: typing.List[str]
- Type: typing.List[str]
Verbs is a list of Verbs that apply to ALL the ResourceKinds contained in this rule.
’*’ represents all verbs.
api_groupsOptional ¶
api_groups: typing.List[str]
- Type: typing.List[str]
APIGroups is the name of the APIGroup that contains the resources.
If multiple API groups are specified, any action requested against one of the enumerated resources in any API group will be allowed. “” represents the core API group and “*” represents all API groups.
non_resource_ur_lsOptional ¶
non_resource_ur_ls: typing.List[str]
- Type: typing.List[str]
NonResourceURLs is a set of partial urls that a user should have access to.
*s are allowed, but only as the full, final step in the path Since non-resource URLs are not namespaced, this field is only applicable for ClusterRoles referenced from a ClusterRoleBinding. Rules can either apply to API resources (such as “pods” or “secrets”) or non-resource URL paths (such as “/api”), but not both.
resource_namesOptional ¶
resource_names: typing.List[str]
- Type: typing.List[str]
ResourceNames is an optional white list of names that the rule applies to.
An empty set means that everything is allowed.
resourcesOptional ¶
resources: typing.List[str]
- Type: typing.List[str]
Resources is a list of resources this rule applies to.
’*’ represents all resources.
PolicyRulesWithSubjects ¶
PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver.
The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PolicyRulesWithSubjects(
subjects: typing.List[Subject],
non_resource_rules: typing.List[NonResourcePolicyRule] = None,
resource_rules: typing.List[ResourcePolicyRule] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
subjects |
typing.List[cdk8s_plus_31.k8s.Subject] |
subjects is the list of normal user, serviceaccount, or group that this rule cares about. |
non_resource_rules |
typing.List[cdk8s_plus_31.k8s.NonResourcePolicyRule] |
nonResourceRules is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL. |
resource_rules |
typing.List[cdk8s_plus_31.k8s.ResourcePolicyRule] |
resourceRules is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. |
subjectsRequired ¶
subjects: typing.List[Subject]
- Type: typing.List[cdk8s_plus_31.k8s.Subject]
subjects is the list of normal user, serviceaccount, or group that this rule cares about.
There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.
non_resource_rulesOptional ¶
non_resource_rules: typing.List[NonResourcePolicyRule]
- Type: typing.List[cdk8s_plus_31.k8s.NonResourcePolicyRule]
nonResourceRules is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.
resource_rulesOptional ¶
resource_rules: typing.List[ResourcePolicyRule]
- Type: typing.List[cdk8s_plus_31.k8s.ResourcePolicyRule]
resourceRules is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource.
At least one of resourceRules and nonResourceRules has to be non-empty.
PolicyRulesWithSubjectsV1Beta3 ¶
PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver.
The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PolicyRulesWithSubjectsV1Beta3(
subjects: typing.List[SubjectV1Beta3],
non_resource_rules: typing.List[NonResourcePolicyRuleV1Beta3] = None,
resource_rules: typing.List[ResourcePolicyRuleV1Beta3] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
subjects |
typing.List[cdk8s_plus_31.k8s.SubjectV1Beta3] |
subjects is the list of normal user, serviceaccount, or group that this rule cares about. |
non_resource_rules |
typing.List[cdk8s_plus_31.k8s.NonResourcePolicyRuleV1Beta3] |
nonResourceRules is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL. |
resource_rules |
typing.List[cdk8s_plus_31.k8s.ResourcePolicyRuleV1Beta3] |
resourceRules is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. |
subjectsRequired ¶
subjects: typing.List[SubjectV1Beta3]
- Type: typing.List[cdk8s_plus_31.k8s.SubjectV1Beta3]
subjects is the list of normal user, serviceaccount, or group that this rule cares about.
There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required.
non_resource_rulesOptional ¶
non_resource_rules: typing.List[NonResourcePolicyRuleV1Beta3]
- Type: typing.List[cdk8s_plus_31.k8s.NonResourcePolicyRuleV1Beta3]
nonResourceRules is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL.
resource_rulesOptional ¶
resource_rules: typing.List[ResourcePolicyRuleV1Beta3]
- Type: typing.List[cdk8s_plus_31.k8s.ResourcePolicyRuleV1Beta3]
resourceRules is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource.
At least one of resourceRules and nonResourceRules has to be non-empty.
PortworxVolumeSource ¶
PortworxVolumeSource represents a Portworx volume resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PortworxVolumeSource(
volume_id: str,
fs_type: str = None,
read_only: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
volume_id |
str |
volumeID uniquely identifies a Portworx volume. |
fs_type |
str |
fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. |
read_only |
bool |
readOnly defaults to false (read/write). |
volume_idRequired ¶
volume_id: str
- Type: str
volumeID uniquely identifies a Portworx volume.
fs_typeOptional ¶
fs_type: str
- Type: str
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.
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
Preconditions ¶
Preconditions must be fulfilled before an operation (update, delete, etc.) is carried out.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Preconditions(
resource_version: str = None,
uid: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
resource_version |
str |
Specifies the target ResourceVersion. |
uid |
str |
Specifies the target UID. |
resource_versionOptional ¶
resource_version: str
- Type: str
Specifies the target ResourceVersion.
uidOptional ¶
uid: str
- Type: str
Specifies the target UID.
PreferredSchedulingTerm ¶
An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it’s a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PreferredSchedulingTerm(
preference: NodeSelectorTerm,
weight: typing.Union[int, float]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
preference |
cdk8s_plus_31.k8s.NodeSelectorTerm |
A node selector term, associated with the corresponding weight. |
weight |
typing.Union[int, float] |
Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. |
preferenceRequired ¶
preference: NodeSelectorTerm
- Type: cdk8s_plus_31.k8s.NodeSelectorTerm
A node selector term, associated with the corresponding weight.
weightRequired ¶
weight: typing.Union[int, float]
- Type: typing.Union[int, float]
Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
PriorityLevelConfigurationReference ¶
PriorityLevelConfigurationReference contains information that points to the “request-priority” being used.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PriorityLevelConfigurationReference(
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of the priority level configuration being referenced Required. |
nameRequired ¶
name: str
- Type: str
name is the name of the priority level configuration being referenced Required.
PriorityLevelConfigurationReferenceV1Beta3 ¶
PriorityLevelConfigurationReference contains information that points to the “request-priority” being used.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PriorityLevelConfigurationReferenceV1Beta3(
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of the priority level configuration being referenced Required. |
nameRequired ¶
name: str
- Type: str
name is the name of the priority level configuration being referenced Required.
PriorityLevelConfigurationSpec ¶
PriorityLevelConfigurationSpec specifies the configuration of a priority level.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PriorityLevelConfigurationSpec(
type: str,
exempt: ExemptPriorityLevelConfiguration = None,
limited: LimitedPriorityLevelConfiguration = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type indicates whether this priority level is subject to limitation on request execution. |
exempt |
cdk8s_plus_31.k8s.ExemptPriorityLevelConfiguration |
exempt specifies how requests are handled for an exempt priority level. |
limited |
cdk8s_plus_31.k8s.LimitedPriorityLevelConfiguration |
limited specifies how requests are handled for a Limited priority level. |
typeRequired ¶
type: str
- Type: str
type indicates whether this priority level is subject to limitation on request execution.
A value of "Exempt" means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of "Limited" means that (a) requests of this priority level are subject to limits and (b) some of the server’s limited capacity is made available exclusively to this priority level. Required.
exemptOptional ¶
exempt: ExemptPriorityLevelConfiguration
- Type: cdk8s_plus_31.k8s.ExemptPriorityLevelConfiguration
exempt specifies how requests are handled for an exempt priority level.
This field MUST be empty if type is "Limited". This field MAY be non-empty if type is "Exempt". If empty and type is "Exempt" then the default values for ExemptPriorityLevelConfiguration apply.
limitedOptional ¶
limited: LimitedPriorityLevelConfiguration
- Type: cdk8s_plus_31.k8s.LimitedPriorityLevelConfiguration
limited specifies how requests are handled for a Limited priority level.
This field must be non-empty if and only if type is "Limited".
PriorityLevelConfigurationSpecV1Beta3 ¶
PriorityLevelConfigurationSpec specifies the configuration of a priority level.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.PriorityLevelConfigurationSpecV1Beta3(
type: str,
exempt: ExemptPriorityLevelConfigurationV1Beta3 = None,
limited: LimitedPriorityLevelConfigurationV1Beta3 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type indicates whether this priority level is subject to limitation on request execution. |
exempt |
cdk8s_plus_31.k8s.ExemptPriorityLevelConfigurationV1Beta3 |
exempt specifies how requests are handled for an exempt priority level. |
limited |
cdk8s_plus_31.k8s.LimitedPriorityLevelConfigurationV1Beta3 |
limited specifies how requests are handled for a Limited priority level. |
typeRequired ¶
type: str
- Type: str
type indicates whether this priority level is subject to limitation on request execution.
A value of "Exempt" means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of "Limited" means that (a) requests of this priority level are subject to limits and (b) some of the server’s limited capacity is made available exclusively to this priority level. Required.
exemptOptional ¶
exempt: ExemptPriorityLevelConfigurationV1Beta3
- Type: cdk8s_plus_31.k8s.ExemptPriorityLevelConfigurationV1Beta3
exempt specifies how requests are handled for an exempt priority level.
This field MUST be empty if type is "Limited". This field MAY be non-empty if type is "Exempt". If empty and type is "Exempt" then the default values for ExemptPriorityLevelConfiguration apply.
limitedOptional ¶
limited: LimitedPriorityLevelConfigurationV1Beta3
- Type: cdk8s_plus_31.k8s.LimitedPriorityLevelConfigurationV1Beta3
limited specifies how requests are handled for a Limited priority level.
This field must be non-empty if and only if type is "Limited".
Probe ¶
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Probe(
exec: ExecAction = None,
failure_threshold: typing.Union[int, float] = None,
grpc: GrpcAction = None,
http_get: HttpGetAction = None,
initial_delay_seconds: typing.Union[int, float] = None,
period_seconds: typing.Union[int, float] = None,
success_threshold: typing.Union[int, float] = None,
tcp_socket: TcpSocketAction = None,
termination_grace_period_seconds: typing.Union[int, float] = None,
timeout_seconds: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
exec |
cdk8s_plus_31.k8s.ExecAction |
Exec specifies the action to take. |
failure_threshold |
typing.Union[int, float] |
Minimum consecutive failures for the probe to be considered failed after having succeeded. |
grpc |
cdk8s_plus_31.k8s.GrpcAction |
GRPC specifies an action involving a GRPC port. |
http_get |
cdk8s_plus_31.k8s.HttpGetAction |
HTTPGet specifies the http request to perform. |
initial_delay_seconds |
typing.Union[int, float] |
Number of seconds after the container has started before liveness probes are initiated. |
period_seconds |
typing.Union[int, float] |
How often (in seconds) to perform the probe. |
success_threshold |
typing.Union[int, float] |
Minimum consecutive successes for the probe to be considered successful after having failed. |
tcp_socket |
cdk8s_plus_31.k8s.TcpSocketAction |
TCPSocket specifies an action involving a TCP port. |
termination_grace_period_seconds |
typing.Union[int, float] |
Optional duration in seconds the pod needs to terminate gracefully upon probe failure. |
timeout_seconds |
typing.Union[int, float] |
Number of seconds after which the probe times out. |
execOptional ¶
exec: ExecAction
- Type: cdk8s_plus_31.k8s.ExecAction
Exec specifies the action to take.
failure_thresholdOptional ¶
failure_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 3. Minimum value is 1.
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
grpcOptional ¶
grpc: GrpcAction
- Type: cdk8s_plus_31.k8s.GrpcAction
GRPC specifies an action involving a GRPC port.
http_getOptional ¶
http_get: HttpGetAction
- Type: cdk8s_plus_31.k8s.HttpGetAction
HTTPGet specifies the http request to perform.
initial_delay_secondsOptional ¶
initial_delay_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
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
period_secondsOptional ¶
period_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 10 seconds. Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
success_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1. Must be 1 for liveness and startup. Minimum value is 1.
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.
tcp_socketOptional ¶
tcp_socket: TcpSocketAction
- Type: cdk8s_plus_31.k8s.TcpSocketAction
TCPSocket specifies an action involving a TCP port.
termination_grace_period_secondsOptional ¶
termination_grace_period_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
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.
timeout_secondsOptional ¶
timeout_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1 second. Minimum value is 1. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
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
ProbeOptions ¶
Probe options.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ProbeOptions(
failure_threshold: typing.Union[int, float] = None,
initial_delay_seconds: Duration = None,
period_seconds: Duration = None,
success_threshold: typing.Union[int, float] = None,
timeout_seconds: Duration = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
failure_threshold |
typing.Union[int, float] |
Minimum consecutive failures for the probe to be considered failed after having succeeded. |
initial_delay_seconds |
cdk8s.Duration |
Number of seconds after the container has started before liveness probes are initiated. |
period_seconds |
cdk8s.Duration |
How often (in seconds) to perform the probe. |
success_threshold |
typing.Union[int, float] |
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. |
timeout_seconds |
cdk8s.Duration |
Number of seconds after which the probe times out. |
failure_thresholdOptional ¶
failure_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 3
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
initial_delay_secondsOptional ¶
initial_delay_seconds: Duration
- Type: cdk8s.Duration
- Default: immediate
Number of seconds after the container has started before liveness probes are initiated.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_secondsOptional ¶
period_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(10) Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
success_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1 Must be 1 for liveness and startup. Minimum value is 1.
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.
timeout_secondsOptional ¶
timeout_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(1)
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
ProjectedVolumeSource ¶
Represents a projected volume source.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ProjectedVolumeSource(
default_mode: typing.Union[int, float] = None,
sources: typing.List[VolumeProjection] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
default_mode |
typing.Union[int, float] |
defaultMode are the mode bits used to set permissions on created files by default. |
sources |
typing.List[cdk8s_plus_31.k8s.VolumeProjection] |
sources is the list of volume projections. |
default_modeOptional ¶
default_mode: typing.Union[int, float]
- Type: typing.Union[int, float]
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.
sourcesOptional ¶
sources: typing.List[VolumeProjection]
- Type: typing.List[cdk8s_plus_31.k8s.VolumeProjection]
sources is the list of volume projections.
Each entry in this list handles one source.
QueuingConfiguration ¶
QueuingConfiguration holds the configuration parameters for queuing.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.QueuingConfiguration(
hand_size: typing.Union[int, float] = None,
queue_length_limit: typing.Union[int, float] = None,
queues: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
hand_size |
typing.Union[int, float] |
handSize is a small positive number that configures the shuffle sharding of requests into queues. |
queue_length_limit |
typing.Union[int, float] |
queueLengthLimit is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; |
queues |
typing.Union[int, float] |
queues is the number of queues for this priority level. |
hand_sizeOptional ¶
hand_size: typing.Union[int, float]
- Type: typing.Union[int, float]
handSize is a small positive number that configures the shuffle sharding of requests into queues.
When enqueuing a request at this priority level the request’s flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. handSize must be no larger than queues, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.
queue_length_limitOptional ¶
queue_length_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
queueLengthLimit is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time;
excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.
queuesOptional ¶
queues: typing.Union[int, float]
- Type: typing.Union[int, float]
queues is the number of queues for this priority level.
The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.
QueuingConfigurationV1Beta3 ¶
QueuingConfiguration holds the configuration parameters for queuing.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.QueuingConfigurationV1Beta3(
hand_size: typing.Union[int, float] = None,
queue_length_limit: typing.Union[int, float] = None,
queues: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
hand_size |
typing.Union[int, float] |
handSize is a small positive number that configures the shuffle sharding of requests into queues. |
queue_length_limit |
typing.Union[int, float] |
queueLengthLimit is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; |
queues |
typing.Union[int, float] |
queues is the number of queues for this priority level. |
hand_sizeOptional ¶
hand_size: typing.Union[int, float]
- Type: typing.Union[int, float]
handSize is a small positive number that configures the shuffle sharding of requests into queues.
When enqueuing a request at this priority level the request’s flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. handSize must be no larger than queues, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8.
queue_length_limitOptional ¶
queue_length_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
queueLengthLimit is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time;
excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50.
queuesOptional ¶
queues: typing.Union[int, float]
- Type: typing.Union[int, float]
queues is the number of queues for this priority level.
The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64.
QuobyteVolumeSource ¶
Represents a Quobyte mount that lasts the lifetime of a pod.
Quobyte volumes do not support ownership management or SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.QuobyteVolumeSource(
registry: str,
volume: str,
group: str = None,
read_only: bool = None,
tenant: str = None,
user: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
registry |
str |
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. |
volume |
str |
volume is a string that references an already created Quobyte volume by name. |
group |
str |
group to map volume access to Default is no group. |
read_only |
bool |
readOnly here will force the Quobyte volume to be mounted with read-only permissions. |
tenant |
str |
tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin. |
user |
str |
user to map volume access to Defaults to serivceaccount user. |
registryRequired ¶
registry: str
- Type: str
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.
volumeRequired ¶
volume: str
- Type: str
volume is a string that references an already created Quobyte volume by name.
groupOptional ¶
group: str
- Type: str
- Default: no group
group to map volume access to Default is no group.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false.
readOnly here will force the Quobyte volume to be mounted with read-only permissions.
Defaults to false.
tenantOptional ¶
tenant: str
- Type: str
tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin.
userOptional ¶
user: str
- Type: str
- Default: serivceaccount user
user to map volume access to Defaults to serivceaccount user.
RbdPersistentVolumeSource ¶
Represents a Rados Block Device mount that lasts the lifetime of a pod.
RBD volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.RbdPersistentVolumeSource(
image: str,
monitors: typing.List[str],
fs_type: str = None,
keyring: str = None,
pool: str = None,
read_only: bool = None,
secret_ref: SecretReference = None,
user: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
image |
str |
image is the rados image name. |
monitors |
typing.List[str] |
monitors is a collection of Ceph monitors. |
fs_type |
str |
fsType is the filesystem type of the volume that you want to mount. |
keyring |
str |
keyring is the path to key ring for RBDUser. |
pool |
str |
pool is the rados pool name. |
read_only |
bool |
readOnly here will force the ReadOnly setting in VolumeMounts. |
secret_ref |
cdk8s_plus_31.k8s.SecretReference |
secretRef is name of the authentication secret for RBDUser. |
user |
str |
user is the rados user name. |
imageRequired ¶
image: str
- Type: str
image is the rados image name.
More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
monitorsRequired ¶
monitors: typing.List[str]
- Type: typing.List[str]
monitors is a collection of Ceph monitors.
More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
fs_typeOptional ¶
fs_type: str
- Type: str
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
keyringOptional ¶
keyring: str
- Type: str
- Default: etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
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
poolOptional ¶
pool: str
- Type: str
- Default: rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
pool is the rados pool name.
Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
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
secret_refOptional ¶
secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
- Default: nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
secretRef is name of the authentication secret for RBDUser.
If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
userOptional ¶
user: str
- Type: str
- Default: admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
user is the rados user name.
Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
RbdVolumeSource ¶
Represents a Rados Block Device mount that lasts the lifetime of a pod.
RBD volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.RbdVolumeSource(
image: str,
monitors: typing.List[str],
fs_type: str = None,
keyring: str = None,
pool: str = None,
read_only: bool = None,
secret_ref: LocalObjectReference = None,
user: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
image |
str |
image is the rados image name. |
monitors |
typing.List[str] |
monitors is a collection of Ceph monitors. |
fs_type |
str |
fsType is the filesystem type of the volume that you want to mount. |
keyring |
str |
keyring is the path to key ring for RBDUser. |
pool |
str |
pool is the rados pool name. |
read_only |
bool |
readOnly here will force the ReadOnly setting in VolumeMounts. |
secret_ref |
cdk8s_plus_31.k8s.LocalObjectReference |
secretRef is name of the authentication secret for RBDUser. |
user |
str |
user is the rados user name. |
imageRequired ¶
image: str
- Type: str
image is the rados image name.
More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
monitorsRequired ¶
monitors: typing.List[str]
- Type: typing.List[str]
monitors is a collection of Ceph monitors.
More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
fs_typeOptional ¶
fs_type: str
- Type: str
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
keyringOptional ¶
keyring: str
- Type: str
- Default: etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
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
poolOptional ¶
pool: str
- Type: str
- Default: rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
pool is the rados pool name.
Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
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
secret_refOptional ¶
secret_ref: LocalObjectReference
- Type: cdk8s_plus_31.k8s.LocalObjectReference
- Default: nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
secretRef is name of the authentication secret for RBDUser.
If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
userOptional ¶
user: str
- Type: str
- Default: admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
user is the rados user name.
Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it
ReplicaSetSpec ¶
ReplicaSetSpec is the specification of a ReplicaSet.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ReplicaSetSpec(
selector: LabelSelector,
min_ready_seconds: typing.Union[int, float] = None,
replicas: typing.Union[int, float] = None,
template: PodTemplateSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
selector |
cdk8s_plus_31.k8s.LabelSelector |
Selector is a label query over pods that should match the replica count. |
min_ready_seconds |
typing.Union[int, float] |
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
replicas |
typing.Union[int, float] |
Replicas is the number of desired replicas. |
template |
cdk8s_plus_31.k8s.PodTemplateSpec |
Template is the object that describes the pod that will be created if insufficient replicas are detected. |
selectorRequired ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
Selector is a label query over pods that should match the replica count.
Label keys and values that must match in order to be controlled by this replica set. It must match the pod template’s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
min_ready_secondsOptional ¶
min_ready_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 0 (pod will be considered available as soon as it is ready)
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
Defaults to 0 (pod will be considered available as soon as it is ready)
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
Replicas is the number of desired replicas.
This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/#what-is-a-replicationcontroller
templateOptional ¶
template: PodTemplateSpec
- Type: cdk8s_plus_31.k8s.PodTemplateSpec
Template is the object that describes the pod that will be created if insufficient replicas are detected.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
ReplicationControllerSpec ¶
ReplicationControllerSpec is the specification of a replication controller.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ReplicationControllerSpec(
min_ready_seconds: typing.Union[int, float] = None,
replicas: typing.Union[int, float] = None,
selector: typing.Mapping[str] = None,
template: PodTemplateSpec = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
min_ready_seconds |
typing.Union[int, float] |
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
replicas |
typing.Union[int, float] |
Replicas is the number of desired replicas. |
selector |
typing.Mapping[str] |
Selector is a label query over pods that should match the Replicas count. |
template |
cdk8s_plus_31.k8s.PodTemplateSpec |
Template is the object that describes the pod that will be created if insufficient replicas are detected. |
min_ready_secondsOptional ¶
min_ready_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 0 (pod will be considered available as soon as it is ready)
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
Defaults to 0 (pod will be considered available as soon as it is ready)
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
Replicas is the number of desired replicas.
This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#what-is-a-replicationcontroller
selectorOptional ¶
selector: typing.Mapping[str]
- Type: typing.Mapping[str]
Selector is a label query over pods that should match the Replicas count.
If Selector is empty, it is defaulted to the labels present on the Pod template. Label keys and values that must match in order to be controlled by this replication controller, if empty defaulted to labels on Pod template. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
templateOptional ¶
template: PodTemplateSpec
- Type: cdk8s_plus_31.k8s.PodTemplateSpec
Template is the object that describes the pod that will be created if insufficient replicas are detected.
This takes precedence over a TemplateRef. The only allowed template.spec.restartPolicy value is “Always”. More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller#pod-template
ResourceAttributes ¶
ResourceAttributes includes the authorization attributes available for resource requests to the Authorizer interface.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourceAttributes(
field_selector: FieldSelectorAttributes = None,
group: str = None,
label_selector: LabelSelectorAttributes = None,
name: str = None,
namespace: str = None,
resource: str = None,
subresource: str = None,
verb: str = None,
version: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
field_selector |
cdk8s_plus_31.k8s.FieldSelectorAttributes |
fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it. |
group |
str |
Group is the API Group of the Resource. |
label_selector |
cdk8s_plus_31.k8s.LabelSelectorAttributes |
labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it. |
name |
str |
Name is the name of the resource being requested for a “get” or deleted for a “delete”. |
namespace |
str |
Namespace is the namespace of the action being requested. |
resource |
str |
Resource is one of the existing resource types. |
subresource |
str |
Subresource is one of the existing resource types. |
verb |
str |
Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy. |
version |
str |
Version is the API Version of the Resource. |
field_selectorOptional ¶
field_selector: FieldSelectorAttributes
- Type: cdk8s_plus_31.k8s.FieldSelectorAttributes
fieldSelector describes the limitation on access based on field. It can only limit access, not broaden it.
This field is alpha-level. To use this field, you must enable the AuthorizeWithSelectors feature gate (disabled by default).
groupOptional ¶
group: str
- Type: str
Group is the API Group of the Resource.
”*” means all.
label_selectorOptional ¶
label_selector: LabelSelectorAttributes
- Type: cdk8s_plus_31.k8s.LabelSelectorAttributes
labelSelector describes the limitation on access based on labels. It can only limit access, not broaden it.
This field is alpha-level. To use this field, you must enable the AuthorizeWithSelectors feature gate (disabled by default).
nameOptional ¶
name: str
- Type: str
Name is the name of the resource being requested for a “get” or deleted for a “delete”.
”” (empty) means all.
namespaceOptional ¶
namespace: str
- Type: str
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
resourceOptional ¶
resource: str
- Type: str
Resource is one of the existing resource types.
”*” means all.
subresourceOptional ¶
subresource: str
- Type: str
Subresource is one of the existing resource types.
”” means none.
verbOptional ¶
verb: str
- Type: str
Verb is a kubernetes resource API verb, like: get, list, watch, create, update, delete, proxy.
”*” means all.
versionOptional ¶
version: str
- Type: str
Version is the API Version of the Resource.
”*” means all.
ResourceClaim ¶
ResourceClaim references one entry in PodSpec.ResourceClaims.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourceClaim(
name: str,
request: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
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. |
request |
str |
Request is the name chosen for a request in the referenced claim. |
nameRequired ¶
name: str
- Type: str
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.
requestOptional ¶
request: str
- Type: str
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.
ResourceClaimSpecV1Alpha3 ¶
ResourceClaimSpec defines what is being requested in a ResourceClaim and how to configure it.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourceClaimSpecV1Alpha3(
controller: str = None,
devices: DeviceClaimV1Alpha3 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
controller |
str |
Controller is the name of the DRA driver that is meant to handle allocation of this claim. |
devices |
cdk8s_plus_31.k8s.DeviceClaimV1Alpha3 |
Devices defines how to request devices. |
controllerOptional ¶
controller: str
- Type: str
Controller is the name of the DRA driver that is meant to handle allocation of this claim.
If empty, allocation is handled by the scheduler while scheduling a pod.
Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
This is an alpha field and requires enabling the DRAControlPlaneController feature gate.
devicesOptional ¶
devices: DeviceClaimV1Alpha3
- Type: cdk8s_plus_31.k8s.DeviceClaimV1Alpha3
Devices defines how to request devices.
ResourceClaimTemplateSpecV1Alpha3 ¶
ResourceClaimTemplateSpec contains the metadata and fields for a ResourceClaim.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourceClaimTemplateSpecV1Alpha3(
spec: ResourceClaimSpecV1Alpha3,
metadata: ObjectMeta = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
spec |
cdk8s_plus_31.k8s.ResourceClaimSpecV1Alpha3 |
Spec for the ResourceClaim. |
metadata |
cdk8s_plus_31.k8s.ObjectMeta |
ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it. |
specRequired ¶
spec: ResourceClaimSpecV1Alpha3
- Type: cdk8s_plus_31.k8s.ResourceClaimSpecV1Alpha3
Spec for the ResourceClaim.
The entire content is copied unchanged into the ResourceClaim that gets created from this template. The same fields as in a ResourceClaim are also valid here.
metadataOptional ¶
metadata: ObjectMeta
- Type: cdk8s_plus_31.k8s.ObjectMeta
ObjectMeta may contain labels and annotations that will be copied into the PVC when creating it.
No other fields are allowed and will be rejected during validation.
ResourceFieldSelector ¶
ResourceFieldSelector represents container resources (cpu, memory) and their output format.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourceFieldSelector(
resource: str,
container_name: str = None,
divisor: Quantity = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
resource |
str |
Required: resource to select. |
container_name |
str |
Container name: required for volumes, optional for env vars. |
divisor |
cdk8s_plus_31.k8s.Quantity |
Specifies the output format of the exposed resources, defaults to “1”. |
resourceRequired ¶
resource: str
- Type: str
Required: resource to select.
container_nameOptional ¶
container_name: str
- Type: str
Container name: required for volumes, optional for env vars.
divisorOptional ¶
divisor: Quantity
- Type: cdk8s_plus_31.k8s.Quantity
Specifies the output format of the exposed resources, defaults to “1”.
ResourceMetricSourceV2 ¶
ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source. Only one “target” type should be set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourceMetricSourceV2(
name: str,
target: MetricTargetV2
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of the resource in question. |
target |
cdk8s_plus_31.k8s.MetricTargetV2 |
target specifies the target value for the given metric. |
nameRequired ¶
name: str
- Type: str
name is the name of the resource in question.
targetRequired ¶
target: MetricTargetV2
- Type: cdk8s_plus_31.k8s.MetricTargetV2
target specifies the target value for the given metric.
ResourcePolicyRule ¶
ResourcePolicyRule is a predicate that matches some resource requests, testing the request’s verb and the target resource.
A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., Namespace=="") and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request’s namespace.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourcePolicyRule(
api_groups: typing.List[str],
resources: typing.List[str],
verbs: typing.List[str],
cluster_scope: bool = None,
namespaces: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_groups |
typing.List[str] |
apiGroups is a list of matching API groups and may not be empty. |
resources |
typing.List[str] |
resources is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ “services”, “nodes/status” ]. This list may not be empty. “*” matches all resources and, if present, must be the only entry. Required. |
verbs |
typing.List[str] |
verbs is a list of matching verbs and may not be empty. |
cluster_scope |
bool |
clusterScope indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). |
namespaces |
typing.List[str] |
namespaces is a list of target namespaces that restricts matches. |
api_groupsRequired ¶
api_groups: typing.List[str]
- Type: typing.List[str]
apiGroups is a list of matching API groups and may not be empty.
”*” matches all API groups and, if present, must be the only entry. Required.
resourcesRequired ¶
resources: typing.List[str]
- Type: typing.List[str]
resources is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ “services”, “nodes/status” ]. This list may not be empty. “*” matches all resources and, if present, must be the only entry. Required.
verbsRequired ¶
verbs: typing.List[str]
- Type: typing.List[str]
verbs is a list of matching verbs and may not be empty.
”*” matches all verbs and, if present, must be the only entry. Required.
cluster_scopeOptional ¶
cluster_scope: bool
- Type: bool
clusterScope indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces).
If this field is omitted or false then the namespaces field must contain a non-empty list.
namespacesOptional ¶
namespaces: typing.List[str]
- Type: typing.List[str]
namespaces is a list of target namespaces that restricts matches.
A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains “”. Note that “” matches any specified namespace but does not match a request that does not specify a namespace (see the clusterScope field for that). This list may be empty, but only if clusterScope is true.
ResourcePolicyRuleV1Beta3 ¶
ResourcePolicyRule is a predicate that matches some resource requests, testing the request’s verb and the target resource.
A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., Namespace=="") and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request’s namespace.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourcePolicyRuleV1Beta3(
api_groups: typing.List[str],
resources: typing.List[str],
verbs: typing.List[str],
cluster_scope: bool = None,
namespaces: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_groups |
typing.List[str] |
apiGroups is a list of matching API groups and may not be empty. |
resources |
typing.List[str] |
resources is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ “services”, “nodes/status” ]. This list may not be empty. “*” matches all resources and, if present, must be the only entry. Required. |
verbs |
typing.List[str] |
verbs is a list of matching verbs and may not be empty. |
cluster_scope |
bool |
clusterScope indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). |
namespaces |
typing.List[str] |
namespaces is a list of target namespaces that restricts matches. |
api_groupsRequired ¶
api_groups: typing.List[str]
- Type: typing.List[str]
apiGroups is a list of matching API groups and may not be empty.
”*” matches all API groups and, if present, must be the only entry. Required.
resourcesRequired ¶
resources: typing.List[str]
- Type: typing.List[str]
resources is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ “services”, “nodes/status” ]. This list may not be empty. “*” matches all resources and, if present, must be the only entry. Required.
verbsRequired ¶
verbs: typing.List[str]
- Type: typing.List[str]
verbs is a list of matching verbs and may not be empty.
”*” matches all verbs and, if present, must be the only entry. Required.
cluster_scopeOptional ¶
cluster_scope: bool
- Type: bool
clusterScope indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces).
If this field is omitted or false then the namespaces field must contain a non-empty list.
namespacesOptional ¶
namespaces: typing.List[str]
- Type: typing.List[str]
namespaces is a list of target namespaces that restricts matches.
A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains “”. Note that “” matches any specified namespace but does not match a request that does not specify a namespace (see the clusterScope field for that). This list may be empty, but only if clusterScope is true.
ResourcePoolV1Alpha3 ¶
ResourcePool describes the pool that ResourceSlices belong to.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourcePoolV1Alpha3(
generation: typing.Union[int, float],
name: str,
resource_slice_count: typing.Union[int, float]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
generation |
typing.Union[int, float] |
Generation tracks the change in a pool over time. |
name |
str |
Name is used to identify the pool. |
resource_slice_count |
typing.Union[int, float] |
ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero. |
generationRequired ¶
generation: typing.Union[int, float]
- Type: typing.Union[int, float]
Generation tracks the change in a pool over time.
Whenever a driver changes something about one or more of the resources in a pool, it must change the generation in all ResourceSlices which are part of that pool. Consumers of ResourceSlices should only consider resources from the pool with the highest generation number. The generation may be reset by drivers, which should be fine for consumers, assuming that all ResourceSlices in a pool are updated to match or deleted.
Combined with ResourceSliceCount, this mechanism enables consumers to detect pools which are comprised of multiple ResourceSlices and are in an incomplete state.
nameRequired ¶
name: str
- Type: str
Name is used to identify the pool.
For node-local devices, this is often the node name, but this is not required.
It must not be longer than 253 characters and must consist of one or more DNS sub-domains separated by slashes. This field is immutable.
resource_slice_countRequired ¶
resource_slice_count: typing.Union[int, float]
- Type: typing.Union[int, float]
ResourceSliceCount is the total number of ResourceSlices in the pool at this generation number. Must be greater than zero.
Consumers can use this to check whether they have seen all ResourceSlices belonging to the same pool.
ResourceProps ¶
Initialization properties for resources.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ResourceProps(
metadata: ApiObjectMetadata = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
ResourceQuotaSpec ¶
ResourceQuotaSpec defines the desired hard limits to enforce for Quota.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourceQuotaSpec(
hard: typing.Mapping[Quantity] = None,
scopes: typing.List[str] = None,
scope_selector: ScopeSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
hard |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
hard is the set of desired hard limits for each named resource. |
scopes |
typing.List[str] |
A collection of filters that must match each object tracked by a quota. |
scope_selector |
cdk8s_plus_31.k8s.ScopeSelector |
scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values. |
hardOptional ¶
hard: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
hard is the set of desired hard limits for each named resource.
More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
scopesOptional ¶
scopes: typing.List[str]
- Type: typing.List[str]
A collection of filters that must match each object tracked by a quota.
If not specified, the quota matches all objects.
scope_selectorOptional ¶
scope_selector: ScopeSelector
- Type: cdk8s_plus_31.k8s.ScopeSelector
scopeSelector is also a collection of filters like scopes that must match each object tracked by a quota but expressed using ScopeSelectorOperator in combination with possible values.
For a resource to match, both scopes AND scopeSelector (if specified in spec), must be matched.
ResourceRequirements ¶
ResourceRequirements describes the compute resource requirements.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourceRequirements(
claims: typing.List[ResourceClaim] = None,
limits: typing.Mapping[Quantity] = None,
requests: typing.Mapping[Quantity] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
claims |
typing.List[cdk8s_plus_31.k8s.ResourceClaim] |
Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. |
limits |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
Limits describes the maximum amount of compute resources allowed. |
requests |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
Requests describes the minimum amount of compute resources required. |
claimsOptional ¶
claims: typing.List[ResourceClaim]
- Type: typing.List[cdk8s_plus_31.k8s.ResourceClaim]
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.
limitsOptional ¶
limits: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
Limits describes the maximum amount of compute resources allowed.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
requestsOptional ¶
requests: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
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/
ResourceSliceSpecV1Alpha3 ¶
ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ResourceSliceSpecV1Alpha3(
driver: str,
pool: ResourcePoolV1Alpha3,
all_nodes: bool = None,
devices: typing.List[DeviceV1Alpha3] = None,
node_name: str = None,
node_selector: NodeSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
driver |
str |
Driver identifies the DRA driver providing the capacity information. |
pool |
cdk8s_plus_31.k8s.ResourcePoolV1Alpha3 |
Pool describes the pool that this ResourceSlice belongs to. |
all_nodes |
bool |
AllNodes indicates that all nodes have access to the resources in the pool. |
devices |
typing.List[cdk8s_plus_31.k8s.DeviceV1Alpha3] |
Devices lists some or all of the devices in this pool. |
node_name |
str |
NodeName identifies the node which provides the resources in this pool. |
node_selector |
cdk8s_plus_31.k8s.NodeSelector |
NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node. |
driverRequired ¶
driver: str
- Type: str
Driver identifies the DRA driver providing the capacity information.
A field selector can be used to list only ResourceSlice objects with a certain driver name.
Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
poolRequired ¶
pool: ResourcePoolV1Alpha3
- Type: cdk8s_plus_31.k8s.ResourcePoolV1Alpha3
Pool describes the pool that this ResourceSlice belongs to.
all_nodesOptional ¶
all_nodes: bool
- Type: bool
AllNodes indicates that all nodes have access to the resources in the pool.
Exactly one of NodeName, NodeSelector and AllNodes must be set.
devicesOptional ¶
devices: typing.List[DeviceV1Alpha3]
- Type: typing.List[cdk8s_plus_31.k8s.DeviceV1Alpha3]
Devices lists some or all of the devices in this pool.
Must not have more than 128 entries.
node_nameOptional ¶
node_name: str
- Type: str
NodeName identifies the node which provides the resources in this pool.
A field selector can be used to list only ResourceSlice objects belonging to a certain node.
This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.
Exactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.
node_selectorOptional ¶
node_selector: NodeSelector
- Type: cdk8s_plus_31.k8s.NodeSelector
NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.
Must use exactly one term.
Exactly one of NodeName, NodeSelector and AllNodes must be set.
RoleBindingProps ¶
Properties for RoleBinding.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.RoleBindingProps(
metadata: ApiObjectMetadata = None,
role: IRole
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
role |
IRole |
The role to bind to. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
roleRequired ¶
role: IRole
- Type: IRole
The role to bind to.
A RoleBinding can reference a Role or a ClusterRole.
RolePolicyRule ¶
Policy rule of a `Role.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.RolePolicyRule(
resources: typing.List[IApiResource],
verbs: typing.List[str]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
resources |
typing.List[IApiResource] |
Resources this rule applies to. |
verbs |
typing.List[str] |
Verbs to allow. |
resourcesRequired ¶
resources: typing.List[IApiResource]
- Type: typing.List[IApiResource]
Resources this rule applies to.
verbsRequired ¶
verbs: typing.List[str]
- Type: typing.List[str]
Verbs to allow.
(e.g [‘get’, ‘watch’])
RoleProps ¶
Properties for Role.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.RoleProps(
metadata: ApiObjectMetadata = None,
rules: typing.List[RolePolicyRule] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
rules |
typing.List[RolePolicyRule] |
A list of rules the role should allow. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
rulesOptional ¶
rules: typing.List[RolePolicyRule]
- Type: typing.List[RolePolicyRule]
- Default: []
A list of rules the role should allow.
RoleRef ¶
RoleRef contains information that points to the role being used.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.RoleRef(
api_group: str,
kind: str,
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_group |
str |
APIGroup is the group for the resource being referenced. |
kind |
str |
Kind is the type of resource being referenced. |
name |
str |
Name is the name of resource being referenced. |
api_groupRequired ¶
api_group: str
- Type: str
APIGroup is the group for the resource being referenced.
kindRequired ¶
kind: str
- Type: str
Kind is the type of resource being referenced.
nameRequired ¶
name: str
- Type: str
Name is the name of resource being referenced.
RollingUpdateDaemonSet ¶
Spec to control the desired behavior of daemon set rolling update.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.RollingUpdateDaemonSet(
max_surge: IntOrString = None,
max_unavailable: IntOrString = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
max_surge |
cdk8s_plus_31.k8s.IntOrString |
The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update. |
max_unavailable |
cdk8s_plus_31.k8s.IntOrString |
The maximum number of DaemonSet pods that can be unavailable during the update. |
max_surgeOptional ¶
max_surge: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
The maximum number of nodes with an existing available DaemonSet pod that can have an updated DaemonSet pod during during an update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up to a minimum of 1. Default value is 0. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their a new pod created before the old pod is marked as deleted. The update starts by launching new pods on 30% of nodes. Once an updated pod is available (Ready for at least minReadySeconds) the old DaemonSet pod on that node is marked deleted. If the old pod becomes unavailable for any reason (Ready transitions to false, is evicted, or is drained) an updated pod is immediatedly created on that node without considering surge limits. Allowing surge implies the possibility that the resources consumed by the daemonset on any given node can double if the readiness check fails, and so resource intensive daemonsets should take into account that they may cause evictions during disruption.
max_unavailableOptional ¶
max_unavailable: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
The maximum number of DaemonSet pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of total number of DaemonSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0 if MaxSurge is 0 Default value is 1. Example: when this is set to 30%, at most 30% of the total number of nodes that should be running the daemon pod (i.e. status.desiredNumberScheduled) can have their pods stopped for an update at any given time. The update starts by stopping at most 30% of those DaemonSet pods and then brings up new DaemonSet pods in their place. Once the new pods are available, it then proceeds onto other DaemonSet pods, thus ensuring that at least 70% of original number of DaemonSet pods are available at all times during the update.
RollingUpdateDeployment ¶
Spec to control the desired behavior of rolling update.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.RollingUpdateDeployment(
max_surge: IntOrString = None,
max_unavailable: IntOrString = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
max_surge |
cdk8s_plus_31.k8s.IntOrString |
The maximum number of pods that can be scheduled above the desired number of pods. |
max_unavailable |
cdk8s_plus_31.k8s.IntOrString |
The maximum number of pods that can be unavailable during the update. |
max_surgeOptional ¶
max_surge: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
- Default: 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.
The maximum number of pods that can be scheduled above the desired number of pods.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). This can not be 0 if MaxUnavailable is 0. Absolute number is calculated from percentage by rounding up. Defaults to 25%. Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.
max_unavailableOptional ¶
max_unavailable: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
- Default: 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.
The maximum number of pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding down. This can not be 0 if MaxSurge is 0. Defaults to 25%. Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.
RollingUpdateStatefulSetStrategy ¶
RollingUpdateStatefulSetStrategy is used to communicate parameter for RollingUpdateStatefulSetStrategyType.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.RollingUpdateStatefulSetStrategy(
max_unavailable: IntOrString = None,
partition: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
max_unavailable |
cdk8s_plus_31.k8s.IntOrString |
The maximum number of pods that can be unavailable during the update. |
partition |
typing.Union[int, float] |
Partition indicates the ordinal at which the StatefulSet should be partitioned for updates. |
max_unavailableOptional ¶
max_unavailable: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
- Default: 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.
The maximum number of pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). Absolute number is calculated from percentage by rounding up. This can not be 0. Defaults to 1. This field is alpha-level and is only honored by servers that enable the MaxUnavailableStatefulSet feature. The field applies to all pods in the range 0 to Replicas-1. That means if there is any unavailable pod in the range 0 to Replicas-1, it will be counted towards MaxUnavailable.
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
Partition indicates the ordinal at which the StatefulSet should be partitioned for updates.
During a rolling update, all pods from ordinal Replicas-1 to Partition are updated. All pods from ordinal Partition-1 to 0 remain untouched. This is helpful in being able to do a canary based deployment. The default value is 0.
RuleWithOperations ¶
RuleWithOperations is a tuple of Operations and Resources.
It is recommended to make sure that all the tuple expansions are valid.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.RuleWithOperations(
api_groups: typing.List[str] = None,
api_versions: typing.List[str] = None,
operations: typing.List[str] = None,
resources: typing.List[str] = None,
scope: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_groups |
typing.List[str] |
APIGroups is the API groups the resources belong to. |
api_versions |
typing.List[str] |
APIVersions is the API versions the resources belong to. |
operations |
typing.List[str] |
Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. |
resources |
typing.List[str] |
Resources is a list of resources this rule applies to. |
scope |
str |
scope specifies the scope of this rule. |
api_groupsOptional ¶
api_groups: typing.List[str]
- Type: typing.List[str]
APIGroups is the API groups the resources belong to.
‘’ is all groups. If ‘’ is present, the length of the slice must be one. Required.
api_versionsOptional ¶
api_versions: typing.List[str]
- Type: typing.List[str]
APIVersions is the API versions the resources belong to.
‘’ is all versions. If ‘’ is present, the length of the slice must be one. Required.
operationsOptional ¶
operations: typing.List[str]
- Type: typing.List[str]
Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added.
If ‘*’ is present, the length of the slice must be one. Required.
resourcesOptional ¶
resources: typing.List[str]
- Type: typing.List[str]
Resources is a list of resources this rule applies to.
For example: ‘pods’ means pods. ‘pods/log’ means the log subresource of pods. ‘’ means all resources, but not subresources. ‘pods/’ means all subresources of pods. ‘/scale’ means all scale subresources. ‘/*’ means all resources and their subresources.
If wildcard is present, the validation rule will ensure resources do not overlap with each other.
Depending on the enclosing object, subresources might not be allowed. Required.
scopeOptional ¶
scope: str
- Type: str
- Default: .
scope specifies the scope of this rule.
Valid values are “Cluster”, “Namespaced”, and ““ “Cluster” means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. “Namespaced” means that only namespaced resources will match this rule. “” means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is “*”.
ScaleIoPersistentVolumeSource ¶
ScaleIOPersistentVolumeSource represents a persistent ScaleIO volume.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ScaleIoPersistentVolumeSource(
gateway: str,
secret_ref: SecretReference,
system: str,
fs_type: str = None,
protection_domain: str = None,
read_only: bool = None,
ssl_enabled: bool = None,
storage_mode: str = None,
storage_pool: str = None,
volume_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
gateway |
str |
gateway is the host address of the ScaleIO API Gateway. |
secret_ref |
cdk8s_plus_31.k8s.SecretReference |
secretRef references to the secret for ScaleIO user and other sensitive information. |
system |
str |
system is the name of the storage system as configured in ScaleIO. |
fs_type |
str |
fsType is the filesystem type to mount. |
protection_domain |
str |
protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. |
read_only |
bool |
readOnly defaults to false (read/write). |
ssl_enabled |
bool |
sslEnabled is the flag to enable/disable SSL communication with Gateway, default false. |
storage_mode |
str |
storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. |
storage_pool |
str |
storagePool is the ScaleIO Storage Pool associated with the protection domain. |
volume_name |
str |
volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. |
gatewayRequired ¶
gateway: str
- Type: str
gateway is the host address of the ScaleIO API Gateway.
secret_refRequired ¶
secret_ref: SecretReference
- Type: cdk8s_plus_31.k8s.SecretReference
secretRef references to the secret for ScaleIO user and other sensitive information.
If this is not provided, Login operation will fail.
systemRequired ¶
system: str
- Type: str
system is the name of the storage system as configured in ScaleIO.
fs_typeOptional ¶
fs_type: str
- Type: str
- Default: xfs”
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”
protection_domainOptional ¶
protection_domain: str
- Type: str
protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
ssl_enabledOptional ¶
ssl_enabled: bool
- Type: bool
sslEnabled is the flag to enable/disable SSL communication with Gateway, default false.
storage_modeOptional ¶
storage_mode: str
- Type: str
- Default: ThinProvisioned.
storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
Default is ThinProvisioned.
storage_poolOptional ¶
storage_pool: str
- Type: str
storagePool is the ScaleIO Storage Pool associated with the protection domain.
volume_nameOptional ¶
volume_name: str
- Type: str
volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.
ScaleIoVolumeSource ¶
ScaleIOVolumeSource represents a persistent ScaleIO volume.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ScaleIoVolumeSource(
gateway: str,
secret_ref: LocalObjectReference,
system: str,
fs_type: str = None,
protection_domain: str = None,
read_only: bool = None,
ssl_enabled: bool = None,
storage_mode: str = None,
storage_pool: str = None,
volume_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
gateway |
str |
gateway is the host address of the ScaleIO API Gateway. |
secret_ref |
cdk8s_plus_31.k8s.LocalObjectReference |
secretRef references to the secret for ScaleIO user and other sensitive information. |
system |
str |
system is the name of the storage system as configured in ScaleIO. |
fs_type |
str |
fsType is the filesystem type to mount. |
protection_domain |
str |
protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. |
read_only |
bool |
readOnly Defaults to false (read/write). |
ssl_enabled |
bool |
sslEnabled Flag enable/disable SSL communication with Gateway, default false. |
storage_mode |
str |
storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. |
storage_pool |
str |
storagePool is the ScaleIO Storage Pool associated with the protection domain. |
volume_name |
str |
volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. |
gatewayRequired ¶
gateway: str
- Type: str
gateway is the host address of the ScaleIO API Gateway.
secret_refRequired ¶
secret_ref: LocalObjectReference
- Type: cdk8s_plus_31.k8s.LocalObjectReference
secretRef references to the secret for ScaleIO user and other sensitive information.
If this is not provided, Login operation will fail.
systemRequired ¶
system: str
- Type: str
system is the name of the storage system as configured in ScaleIO.
fs_typeOptional ¶
fs_type: str
- Type: str
- Default: xfs”.
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”.
protection_domainOptional ¶
protection_domain: str
- Type: str
protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.
readOnly Defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
ssl_enabledOptional ¶
ssl_enabled: bool
- Type: bool
sslEnabled Flag enable/disable SSL communication with Gateway, default false.
storage_modeOptional ¶
storage_mode: str
- Type: str
- Default: ThinProvisioned.
storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
Default is ThinProvisioned.
storage_poolOptional ¶
storage_pool: str
- Type: str
storagePool is the ScaleIO Storage Pool associated with the protection domain.
volume_nameOptional ¶
volume_name: str
- Type: str
volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source.
ScaleSpec ¶
ScaleSpec describes the attributes of a scale subresource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ScaleSpec(
replicas: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
replicas |
typing.Union[int, float] |
replicas is the desired number of instances for the scaled object. |
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
replicas is the desired number of instances for the scaled object.
ScalingPolicy ¶
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ScalingPolicy(
replicas: Replicas,
duration: Duration = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
replicas |
Replicas |
The type and quantity of replicas to change. |
duration |
cdk8s.Duration |
The amount of time the scaling policy has to continue scaling before the target metric must be revalidated. |
replicasRequired ¶
replicas: Replicas
- Type: Replicas
The type and quantity of replicas to change.
durationOptional ¶
duration: Duration
- Type: cdk8s.Duration
- Default: 15 seconds
The amount of time the scaling policy has to continue scaling before the target metric must be revalidated.
Must be greater than 0 seconds and no longer than 30 minutes.
ScalingRules ¶
Defines the scaling behavior for one direction.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ScalingRules(
policies: typing.List[ScalingPolicy] = None,
stabilization_window: Duration = None,
strategy: ScalingStrategy = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
policies |
typing.List[ScalingPolicy] |
The scaling policies. |
stabilization_window |
cdk8s.Duration |
Defines the window of past metrics that the autoscaler should consider when calculating wether or not autoscaling should occur. |
strategy |
ScalingStrategy |
The strategy to use when scaling. |
policiesOptional ¶
policies: typing.List[ScalingPolicy]
- Type: typing.List[ScalingPolicy]
- Default: * Scale up * Increase no more than 4 pods per 60 seconds * Double the number of pods per 60 seconds * Scale down * Decrease to minReplica count
The scaling policies.
stabilization_windowOptional ¶
stabilization_window: Duration
- Type: cdk8s.Duration
- Default: * On scale down no stabilization is performed. * On scale up stabilization is performed for 5 minutes.
Defines the window of past metrics that the autoscaler should consider when calculating wether or not autoscaling should occur.
Minimum duration is 1 second, max is 1 hour.
Example
# Example automatically generated from non-compiling source. May contain errors.
stabilizationWindow: Duration.minutes(30)
strategyOptional ¶
strategy: ScalingStrategy
- Type: ScalingStrategy
- Default: MAX_CHANGE
The strategy to use when scaling.
ScalingTarget ¶
Properties used to configure the target of an Autoscaler.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ScalingTarget(
api_version: str,
containers: typing.List[Container],
kind: str,
name: str,
replicas: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
containers |
typing.List[Container] |
Container definitions associated with the target. |
kind |
str |
The object kind (e.g. “Deployment”). |
name |
str |
The Kubernetes name of this resource. |
replicas |
typing.Union[int, float] |
The fixed number of replicas defined on the target. |
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
containersRequired ¶
containers: typing.List[Container]
- Type: typing.List[Container]
Container definitions associated with the target.
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
nameRequired ¶
name: str
- Type: str
The Kubernetes name of this resource.
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
The fixed number of replicas defined on the target.
This is used for validation purposes as Scalable targets should not have a fixed number of replicas.
Scheduling ¶
Scheduling specifies the scheduling constraints for nodes supporting a RuntimeClass.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Scheduling(
node_selector: typing.Mapping[str] = None,
tolerations: typing.List[Toleration] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
node_selector |
typing.Mapping[str] |
nodeSelector lists labels that must be present on nodes that support this RuntimeClass. |
tolerations |
typing.List[cdk8s_plus_31.k8s.Toleration] |
tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass. |
node_selectorOptional ¶
node_selector: typing.Mapping[str]
- Type: typing.Mapping[str]
nodeSelector lists labels that must be present on nodes that support this RuntimeClass.
Pods using this RuntimeClass can only be scheduled to a node matched by this selector. The RuntimeClass nodeSelector is merged with a pod’s existing nodeSelector. Any conflicts will cause the pod to be rejected in admission.
tolerationsOptional ¶
tolerations: typing.List[Toleration]
- Type: typing.List[cdk8s_plus_31.k8s.Toleration]
tolerations are appended (excluding duplicates) to pods running with this RuntimeClass during admission, effectively unioning the set of nodes tolerated by the pod and the RuntimeClass.
ScopedResourceSelectorRequirement ¶
A scoped-resource selector requirement is a selector that contains values, a scope name, and an operator that relates the scope name and values.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ScopedResourceSelectorRequirement(
operator: str,
scope_name: str,
values: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
operator |
str |
Represents a scope’s relationship to a set of values. |
scope_name |
str |
The name of the scope that the selector applies to. |
values |
typing.List[str] |
An array of string values. |
operatorRequired ¶
operator: str
- Type: str
Represents a scope’s relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist.
scope_nameRequired ¶
scope_name: str
- Type: str
The name of the scope that the selector applies to.
valuesOptional ¶
values: typing.List[str]
- Type: typing.List[str]
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. This array is replaced during a strategic merge patch.
ScopeSelector ¶
A scope selector represents the AND of the selectors represented by the scoped-resource selector requirements.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ScopeSelector(
match_expressions: typing.List[ScopedResourceSelectorRequirement] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
match_expressions |
typing.List[cdk8s_plus_31.k8s.ScopedResourceSelectorRequirement] |
A list of scope selector requirements by scope of the resources. |
match_expressionsOptional ¶
match_expressions: typing.List[ScopedResourceSelectorRequirement]
- Type: typing.List[cdk8s_plus_31.k8s.ScopedResourceSelectorRequirement]
A list of scope selector requirements by scope of the resources.
SeccompProfile ¶
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.SeccompProfile(
type: SeccompProfileType,
localhost_profile: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
SeccompProfileType |
Indicates which kind of seccomp profile will be applied. |
localhost_profile |
str |
localhostProfile indicates a profile defined in a file on the node should be used. |
typeRequired ¶
type: SeccompProfileType
- Type: SeccompProfileType
Indicates which kind of seccomp profile will be applied.
localhost_profileOptional ¶
localhost_profile: str
- Type: str
- Default: empty string
localhostProfile indicates a profile defined in a file on the node should be used.
The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet’s configured seccomp profile location. Must only be set if type is “Localhost”.
SeccompProfile ¶
SeccompProfile defines a pod/container’s seccomp profile settings.
Only one profile source may be set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SeccompProfile(
type: str,
localhost_profile: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
type indicates which kind of seccomp profile will be applied. Valid options are:. |
localhost_profile |
str |
localhostProfile indicates a profile defined in a file on the node should be used. |
typeRequired ¶
type: str
- Type: str
type indicates which kind of seccomp profile will be applied. Valid options are:.
Localhost - a profile defined in a file on the node should be used. RuntimeDefault - the container runtime default profile should be used. Unconfined - no profile should be applied.
localhost_profileOptional ¶
localhost_profile: str
- Type: str
localhostProfile indicates a profile defined in a file on the node should be used.
The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet’s configured seccomp profile location. Must be set if type is “Localhost”. Must NOT be set for any other type.
SecretEnvSource ¶
SecretEnvSource selects a Secret to populate the environment variables with.
The contents of the target Secret’s Data field will represent the key-value pairs as environment variables.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SecretEnvSource(
name: str = None,
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name of the referent. |
optional |
bool |
Specify whether the Secret must be defined. |
nameOptional ¶
name: str
- Type: str
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
optionalOptional ¶
optional: bool
- Type: bool
Specify whether the Secret must be defined.
SecretKeySelector ¶
SecretKeySelector selects a key of a Secret.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SecretKeySelector(
key: str,
name: str = None,
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
The key of the secret to select from. |
name |
str |
Name of the referent. |
optional |
bool |
Specify whether the Secret or its key must be defined. |
keyRequired ¶
key: str
- Type: str
The key of the secret to select from.
Must be a valid secret key.
nameOptional ¶
name: str
- Type: str
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
optionalOptional ¶
optional: bool
- Type: bool
Specify whether the Secret or its key must be defined.
SecretProjection ¶
Adapts a secret into a projected volume.
The contents of the target Secret’s Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SecretProjection(
items: typing.List[KeyToPath] = None,
name: str = None,
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
items |
typing.List[cdk8s_plus_31.k8s.KeyToPath] |
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. |
name |
str |
Name of the referent. |
optional |
bool |
optional field specify whether the Secret or its key must be defined. |
itemsOptional ¶
items: typing.List[KeyToPath]
- Type: typing.List[cdk8s_plus_31.k8s.KeyToPath]
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 ‘..’.
nameOptional ¶
name: str
- Type: str
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
optionalOptional ¶
optional: bool
- Type: bool
optional field specify whether the Secret or its key must be defined.
SecretProps ¶
Options for Secret.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.SecretProps(
metadata: ApiObjectMetadata = None,
immutable: bool = None,
string_data: typing.Mapping[str] = None,
type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
string_data |
typing.Mapping[str] |
stringData allows specifying non-binary secret data in string form. |
type |
str |
Optional type associated with the secret. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
immutable: bool
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
string_dataOptional ¶
string_data: typing.Mapping[str]
- Type: typing.Mapping[str]
stringData allows specifying non-binary secret data in string form.
It is provided as a write-only convenience method. All keys and values are merged into the data field on write, overwriting any existing values. It is never output when reading from the API.
typeOptional ¶
type: str
- Type: str
- Default: undefined - Don’t set a type.
Optional type associated with the secret.
Used to facilitate programmatic handling of secret data by various controllers.
SecretReference ¶
SecretReference represents a Secret Reference.
It has enough information to retrieve secret in any namespace
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SecretReference(
name: str = None,
namespace: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is unique within a namespace to reference a secret resource. |
namespace |
str |
namespace defines the space within which the secret name must be unique. |
nameOptional ¶
name: str
- Type: str
name is unique within a namespace to reference a secret resource.
namespaceOptional ¶
namespace: str
- Type: str
namespace defines the space within which the secret name must be unique.
SecretValue ¶
Represents a specific value in JSON secret.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.SecretValue(
key: str,
secret: ISecret
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
The JSON key. |
secret |
ISecret |
The secret. |
keyRequired ¶
key: str
- Type: str
The JSON key.
secretRequired ¶
secret: ISecret
- Type: ISecret
The secret.
SecretVolumeOptions ¶
Options for the Secret-based volume.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.SecretVolumeOptions(
default_mode: typing.Union[int, float] = None,
items: typing.Mapping[PathMapping] = None,
name: str = None,
optional: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
default_mode |
typing.Union[int, float] |
Mode bits to use on created files by default. |
items |
typing.Mapping[PathMapping] |
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. |
name |
str |
The volume name. |
optional |
bool |
Specify whether the secret or its keys must be defined. |
default_modeOptional ¶
default_mode: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 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.
Mode bits to use on created files by default.
Must be a value between 0 and 0777. 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.
itemsOptional ¶
items: typing.Mapping[PathMapping]
- Type: typing.Mapping[PathMapping]
- Default: no mapping
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 ‘..’.
nameOptional ¶
name: str
- Type: str
- Default: auto-generated
The volume name.
optionalOptional ¶
optional: bool
- Type: bool
- Default: undocumented
Specify whether the secret or its keys must be defined.
SecretVolumeSource ¶
Adapts a Secret into a volume.
The contents of the target Secret’s Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SecretVolumeSource(
default_mode: typing.Union[int, float] = None,
items: typing.List[KeyToPath] = None,
optional: bool = None,
secret_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
default_mode |
typing.Union[int, float] |
defaultMode is Optional: mode bits used to set permissions on created files by default. |
items |
typing.List[cdk8s_plus_31.k8s.KeyToPath] |
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. |
optional |
bool |
optional field specify whether the Secret or its keys must be defined. |
secret_name |
str |
secretName is the name of the secret in the pod’s namespace to use. |
default_modeOptional ¶
default_mode: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 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 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.
itemsOptional ¶
items: typing.List[KeyToPath]
- Type: typing.List[cdk8s_plus_31.k8s.KeyToPath]
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 ‘..’.
optionalOptional ¶
optional: bool
- Type: bool
optional field specify whether the Secret or its keys must be defined.
secret_nameOptional ¶
secret_name: str
- Type: str
secretName is the name of the secret in the pod’s namespace to use.
More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
SecurityContext ¶
SecurityContext holds security configuration that will be applied to a container.
Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SecurityContext(
allow_privilege_escalation: bool = None,
app_armor_profile: AppArmorProfile = None,
capabilities: Capabilities = None,
privileged: bool = None,
proc_mount: str = None,
read_only_root_filesystem: bool = None,
run_as_group: typing.Union[int, float] = None,
run_as_non_root: bool = None,
run_as_user: typing.Union[int, float] = None,
seccomp_profile: SeccompProfile = None,
se_linux_options: SeLinuxOptions = None,
windows_options: WindowsSecurityContextOptions = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
allow_privilege_escalation |
bool |
AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process. |
app_armor_profile |
cdk8s_plus_31.k8s.AppArmorProfile |
appArmorProfile is the AppArmor options to use by this container. |
capabilities |
cdk8s_plus_31.k8s.Capabilities |
The capabilities to add/drop when running containers. |
privileged |
bool |
Run container in privileged mode. |
proc_mount |
str |
procMount denotes the type of proc mount to use for the containers. |
read_only_root_filesystem |
bool |
Whether this container has a read-only root filesystem. |
run_as_group |
typing.Union[int, float] |
The GID to run the entrypoint of the container process. |
run_as_non_root |
bool |
Indicates that the container must run as a non-root user. |
run_as_user |
typing.Union[int, float] |
The UID to run the entrypoint of the container process. |
seccomp_profile |
cdk8s_plus_31.k8s.SeccompProfile |
The seccomp options to use by this container. |
se_linux_options |
cdk8s_plus_31.k8s.SeLinuxOptions |
The SELinux context to be applied to the container. |
windows_options |
cdk8s_plus_31.k8s.WindowsSecurityContextOptions |
The Windows specific settings applied to all containers. |
allow_privilege_escalationOptional ¶
allow_privilege_escalation: bool
- Type: bool
AllowPrivilegeEscalation controls whether a process can gain more privileges than its parent process.
This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set when spec.os.name is windows.
app_armor_profileOptional ¶
app_armor_profile: AppArmorProfile
- Type: cdk8s_plus_31.k8s.AppArmorProfile
appArmorProfile is the AppArmor options to use by this container.
If set, this profile overrides the pod’s appArmorProfile. Note that this field cannot be set when spec.os.name is windows.
capabilitiesOptional ¶
capabilities: Capabilities
- Type: cdk8s_plus_31.k8s.Capabilities
- Default: the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
The capabilities to add/drop when running containers.
Defaults to the default set of capabilities granted by the container runtime. Note that this field cannot be set when spec.os.name is windows.
privilegedOptional ¶
privileged: bool
- Type: bool
- Default: false. Note that this field cannot be set when spec.os.name is windows.
Run container in privileged mode.
Processes in privileged containers are essentially equivalent to root on the host. Defaults to false. Note that this field cannot be set when spec.os.name is windows.
proc_mountOptional ¶
proc_mount: str
- Type: str
procMount denotes the type of proc mount to use for the containers.
The default value is Default which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. Note that this field cannot be set when spec.os.name is windows.
read_only_root_filesystemOptional ¶
read_only_root_filesystem: bool
- Type: bool
- Default: false. Note that this field cannot be set when spec.os.name is windows.
Whether this container has a read-only root filesystem.
Default is false. Note that this field cannot be set when spec.os.name is windows.
run_as_groupOptional ¶
run_as_group: typing.Union[int, float]
- Type: typing.Union[int, float]
The GID to run the entrypoint of the container process.
Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
run_as_non_rootOptional ¶
run_as_non_root: bool
- Type: bool
Indicates that the container must run as a non-root user.
If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does. If unset or false, no such validation will be performed. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
run_as_userOptional ¶
run_as_user: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
The UID to run the entrypoint of the container process.
Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
seccomp_profileOptional ¶
seccomp_profile: SeccompProfile
- Type: cdk8s_plus_31.k8s.SeccompProfile
The seccomp options to use by this container.
If seccomp options are provided at both the pod & container level, the container options override the pod options. Note that this field cannot be set when spec.os.name is windows.
se_linux_optionsOptional ¶
se_linux_options: SeLinuxOptions
- Type: cdk8s_plus_31.k8s.SeLinuxOptions
The SELinux context to be applied to the container.
If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is windows.
windows_optionsOptional ¶
windows_options: WindowsSecurityContextOptions
- Type: cdk8s_plus_31.k8s.WindowsSecurityContextOptions
The Windows specific settings applied to all containers.
If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. Note that this field cannot be set when spec.os.name is linux.
SelectableField ¶
SelectableField specifies the JSON path of a field that may be used with field selectors.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SelectableField(
json_path: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
json_path |
str |
jsonPath is a simple JSON path which is evaluated against each custom resource to produce a field selector value. |
json_pathRequired ¶
json_path: str
- Type: str
jsonPath is a simple JSON path which is evaluated against each custom resource to produce a field selector value.
Only JSON paths without the array notation are allowed. Must point to a field of type string, boolean or integer. Types with enum values and strings with formats are allowed. If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. Must not point to metdata fields. Required.
SelfSubjectAccessReviewSpec ¶
SelfSubjectAccessReviewSpec is a description of the access request.
Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SelfSubjectAccessReviewSpec(
non_resource_attributes: NonResourceAttributes = None,
resource_attributes: ResourceAttributes = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
non_resource_attributes |
cdk8s_plus_31.k8s.NonResourceAttributes |
NonResourceAttributes describes information for a non-resource access request. |
resource_attributes |
cdk8s_plus_31.k8s.ResourceAttributes |
ResourceAuthorizationAttributes describes information for a resource access request. |
non_resource_attributesOptional ¶
non_resource_attributes: NonResourceAttributes
- Type: cdk8s_plus_31.k8s.NonResourceAttributes
NonResourceAttributes describes information for a non-resource access request.
resource_attributesOptional ¶
resource_attributes: ResourceAttributes
- Type: cdk8s_plus_31.k8s.ResourceAttributes
ResourceAuthorizationAttributes describes information for a resource access request.
SelfSubjectRulesReviewSpec ¶
SelfSubjectRulesReviewSpec defines the specification for SelfSubjectRulesReview.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SelfSubjectRulesReviewSpec(
namespace: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
namespace |
str |
Namespace to evaluate rules for. |
namespaceOptional ¶
namespace: str
- Type: str
Namespace to evaluate rules for.
Required.
SeLinuxOptions ¶
SELinuxOptions are the labels to be applied to the container.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SeLinuxOptions(
level: str = None,
role: str = None,
type: str = None,
user: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
level |
str |
Level is SELinux level label that applies to the container. |
role |
str |
Role is a SELinux role label that applies to the container. |
type |
str |
Type is a SELinux type label that applies to the container. |
user |
str |
User is a SELinux user label that applies to the container. |
levelOptional ¶
level: str
- Type: str
Level is SELinux level label that applies to the container.
roleOptional ¶
role: str
- Type: str
Role is a SELinux role label that applies to the container.
typeOptional ¶
type: str
- Type: str
Type is a SELinux type label that applies to the container.
userOptional ¶
user: str
- Type: str
User is a SELinux user label that applies to the container.
ServiceAccountProps ¶
Properties for initialization of ServiceAccount.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceAccountProps(
metadata: ApiObjectMetadata = None,
automount_token: bool = None,
secrets: typing.List[ISecret] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_token |
bool |
Indicates whether pods running as this service account should have an API token automatically mounted. |
secrets |
typing.List[ISecret] |
List of secrets allowed to be used by pods running using this ServiceAccount. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_tokenOptional ¶
automount_token: bool
- Type: bool
- Default: false
Indicates whether pods running as this service account should have an API token automatically mounted.
Can be overridden at the pod level.
secretsOptional ¶
secrets: typing.List[ISecret]
- Type: typing.List[ISecret]
List of secrets allowed to be used by pods running using this ServiceAccount.
ServiceAccountSubjectV1Beta3 ¶
ServiceAccountSubject holds detailed information for service-account-kind subject.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ServiceAccountSubjectV1Beta3(
name: str,
namespace: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of matching ServiceAccount objects, or “*” to match regardless of name. |
namespace |
str |
namespace is the namespace of matching ServiceAccount objects. |
nameRequired ¶
name: str
- Type: str
name is the name of matching ServiceAccount objects, or “*” to match regardless of name.
Required.
namespaceRequired ¶
namespace: str
- Type: str
namespace is the namespace of matching ServiceAccount objects.
Required.
ServiceAccountTokenProjection ¶
ServiceAccountTokenProjection represents a projected service account token volume.
This projection can be used to insert a service account token into the pods runtime filesystem for use against APIs (Kubernetes API Server or otherwise).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ServiceAccountTokenProjection(
path: str,
audience: str = None,
expiration_seconds: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
path |
str |
path is the path relative to the mount point of the file to project the token into. |
audience |
str |
audience is the intended audience of the token. |
expiration_seconds |
typing.Union[int, float] |
expirationSeconds is the requested duration of validity of the service account token. |
pathRequired ¶
path: str
- Type: str
path is the path relative to the mount point of the file to project the token into.
audienceOptional ¶
audience: str
- Type: str
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.
expiration_secondsOptional ¶
expiration_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1 hour and must be at least 10 minutes.
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.
ServiceAccountTokenSecretProps ¶
Options for ServiceAccountTokenSecret.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceAccountTokenSecretProps(
metadata: ApiObjectMetadata = None,
immutable: bool = None,
service_account: IServiceAccount
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
service_account |
IServiceAccount |
The service account to store a secret for. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
immutable: bool
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
service_accountRequired ¶
service_account: IServiceAccount
- Type: IServiceAccount
The service account to store a secret for.
ServiceBackendPort ¶
ServiceBackendPort is the service port being referenced.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ServiceBackendPort(
name: str = None,
number: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of the port on the Service. |
number |
typing.Union[int, float] |
number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with “Name”. |
nameOptional ¶
name: str
- Type: str
name is the name of the port on the Service.
This is a mutually exclusive setting with “Number”.
numberOptional ¶
number: typing.Union[int, float]
- Type: typing.Union[int, float]
number is the numerical port number (e.g. 80) on the Service. This is a mutually exclusive setting with “Name”.
ServiceBindOptions ¶
Options for Service.bind.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceBindOptions(
name: str = None,
node_port: typing.Union[int, float] = None,
protocol: Protocol = None,
target_port: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The name of this port within the service. |
node_port |
typing.Union[int, float] |
The port on each node on which this service is exposed when type=NodePort or LoadBalancer. |
protocol |
Protocol |
The IP protocol for this port. |
target_port |
typing.Union[int, float] |
The port number the service will redirect to. |
nameOptional ¶
name: str
- Type: str
The name of this port within the service.
This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the ‘Name’ field in EndpointPort objects. Optional if only one ServicePort is defined on this service.
node_portOptional ¶
node_port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: auto-allocate a port if the ServiceType of this Service requires one.
The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one.
https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
protocolOptional ¶
protocol: Protocol
- Type: Protocol
- Default: Protocol.TCP
The IP protocol for this port.
Supports “TCP”, “UDP”, and “SCTP”. Default is TCP.
target_portOptional ¶
target_port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: The value of
portwill be used.
The port number the service will redirect to.
ServiceCidrSpecV1Beta1 ¶
ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ServiceCidrSpecV1Beta1(
cidrs: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
cidrs |
typing.List[str] |
CIDRs defines the IP blocks in CIDR notation (e.g. “192.168.0.0/24” or “2001:db8::/64”) from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable. |
cidrsOptional ¶
cidrs: typing.List[str]
- Type: typing.List[str]
CIDRs defines the IP blocks in CIDR notation (e.g. “192.168.0.0/24” or “2001:db8::/64”) from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable.
ServiceIngressBackendOptions ¶
Options for setting up backends for ingress rules.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceIngressBackendOptions(
port: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
port |
typing.Union[int, float] |
The port to use to access the service. |
portOptional ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: if the service exposes a single port, this port will be used.
The port to use to access the service.
- This option will fail if the service does not expose any ports.
- If the service exposes multiple ports, this option must be specified.
- If the service exposes a single port, this option is optional and if specified, it must be the same port exposed by the service.
ServicePort ¶
Definition of a service port.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ServicePort(
name: str = None,
node_port: typing.Union[int, float] = None,
protocol: Protocol = None,
target_port: typing.Union[int, float] = None,
port: typing.Union[int, float]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
The name of this port within the service. |
node_port |
typing.Union[int, float] |
The port on each node on which this service is exposed when type=NodePort or LoadBalancer. |
protocol |
Protocol |
The IP protocol for this port. |
target_port |
typing.Union[int, float] |
The port number the service will redirect to. |
port |
typing.Union[int, float] |
The port number the service will bind to. |
nameOptional ¶
name: str
- Type: str
The name of this port within the service.
This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. This maps to the ‘Name’ field in EndpointPort objects. Optional if only one ServicePort is defined on this service.
node_portOptional ¶
node_port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: auto-allocate a port if the ServiceType of this Service requires one.
The port on each node on which this service is exposed when type=NodePort or LoadBalancer.
Usually assigned by the system. If specified, it will be allocated to the service if unused or else creation of the service will fail. Default is to auto-allocate a port if the ServiceType of this Service requires one.
https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
protocolOptional ¶
protocol: Protocol
- Type: Protocol
- Default: Protocol.TCP
The IP protocol for this port.
Supports “TCP”, “UDP”, and “SCTP”. Default is TCP.
target_portOptional ¶
target_port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: The value of
portwill be used.
The port number the service will redirect to.
portRequired ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
The port number the service will bind to.
ServicePort ¶
ServicePort contains information on service’s port.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ServicePort(
port: typing.Union[int, float],
app_protocol: str = None,
name: str = None,
node_port: typing.Union[int, float] = None,
protocol: str = None,
target_port: IntOrString = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
port |
typing.Union[int, float] |
The port that will be exposed by this service. |
app_protocol |
str |
The application protocol for this port. |
name |
str |
The name of this port within the service. |
node_port |
typing.Union[int, float] |
The port on each node on which this service is exposed when type is NodePort or LoadBalancer. |
protocol |
str |
The IP protocol for this port. |
target_port |
cdk8s_plus_31.k8s.IntOrString |
Number or name of the port to access on the pods targeted by the service. |
portRequired ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
The port that will be exposed by this service.
app_protocolOptional ¶
app_protocol: str
- Type: str
The application protocol for this port.
This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:
- Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).
- Kubernetes-defined prefixed names:
- ‘kubernetes.io/h2c’ - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
- ‘kubernetes.io/ws’ - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
- ‘kubernetes.io/wss’ - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
- Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
nameOptional ¶
name: str
- Type: str
The name of this port within the service.
This must be a DNS_LABEL. All ports within a ServiceSpec must have unique names. When considering the endpoints for a Service, this must match the ‘name’ field in the EndpointPort. Optional if only one ServicePort is defined on this service.
node_portOptional ¶
node_port: typing.Union[int, float]
- Type: typing.Union[int, float]
The port on each node on which this service is exposed when type is NodePort or LoadBalancer.
Usually assigned by the system. If a value is specified, in-range, and not in use it will be used, otherwise the operation will fail. If not specified, a port will be allocated if this Service requires one. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type from NodePort to ClusterIP). More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
protocolOptional ¶
protocol: str
- Type: str
- Default: TCP.
The IP protocol for this port.
Supports “TCP”, “UDP”, and “SCTP”. Default is TCP.
target_portOptional ¶
target_port: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
Number or name of the port to access on the pods targeted by the service.
Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. If this is a string, it will be looked up as a named port in the target Pod’s container ports. If this is not specified, the value of the ‘port’ field is used (an identity map). This field is ignored for services with clusterIP=None, and should be omitted or set equal to the ‘port’ field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service
ServiceProps ¶
Properties for Service.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.ServiceProps(
metadata: ApiObjectMetadata = None,
cluster_i_p: str = None,
external_i_ps: typing.List[str] = None,
external_name: str = None,
load_balancer_source_ranges: typing.List[str] = None,
ports: typing.List[ServicePort] = None,
publish_not_ready_addresses: bool = None,
selector: IPodSelector = None,
type: ServiceType = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
cluster_i_p |
str |
The IP address of the service and is usually assigned randomly by the master. |
external_i_ps |
typing.List[str] |
A list of IP addresses for which nodes in the cluster will also accept traffic for this service. |
external_name |
str |
The externalName to be used when ServiceType.EXTERNAL_NAME is set. |
load_balancer_source_ranges |
typing.List[str] |
A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs. |
ports |
typing.List[ServicePort] |
The ports this service binds to. |
publish_not_ready_addresses |
bool |
The publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. |
selector |
IPodSelector |
Which pods should the service select and route to. |
type |
ServiceType |
Determines how the Service is exposed. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
cluster_i_pOptional ¶
cluster_i_p: str
- Type: str
- Default: Automatically assigned.
The IP address of the service and is usually assigned randomly by the master.
If an address is specified manually and is not in use by others, it will be allocated to the service; otherwise, creation of the service will fail. This field can not be changed through updates. Valid values are “None”, empty string (“”), or a valid IP address. “None” can be specified for headless services when proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName.
https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
external_i_psOptional ¶
external_i_ps: typing.List[str]
- Type: typing.List[str]
- Default: No external IPs.
A list of IP addresses for which nodes in the cluster will also accept traffic for this service.
These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.
external_nameOptional ¶
external_name: str
- Type: str
- Default: No external name.
The externalName to be used when ServiceType.EXTERNAL_NAME is set.
load_balancer_source_rangesOptional ¶
load_balancer_source_ranges: typing.List[str]
- Type: typing.List[str]
A list of CIDR IP addresses, if specified and supported by the platform, will restrict traffic through the cloud-provider load-balancer to the specified client IPs.
More info: https://kubernetes.io/docs/tasks/access-application-cluster/configure-cloud-provider-firewall/
portsOptional ¶
ports: typing.List[ServicePort]
- Type: typing.List[ServicePort]
- Default: either the selector ports, or none.
The ports this service binds to.
If the selector of the service is a managed pod / workload, its ports will are automatically extracted and used as the default value. Otherwise, no ports are bound.
publish_not_ready_addressesOptional ¶
publish_not_ready_addresses: bool
- Type: bool
- Default: false
The publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready.
More info: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#servicespec-v1-core
selectorOptional ¶
selector: IPodSelector
- Type: IPodSelector
- Default: unset, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify.
Which pods should the service select and route to.
You can pass one of the following:
- An instance of
Podor any workload resource (e.gDeployment,StatefulSet, …) - Pods selected by the
Pods.selectfunction. Note that in this case only labels can be specified.
Example
# Example automatically generated from non-compiling source. May contain errors.
# select the pods of a specific deployment
backend = kplus.Deployment(self, "Backend", ...)
kplus.Service(self, "Service", selector=backend)
# select all pods labeled with the `tier=backend` label
backend = kplus.Pod.labeled(tier="backend")
kplus.Service(self, "Service", selector=backend)
typeOptional ¶
type: ServiceType
- Type: ServiceType
- Default: ServiceType.ClusterIP
Determines how the Service is exposed.
More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
ServiceReference ¶
ServiceReference holds a reference to Service.legacy.k8s.io.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ServiceReference(
name: str,
namespace: str,
path: str = None,
port: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the name of the service. |
namespace |
str |
namespace is the namespace of the service. |
path |
str |
path is an optional URL path which will be sent in any request to this service. |
port |
typing.Union[int, float] |
If specified, the port on the service that hosting webhook. |
nameRequired ¶
name: str
- Type: str
name is the name of the service.
Required
namespaceRequired ¶
namespace: str
- Type: str
namespace is the namespace of the service.
Required
pathOptional ¶
path: str
- Type: str
path is an optional URL path which will be sent in any request to this service.
portOptional ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 443 for backward compatibility.
portshould be a valid port number (1-65535, inclusive).
If specified, the port on the service that hosting webhook.
Default to 443 for backward compatibility. port should be a valid port number (1-65535, inclusive).
ServiceSpec ¶
ServiceSpec describes the attributes that a user creates on a service.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ServiceSpec(
allocate_load_balancer_node_ports: bool = None,
cluster_ip: str = None,
cluster_i_ps: typing.List[str] = None,
external_i_ps: typing.List[str] = None,
external_name: str = None,
external_traffic_policy: str = None,
health_check_node_port: typing.Union[int, float] = None,
internal_traffic_policy: str = None,
ip_families: typing.List[str] = None,
ip_family_policy: str = None,
load_balancer_class: str = None,
load_balancer_ip: str = None,
load_balancer_source_ranges: typing.List[str] = None,
ports: typing.List[ServicePort] = None,
publish_not_ready_addresses: bool = None,
selector: typing.Mapping[str] = None,
session_affinity: str = None,
session_affinity_config: SessionAffinityConfig = None,
traffic_distribution: str = None,
type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
allocate_load_balancer_node_ports |
bool |
allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. |
cluster_ip |
str |
clusterIP is the IP address of the service and is usually assigned randomly. |
cluster_i_ps |
typing.List[str] |
ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly. |
external_i_ps |
typing.List[str] |
externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service. |
external_name |
str |
externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires type to be “ExternalName”. |
external_traffic_policy |
str |
externalTrafficPolicy describes how nodes distribute service traffic they receive on one of the Service’s “externally-facing” addresses (NodePorts, ExternalIPs, and LoadBalancer IPs). |
health_check_node_port |
typing.Union[int, float] |
healthCheckNodePort specifies the healthcheck nodePort for the service. |
internal_traffic_policy |
str |
InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP. |
ip_families |
typing.List[str] |
IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are “IPv4” and “IPv6”. This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to “headless” services. This field will be wiped when updating a Service to type ExternalName. |
ip_family_policy |
str |
IPFamilyPolicy represents the dual-stack-ness requested or required by this Service. |
load_balancer_class |
str |
loadBalancerClass is the class of the load balancer implementation this Service belongs to. |
load_balancer_ip |
str |
Only applies to Service Type: LoadBalancer. |
load_balancer_source_ranges |
typing.List[str] |
If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs. |
ports |
typing.List[cdk8s_plus_31.k8s.ServicePort] |
The list of ports that are exposed by this service. |
publish_not_ready_addresses |
bool |
publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready. |
selector |
typing.Mapping[str] |
Route service traffic to pods with label keys and values matching this selector. |
session_affinity |
str |
Supports “ClientIP” and “None”. |
session_affinity_config |
cdk8s_plus_31.k8s.SessionAffinityConfig |
sessionAffinityConfig contains the configurations of session affinity. |
traffic_distribution |
str |
TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints. |
type |
str |
type determines how the Service is exposed. |
allocate_load_balancer_node_portsOptional ¶
allocate_load_balancer_node_ports: bool
- Type: bool
- Default: true”. It may be set to “false” if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.
allocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer.
Default is “true”. It may be set to “false” if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type.
cluster_ipOptional ¶
cluster_ip: str
- Type: str
clusterIP is the IP address of the service and is usually assigned randomly.
If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be blank) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are “None”, empty string (“”), or a valid IP address. Setting this to “None” makes a “headless service” (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
cluster_i_psOptional ¶
cluster_i_ps: typing.List[str]
- Type: typing.List[str]
ClusterIPs is a list of IP addresses assigned to this service, and are usually assigned randomly.
If an address is specified manually, is in-range (as per system configuration), and is not in use, it will be allocated to the service; otherwise creation of the service will fail. This field may not be changed through updates unless the type field is also being changed to ExternalName (which requires this field to be empty) or the type field is being changed from ExternalName (in which case this field may optionally be specified, as describe above). Valid values are “None”, empty string (“”), or a valid IP address. Setting this to “None” makes a “headless service” (no virtual IP), which is useful when direct endpoint connections are preferred and proxying is not required. Only applies to types ClusterIP, NodePort, and LoadBalancer. If this field is specified when creating a Service of type ExternalName, creation will fail. This field will be wiped when updating a Service to type ExternalName. If this field is not specified, it will be initialized from the clusterIP field. If this field is specified, clients must ensure that clusterIPs[0] and clusterIP have the same value.
This field may hold a maximum of two entries (dual-stack IPs, in either order). These IPs must correspond to the values of the ipFamilies field. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
external_i_psOptional ¶
external_i_ps: typing.List[str]
- Type: typing.List[str]
externalIPs is a list of IP addresses for which nodes in the cluster will also accept traffic for this service.
These IPs are not managed by Kubernetes. The user is responsible for ensuring that traffic arrives at a node with this IP. A common example is external load-balancers that are not part of the Kubernetes system.
external_nameOptional ¶
external_name: str
- Type: str
externalName is the external reference that discovery mechanisms will return as an alias for this service (e.g. a DNS CNAME record). No proxying will be involved. Must be a lowercase RFC-1123 hostname (https://tools.ietf.org/html/rfc1123) and requires type to be “ExternalName”.
external_traffic_policyOptional ¶
external_traffic_policy: str
- Type: str
externalTrafficPolicy describes how nodes distribute service traffic they receive on one of the Service’s “externally-facing” addresses (NodePorts, ExternalIPs, and LoadBalancer IPs).
If set to “Local”, the proxy will configure the service in a way that assumes that external load balancers will take care of balancing the service traffic between nodes, and so each node will deliver traffic only to the node-local endpoints of the service, without masquerading the client source IP. (Traffic mistakenly sent to a node with no endpoints will be dropped.) The default value, “Cluster”, uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features). Note that traffic sent to an External IP or LoadBalancer IP from within the cluster will always get “Cluster” semantics, but clients sending to a NodePort from within the cluster may need to take traffic policy into account when picking a node.
health_check_node_portOptional ¶
health_check_node_port: typing.Union[int, float]
- Type: typing.Union[int, float]
healthCheckNodePort specifies the healthcheck nodePort for the service.
This only applies when type is set to LoadBalancer and externalTrafficPolicy is set to Local. If a value is specified, is in-range, and is not in use, it will be used. If not specified, a value will be automatically allocated. External systems (e.g. load-balancers) can use this port to determine if a given node holds endpoints for this service or not. If this field is specified when creating a Service which does not need it, creation will fail. This field will be wiped when updating a Service to no longer need it (e.g. changing type). This field cannot be updated once set.
internal_traffic_policyOptional ¶
internal_traffic_policy: str
- Type: str
InternalTrafficPolicy describes how nodes distribute service traffic they receive on the ClusterIP.
If set to “Local”, the proxy will assume that pods only want to talk to endpoints of the service on the same node as the pod, dropping the traffic if there are no local endpoints. The default value, “Cluster”, uses the standard behavior of routing to all endpoints evenly (possibly modified by topology and other features).
ip_familiesOptional ¶
ip_families: typing.List[str]
- Type: typing.List[str]
IPFamilies is a list of IP families (e.g. IPv4, IPv6) assigned to this service. This field is usually assigned automatically based on cluster configuration and the ipFamilyPolicy field. If this field is specified manually, the requested family is available in the cluster, and ipFamilyPolicy allows it, it will be used; otherwise creation of the service will fail. This field is conditionally mutable: it allows for adding or removing a secondary IP family, but it does not allow changing the primary IP family of the Service. Valid values are “IPv4” and “IPv6”. This field only applies to Services of types ClusterIP, NodePort, and LoadBalancer, and does apply to “headless” services. This field will be wiped when updating a Service to type ExternalName.
This field may hold a maximum of two entries (dual-stack families, in either order). These families must correspond to the values of the clusterIPs field, if specified. Both clusterIPs and ipFamilies are governed by the ipFamilyPolicy field.
ip_family_policyOptional ¶
ip_family_policy: str
- Type: str
IPFamilyPolicy represents the dual-stack-ness requested or required by this Service.
If there is no value provided, then this field will be set to SingleStack. Services can be “SingleStack” (a single IP family), “PreferDualStack” (two IP families on dual-stack configured clusters or a single IP family on single-stack clusters), or “RequireDualStack” (two IP families on dual-stack configured clusters, otherwise fail). The ipFamilies and clusterIPs fields depend on the value of this field. This field will be wiped when updating a service to type ExternalName.
load_balancer_classOptional ¶
load_balancer_class: str
- Type: str
loadBalancerClass is the class of the load balancer implementation this Service belongs to.
If specified, the value of this field must be a label-style identifier, with an optional prefix, e.g. “internal-vip” or “example.com/internal-vip”. Unprefixed names are reserved for end-users. This field can only be set when the Service type is ‘LoadBalancer’. If not set, the default load balancer implementation is used, today this is typically done through the cloud provider integration, but should apply for any default implementation. If set, it is assumed that a load balancer implementation is watching for Services with a matching class. Any default load balancer implementation (e.g. cloud providers) should ignore Services that set this field. This field can only be set when creating or updating a Service to type ‘LoadBalancer’. Once set, it can not be changed. This field will be wiped when a service is updated to a non ‘LoadBalancer’ type.
load_balancer_ipOptional ¶
load_balancer_ip: str
- Type: str
Only applies to Service Type: LoadBalancer.
This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available.
load_balancer_source_rangesOptional ¶
load_balancer_source_ranges: typing.List[str]
- Type: typing.List[str]
If specified and supported by the platform, this will restrict traffic through the cloud-provider load-balancer will be restricted to the specified client IPs.
This field will be ignored if the cloud-provider does not support the feature.” More info: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/
portsOptional ¶
ports: typing.List[ServicePort]
- Type: typing.List[cdk8s_plus_31.k8s.ServicePort]
The list of ports that are exposed by this service.
More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
publish_not_ready_addressesOptional ¶
publish_not_ready_addresses: bool
- Type: bool
publishNotReadyAddresses indicates that any agent which deals with endpoints for this Service should disregard any indications of ready/not-ready.
The primary use case for setting this field is for a StatefulSet’s Headless Service to propagate SRV DNS records for its Pods for the purpose of peer discovery. The Kubernetes controllers that generate Endpoints and EndpointSlice resources for Services interpret this to mean that all endpoints are considered “ready” even if the Pods themselves are not. Agents which consume only Kubernetes generated endpoints through the Endpoints or EndpointSlice resources can safely assume this behavior.
selectorOptional ¶
selector: typing.Mapping[str]
- Type: typing.Mapping[str]
Route service traffic to pods with label keys and values matching this selector.
If empty or not present, the service is assumed to have an external process managing its endpoints, which Kubernetes will not modify. Only applies to types ClusterIP, NodePort, and LoadBalancer. Ignored if type is ExternalName. More info: https://kubernetes.io/docs/concepts/services-networking/service/
session_affinityOptional ¶
session_affinity: str
- Type: str
- Default: None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
Supports “ClientIP” and “None”.
Used to maintain session affinity. Enable client IP based session affinity. Must be ClientIP or None. Defaults to None. More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies
session_affinity_configOptional ¶
session_affinity_config: SessionAffinityConfig
- Type: cdk8s_plus_31.k8s.SessionAffinityConfig
sessionAffinityConfig contains the configurations of session affinity.
traffic_distributionOptional ¶
traffic_distribution: str
- Type: str
TrafficDistribution offers a way to express preferences for how traffic is distributed to Service endpoints.
Implementations can use this field as a hint, but are not required to guarantee strict adherence. If the field is not set, the implementation will apply its default routing strategy. If set to “PreferClose”, implementations should prioritize endpoints that are topologically close (e.g., same zone). This is an alpha field and requires enabling ServiceTrafficDistribution feature.
typeOptional ¶
type: str
- Type: str
- Default: ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. “ClusterIP” allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is “None”, no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. “NodePort” builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. “LoadBalancer” builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. “ExternalName” aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
type determines how the Service is exposed.
Defaults to ClusterIP. Valid options are ExternalName, ClusterIP, NodePort, and LoadBalancer. “ClusterIP” allocates a cluster-internal IP address for load-balancing to endpoints. Endpoints are determined by the selector or if that is not specified, by manual construction of an Endpoints object or EndpointSlice objects. If clusterIP is “None”, no virtual IP is allocated and the endpoints are published as a set of endpoints rather than a virtual IP. “NodePort” builds on ClusterIP and allocates a port on every node which routes to the same endpoints as the clusterIP. “LoadBalancer” builds on NodePort and creates an external load-balancer (if supported in the current cloud) which routes to the same endpoints as the clusterIP. “ExternalName” aliases this service to the specified externalName. Several other fields do not apply to ExternalName services. More info: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
SessionAffinityConfig ¶
SessionAffinityConfig represents the configurations of session affinity.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SessionAffinityConfig(
client_ip: ClientIpConfig = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
client_ip |
cdk8s_plus_31.k8s.ClientIpConfig |
clientIP contains the configurations of Client IP based session affinity. |
client_ipOptional ¶
client_ip: ClientIpConfig
- Type: cdk8s_plus_31.k8s.ClientIpConfig
clientIP contains the configurations of Client IP based session affinity.
SleepAction ¶
SleepAction describes a “sleep” action.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SleepAction(
seconds: typing.Union[int, float]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
seconds |
typing.Union[int, float] |
Seconds is the number of seconds to sleep. |
secondsRequired ¶
seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
Seconds is the number of seconds to sleep.
SshAuthSecretProps ¶
Options for SshAuthSecret.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.SshAuthSecretProps(
metadata: ApiObjectMetadata = None,
immutable: bool = None,
ssh_private_key: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
ssh_private_key |
str |
The SSH private key to use. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
immutable: bool
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
ssh_private_keyRequired ¶
ssh_private_key: str
- Type: str
The SSH private key to use.
StatefulSetOrdinals ¶
StatefulSetOrdinals describes the policy used for replica ordinal assignment in this StatefulSet.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.StatefulSetOrdinals(
start: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
start |
typing.Union[int, float] |
start is the number representing the first replica’s index. |
startOptional ¶
start: typing.Union[int, float]
- Type: typing.Union[int, float]
start is the number representing the first replica’s index.
It may be used to number replicas from an alternate index (eg: 1-indexed) over the default 0-indexed names, or to orchestrate progressive movement of replicas from one StatefulSet to another. If set, replica indices will be in the range: [.spec.ordinals.start, .spec.ordinals.start + .spec.replicas). If unset, defaults to 0. Replica indices will be in the range: [0, .spec.replicas).
StatefulSetPersistentVolumeClaimRetentionPolicy ¶
StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.StatefulSetPersistentVolumeClaimRetentionPolicy(
when_deleted: str = None,
when_scaled: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
when_deleted |
str |
WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. |
when_scaled |
str |
WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. |
when_deletedOptional ¶
when_deleted: str
- Type: str
WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted.
The default policy of Retain causes PVCs to not be affected by StatefulSet deletion. The Delete policy causes those PVCs to be deleted.
when_scaledOptional ¶
when_scaled: str
- Type: str
WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down.
The default policy of Retain causes PVCs to not be affected by a scaledown. The Delete policy causes the associated PVCs for any excess pods above the replica count to be deleted.
StatefulSetProps ¶
Properties for initialization of StatefulSet.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.StatefulSetProps(
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None,
min_ready: Duration = None,
pod_management_policy: PodManagementPolicy = None,
replicas: typing.Union[int, float] = None,
service: Service = None,
strategy: StatefulSetUpdateStrategy = None,
volume_claim_templates: typing.List[PersistentVolumeClaimTemplateProps] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
min_ready |
cdk8s.Duration |
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available. |
pod_management_policy |
PodManagementPolicy |
Pod management policy to use for this statefulset. |
replicas |
typing.Union[int, float] |
Number of desired pods. |
service |
Service |
Service to associate with the statefulset. |
strategy |
StatefulSetUpdateStrategy |
Indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. |
volume_claim_templates |
typing.List[PersistentVolumeClaimTemplateProps] |
A list of PersistentVolumeClaim templates that will be created for each pod in the StatefulSet. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
dns: PodDnsProps
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
host_network: bool
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
init_containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
isolate: bool
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
security_context: PodSecurityContextProps
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
share_process_namespace: bool
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
pod_metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
select: bool
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
spread: bool
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
min_readyOptional ¶
min_ready: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(0)
Minimum duration for which a newly created pod should be ready without any of its container crashing, for it to be considered available.
Zero means the pod will be considered available as soon as it is ready.
This is an alpha field and requires enabling StatefulSetMinReadySeconds feature gate.
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#min-ready-seconds
pod_management_policyOptional ¶
pod_management_policy: PodManagementPolicy
- Type: PodManagementPolicy
- Default: PodManagementPolicy.ORDERED_READY
Pod management policy to use for this statefulset.
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1
Number of desired pods.
serviceOptional ¶
service: Service
- Type: Service
- Default: A new headless service will be created.
Service to associate with the statefulset.
strategyOptional ¶
strategy: StatefulSetUpdateStrategy
- Type: StatefulSetUpdateStrategy
- Default: RollingUpdate with partition set to 0
Indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.
volume_claim_templatesOptional ¶
volume_claim_templates: typing.List[PersistentVolumeClaimTemplateProps]
- Type: typing.List[PersistentVolumeClaimTemplateProps]
- Default: No volume claim templates will be created.
A list of PersistentVolumeClaim templates that will be created for each pod in the StatefulSet.
The StatefulSet controller creates a PVC and a PV for each template based on the pod’s ordinal index, ensuring stable storage across pod restarts and rescheduling.
Each claim in this list must have at least one matching (by name) volumeMount in one of the containers.
StatefulSetSpec ¶
A StatefulSetSpec is the specification of a StatefulSet.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.StatefulSetSpec(
selector: LabelSelector,
service_name: str,
template: PodTemplateSpec,
min_ready_seconds: typing.Union[int, float] = None,
ordinals: StatefulSetOrdinals = None,
persistent_volume_claim_retention_policy: StatefulSetPersistentVolumeClaimRetentionPolicy = None,
pod_management_policy: str = None,
replicas: typing.Union[int, float] = None,
revision_history_limit: typing.Union[int, float] = None,
update_strategy: StatefulSetUpdateStrategy = None,
volume_claim_templates: typing.List[KubePersistentVolumeClaimProps] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
selector |
cdk8s_plus_31.k8s.LabelSelector |
selector is a label query over pods that should match the replica count. |
service_name |
str |
serviceName is the name of the service that governs this StatefulSet. |
template |
cdk8s_plus_31.k8s.PodTemplateSpec |
template is the object that describes the pod that will be created if insufficient replicas are detected. |
min_ready_seconds |
typing.Union[int, float] |
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available. |
ordinals |
cdk8s_plus_31.k8s.StatefulSetOrdinals |
ordinals controls the numbering of replica indices in a StatefulSet. |
persistent_volume_claim_retention_policy |
cdk8s_plus_31.k8s.StatefulSetPersistentVolumeClaimRetentionPolicy |
persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates. |
pod_management_policy |
str |
podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down. |
replicas |
typing.Union[int, float] |
replicas is the desired number of replicas of the given Template. |
revision_history_limit |
typing.Union[int, float] |
revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet’s revision history. |
update_strategy |
cdk8s_plus_31.k8s.StatefulSetUpdateStrategy |
updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template. |
volume_claim_templates |
typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeClaimProps] |
volumeClaimTemplates is a list of claims that pods are allowed to reference. |
selectorRequired ¶
selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
selector is a label query over pods that should match the replica count.
It must match the pod template’s labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
service_nameRequired ¶
service_name: str
- Type: str
serviceName is the name of the service that governs this StatefulSet.
This service must exist before the StatefulSet, and is responsible for the network identity of the set. Pods get DNS/hostnames that follow the pattern: pod-specific-string.serviceName.default.svc.cluster.local where “pod-specific-string” is managed by the StatefulSet controller.
templateRequired ¶
template: PodTemplateSpec
- Type: cdk8s_plus_31.k8s.PodTemplateSpec
template is the object that describes the pod that will be created if insufficient replicas are detected.
Each pod stamped out by the StatefulSet will fulfill this Template, but have a unique identity from the rest of the StatefulSet. Each pod will be named with the format
min_ready_secondsOptional ¶
min_ready_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 0 (pod will be considered available as soon as it is ready)
Minimum number of seconds for which a newly created pod should be ready without any of its container crashing for it to be considered available.
Defaults to 0 (pod will be considered available as soon as it is ready)
ordinalsOptional ¶
ordinals: StatefulSetOrdinals
- Type: cdk8s_plus_31.k8s.StatefulSetOrdinals
ordinals controls the numbering of replica indices in a StatefulSet.
The default ordinals behavior assigns a “0” index to the first replica and increments the index by one for each additional replica requested.
persistent_volume_claim_retention_policyOptional ¶
persistent_volume_claim_retention_policy: StatefulSetPersistentVolumeClaimRetentionPolicy
- Type: cdk8s_plus_31.k8s.StatefulSetPersistentVolumeClaimRetentionPolicy
persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent volume claims created from volumeClaimTemplates.
By default, all persistent volume claims are created as needed and retained until manually deleted. This policy allows the lifecycle to be altered, for example by deleting persistent volume claims when their stateful set is deleted, or when their pod is scaled down. This requires the StatefulSetAutoDeletePVC feature gate to be enabled, which is beta.
pod_management_policyOptional ¶
pod_management_policy: str
- Type: str
podManagementPolicy controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down.
The default policy is OrderedReady, where pods are created in increasing order (pod-0, then pod-1, etc) and the controller will wait until each pod is ready before continuing. When scaling down, the pods are removed in the opposite order. The alternative policy is Parallel which will create pods in parallel to match the desired scale without waiting, and on scale down will delete all pods at once.
replicasOptional ¶
replicas: typing.Union[int, float]
- Type: typing.Union[int, float]
replicas is the desired number of replicas of the given Template.
These are replicas in the sense that they are instantiations of the same Template, but individual replicas also have a consistent identity. If unspecified, defaults to 1.
revision_history_limitOptional ¶
revision_history_limit: typing.Union[int, float]
- Type: typing.Union[int, float]
revisionHistoryLimit is the maximum number of revisions that will be maintained in the StatefulSet’s revision history.
The revision history consists of all revisions not represented by a currently applied StatefulSetSpec version. The default value is 10.
update_strategyOptional ¶
update_strategy: StatefulSetUpdateStrategy
- Type: cdk8s_plus_31.k8s.StatefulSetUpdateStrategy
updateStrategy indicates the StatefulSetUpdateStrategy that will be employed to update Pods in the StatefulSet when a revision is made to Template.
volume_claim_templatesOptional ¶
volume_claim_templates: typing.List[KubePersistentVolumeClaimProps]
- Type: typing.List[cdk8s_plus_31.k8s.KubePersistentVolumeClaimProps]
volumeClaimTemplates is a list of claims that pods are allowed to reference.
The StatefulSet controller is responsible for mapping network identities to claims in a way that maintains the identity of a pod. Every claim in this list must have at least one matching (by name) volumeMount in one container in the template. A claim in this list takes precedence over any volumes in the template, with the same name.
StatefulSetUpdateStrategy ¶
StatefulSetUpdateStrategy indicates the strategy that the StatefulSet controller will use to perform updates.
It includes any additional parameters necessary to perform the update for the indicated strategy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.StatefulSetUpdateStrategy(
rolling_update: RollingUpdateStatefulSetStrategy = None,
type: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
rolling_update |
cdk8s_plus_31.k8s.RollingUpdateStatefulSetStrategy |
RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType. |
type |
str |
Type indicates the type of the StatefulSetUpdateStrategy. |
rolling_updateOptional ¶
rolling_update: RollingUpdateStatefulSetStrategy
- Type: cdk8s_plus_31.k8s.RollingUpdateStatefulSetStrategy
RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
typeOptional ¶
type: str
- Type: str
- Default: RollingUpdate.
Type indicates the type of the StatefulSetUpdateStrategy.
Default is RollingUpdate.
StatefulSetUpdateStrategyRollingUpdateOptions ¶
Options for StatefulSetUpdateStrategy.rollingUpdate.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.StatefulSetUpdateStrategyRollingUpdateOptions(
partition: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
partition |
typing.Union[int, float] |
If specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet’s .spec.template is updated. All Pods with an ordinal that is less than the partition will not be updated, and, even if they are deleted, they will be recreated at the previous version. |
partitionOptional ¶
partition: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 0
If specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet’s .spec.template is updated. All Pods with an ordinal that is less than the partition will not be updated, and, even if they are deleted, they will be recreated at the previous version.
If the partition is greater than replicas, updates to the pod template will not be propagated to Pods. In most cases you will not need to use a partition, but they are useful if you want to stage an update, roll out a canary, or perform a phased roll out.
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
StatusCause ¶
StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.StatusCause(
field: str = None,
message: str = None,
reason: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
field |
str |
The field of the resource that has caused this error, as named by its JSON serialization. |
message |
str |
A human-readable description of the cause of the error. |
reason |
str |
A machine-readable description of the cause of the error. |
fieldOptional ¶
field: str
- Type: str
The field of the resource that has caused this error, as named by its JSON serialization.
May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Optional.
Examples: “name” - the field “name” on the current resource “items[0].name” - the field “name” on the first array entry in “items”
messageOptional ¶
message: str
- Type: str
A human-readable description of the cause of the error.
This field may be presented as-is to a reader.
reasonOptional ¶
reason: str
- Type: str
A machine-readable description of the cause of the error.
If this value is empty there is no information available.
StatusDetails ¶
StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response.
The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.StatusDetails(
causes: typing.List[StatusCause] = None,
group: str = None,
kind: str = None,
name: str = None,
retry_after_seconds: typing.Union[int, float] = None,
uid: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
causes |
typing.List[cdk8s_plus_31.k8s.StatusCause] |
The Causes array includes more details associated with the StatusReason failure. |
group |
str |
The group attribute of the resource associated with the status StatusReason. |
kind |
str |
The kind attribute of the resource associated with the status StatusReason. |
name |
str |
The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described). |
retry_after_seconds |
typing.Union[int, float] |
If specified, the time in seconds before the operation should be retried. |
uid |
str |
UID of the resource. |
causesOptional ¶
causes: typing.List[StatusCause]
- Type: typing.List[cdk8s_plus_31.k8s.StatusCause]
The Causes array includes more details associated with the StatusReason failure.
Not all StatusReasons may provide detailed causes.
groupOptional ¶
group: str
- Type: str
The group attribute of the resource associated with the status StatusReason.
kindOptional ¶
kind: str
- Type: str
The kind attribute of the resource associated with the status StatusReason.
On some operations may differ from the requested resource Kind. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
nameOptional ¶
name: str
- Type: str
The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).
retry_after_secondsOptional ¶
retry_after_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
If specified, the time in seconds before the operation should be retried.
Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.
uidOptional ¶
uid: str
- Type: str
UID of the resource.
(when there is a single resource which can be described). More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids
StorageOsPersistentVolumeSource ¶
Represents a StorageOS persistent volume resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.StorageOsPersistentVolumeSource(
fs_type: str = None,
read_only: bool = None,
secret_ref: ObjectReference = None,
volume_name: str = None,
volume_namespace: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
fs_type |
str |
fsType is the filesystem type to mount. |
read_only |
bool |
readOnly defaults to false (read/write). |
secret_ref |
cdk8s_plus_31.k8s.ObjectReference |
secretRef specifies the secret to use for obtaining the StorageOS API credentials. |
volume_name |
str |
volumeName is the human-readable name of the StorageOS volume. |
volume_namespace |
str |
volumeNamespace specifies the scope of the volume within StorageOS. |
fs_typeOptional ¶
fs_type: str
- Type: str
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.
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
secret_refOptional ¶
secret_ref: ObjectReference
- Type: cdk8s_plus_31.k8s.ObjectReference
secretRef specifies the secret to use for obtaining the StorageOS API credentials.
If not specified, default values will be attempted.
volume_nameOptional ¶
volume_name: str
- Type: str
volumeName is the human-readable name of the StorageOS volume.
Volume names are only unique within a namespace.
volume_namespaceOptional ¶
volume_namespace: str
- Type: str
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.
StorageOsVolumeSource ¶
Represents a StorageOS persistent volume resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.StorageOsVolumeSource(
fs_type: str = None,
read_only: bool = None,
secret_ref: LocalObjectReference = None,
volume_name: str = None,
volume_namespace: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
fs_type |
str |
fsType is the filesystem type to mount. |
read_only |
bool |
readOnly defaults to false (read/write). |
secret_ref |
cdk8s_plus_31.k8s.LocalObjectReference |
secretRef specifies the secret to use for obtaining the StorageOS API credentials. |
volume_name |
str |
volumeName is the human-readable name of the StorageOS volume. |
volume_namespace |
str |
volumeNamespace specifies the scope of the volume within StorageOS. |
fs_typeOptional ¶
fs_type: str
- Type: str
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.
read_onlyOptional ¶
read_only: bool
- Type: bool
readOnly defaults to false (read/write).
ReadOnly here will force the ReadOnly setting in VolumeMounts.
secret_refOptional ¶
secret_ref: LocalObjectReference
- Type: cdk8s_plus_31.k8s.LocalObjectReference
secretRef specifies the secret to use for obtaining the StorageOS API credentials.
If not specified, default values will be attempted.
volume_nameOptional ¶
volume_name: str
- Type: str
volumeName is the human-readable name of the StorageOS volume.
Volume names are only unique within a namespace.
volume_namespaceOptional ¶
volume_namespace: str
- Type: str
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.
StorageVersionMigrationSpecV1Alpha1 ¶
Spec of the storage version migration.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.StorageVersionMigrationSpecV1Alpha1(
resource: GroupVersionResourceV1Alpha1,
continue_token: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
resource |
cdk8s_plus_31.k8s.GroupVersionResourceV1Alpha1 |
The resource that is being migrated. |
continue_token |
str |
The token used in the list options to get the next chunk of objects to migrate. |
resourceRequired ¶
resource: GroupVersionResourceV1Alpha1
- Type: cdk8s_plus_31.k8s.GroupVersionResourceV1Alpha1
The resource that is being migrated.
The migrator sends requests to the endpoint serving the resource. Immutable.
continue_tokenOptional ¶
continue_token: str
- Type: str
The token used in the list options to get the next chunk of objects to migrate.
When the .status.conditions indicates the migration is “Running”, users can use this token to check the progress of the migration.
Subject ¶
Subject contains a reference to the object or user identities a role binding applies to.
This can either hold a direct API object reference, or a value for non-objects such as user and group names.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Subject(
kind: str,
name: str,
api_group: str = None,
namespace: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kind |
str |
Kind of object being referenced. |
name |
str |
Name of the object being referenced. |
api_group |
str |
APIGroup holds the API group of the referenced subject. |
namespace |
str |
Namespace of the referenced object. |
kindRequired ¶
kind: str
- Type: str
Kind of object being referenced.
Values defined by this API group are “User”, “Group”, and “ServiceAccount”. If the Authorizer does not recognized the kind value, the Authorizer should report an error.
nameRequired ¶
name: str
- Type: str
Name of the object being referenced.
api_groupOptional ¶
api_group: str
- Type: str
- Default: for ServiceAccount subjects. Defaults to “rbac.authorization.k8s.io” for User and Group subjects.
APIGroup holds the API group of the referenced subject.
Defaults to “” for ServiceAccount subjects. Defaults to “rbac.authorization.k8s.io” for User and Group subjects.
namespaceOptional ¶
namespace: str
- Type: str
Namespace of the referenced object.
If the object kind is non-namespace, such as “User” or “Group”, and this value is not empty the Authorizer should report an error.
SubjectAccessReviewSpec ¶
SubjectAccessReviewSpec is a description of the access request.
Exactly one of ResourceAuthorizationAttributes and NonResourceAuthorizationAttributes must be set
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SubjectAccessReviewSpec(
extra: typing.Mapping[typing.List[str]] = None,
groups: typing.List[str] = None,
non_resource_attributes: NonResourceAttributes = None,
resource_attributes: ResourceAttributes = None,
uid: str = None,
user: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
extra |
typing.Mapping[typing.List[str]] |
Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here. |
groups |
typing.List[str] |
Groups is the groups you’re testing for. |
non_resource_attributes |
cdk8s_plus_31.k8s.NonResourceAttributes |
NonResourceAttributes describes information for a non-resource access request. |
resource_attributes |
cdk8s_plus_31.k8s.ResourceAttributes |
ResourceAuthorizationAttributes describes information for a resource access request. |
uid |
str |
UID information about the requesting user. |
user |
str |
User is the user you’re testing for. |
extraOptional ¶
extra: typing.Mapping[typing.List[str]]
- Type: typing.Mapping[typing.List[str]]
Extra corresponds to the user.Info.GetExtra() method from the authenticator. Since that is input to the authorizer it needs a reflection here.
groupsOptional ¶
groups: typing.List[str]
- Type: typing.List[str]
Groups is the groups you’re testing for.
non_resource_attributesOptional ¶
non_resource_attributes: NonResourceAttributes
- Type: cdk8s_plus_31.k8s.NonResourceAttributes
NonResourceAttributes describes information for a non-resource access request.
resource_attributesOptional ¶
resource_attributes: ResourceAttributes
- Type: cdk8s_plus_31.k8s.ResourceAttributes
ResourceAuthorizationAttributes describes information for a resource access request.
uidOptional ¶
uid: str
- Type: str
UID information about the requesting user.
userOptional ¶
user: str
- Type: str
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
SubjectConfiguration ¶
Subject contains a reference to the object or user identities a role binding applies to.
This can either hold a direct API object reference, or a value for non-objects such as user and group names.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.SubjectConfiguration(
kind: str,
name: str,
api_group: str = None,
namespace: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kind |
str |
Kind of object being referenced. |
name |
str |
Name of the object being referenced. |
api_group |
str |
APIGroup holds the API group of the referenced subject. |
namespace |
str |
Namespace of the referenced object. |
kindRequired ¶
kind: str
- Type: str
Kind of object being referenced.
Values defined by this API group are “User”, “Group”, and “ServiceAccount”. If the Authorizer does not recognized the kind value, the Authorizer should report an error.
nameRequired ¶
name: str
- Type: str
Name of the object being referenced.
api_groupOptional ¶
api_group: str
- Type: str
APIGroup holds the API group of the referenced subject.
Defaults to “” for ServiceAccount subjects. Defaults to “rbac.authorization.k8s.io” for User and Group subjects.
namespaceOptional ¶
namespace: str
- Type: str
Namespace of the referenced object.
If the object kind is non-namespace, such as “User” or “Group”, and this value is not empty the Authorizer should report an error.
SubjectV1Beta3 ¶
Subject matches the originator of a request, as identified by the request authentication system.
There are three ways of matching an originator; by user, group, or service account.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SubjectV1Beta3(
kind: str,
group: GroupSubjectV1Beta3 = None,
service_account: ServiceAccountSubjectV1Beta3 = None,
user: UserSubjectV1Beta3 = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kind |
str |
kind indicates which one of the other fields is non-empty. |
group |
cdk8s_plus_31.k8s.GroupSubjectV1Beta3 |
group matches based on user group name. |
service_account |
cdk8s_plus_31.k8s.ServiceAccountSubjectV1Beta3 |
serviceAccount matches ServiceAccounts. |
user |
cdk8s_plus_31.k8s.UserSubjectV1Beta3 |
user matches based on username. |
kindRequired ¶
kind: str
- Type: str
kind indicates which one of the other fields is non-empty.
Required
groupOptional ¶
group: GroupSubjectV1Beta3
- Type: cdk8s_plus_31.k8s.GroupSubjectV1Beta3
group matches based on user group name.
service_accountOptional ¶
service_account: ServiceAccountSubjectV1Beta3
- Type: cdk8s_plus_31.k8s.ServiceAccountSubjectV1Beta3
serviceAccount matches ServiceAccounts.
userOptional ¶
user: UserSubjectV1Beta3
- Type: cdk8s_plus_31.k8s.UserSubjectV1Beta3
user matches based on username.
SuccessPolicy ¶
SuccessPolicy describes when a Job can be declared as succeeded based on the success of some indexes.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SuccessPolicy(
rules: typing.List[SuccessPolicyRule]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
rules |
typing.List[cdk8s_plus_31.k8s.SuccessPolicyRule] |
rules represents the list of alternative rules for the declaring the Jobs as successful before .status.succeeded >= .spec.completions. Once any of the rules are met, the “SucceededCriteriaMet” condition is added, and the lingering pods are removed. The terminal state for such a Job has the “Complete” condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed. |
rulesRequired ¶
rules: typing.List[SuccessPolicyRule]
- Type: typing.List[cdk8s_plus_31.k8s.SuccessPolicyRule]
rules represents the list of alternative rules for the declaring the Jobs as successful before .status.succeeded >= .spec.completions. Once any of the rules are met, the “SucceededCriteriaMet” condition is added, and the lingering pods are removed. The terminal state for such a Job has the “Complete” condition. Additionally, these rules are evaluated in order; Once the Job meets one of the rules, other rules are ignored. At most 20 elements are allowed.
SuccessPolicyRule ¶
SuccessPolicyRule describes rule for declaring a Job as succeeded.
Each rule must have at least one of the “succeededIndexes” or “succeededCount” specified.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.SuccessPolicyRule(
succeeded_count: typing.Union[int, float] = None,
succeeded_indexes: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
succeeded_count |
typing.Union[int, float] |
succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job. |
succeeded_indexes |
str |
succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job. |
succeeded_countOptional ¶
succeeded_count: typing.Union[int, float]
- Type: typing.Union[int, float]
succeededCount specifies the minimal required size of the actual set of the succeeded indexes for the Job.
When succeededCount is used along with succeededIndexes, the check is constrained only to the set of indexes specified by succeededIndexes. For example, given that succeededIndexes is “1-4”, succeededCount is “3”, and completed indexes are “1”, “3”, and “5”, the Job isn’t declared as succeeded because only “1” and “3” indexes are considered in that rules. When this field is null, this doesn’t default to any value and is never evaluated at any time. When specified it needs to be a positive integer.
succeeded_indexesOptional ¶
succeeded_indexes: str
- Type: str
succeededIndexes specifies the set of indexes which need to be contained in the actual set of the succeeded indexes for the Job.
The list of indexes must be within 0 to “.spec.completions-1” and must not contain duplicates. At least one element is required. The indexes are represented as intervals separated by commas. The intervals can be a decimal integer or a pair of decimal integers separated by a hyphen. The number are listed in represented by the first and last element of the series, separated by a hyphen. For example, if the completed indexes are 1, 3, 4, 5 and 7, they are represented as “1,3-5,7”. When this field is null, this field doesn’t default to any value and is never evaluated at any time.
Sysctl ¶
Sysctl defines a kernel parameter to be set.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.Sysctl(
name: str,
value: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name of a property to set. |
value |
str |
Value of a property to set. |
nameRequired ¶
name: str
- Type: str
Name of a property to set.
valueRequired ¶
value: str
- Type: str
Value of a property to set.
Sysctl ¶
Sysctl defines a kernel parameter to be set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Sysctl(
name: str,
value: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
Name of a property to set. |
value |
str |
Value of a property to set. |
nameRequired ¶
name: str
- Type: str
Name of a property to set.
valueRequired ¶
value: str
- Type: str
Value of a property to set.
Taint ¶
The node this Taint is attached to has the “effect” on any pod that does not tolerate the Taint.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Taint(
effect: str,
key: str,
time_added: datetime.datetime = None,
value: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
effect |
str |
Required. |
key |
str |
Required. |
time_added |
datetime.datetime |
TimeAdded represents the time at which the taint was added. |
value |
str |
The taint value corresponding to the taint key. |
effectRequired ¶
effect: str
- Type: str
Required.
The effect of the taint on pods that do not tolerate the taint. Valid effects are NoSchedule, PreferNoSchedule and NoExecute.
keyRequired ¶
key: str
- Type: str
Required.
The taint key to be applied to a node.
time_addedOptional ¶
time_added: datetime.datetime
- Type: datetime.datetime
TimeAdded represents the time at which the taint was added.
It is only written for NoExecute taints.
valueOptional ¶
value: str
- Type: str
The taint value corresponding to the taint key.
TcpSocketAction ¶
TCPSocketAction describes an action based on opening a socket.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.TcpSocketAction(
port: IntOrString,
host: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
port |
cdk8s_plus_31.k8s.IntOrString |
Number or name of the port to access on the container. |
host |
str |
Optional: Host name to connect to, defaults to the pod IP. |
portRequired ¶
port: IntOrString
- Type: cdk8s_plus_31.k8s.IntOrString
Number or name of the port to access on the container.
Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.
hostOptional ¶
host: str
- Type: str
Optional: Host name to connect to, defaults to the pod IP.
TcpSocketProbeOptions ¶
Options for Probe.fromTcpSocket().
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.TcpSocketProbeOptions(
failure_threshold: typing.Union[int, float] = None,
initial_delay_seconds: Duration = None,
period_seconds: Duration = None,
success_threshold: typing.Union[int, float] = None,
timeout_seconds: Duration = None,
host: str = None,
port: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
failure_threshold |
typing.Union[int, float] |
Minimum consecutive failures for the probe to be considered failed after having succeeded. |
initial_delay_seconds |
cdk8s.Duration |
Number of seconds after the container has started before liveness probes are initiated. |
period_seconds |
cdk8s.Duration |
How often (in seconds) to perform the probe. |
success_threshold |
typing.Union[int, float] |
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. |
timeout_seconds |
cdk8s.Duration |
Number of seconds after which the probe times out. |
host |
str |
The host name to connect to on the container. |
port |
typing.Union[int, float] |
The TCP port to connect to on the container. |
failure_thresholdOptional ¶
failure_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 3
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
initial_delay_secondsOptional ¶
initial_delay_seconds: Duration
- Type: cdk8s.Duration
- Default: immediate
Number of seconds after the container has started before liveness probes are initiated.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_secondsOptional ¶
period_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(10) Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
success_threshold: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 1 Must be 1 for liveness and startup. Minimum value is 1.
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.
timeout_secondsOptional ¶
timeout_seconds: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(1)
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
hostOptional ¶
host: str
- Type: str
- Default: defaults to the pod IP
The host name to connect to on the container.
portOptional ¶
port: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to connect to on the container.
TlsSecretProps ¶
Options for TlsSecret.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.TlsSecretProps(
metadata: ApiObjectMetadata = None,
immutable: bool = None,
tls_cert: str,
tls_key: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
immutable |
bool |
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). |
tls_cert |
str |
The TLS cert. |
tls_key |
str |
The TLS key. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
immutableOptional ¶
immutable: bool
- Type: bool
- Default: false
If set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified).
If not set to true, the field can be modified at any time.
tls_certRequired ¶
tls_cert: str
- Type: str
The TLS cert.
tls_keyRequired ¶
tls_key: str
- Type: str
The TLS key.
TokenRequest ¶
TokenRequest contains parameters of a service account token.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.TokenRequest(
audience: str,
expiration_seconds: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
audience |
str |
audience is the intended audience of the token in “TokenRequestSpec”. |
expiration_seconds |
typing.Union[int, float] |
expirationSeconds is the duration of validity of the token in “TokenRequestSpec”. |
audienceRequired ¶
audience: str
- Type: str
audience is the intended audience of the token in “TokenRequestSpec”.
It will default to the audiences of kube apiserver.
expiration_secondsOptional ¶
expiration_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
expirationSeconds is the duration of validity of the token in “TokenRequestSpec”.
It has the same default value of “ExpirationSeconds” in “TokenRequestSpec”.
TokenRequestSpec ¶
TokenRequestSpec contains client provided parameters of a token request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.TokenRequestSpec(
audiences: typing.List[str],
bound_object_ref: BoundObjectReference = None,
expiration_seconds: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
audiences |
typing.List[str] |
Audiences are the intendend audiences of the token. |
bound_object_ref |
cdk8s_plus_31.k8s.BoundObjectReference |
BoundObjectRef is a reference to an object that the token will be bound to. |
expiration_seconds |
typing.Union[int, float] |
ExpirationSeconds is the requested duration of validity of the request. |
audiencesRequired ¶
audiences: typing.List[str]
- Type: typing.List[str]
Audiences are the intendend audiences of the token.
A recipient of a token must identify themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.
bound_object_refOptional ¶
bound_object_ref: BoundObjectReference
- Type: cdk8s_plus_31.k8s.BoundObjectReference
BoundObjectRef is a reference to an object that the token will be bound to.
The token will only be valid for as long as the bound object exists. NOTE: The API server’s TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.
expiration_secondsOptional ¶
expiration_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
ExpirationSeconds is the requested duration of validity of the request.
The token issuer may return a token with a different validity duration so a client needs to check the ‘expiration’ field in a response.
TokenReviewSpec ¶
TokenReviewSpec is a description of the token authentication request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.TokenReviewSpec(
audiences: typing.List[str] = None,
token: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
audiences |
typing.List[str] |
Audiences is a list of the identifiers that the resource server presented with the token identifies as. |
token |
str |
Token is the opaque bearer token. |
audiencesOptional ¶
audiences: typing.List[str]
- Type: typing.List[str]
Audiences is a list of the identifiers that the resource server presented with the token identifies as.
Audience-aware token authenticators will verify that the token was intended for at least one of the audiences in this list. If no audiences are provided, the audience will default to the audience of the Kubernetes apiserver.
tokenOptional ¶
token: str
- Type: str
Token is the opaque bearer token.
Toleration ¶
The pod this Toleration is attached to tolerates any taint that matches the triple
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Toleration(
effect: str = None,
key: str = None,
operator: str = None,
toleration_seconds: typing.Union[int, float] = None,
value: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
effect |
str |
Effect indicates the taint effect to match. |
key |
str |
Key is the taint key that the toleration applies to. |
operator |
str |
Operator represents a key’s relationship to the value. |
toleration_seconds |
typing.Union[int, float] |
TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. |
value |
str |
Value is the taint value the toleration matches to. |
effectOptional ¶
effect: str
- Type: str
Effect indicates the taint effect to match.
Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
keyOptional ¶
key: str
- Type: str
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.
operatorOptional ¶
operator: str
- Type: str
- Default: Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
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.
toleration_secondsOptional ¶
toleration_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
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.
valueOptional ¶
value: str
- Type: str
Value is the taint value the toleration matches to.
If the operator is Exists, the value should be empty, otherwise just a regular string.
TopologySelectorLabelRequirement ¶
A topology selector requirement is a selector that matches given label.
This is an alpha feature and may change in the future.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.TopologySelectorLabelRequirement(
key: str,
values: typing.List[str]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
The label key that the selector applies to. |
values |
typing.List[str] |
An array of string values. |
keyRequired ¶
key: str
- Type: str
The label key that the selector applies to.
valuesRequired ¶
values: typing.List[str]
- Type: typing.List[str]
An array of string values.
One value must match the label to be selected. Each entry in Values is ORed.
TopologySelectorTerm ¶
A topology selector term represents the result of label queries.
A null or empty topology selector term matches no objects. The requirements of them are ANDed. It provides a subset of functionality as NodeSelectorTerm. This is an alpha feature and may change in the future.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.TopologySelectorTerm(
match_label_expressions: typing.List[TopologySelectorLabelRequirement] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
match_label_expressions |
typing.List[cdk8s_plus_31.k8s.TopologySelectorLabelRequirement] |
A list of topology selector requirements by labels. |
match_label_expressionsOptional ¶
match_label_expressions: typing.List[TopologySelectorLabelRequirement]
- Type: typing.List[cdk8s_plus_31.k8s.TopologySelectorLabelRequirement]
A list of topology selector requirements by labels.
TopologySpreadConstraint ¶
TopologySpreadConstraint specifies how to spread matching pods among the given topology.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.TopologySpreadConstraint(
max_skew: typing.Union[int, float],
topology_key: str,
when_unsatisfiable: str,
label_selector: LabelSelector = None,
match_label_keys: typing.List[str] = None,
min_domains: typing.Union[int, float] = None,
node_affinity_policy: str = None,
node_taints_policy: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
max_skew |
typing.Union[int, float] |
MaxSkew describes the degree to which pods may be unevenly distributed. |
topology_key |
str |
TopologyKey is the key of node labels. |
when_unsatisfiable |
str |
WhenUnsatisfiable indicates how to deal with a pod if it doesn’t satisfy the spread constraint. |
label_selector |
cdk8s_plus_31.k8s.LabelSelector |
LabelSelector is used to find matching pods. |
match_label_keys |
typing.List[str] |
MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. |
min_domains |
typing.Union[int, float] |
MinDomains indicates a minimum number of eligible domains. |
node_affinity_policy |
str |
NodeAffinityPolicy indicates how we will treat Pod’s nodeAffinity/nodeSelector when calculating pod topology spread skew. |
node_taints_policy |
str |
NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. |
max_skewRequired ¶
max_skew: typing.Union[int, float]
- Type: typing.Union[int, float]
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.
topology_keyRequired ¶
topology_key: str
- Type: str
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
when_unsatisfiableRequired ¶
when_unsatisfiable: str
- Type: str
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.
label_selectorOptional ¶
label_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
LabelSelector is used to find matching pods.
Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.
match_label_keysOptional ¶
match_label_keys: typing.List[str]
- Type: typing.List[str]
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).
min_domainsOptional ¶
min_domains: typing.Union[int, float]
- Type: typing.Union[int, float]
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.
node_affinity_policyOptional ¶
node_affinity_policy: str
- Type: str
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.
node_taints_policyOptional ¶
node_taints_policy: str
- Type: str
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.
TypedLocalObjectReference ¶
TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.TypedLocalObjectReference(
kind: str,
name: str,
api_group: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kind |
str |
Kind is the type of resource being referenced. |
name |
str |
Name is the name of resource being referenced. |
api_group |
str |
APIGroup is the group for the resource being referenced. |
kindRequired ¶
kind: str
- Type: str
Kind is the type of resource being referenced.
nameRequired ¶
name: str
- Type: str
Name is the name of resource being referenced.
api_groupOptional ¶
api_group: str
- Type: str
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.
TypedObjectReference ¶
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.TypedObjectReference(
kind: str,
name: str,
api_group: str = None,
namespace: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
kind |
str |
Kind is the type of resource being referenced. |
name |
str |
Name is the name of resource being referenced. |
api_group |
str |
APIGroup is the group for the resource being referenced. |
namespace |
str |
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. |
kindRequired ¶
kind: str
- Type: str
Kind is the type of resource being referenced.
nameRequired ¶
name: str
- Type: str
Name is the name of resource being referenced.
api_groupOptional ¶
api_group: str
- Type: str
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.
namespaceOptional ¶
namespace: str
- Type: str
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.
UserSubjectV1Beta3 ¶
UserSubject holds detailed information for user-kind subject.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.UserSubjectV1Beta3(
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name is the username that matches, or “*” to match all usernames. |
nameRequired ¶
name: str
- Type: str
name is the username that matches, or “*” to match all usernames.
Required.
ValidatingAdmissionPolicyBindingSpec ¶
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidatingAdmissionPolicyBindingSpec(
match_resources: MatchResources = None,
param_ref: ParamRef = None,
policy_name: str = None,
validation_actions: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
match_resources |
cdk8s_plus_31.k8s.MatchResources |
MatchResources declares what resources match this binding and will be validated by it. |
param_ref |
cdk8s_plus_31.k8s.ParamRef |
paramRef specifies the parameter resource used to configure the admission control policy. |
policy_name |
str |
PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. |
validation_actions |
typing.List[str] |
validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. |
match_resourcesOptional ¶
match_resources: MatchResources
- Type: cdk8s_plus_31.k8s.MatchResources
MatchResources declares what resources match this binding and will be validated by it.
Note that this is intersected with the policy’s matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.
param_refOptional ¶
param_ref: ParamRef
- Type: cdk8s_plus_31.k8s.ParamRef
paramRef specifies the parameter resource used to configure the admission control policy.
It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
policy_nameOptional ¶
policy_name: str
- Type: str
PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.
validation_actionsOptional ¶
validation_actions: typing.List[str]
- Type: typing.List[str]
validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced.
If a validation evaluates to false it is always enforced according to these actions.
Failures defined by the ValidatingAdmissionPolicy’s FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.
validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.
The supported actions values are:
“Deny” specifies that a validation failure results in a denied request.
“Warn” specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
“Audit” specifies that a validation failure is included in the published audit event for the request. The audit event will contain a validation.policy.admission.k8s.io/validation_failure audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: "validation.policy.admission.k8s.io/validation_failure": "[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]"
Clients should expect to handle additional values by ignoring any values not recognized.
“Deny” and “Warn” may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.
Required.
ValidatingAdmissionPolicyBindingSpecV1Alpha1 ¶
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidatingAdmissionPolicyBindingSpecV1Alpha1(
match_resources: MatchResourcesV1Alpha1 = None,
param_ref: ParamRefV1Alpha1 = None,
policy_name: str = None,
validation_actions: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
match_resources |
cdk8s_plus_31.k8s.MatchResourcesV1Alpha1 |
MatchResources declares what resources match this binding and will be validated by it. |
param_ref |
cdk8s_plus_31.k8s.ParamRefV1Alpha1 |
paramRef specifies the parameter resource used to configure the admission control policy. |
policy_name |
str |
PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. |
validation_actions |
typing.List[str] |
validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. |
match_resourcesOptional ¶
match_resources: MatchResourcesV1Alpha1
- Type: cdk8s_plus_31.k8s.MatchResourcesV1Alpha1
MatchResources declares what resources match this binding and will be validated by it.
Note that this is intersected with the policy’s matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.
param_refOptional ¶
param_ref: ParamRefV1Alpha1
- Type: cdk8s_plus_31.k8s.ParamRefV1Alpha1
paramRef specifies the parameter resource used to configure the admission control policy.
It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
policy_nameOptional ¶
policy_name: str
- Type: str
PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.
validation_actionsOptional ¶
validation_actions: typing.List[str]
- Type: typing.List[str]
validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced.
If a validation evaluates to false it is always enforced according to these actions.
Failures defined by the ValidatingAdmissionPolicy’s FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.
validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.
The supported actions values are:
“Deny” specifies that a validation failure results in a denied request.
“Warn” specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
“Audit” specifies that a validation failure is included in the published audit event for the request. The audit event will contain a validation.policy.admission.k8s.io/validation_failure audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: "validation.policy.admission.k8s.io/validation_failure": "[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]"
Clients should expect to handle additional values by ignoring any values not recognized.
“Deny” and “Warn” may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.
Required.
ValidatingAdmissionPolicyBindingSpecV1Beta1 ¶
ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidatingAdmissionPolicyBindingSpecV1Beta1(
match_resources: MatchResourcesV1Beta1 = None,
param_ref: ParamRefV1Beta1 = None,
policy_name: str = None,
validation_actions: typing.List[str] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
match_resources |
cdk8s_plus_31.k8s.MatchResourcesV1Beta1 |
MatchResources declares what resources match this binding and will be validated by it. |
param_ref |
cdk8s_plus_31.k8s.ParamRefV1Beta1 |
paramRef specifies the parameter resource used to configure the admission control policy. |
policy_name |
str |
PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. |
validation_actions |
typing.List[str] |
validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. |
match_resourcesOptional ¶
match_resources: MatchResourcesV1Beta1
- Type: cdk8s_plus_31.k8s.MatchResourcesV1Beta1
MatchResources declares what resources match this binding and will be validated by it.
Note that this is intersected with the policy’s matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required.
param_refOptional ¶
param_ref: ParamRefV1Beta1
- Type: cdk8s_plus_31.k8s.ParamRefV1Beta1
paramRef specifies the parameter resource used to configure the admission control policy.
It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param.
policy_nameOptional ¶
policy_name: str
- Type: str
PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to.
If the referenced resource does not exist, this binding is considered invalid and will be ignored Required.
validation_actionsOptional ¶
validation_actions: typing.List[str]
- Type: typing.List[str]
validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced.
If a validation evaluates to false it is always enforced according to these actions.
Failures defined by the ValidatingAdmissionPolicy’s FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy.
validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action.
The supported actions values are:
“Deny” specifies that a validation failure results in a denied request.
“Warn” specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses.
“Audit” specifies that a validation failure is included in the published audit event for the request. The audit event will contain a validation.policy.admission.k8s.io/validation_failure audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: "validation.policy.admission.k8s.io/validation_failure": "[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]"
Clients should expect to handle additional values by ignoring any values not recognized.
“Deny” and “Warn” may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers.
Required.
ValidatingAdmissionPolicySpec ¶
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidatingAdmissionPolicySpec(
audit_annotations: typing.List[AuditAnnotation] = None,
failure_policy: str = None,
match_conditions: typing.List[MatchCondition] = None,
match_constraints: MatchResources = None,
param_kind: ParamKind = None,
validations: typing.List[Validation] = None,
variables: typing.List[Variable] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
audit_annotations |
typing.List[cdk8s_plus_31.k8s.AuditAnnotation] |
auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. |
failure_policy |
str |
failurePolicy defines how to handle failures for the admission policy. |
match_conditions |
typing.List[cdk8s_plus_31.k8s.MatchCondition] |
MatchConditions is a list of conditions that must be met for a request to be validated. |
match_constraints |
cdk8s_plus_31.k8s.MatchResources |
MatchConstraints specifies what resources this policy is designed to validate. |
param_kind |
cdk8s_plus_31.k8s.ParamKind |
ParamKind specifies the kind of resources used to parameterize this policy. |
validations |
typing.List[cdk8s_plus_31.k8s.Validation] |
Validations contain CEL expressions which is used to apply the validation. |
variables |
typing.List[cdk8s_plus_31.k8s.Variable] |
Variables contain definitions of variables that can be used in composition of other expressions. |
audit_annotationsOptional ¶
audit_annotations: typing.List[AuditAnnotation]
- Type: typing.List[cdk8s_plus_31.k8s.AuditAnnotation]
auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request.
validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
failure_policyOptional ¶
failure_policy: str
- Type: str
- Default: Fail.
failurePolicy defines how to handle failures for the admission policy.
Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.
failurePolicy does not define how validations that evaluate to false are handled.
When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
Allowed values are Ignore or Fail. Defaults to Fail.
match_conditionsOptional ¶
match_conditions: typing.List[MatchCondition]
- Type: typing.List[cdk8s_plus_31.k8s.MatchCondition]
MatchConditions is a list of conditions that must be met for a request to be validated.
Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
If a parameter object is provided, it can be accessed via the params handle in the same manner as validation expressions.
The exact matching logic is (in order):
- If ANY matchCondition evaluates to FALSE, the policy is skipped.
- If ALL matchConditions evaluate to TRUE, the policy is evaluated.
-
If any matchCondition evaluates to an error (but none are FALSE):
-
If failurePolicy=Fail, reject the request
- If failurePolicy=Ignore, the policy is skipped
match_constraintsOptional ¶
match_constraints: MatchResources
- Type: cdk8s_plus_31.k8s.MatchResources
MatchConstraints specifies what resources this policy is designed to validate.
The AdmissionPolicy cares about a request if it matches all Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.
param_kindOptional ¶
param_kind: ParamKind
- Type: cdk8s_plus_31.k8s.ParamKind
ParamKind specifies the kind of resources used to parameterize this policy.
If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.
validationsOptional ¶
validations: typing.List[Validation]
- Type: typing.List[cdk8s_plus_31.k8s.Validation]
Validations contain CEL expressions which is used to apply the validation.
Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
variablesOptional ¶
variables: typing.List[Variable]
- Type: typing.List[cdk8s_plus_31.k8s.Variable]
Variables contain definitions of variables that can be used in composition of other expressions.
Each variable is defined as a named CEL expression. The variables defined here will be available under variables in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.
The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.
ValidatingAdmissionPolicySpecV1Alpha1 ¶
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidatingAdmissionPolicySpecV1Alpha1(
audit_annotations: typing.List[AuditAnnotationV1Alpha1] = None,
failure_policy: str = None,
match_conditions: typing.List[MatchConditionV1Alpha1] = None,
match_constraints: MatchResourcesV1Alpha1 = None,
param_kind: ParamKindV1Alpha1 = None,
validations: typing.List[ValidationV1Alpha1] = None,
variables: typing.List[VariableV1Alpha1] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
audit_annotations |
typing.List[cdk8s_plus_31.k8s.AuditAnnotationV1Alpha1] |
auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. |
failure_policy |
str |
failurePolicy defines how to handle failures for the admission policy. |
match_conditions |
typing.List[cdk8s_plus_31.k8s.MatchConditionV1Alpha1] |
MatchConditions is a list of conditions that must be met for a request to be validated. |
match_constraints |
cdk8s_plus_31.k8s.MatchResourcesV1Alpha1 |
MatchConstraints specifies what resources this policy is designed to validate. |
param_kind |
cdk8s_plus_31.k8s.ParamKindV1Alpha1 |
ParamKind specifies the kind of resources used to parameterize this policy. |
validations |
typing.List[cdk8s_plus_31.k8s.ValidationV1Alpha1] |
Validations contain CEL expressions which is used to apply the validation. |
variables |
typing.List[cdk8s_plus_31.k8s.VariableV1Alpha1] |
Variables contain definitions of variables that can be used in composition of other expressions. |
audit_annotationsOptional ¶
audit_annotations: typing.List[AuditAnnotationV1Alpha1]
- Type: typing.List[cdk8s_plus_31.k8s.AuditAnnotationV1Alpha1]
auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request.
validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
failure_policyOptional ¶
failure_policy: str
- Type: str
- Default: Fail.
failurePolicy defines how to handle failures for the admission policy.
Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.
failurePolicy does not define how validations that evaluate to false are handled.
When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
Allowed values are Ignore or Fail. Defaults to Fail.
match_conditionsOptional ¶
match_conditions: typing.List[MatchConditionV1Alpha1]
- Type: typing.List[cdk8s_plus_31.k8s.MatchConditionV1Alpha1]
MatchConditions is a list of conditions that must be met for a request to be validated.
Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
If a parameter object is provided, it can be accessed via the params handle in the same manner as validation expressions.
The exact matching logic is (in order):
- If ANY matchCondition evaluates to FALSE, the policy is skipped.
- If ALL matchConditions evaluate to TRUE, the policy is evaluated.
-
If any matchCondition evaluates to an error (but none are FALSE):
-
If failurePolicy=Fail, reject the request
- If failurePolicy=Ignore, the policy is skipped
match_constraintsOptional ¶
match_constraints: MatchResourcesV1Alpha1
- Type: cdk8s_plus_31.k8s.MatchResourcesV1Alpha1
MatchConstraints specifies what resources this policy is designed to validate.
The AdmissionPolicy cares about a request if it matches all Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.
param_kindOptional ¶
param_kind: ParamKindV1Alpha1
- Type: cdk8s_plus_31.k8s.ParamKindV1Alpha1
ParamKind specifies the kind of resources used to parameterize this policy.
If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.
validationsOptional ¶
validations: typing.List[ValidationV1Alpha1]
- Type: typing.List[cdk8s_plus_31.k8s.ValidationV1Alpha1]
Validations contain CEL expressions which is used to apply the validation.
Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
variablesOptional ¶
variables: typing.List[VariableV1Alpha1]
- Type: typing.List[cdk8s_plus_31.k8s.VariableV1Alpha1]
Variables contain definitions of variables that can be used in composition of other expressions.
Each variable is defined as a named CEL expression. The variables defined here will be available under variables in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.
The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.
ValidatingAdmissionPolicySpecV1Beta1 ¶
ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidatingAdmissionPolicySpecV1Beta1(
audit_annotations: typing.List[AuditAnnotationV1Beta1] = None,
failure_policy: str = None,
match_conditions: typing.List[MatchConditionV1Beta1] = None,
match_constraints: MatchResourcesV1Beta1 = None,
param_kind: ParamKindV1Beta1 = None,
validations: typing.List[ValidationV1Beta1] = None,
variables: typing.List[VariableV1Beta1] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
audit_annotations |
typing.List[cdk8s_plus_31.k8s.AuditAnnotationV1Beta1] |
auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. |
failure_policy |
str |
failurePolicy defines how to handle failures for the admission policy. |
match_conditions |
typing.List[cdk8s_plus_31.k8s.MatchConditionV1Beta1] |
MatchConditions is a list of conditions that must be met for a request to be validated. |
match_constraints |
cdk8s_plus_31.k8s.MatchResourcesV1Beta1 |
MatchConstraints specifies what resources this policy is designed to validate. |
param_kind |
cdk8s_plus_31.k8s.ParamKindV1Beta1 |
ParamKind specifies the kind of resources used to parameterize this policy. |
validations |
typing.List[cdk8s_plus_31.k8s.ValidationV1Beta1] |
Validations contain CEL expressions which is used to apply the validation. |
variables |
typing.List[cdk8s_plus_31.k8s.VariableV1Beta1] |
Variables contain definitions of variables that can be used in composition of other expressions. |
audit_annotationsOptional ¶
audit_annotations: typing.List[AuditAnnotationV1Beta1]
- Type: typing.List[cdk8s_plus_31.k8s.AuditAnnotationV1Beta1]
auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request.
validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
failure_policyOptional ¶
failure_policy: str
- Type: str
- Default: Fail.
failurePolicy defines how to handle failures for the admission policy.
Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.
failurePolicy does not define how validations that evaluate to false are handled.
When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
Allowed values are Ignore or Fail. Defaults to Fail.
match_conditionsOptional ¶
match_conditions: typing.List[MatchConditionV1Beta1]
- Type: typing.List[cdk8s_plus_31.k8s.MatchConditionV1Beta1]
MatchConditions is a list of conditions that must be met for a request to be validated.
Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
If a parameter object is provided, it can be accessed via the params handle in the same manner as validation expressions.
The exact matching logic is (in order):
- If ANY matchCondition evaluates to FALSE, the policy is skipped.
- If ALL matchConditions evaluate to TRUE, the policy is evaluated.
-
If any matchCondition evaluates to an error (but none are FALSE):
-
If failurePolicy=Fail, reject the request
- If failurePolicy=Ignore, the policy is skipped
match_constraintsOptional ¶
match_constraints: MatchResourcesV1Beta1
- Type: cdk8s_plus_31.k8s.MatchResourcesV1Beta1
MatchConstraints specifies what resources this policy is designed to validate.
The AdmissionPolicy cares about a request if it matches all Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.
param_kindOptional ¶
param_kind: ParamKindV1Beta1
- Type: cdk8s_plus_31.k8s.ParamKindV1Beta1
ParamKind specifies the kind of resources used to parameterize this policy.
If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null.
validationsOptional ¶
validations: typing.List[ValidationV1Beta1]
- Type: typing.List[cdk8s_plus_31.k8s.ValidationV1Beta1]
Validations contain CEL expressions which is used to apply the validation.
Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
variablesOptional ¶
variables: typing.List[VariableV1Beta1]
- Type: typing.List[cdk8s_plus_31.k8s.VariableV1Beta1]
Variables contain definitions of variables that can be used in composition of other expressions.
Each variable is defined as a named CEL expression. The variables defined here will be available under variables in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy.
The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic.
ValidatingWebhook ¶
ValidatingWebhook describes an admission webhook and the resources and operations it applies to.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidatingWebhook(
admission_review_versions: typing.List[str],
client_config: WebhookClientConfig,
name: str,
side_effects: str,
failure_policy: str = None,
match_conditions: typing.List[MatchCondition] = None,
match_policy: str = None,
namespace_selector: LabelSelector = None,
object_selector: LabelSelector = None,
rules: typing.List[RuleWithOperations] = None,
timeout_seconds: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
admission_review_versions |
typing.List[str] |
AdmissionReviewVersions is an ordered list of preferred AdmissionReview versions the Webhook expects. |
client_config |
cdk8s_plus_31.k8s.WebhookClientConfig |
ClientConfig defines how to communicate with the hook. |
name |
str |
The name of the admission webhook. |
side_effects |
str |
SideEffects states whether this webhook has side effects. |
failure_policy |
str |
FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail. |
match_conditions |
typing.List[cdk8s_plus_31.k8s.MatchCondition] |
MatchConditions is a list of conditions that must be met for a request to be sent to this webhook. |
match_policy |
str |
matchPolicy defines how the “rules” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”. |
namespace_selector |
cdk8s_plus_31.k8s.LabelSelector |
NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector. |
object_selector |
cdk8s_plus_31.k8s.LabelSelector |
ObjectSelector decides whether to run the webhook based on if the object has matching labels. |
rules |
typing.List[cdk8s_plus_31.k8s.RuleWithOperations] |
Rules describes what operations on what resources/subresources the webhook cares about. |
timeout_seconds |
typing.Union[int, float] |
TimeoutSeconds specifies the timeout for this webhook. |
admission_review_versionsRequired ¶
admission_review_versions: typing.List[str]
- Type: typing.List[str]
AdmissionReviewVersions is an ordered list of preferred AdmissionReview versions the Webhook expects.
API server will try to use first version in the list which it supports. If none of the versions specified in this list supported by API server, validation will fail for this object. If a persisted webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail and be subject to the failure policy.
client_configRequired ¶
client_config: WebhookClientConfig
- Type: cdk8s_plus_31.k8s.WebhookClientConfig
ClientConfig defines how to communicate with the hook.
Required
nameRequired ¶
name: str
- Type: str
The name of the admission webhook.
Name should be fully qualified, e.g., imagepolicy.kubernetes.io, where “imagepolicy” is the name of the webhook, and kubernetes.io is the name of the organization. Required.
side_effectsRequired ¶
side_effects: str
- Type: str
SideEffects states whether this webhook has side effects.
Acceptable values are: None, NoneOnDryRun (webhooks created via v1beta1 may also specify Some or Unknown). Webhooks with side effects MUST implement a reconciliation system, since a request may be rejected by a future step in the admission chain and the side effects therefore need to be undone. Requests with the dryRun attribute will be auto-rejected if they match a webhook with sideEffects == Unknown or Some.
failure_policyOptional ¶
failure_policy: str
- Type: str
- Default: Fail.
FailurePolicy defines how unrecognized errors from the admission endpoint are handled - allowed values are Ignore or Fail.
Defaults to Fail.
match_conditionsOptional ¶
match_conditions: typing.List[MatchCondition]
- Type: typing.List[cdk8s_plus_31.k8s.MatchCondition]
MatchConditions is a list of conditions that must be met for a request to be sent to this webhook.
Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
The exact matching logic is (in order):
- If ANY matchCondition evaluates to FALSE, the webhook is skipped.
- If ALL matchConditions evaluate to TRUE, the webhook is called.
-
If any matchCondition evaluates to an error (but none are FALSE):
-
If failurePolicy=Fail, reject the request
- If failurePolicy=Ignore, the error is ignored and the webhook is skipped
match_policyOptional ¶
match_policy: str
- Type: str
- Default: Equivalent”
matchPolicy defines how the “rules” list is used to match incoming requests. Allowed values are “Exact” or “Equivalent”.
- Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the webhook. - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and “rules” only included
apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"], a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the webhook.
Defaults to “Equivalent”
namespace_selectorOptional ¶
namespace_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
NamespaceSelector decides whether to run the webhook on an object based on whether the namespace for that object matches the selector.
If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the webhook.
For example, to run the webhook on any objects whose namespace is not associated with “runlevel” of “0” or “1”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “runlevel”, “operator”: “NotIn”, “values”: [ “0”, “1” ] } ] }
If instead you want to only run the webhook on any objects whose namespace is associated with the “environment” of “prod” or “staging”; you will set the selector as follows: “namespaceSelector”: { “matchExpressions”: [ { “key”: “environment”, “operator”: “In”, “values”: [ “prod”, “staging” ] } ] }
See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels for more examples of label selectors.
Default to the empty LabelSelector, which matches everything.
object_selectorOptional ¶
object_selector: LabelSelector
- Type: cdk8s_plus_31.k8s.LabelSelector
- Default: the empty LabelSelector, which matches everything.
ObjectSelector decides whether to run the webhook based on if the object has matching labels.
objectSelector is evaluated against both the oldObject and newObject that would be sent to the webhook, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything.
rulesOptional ¶
rules: typing.List[RuleWithOperations]
- Type: typing.List[cdk8s_plus_31.k8s.RuleWithOperations]
Rules describes what operations on what resources/subresources the webhook cares about.
The webhook cares about an operation if it matches any Rule. However, in order to prevent ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks from putting the cluster in a state which cannot be recovered from without completely disabling the plugin, ValidatingAdmissionWebhooks and MutatingAdmissionWebhooks are never called on admission requests for ValidatingWebhookConfiguration and MutatingWebhookConfiguration objects.
timeout_secondsOptional ¶
timeout_seconds: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: 10 seconds.
TimeoutSeconds specifies the timeout for this webhook.
After the timeout passes, the webhook call will be ignored or the API call will fail based on the failure policy. The timeout value must be between 1 and 30 seconds. Default to 10 seconds.
Validation ¶
Validation specifies the CEL expression which is used to apply the validation.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Validation(
expression: str,
message: str = None,
message_expression: str = None,
reason: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression represents the expression which will be evaluated by CEL. |
message |
str |
Message represents the message displayed when validation fails. |
message_expression |
str |
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. |
reason |
str |
Reason represents a machine-readable description of why this validation failed. |
expressionRequired ¶
expression: str
- Type: str
Expression represents the expression which will be evaluated by CEL.
ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
- ‘object’ - The object from the incoming request. The value is null for DELETE requests. - ‘oldObject’ - The existing object. The value is null for CREATE requests. - ‘request’ - Attributes of the API request(ref). - ‘params’ - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - ‘namespaceObject’ - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - ‘variables’ - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named ‘foo’ can be accessed as ‘variables.foo’.
- ‘authorizer’ - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
- ‘authorizer.requestResource’ - A CEL ResourceCheck constructed from the ‘authorizer’ and configured with the request resource.
The apiVersion, kind, metadata.name and metadata.generateName are always accessible from the root of the object. No other metadata properties are accessible.
Only property names of the form [a-zA-Z_.-/][a-zA-Z0-9_.-/]* are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - ‘’ escapes to ‘underscores’ - ‘.’ escapes to ‘dot’ - ‘-’ escapes to ‘dash’ - ‘/’ escapes to ‘slash’ - Property names that exactly match a CEL RESERVED keyword escape to ‘{keyword}__’. The keywords are:
“true”, “false”, “null”, “in”, “as”, “break”, “const”, “continue”, “else”, “for”, “function”, “if”,
“import”, “let”, “loop”, “package”, “namespace”, “return”.
Examples:
- Expression accessing a property named “namespace”: {“Expression”: “object.namespace > 0”}
- Expression accessing a property named “x-prop”: {“Expression”: “object.x__dash__prop > 0”}
- Expression accessing a property named “redact__d”: {“Expression”: “object.redact__underscores__d > 0”}
Equality on arrays with list type of ‘set’ or ‘map’ ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
- ‘set’:
X + Yperforms a union where the array positions of all elements inXare preserved and non-intersecting elements inYare appended, retaining their partial order. - ‘map’:
X + Yperforms a merge where the array positions of all keys inXare preserved but the values are overwritten by values inYwhen the key sets ofXandYintersect. Elements inYwith non-intersecting keys are appended, retaining their partial order. Required.
messageOptional ¶
message: str
- Type: str
Message represents the message displayed when validation fails.
The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is “failed rule: {Rule}”. e.g. “must be a URL with the host matching spec.host” If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is “failed Expression: {Expression}”.
message_expressionOptional ¶
message_expression: str
- Type: str
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the expression except for ‘authorizer’ and ‘authorizer.requestResource’. Example: “object.x must be less than max (“+string(params.max)+”)”
reasonOptional ¶
reason: str
- Type: str
Reason represents a machine-readable description of why this validation failed.
If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: “Unauthorized”, “Forbidden”, “Invalid”, “RequestEntityTooLarge”. If not set, StatusReasonInvalid is used in the response to the client.
ValidationRule ¶
ValidationRule describes a validation rule written in the CEL expression language.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidationRule(
rule: str,
field_path: str = None,
message: str = None,
message_expression: str = None,
optional_old_self: bool = None,
reason: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
rule |
str |
Rule represents the expression which will be evaluated by CEL. |
field_path |
str |
fieldPath represents the field path returned when the validation fails. |
message |
str |
Message represents the message displayed when validation fails. |
message_expression |
str |
MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. |
optional_old_self |
bool |
optionalOldSelf is used to opt a transition rule into evaluation even when the object is first created, or if the old object is missing the value. |
reason |
str |
reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. |
ruleRequired ¶
rule: str
- Type: str
Rule represents the expression which will be evaluated by CEL.
ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The self variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {“rule”: “self.status.actual <= self.spec.maxDesired”}
If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable via self.field and field presence can be checked via has(self.field). Null valued fields are treated as absent fields in CEL expressions. If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map are accessible via self[mapKey], map containment can be checked via mapKey in self and all entries of the map are accessible via CEL macros and functions such as self.all(...). If the Rule is scoped to an array, the elements of the array are accessible via self[i] and also by macros and functions. If the Rule is scoped to a scalar, self is bound to the scalar value. Examples: - Rule scoped to a map of objects: {“rule”: “self.components[‘Widget’].priority < 10”} - Rule scoped to a list of integers: {“rule”: “self.values.all(value, value >= 0 && value < 100)”} - Rule scoped to a string value: {“rule”: “self.startsWith(‘kube’)”}
The apiVersion, kind, metadata.name and metadata.generateName are always accessible from the root of the object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible.
Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL expressions. This includes: - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - Object properties where the property schema is of an “unknown type”. An “unknown type” is recursively defined as:
- A schema with no type and x-kubernetes-preserve-unknown-fields set to true
- An array where the items schema is of an “unknown type”
- An object where the additionalProperties schema is of an “unknown type”
Only property names of the form [a-zA-Z_.-/][a-zA-Z0-9_.-/]* are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - ‘’ escapes to ‘underscores’ - ‘.’ escapes to ‘dot’ - ‘-’ escapes to ‘dash’ - ‘/’ escapes to ‘slash’ - Property names that exactly match a CEL RESERVED keyword escape to ‘{keyword}__’. The keywords are:
“true”, “false”, “null”, “in”, “as”, “break”, “const”, “continue”, “else”, “for”, “function”, “if”,
“import”, “let”, “loop”, “package”, “namespace”, “return”.
Examples:
- Rule accessing a property named “namespace”: {“rule”: “self.namespace > 0”}
- Rule accessing a property named “x-prop”: {“rule”: “self.x__dash__prop > 0”}
- Rule accessing a property named “redact__d”: {“rule”: “self.redact__underscores__d > 0”}
Equality on arrays with x-kubernetes-list-type of ‘set’ or ‘map’ ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
- ‘set’:
X + Yperforms a union where the array positions of all elements inXare preserved and non-intersecting elements inYare appended, retaining their partial order. - ‘map’:
X + Yperforms a merge where the array positions of all keys inXare preserved but the values are overwritten by values inYwhen the key sets ofXandYintersect. Elements inYwith non-intersecting keys are appended, retaining their partial order.
If rule makes use of the oldSelf variable it is implicitly a transition rule.
By default, the oldSelf variable is the same type as self. When optionalOldSelf is true, the oldSelf variable is a CEL optional
variable whose value() is the same type as self.
See the documentation for the optionalOldSelf field for details.
Transition rules by default are applied only on UPDATE requests and are skipped if an old value could not be found. You can opt a transition rule into unconditional evaluation by setting optionalOldSelf to true.
field_pathOptional ¶
field_path: str
- Type: str
fieldPath represents the field path returned when the validation fails.
It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute foo under a map testMap, the fieldPath could be set to .testMap.foo If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. .testList It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to JSONPath support in Kubernetes for more info. Numeric index of array is not supported. For field name which contains special characters, use ['specialName'] to refer the field name. e.g. for attribute foo.34$ appears in a list testList, the fieldPath could be set to .testList['foo.34$']
messageOptional ¶
message: str
- Type: str
Message represents the message displayed when validation fails.
The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is “failed rule: {Rule}”. e.g. “must be a URL with the host matching spec.host”
message_expressionOptional ¶
message_expression: str
- Type: str
MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a rule, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the rule; the only difference is the return type. Example: “x must be less than max (“+string(self.max)+”)”
optional_old_selfOptional ¶
optional_old_self: bool
- Type: bool
optionalOldSelf is used to opt a transition rule into evaluation even when the object is first created, or if the old object is missing the value.
When enabled oldSelf will be a CEL optional whose value will be None if there is no old value, or when the object is initially created.
You may check for presence of oldSelf using oldSelf.hasValue() and unwrap it after checking using oldSelf.value(). Check the CEL documentation for Optional types for more information: https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes
May not be set unless oldSelf is used in rule.
reasonOptional ¶
reason: str
- Type: str
reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule.
The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: “FieldValueInvalid”, “FieldValueForbidden”, “FieldValueRequired”, “FieldValueDuplicate”. If not set, default to use “FieldValueInvalid”. All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.
ValidationV1Alpha1 ¶
Validation specifies the CEL expression which is used to apply the validation.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidationV1Alpha1(
expression: str,
message: str = None,
message_expression: str = None,
reason: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression represents the expression which will be evaluated by CEL. |
message |
str |
Message represents the message displayed when validation fails. |
message_expression |
str |
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. |
reason |
str |
Reason represents a machine-readable description of why this validation failed. |
expressionRequired ¶
expression: str
- Type: str
Expression represents the expression which will be evaluated by CEL.
ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
- ‘object’ - The object from the incoming request. The value is null for DELETE requests. - ‘oldObject’ - The existing object. The value is null for CREATE requests. - ‘request’ - Attributes of the API request(ref). - ‘params’ - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - ‘namespaceObject’ - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - ‘variables’ - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named ‘foo’ can be accessed as ‘variables.foo’.
- ‘authorizer’ - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
- ‘authorizer.requestResource’ - A CEL ResourceCheck constructed from the ‘authorizer’ and configured with the request resource.
The apiVersion, kind, metadata.name and metadata.generateName are always accessible from the root of the object. No other metadata properties are accessible.
Only property names of the form [a-zA-Z_.-/][a-zA-Z0-9_.-/]* are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - ‘’ escapes to ‘underscores’ - ‘.’ escapes to ‘dot’ - ‘-’ escapes to ‘dash’ - ‘/’ escapes to ‘slash’ - Property names that exactly match a CEL RESERVED keyword escape to ‘{keyword}__’. The keywords are:
“true”, “false”, “null”, “in”, “as”, “break”, “const”, “continue”, “else”, “for”, “function”, “if”,
“import”, “let”, “loop”, “package”, “namespace”, “return”.
Examples:
- Expression accessing a property named “namespace”: {“Expression”: “object.namespace > 0”}
- Expression accessing a property named “x-prop”: {“Expression”: “object.x__dash__prop > 0”}
- Expression accessing a property named “redact__d”: {“Expression”: “object.redact__underscores__d > 0”}
Equality on arrays with list type of ‘set’ or ‘map’ ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
- ‘set’:
X + Yperforms a union where the array positions of all elements inXare preserved and non-intersecting elements inYare appended, retaining their partial order. - ‘map’:
X + Yperforms a merge where the array positions of all keys inXare preserved but the values are overwritten by values inYwhen the key sets ofXandYintersect. Elements inYwith non-intersecting keys are appended, retaining their partial order. Required.
messageOptional ¶
message: str
- Type: str
Message represents the message displayed when validation fails.
The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is “failed rule: {Rule}”. e.g. “must be a URL with the host matching spec.host” If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is “failed Expression: {Expression}”.
message_expressionOptional ¶
message_expression: str
- Type: str
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the expression except for ‘authorizer’ and ‘authorizer.requestResource’. Example: “object.x must be less than max (“+string(params.max)+”)”
reasonOptional ¶
reason: str
- Type: str
Reason represents a machine-readable description of why this validation failed.
If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: “Unauthorized”, “Forbidden”, “Invalid”, “RequestEntityTooLarge”. If not set, StatusReasonInvalid is used in the response to the client.
ValidationV1Beta1 ¶
Validation specifies the CEL expression which is used to apply the validation.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.ValidationV1Beta1(
expression: str,
message: str = None,
message_expression: str = None,
reason: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression represents the expression which will be evaluated by CEL. |
message |
str |
Message represents the message displayed when validation fails. |
message_expression |
str |
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. |
reason |
str |
Reason represents a machine-readable description of why this validation failed. |
expressionRequired ¶
expression: str
- Type: str
Expression represents the expression which will be evaluated by CEL.
ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables:
- ‘object’ - The object from the incoming request. The value is null for DELETE requests. - ‘oldObject’ - The existing object. The value is null for CREATE requests. - ‘request’ - Attributes of the API request(ref). - ‘params’ - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - ‘namespaceObject’ - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - ‘variables’ - Map of composited variables, from its name to its lazily evaluated value. For example, a variable named ‘foo’ can be accessed as ‘variables.foo’.
- ‘authorizer’ - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz
- ‘authorizer.requestResource’ - A CEL ResourceCheck constructed from the ‘authorizer’ and configured with the request resource.
The apiVersion, kind, metadata.name and metadata.generateName are always accessible from the root of the object. No other metadata properties are accessible.
Only property names of the form [a-zA-Z_.-/][a-zA-Z0-9_.-/]* are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - ‘’ escapes to ‘underscores’ - ‘.’ escapes to ‘dot’ - ‘-’ escapes to ‘dash’ - ‘/’ escapes to ‘slash’ - Property names that exactly match a CEL RESERVED keyword escape to ‘{keyword}__’. The keywords are:
“true”, “false”, “null”, “in”, “as”, “break”, “const”, “continue”, “else”, “for”, “function”, “if”,
“import”, “let”, “loop”, “package”, “namespace”, “return”.
Examples:
- Expression accessing a property named “namespace”: {“Expression”: “object.namespace > 0”}
- Expression accessing a property named “x-prop”: {“Expression”: “object.x__dash__prop > 0”}
- Expression accessing a property named “redact__d”: {“Expression”: “object.redact__underscores__d > 0”}
Equality on arrays with list type of ‘set’ or ‘map’ ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type:
- ‘set’:
X + Yperforms a union where the array positions of all elements inXare preserved and non-intersecting elements inYare appended, retaining their partial order. - ‘map’:
X + Yperforms a merge where the array positions of all keys inXare preserved but the values are overwritten by values inYwhen the key sets ofXandYintersect. Elements inYwith non-intersecting keys are appended, retaining their partial order. Required.
messageOptional ¶
message: str
- Type: str
Message represents the message displayed when validation fails.
The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is “failed rule: {Rule}”. e.g. “must be a URL with the host matching spec.host” If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is “failed Expression: {Expression}”.
message_expressionOptional ¶
message_expression: str
- Type: str
messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails.
Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the expression except for ‘authorizer’ and ‘authorizer.requestResource’. Example: “object.x must be less than max (“+string(params.max)+”)”
reasonOptional ¶
reason: str
- Type: str
Reason represents a machine-readable description of why this validation failed.
If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: “Unauthorized”, “Forbidden”, “Invalid”, “RequestEntityTooLarge”. If not set, StatusReasonInvalid is used in the response to the client.
Variable ¶
Variable is the definition of a variable that is used for composition.
A variable is defined as a named expression.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Variable(
expression: str,
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression is the expression that will be evaluated as the value of the variable. |
name |
str |
Name is the name of the variable. |
expressionRequired ¶
expression: str
- Type: str
Expression is the expression that will be evaluated as the value of the variable.
The CEL expression has access to the same identifiers as the CEL expressions in Validation.
nameRequired ¶
name: str
- Type: str
Name is the name of the variable.
The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through variables For example, if name is “foo”, the variable will be available as variables.foo
VariableV1Alpha1 ¶
Variable is the definition of a variable that is used for composition.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VariableV1Alpha1(
expression: str,
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression is the expression that will be evaluated as the value of the variable. |
name |
str |
Name is the name of the variable. |
expressionRequired ¶
expression: str
- Type: str
Expression is the expression that will be evaluated as the value of the variable.
The CEL expression has access to the same identifiers as the CEL expressions in Validation.
nameRequired ¶
name: str
- Type: str
Name is the name of the variable.
The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through variables For example, if name is “foo”, the variable will be available as variables.foo
VariableV1Beta1 ¶
Variable is the definition of a variable that is used for composition.
A variable is defined as a named expression.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VariableV1Beta1(
expression: str,
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
expression |
str |
Expression is the expression that will be evaluated as the value of the variable. |
name |
str |
Name is the name of the variable. |
expressionRequired ¶
expression: str
- Type: str
Expression is the expression that will be evaluated as the value of the variable.
The CEL expression has access to the same identifiers as the CEL expressions in Validation.
nameRequired ¶
name: str
- Type: str
Name is the name of the variable.
The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through variables For example, if name is “foo”, the variable will be available as variables.foo
Volume ¶
Volume represents a named volume in a pod that may be accessed by any container in the pod.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.Volume(
name: str,
aws_elastic_block_store: AwsElasticBlockStoreVolumeSource = None,
azure_disk: AzureDiskVolumeSource = None,
azure_file: AzureFileVolumeSource = None,
cephfs: CephFsVolumeSource = None,
cinder: CinderVolumeSource = None,
config_map: ConfigMapVolumeSource = None,
csi: CsiVolumeSource = None,
downward_api: DownwardApiVolumeSource = None,
empty_dir: EmptyDirVolumeSource = None,
ephemeral: EphemeralVolumeSource = None,
fc: FcVolumeSource = None,
flex_volume: FlexVolumeSource = None,
flocker: FlockerVolumeSource = None,
gce_persistent_disk: GcePersistentDiskVolumeSource = None,
git_repo: GitRepoVolumeSource = None,
glusterfs: GlusterfsVolumeSource = None,
host_path: HostPathVolumeSource = None,
image: ImageVolumeSource = None,
iscsi: IscsiVolumeSource = None,
nfs: NfsVolumeSource = None,
persistent_volume_claim: PersistentVolumeClaimVolumeSource = None,
photon_persistent_disk: PhotonPersistentDiskVolumeSource = None,
portworx_volume: PortworxVolumeSource = None,
projected: ProjectedVolumeSource = None,
quobyte: QuobyteVolumeSource = None,
rbd: RbdVolumeSource = None,
scale_io: ScaleIoVolumeSource = None,
secret: SecretVolumeSource = None,
storageos: StorageOsVolumeSource = None,
vsphere_volume: VsphereVirtualDiskVolumeSource = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
name of the volume. |
aws_elastic_block_store |
cdk8s_plus_31.k8s.AwsElasticBlockStoreVolumeSource |
awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. |
azure_disk |
cdk8s_plus_31.k8s.AzureDiskVolumeSource |
azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. |
azure_file |
cdk8s_plus_31.k8s.AzureFileVolumeSource |
azureFile represents an Azure File Service mount on the host and bind mount to the pod. |
cephfs |
cdk8s_plus_31.k8s.CephFsVolumeSource |
cephFS represents a Ceph FS mount on the host that shares a pod’s lifetime. |
cinder |
cdk8s_plus_31.k8s.CinderVolumeSource |
cinder represents a cinder volume attached and mounted on kubelets host machine. |
config_map |
cdk8s_plus_31.k8s.ConfigMapVolumeSource |
configMap represents a configMap that should populate this volume. |
csi |
cdk8s_plus_31.k8s.CsiVolumeSource |
csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). |
downward_api |
cdk8s_plus_31.k8s.DownwardApiVolumeSource |
downwardAPI represents downward API about the pod that should populate this volume. |
empty_dir |
cdk8s_plus_31.k8s.EmptyDirVolumeSource |
emptyDir represents a temporary directory that shares a pod’s lifetime. |
ephemeral |
cdk8s_plus_31.k8s.EphemeralVolumeSource |
ephemeral represents a volume that is handled by a cluster storage driver. |
fc |
cdk8s_plus_31.k8s.FcVolumeSource |
fc represents a Fibre Channel resource that is attached to a kubelet’s host machine and then exposed to the pod. |
flex_volume |
cdk8s_plus_31.k8s.FlexVolumeSource |
flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. |
flocker |
cdk8s_plus_31.k8s.FlockerVolumeSource |
flocker represents a Flocker volume attached to a kubelet’s host machine. |
gce_persistent_disk |
cdk8s_plus_31.k8s.GcePersistentDiskVolumeSource |
gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. |
git_repo |
cdk8s_plus_31.k8s.GitRepoVolumeSource |
gitRepo represents a git repository at a particular revision. |
glusterfs |
cdk8s_plus_31.k8s.GlusterfsVolumeSource |
glusterfs represents a Glusterfs mount on the host that shares a pod’s lifetime. |
host_path |
cdk8s_plus_31.k8s.HostPathVolumeSource |
hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. |
image |
cdk8s_plus_31.k8s.ImageVolumeSource |
image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet’s host machine. |
iscsi |
cdk8s_plus_31.k8s.IscsiVolumeSource |
iscsi represents an ISCSI Disk resource that is attached to a kubelet’s host machine and then exposed to the pod. |
nfs |
cdk8s_plus_31.k8s.NfsVolumeSource |
nfs represents an NFS mount on the host that shares a pod’s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs. |
persistent_volume_claim |
cdk8s_plus_31.k8s.PersistentVolumeClaimVolumeSource |
persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. |
photon_persistent_disk |
cdk8s_plus_31.k8s.PhotonPersistentDiskVolumeSource |
photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. |
portworx_volume |
cdk8s_plus_31.k8s.PortworxVolumeSource |
portworxVolume represents a portworx volume attached and mounted on kubelets host machine. |
projected |
cdk8s_plus_31.k8s.ProjectedVolumeSource |
projected items for all in one resources secrets, configmaps, and downward API. |
quobyte |
cdk8s_plus_31.k8s.QuobyteVolumeSource |
quobyte represents a Quobyte mount on the host that shares a pod’s lifetime. |
rbd |
cdk8s_plus_31.k8s.RbdVolumeSource |
rbd represents a Rados Block Device mount on the host that shares a pod’s lifetime. |
scale_io |
cdk8s_plus_31.k8s.ScaleIoVolumeSource |
scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. |
secret |
cdk8s_plus_31.k8s.SecretVolumeSource |
secret represents a secret that should populate this volume. |
storageos |
cdk8s_plus_31.k8s.StorageOsVolumeSource |
storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. |
vsphere_volume |
cdk8s_plus_31.k8s.VsphereVirtualDiskVolumeSource |
vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. |
nameRequired ¶
name: str
- Type: str
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
aws_elastic_block_storeOptional ¶
aws_elastic_block_store: AwsElasticBlockStoreVolumeSource
- Type: cdk8s_plus_31.k8s.AwsElasticBlockStoreVolumeSource
awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet’s host machine and then exposed to the pod.
More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
azure_diskOptional ¶
azure_disk: AzureDiskVolumeSource
- Type: cdk8s_plus_31.k8s.AzureDiskVolumeSource
azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
azure_fileOptional ¶
azure_file: AzureFileVolumeSource
- Type: cdk8s_plus_31.k8s.AzureFileVolumeSource
azureFile represents an Azure File Service mount on the host and bind mount to the pod.
cephfsOptional ¶
cephfs: CephFsVolumeSource
- Type: cdk8s_plus_31.k8s.CephFsVolumeSource
cephFS represents a Ceph FS mount on the host that shares a pod’s lifetime.
cinderOptional ¶
cinder: CinderVolumeSource
- Type: cdk8s_plus_31.k8s.CinderVolumeSource
cinder represents a cinder volume attached and mounted on kubelets host machine.
More info: https://examples.k8s.io/mysql-cinder-pd/README.md
config_mapOptional ¶
config_map: ConfigMapVolumeSource
- Type: cdk8s_plus_31.k8s.ConfigMapVolumeSource
configMap represents a configMap that should populate this volume.
csiOptional ¶
csi: CsiVolumeSource
- Type: cdk8s_plus_31.k8s.CsiVolumeSource
csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
downward_apiOptional ¶
downward_api: DownwardApiVolumeSource
- Type: cdk8s_plus_31.k8s.DownwardApiVolumeSource
downwardAPI represents downward API about the pod that should populate this volume.
empty_dirOptional ¶
empty_dir: EmptyDirVolumeSource
- Type: cdk8s_plus_31.k8s.EmptyDirVolumeSource
emptyDir represents a temporary directory that shares a pod’s lifetime.
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
ephemeralOptional ¶
ephemeral: EphemeralVolumeSource
- Type: cdk8s_plus_31.k8s.EphemeralVolumeSource
ephemeral represents a volume that is handled by a cluster storage driver.
The volume’s lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed.
Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim).
Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod.
Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information.
A pod can use both types of ephemeral volumes and persistent volumes at the same time.
fcOptional ¶
fc: FcVolumeSource
- Type: cdk8s_plus_31.k8s.FcVolumeSource
fc represents a Fibre Channel resource that is attached to a kubelet’s host machine and then exposed to the pod.
flex_volumeOptional ¶
flex_volume: FlexVolumeSource
- Type: cdk8s_plus_31.k8s.FlexVolumeSource
flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.
flockerOptional ¶
flocker: FlockerVolumeSource
- Type: cdk8s_plus_31.k8s.FlockerVolumeSource
flocker represents a Flocker volume attached to a kubelet’s host machine.
This depends on the Flocker control service being running
gce_persistent_diskOptional ¶
gce_persistent_disk: GcePersistentDiskVolumeSource
- Type: cdk8s_plus_31.k8s.GcePersistentDiskVolumeSource
gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet’s host machine and then exposed to the pod.
More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk
git_repoOptional ¶
git_repo: GitRepoVolumeSource
- Type: cdk8s_plus_31.k8s.GitRepoVolumeSource
gitRepo represents a git repository at a particular revision.
DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod’s container.
glusterfsOptional ¶
glusterfs: GlusterfsVolumeSource
- Type: cdk8s_plus_31.k8s.GlusterfsVolumeSource
glusterfs represents a Glusterfs mount on the host that shares a pod’s lifetime.
More info: https://examples.k8s.io/volumes/glusterfs/README.md
host_pathOptional ¶
host_path: HostPathVolumeSource
- Type: cdk8s_plus_31.k8s.HostPathVolumeSource
hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container.
This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath
imageOptional ¶
image: ImageVolumeSource
- Type: cdk8s_plus_31.k8s.ImageVolumeSource
image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet’s host machine.
The volume is resolved at pod startup depending on which PullPolicy value is provided:
- 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.
The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. The OCI object gets mounted in a single directory (spec.containers[].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. The volume will be mounted read-only (ro) and non-executable files (noexec). Sub path mounts for containers are not supported (spec.containers[].volumeMounts.subpath). The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
iscsiOptional ¶
iscsi: IscsiVolumeSource
- Type: cdk8s_plus_31.k8s.IscsiVolumeSource
iscsi represents an ISCSI Disk resource that is attached to a kubelet’s host machine and then exposed to the pod.
More info: https://examples.k8s.io/volumes/iscsi/README.md
nfsOptional ¶
nfs: NfsVolumeSource
- Type: cdk8s_plus_31.k8s.NfsVolumeSource
nfs represents an NFS mount on the host that shares a pod’s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs.
persistent_volume_claimOptional ¶
persistent_volume_claim: PersistentVolumeClaimVolumeSource
- Type: cdk8s_plus_31.k8s.PersistentVolumeClaimVolumeSource
persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
photon_persistent_diskOptional ¶
photon_persistent_disk: PhotonPersistentDiskVolumeSource
- Type: cdk8s_plus_31.k8s.PhotonPersistentDiskVolumeSource
photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine.
portworx_volumeOptional ¶
portworx_volume: PortworxVolumeSource
- Type: cdk8s_plus_31.k8s.PortworxVolumeSource
portworxVolume represents a portworx volume attached and mounted on kubelets host machine.
projectedOptional ¶
projected: ProjectedVolumeSource
- Type: cdk8s_plus_31.k8s.ProjectedVolumeSource
projected items for all in one resources secrets, configmaps, and downward API.
quobyteOptional ¶
quobyte: QuobyteVolumeSource
- Type: cdk8s_plus_31.k8s.QuobyteVolumeSource
quobyte represents a Quobyte mount on the host that shares a pod’s lifetime.
rbdOptional ¶
rbd: RbdVolumeSource
- Type: cdk8s_plus_31.k8s.RbdVolumeSource
rbd represents a Rados Block Device mount on the host that shares a pod’s lifetime.
More info: https://examples.k8s.io/volumes/rbd/README.md
scale_ioOptional ¶
scale_io: ScaleIoVolumeSource
- Type: cdk8s_plus_31.k8s.ScaleIoVolumeSource
scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
secretOptional ¶
secret: SecretVolumeSource
- Type: cdk8s_plus_31.k8s.SecretVolumeSource
secret represents a secret that should populate this volume.
More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
storageosOptional ¶
storageos: StorageOsVolumeSource
- Type: cdk8s_plus_31.k8s.StorageOsVolumeSource
storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
vsphere_volumeOptional ¶
vsphere_volume: VsphereVirtualDiskVolumeSource
- Type: cdk8s_plus_31.k8s.VsphereVirtualDiskVolumeSource
vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine.
VolumeAttachmentSource ¶
VolumeAttachmentSource represents a volume that should be attached.
Right now only PersistenVolumes can be attached via external attacher, in future we may allow also inline volumes in pods. Exactly one member can be set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VolumeAttachmentSource(
inline_volume_spec: PersistentVolumeSpec = None,
persistent_volume_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
inline_volume_spec |
cdk8s_plus_31.k8s.PersistentVolumeSpec |
inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod’s inline VolumeSource. |
persistent_volume_name |
str |
persistentVolumeName represents the name of the persistent volume to attach. |
inline_volume_specOptional ¶
inline_volume_spec: PersistentVolumeSpec
- Type: cdk8s_plus_31.k8s.PersistentVolumeSpec
inlineVolumeSpec contains all the information necessary to attach a persistent volume defined by a pod’s inline VolumeSource.
This field is populated only for the CSIMigration feature. It contains translated fields from a pod’s inline VolumeSource to a PersistentVolumeSpec. This field is beta-level and is only honored by servers that enabled the CSIMigration feature.
persistent_volume_nameOptional ¶
persistent_volume_name: str
- Type: str
persistentVolumeName represents the name of the persistent volume to attach.
VolumeAttachmentSpec ¶
VolumeAttachmentSpec is the specification of a VolumeAttachment request.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VolumeAttachmentSpec(
attacher: str,
node_name: str,
source: VolumeAttachmentSource
)
Properties ¶
| Name | Type | Description |
|---|---|---|
attacher |
str |
attacher indicates the name of the volume driver that MUST handle this request. |
node_name |
str |
nodeName represents the node that the volume should be attached to. |
source |
cdk8s_plus_31.k8s.VolumeAttachmentSource |
source represents the volume that should be attached. |
attacherRequired ¶
attacher: str
- Type: str
attacher indicates the name of the volume driver that MUST handle this request.
This is the name returned by GetPluginName().
node_nameRequired ¶
node_name: str
- Type: str
nodeName represents the node that the volume should be attached to.
sourceRequired ¶
source: VolumeAttachmentSource
- Type: cdk8s_plus_31.k8s.VolumeAttachmentSource
source represents the volume that should be attached.
VolumeDevice ¶
volumeDevice describes a mapping of a raw block device within a container.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VolumeDevice(
device_path: str,
name: str
)
Properties ¶
| Name | Type | Description |
|---|---|---|
device_path |
str |
devicePath is the path inside of the container that the device will be mapped to. |
name |
str |
name must match the name of a persistentVolumeClaim in the pod. |
device_pathRequired ¶
device_path: str
- Type: str
devicePath is the path inside of the container that the device will be mapped to.
nameRequired ¶
name: str
- Type: str
name must match the name of a persistentVolumeClaim in the pod.
VolumeMount ¶
Mount a volume from the pod to the container.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.VolumeMount(
propagation: MountPropagation = None,
read_only: bool = None,
sub_path: str = None,
sub_path_expr: str = None,
path: str,
volume: Volume
)
Properties ¶
| Name | Type | Description |
|---|---|---|
propagation |
MountPropagation |
Determines how mounts are propagated from the host to container and the other way around. |
read_only |
bool |
Mounted read-only if true, read-write otherwise (false or unspecified). |
sub_path |
str |
Path within the volume from which the container’s volume should be mounted.). |
sub_path_expr |
str |
Expanded path within the volume from which the container’s volume should be mounted. |
path |
str |
Path within the container at which the volume should be mounted. |
volume |
Volume |
The volume to mount. |
propagationOptional ¶
propagation: MountPropagation
- Type: MountPropagation
- Default: MountPropagation.NONE
Determines how mounts are propagated from the host to container and the other way around.
When not set, MountPropagationNone is used.
Mount propagation allows for sharing volumes mounted by a Container to other Containers in the same Pod, or even to other Pods on the same node.
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false
Mounted read-only if true, read-write otherwise (false or unspecified).
Defaults to false.
sub_pathOptional ¶
sub_path: str
- Type: str
- Default: “” the volume’s root
Path within the volume from which the container’s volume should be mounted.).
sub_path_exprOptional ¶
sub_path_expr: str
- Type: str
- Default: “” volume’s root.
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.
pathRequired ¶
path: str
- Type: str
Path within the container at which the volume should be mounted.
Must not contain ‘:’.
volumeRequired ¶
volume: Volume
- Type: Volume
The volume to mount.
VolumeMount ¶
VolumeMount describes a mounting of a Volume within a container.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VolumeMount(
mount_path: str,
name: str,
mount_propagation: str = None,
read_only: bool = None,
recursive_read_only: str = None,
sub_path: str = None,
sub_path_expr: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
mount_path |
str |
Path within the container at which the volume should be mounted. |
name |
str |
This must match the Name of a Volume. |
mount_propagation |
str |
mountPropagation determines how mounts are propagated from the host to container and the other way around. |
read_only |
bool |
Mounted read-only if true, read-write otherwise (false or unspecified). |
recursive_read_only |
str |
RecursiveReadOnly specifies whether read-only mounts should be handled recursively. |
sub_path |
str |
Path within the volume from which the container’s volume should be mounted. |
sub_path_expr |
str |
Expanded path within the volume from which the container’s volume should be mounted. |
mount_pathRequired ¶
mount_path: str
- Type: str
Path within the container at which the volume should be mounted.
Must not contain ‘:’.
nameRequired ¶
name: str
- Type: str
This must match the Name of a Volume.
mount_propagationOptional ¶
mount_propagation: str
- Type: str
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).
read_onlyOptional ¶
read_only: bool
- Type: bool
- Default: false.
Mounted read-only if true, read-write otherwise (false or unspecified).
Defaults to false.
recursive_read_onlyOptional ¶
recursive_read_only: str
- Type: str
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.
sub_pathOptional ¶
sub_path: str
- Type: str
- Default: volume’s root).
Path within the volume from which the container’s volume should be mounted.
Defaults to “” (volume’s root).
sub_path_exprOptional ¶
sub_path_expr: str
- Type: str
- Default: volume’s root). SubPathExpr and SubPath are mutually exclusive.
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.
VolumeNodeAffinity ¶
VolumeNodeAffinity defines constraints that limit what nodes this volume can be accessed from.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VolumeNodeAffinity(
required: NodeSelector = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
required |
cdk8s_plus_31.k8s.NodeSelector |
required specifies hard node constraints that must be met. |
requiredOptional ¶
required: NodeSelector
- Type: cdk8s_plus_31.k8s.NodeSelector
required specifies hard node constraints that must be met.
VolumeNodeResources ¶
VolumeNodeResources is a set of resource limits for scheduling of volumes.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VolumeNodeResources(
count: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
count |
typing.Union[int, float] |
count indicates the maximum number of unique volumes managed by the CSI driver that can be used on a node. |
countOptional ¶
count: typing.Union[int, float]
- Type: typing.Union[int, float]
count indicates the maximum number of unique volumes managed by the CSI driver that can be used on a node.
A volume that is both attached and mounted on a node is considered to be used once, not twice. The same rule applies for a unique volume that is shared among multiple pods on the same node. If this field is not specified, then the supported number of volumes on this node is unbounded.
VolumeProjection ¶
Projection that may be projected along with other supported volume types.
Exactly one of these fields must be set.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VolumeProjection(
cluster_trust_bundle: ClusterTrustBundleProjection = None,
config_map: ConfigMapProjection = None,
downward_api: DownwardApiProjection = None,
secret: SecretProjection = None,
service_account_token: ServiceAccountTokenProjection = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
cluster_trust_bundle |
cdk8s_plus_31.k8s.ClusterTrustBundleProjection |
ClusterTrustBundle allows a pod to access the .spec.trustBundle field of ClusterTrustBundle objects in an auto-updating file. |
config_map |
cdk8s_plus_31.k8s.ConfigMapProjection |
configMap information about the configMap data to project. |
downward_api |
cdk8s_plus_31.k8s.DownwardApiProjection |
downwardAPI information about the downwardAPI data to project. |
secret |
cdk8s_plus_31.k8s.SecretProjection |
secret information about the secret data to project. |
service_account_token |
cdk8s_plus_31.k8s.ServiceAccountTokenProjection |
serviceAccountToken is information about the serviceAccountToken data to project. |
cluster_trust_bundleOptional ¶
cluster_trust_bundle: ClusterTrustBundleProjection
- Type: cdk8s_plus_31.k8s.ClusterTrustBundleProjection
ClusterTrustBundle allows a pod to access the .spec.trustBundle field of ClusterTrustBundle objects in an auto-updating file.
Alpha, gated by the ClusterTrustBundleProjection feature gate.
ClusterTrustBundle objects can either be selected by name, or by the combination of signer name and a label selector.
Kubelet performs aggressive normalization of the PEM contents written into the pod filesystem. Esoteric PEM features such as inter-block comments and block headers are stripped. Certificates are deduplicated. The ordering of certificates within the file is arbitrary, and Kubelet may change the order over time.
config_mapOptional ¶
config_map: ConfigMapProjection
- Type: cdk8s_plus_31.k8s.ConfigMapProjection
configMap information about the configMap data to project.
downward_apiOptional ¶
downward_api: DownwardApiProjection
- Type: cdk8s_plus_31.k8s.DownwardApiProjection
downwardAPI information about the downwardAPI data to project.
secretOptional ¶
secret: SecretProjection
- Type: cdk8s_plus_31.k8s.SecretProjection
secret information about the secret data to project.
service_account_tokenOptional ¶
service_account_token: ServiceAccountTokenProjection
- Type: cdk8s_plus_31.k8s.ServiceAccountTokenProjection
serviceAccountToken is information about the serviceAccountToken data to project.
VolumeResourceRequirements ¶
VolumeResourceRequirements describes the storage resource requirements for a volume.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VolumeResourceRequirements(
limits: typing.Mapping[Quantity] = None,
requests: typing.Mapping[Quantity] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
limits |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
Limits describes the maximum amount of compute resources allowed. |
requests |
typing.Mapping[cdk8s_plus_31.k8s.Quantity] |
Requests describes the minimum amount of compute resources required. |
limitsOptional ¶
limits: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
Limits describes the maximum amount of compute resources allowed.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
requestsOptional ¶
requests: typing.Mapping[Quantity]
- Type: typing.Mapping[cdk8s_plus_31.k8s.Quantity]
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/
VsphereVirtualDiskVolumeSource ¶
Represents a vSphere volume resource.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.VsphereVirtualDiskVolumeSource(
volume_path: str,
fs_type: str = None,
storage_policy_id: str = None,
storage_policy_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
volume_path |
str |
volumePath is the path that identifies vSphere volume vmdk. |
fs_type |
str |
fsType is filesystem type to mount. |
storage_policy_id |
str |
storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. |
storage_policy_name |
str |
storagePolicyName is the storage Policy Based Management (SPBM) profile name. |
volume_pathRequired ¶
volume_path: str
- Type: str
volumePath is the path that identifies vSphere volume vmdk.
fs_typeOptional ¶
fs_type: str
- Type: str
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.
storage_policy_idOptional ¶
storage_policy_id: str
- Type: str
storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
storage_policy_nameOptional ¶
storage_policy_name: str
- Type: str
storagePolicyName is the storage Policy Based Management (SPBM) profile name.
WebhookClientConfig ¶
WebhookClientConfig contains the information to make a TLS connection with the webhook.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.WebhookClientConfig(
ca_bundle: str = None,
service: ServiceReference = None,
url: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
ca_bundle |
str |
caBundle is a PEM encoded CA bundle which will be used to validate the webhook’s server certificate. |
service |
cdk8s_plus_31.k8s.ServiceReference |
service is a reference to the service for this webhook. Either service or url must be specified. |
url |
str |
url gives the location of the webhook, in standard URL form (scheme://host:port/path). |
ca_bundleOptional ¶
ca_bundle: str
- Type: str
caBundle is a PEM encoded CA bundle which will be used to validate the webhook’s server certificate.
If unspecified, system trust roots on the apiserver are used.
serviceOptional ¶
service: ServiceReference
- Type: cdk8s_plus_31.k8s.ServiceReference
service is a reference to the service for this webhook. Either service or url must be specified.
If the webhook is running within the cluster, then you should use service.
urlOptional ¶
url: str
- Type: str
url gives the location of the webhook, in standard URL form (scheme://host:port/path).
Exactly one of url or service must be specified.
The host should not refer to a service running in the cluster; use the service field instead. The host might be resolved via external DNS in some apiservers (e.g., kube-apiserver cannot resolve in-cluster DNS as that would be a layering violation). host may also be an IP address.
Please note that using localhost or 127.0.0.1 as a host is risky unless you take great care to run this webhook on all hosts which run an apiserver which might need to make calls to this webhook. Such installs are likely to be non-portable, i.e., not easy to turn up in a new cluster.
The scheme must be “https”; the URL must begin with “https://”.
A path is optional, and if present may be any string permissible in a URL. You may use the path to pass an arbitrary string to the webhook, for example, a cluster identifier.
Attempting to use a user or basic auth e.g. “user:password@” is not allowed. Fragments (“#…”) and query parameters (“?…”) are not allowed, either.
WebhookConversion ¶
WebhookConversion describes how to call a conversion webhook.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.WebhookConversion(
conversion_review_versions: typing.List[str],
client_config: WebhookClientConfig = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
conversion_review_versions |
typing.List[str] |
conversionReviewVersions is an ordered list of preferred ConversionReview versions the Webhook expects. |
client_config |
cdk8s_plus_31.k8s.WebhookClientConfig |
clientConfig is the instructions for how to call the webhook if strategy is Webhook. |
conversion_review_versionsRequired ¶
conversion_review_versions: typing.List[str]
- Type: typing.List[str]
conversionReviewVersions is an ordered list of preferred ConversionReview versions the Webhook expects.
The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
client_configOptional ¶
client_config: WebhookClientConfig
- Type: cdk8s_plus_31.k8s.WebhookClientConfig
clientConfig is the instructions for how to call the webhook if strategy is Webhook.
WeightedPodAffinityTerm ¶
The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s).
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.WeightedPodAffinityTerm(
pod_affinity_term: PodAffinityTerm,
weight: typing.Union[int, float]
)
Properties ¶
| Name | Type | Description |
|---|---|---|
pod_affinity_term |
cdk8s_plus_31.k8s.PodAffinityTerm |
Required. |
weight |
typing.Union[int, float] |
weight associated with matching the corresponding podAffinityTerm, in the range 1-100. |
pod_affinity_termRequired ¶
pod_affinity_term: PodAffinityTerm
- Type: cdk8s_plus_31.k8s.PodAffinityTerm
Required.
A pod affinity term, associated with the corresponding weight.
weightRequired ¶
weight: typing.Union[int, float]
- Type: typing.Union[int, float]
weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
WindowsSecurityContextOptions ¶
WindowsSecurityContextOptions contain Windows-specific options and credentials.
Initializer ¶
from cdk8s_plus_31 import k8s
k8s.WindowsSecurityContextOptions(
gmsa_credential_spec: str = None,
gmsa_credential_spec_name: str = None,
host_process: bool = None,
run_as_user_name: str = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
gmsa_credential_spec |
str |
GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field. |
gmsa_credential_spec_name |
str |
GMSACredentialSpecName is the name of the GMSA credential spec to use. |
host_process |
bool |
HostProcess determines if a container should be run as a ‘Host Process’ container. |
run_as_user_name |
str |
The UserName in Windows to run the entrypoint of the container process. |
gmsa_credential_specOptional ¶
gmsa_credential_spec: str
- Type: str
GMSACredentialSpec is where the GMSA admission webhook (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the GMSA credential spec named by the GMSACredentialSpecName field.
gmsa_credential_spec_nameOptional ¶
gmsa_credential_spec_name: str
- Type: str
GMSACredentialSpecName is the name of the GMSA credential spec to use.
host_processOptional ¶
host_process: bool
- Type: bool
HostProcess determines if a container should be run as a ‘Host Process’ container.
All of a Pod’s containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true.
run_as_user_nameOptional ¶
run_as_user_name: str
- Type: str
- Default: the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
The UserName in Windows to run the entrypoint of the container process.
Defaults to the user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
WorkloadProps ¶
Properties for Workload.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.WorkloadProps(
metadata: ApiObjectMetadata = None,
automount_service_account_token: bool = None,
containers: typing.List[ContainerProps] = None,
dns: PodDnsProps = None,
docker_registry_auth: ISecret = None,
enable_service_links: bool = None,
host_aliases: typing.List[HostAlias] = None,
host_network: bool = None,
init_containers: typing.List[ContainerProps] = None,
isolate: bool = None,
restart_policy: RestartPolicy = None,
security_context: PodSecurityContextProps = None,
service_account: IServiceAccount = None,
share_process_namespace: bool = None,
termination_grace_period: Duration = None,
volumes: typing.List[Volume] = None,
pod_metadata: ApiObjectMetadata = None,
select: bool = None,
spread: bool = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
metadata |
cdk8s.ApiObjectMetadata |
Metadata that all persisted resources must have, which includes all objects users must create. |
automount_service_account_token |
bool |
Indicates whether a service account token should be automatically mounted. |
containers |
typing.List[ContainerProps] |
List of containers belonging to the pod. |
dns |
PodDnsProps |
DNS settings for the pod. |
docker_registry_auth |
ISecret |
A secret containing docker credentials for authenticating to a registry. |
enable_service_links |
bool |
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links. |
host_aliases |
typing.List[HostAlias] |
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file. |
host_network |
bool |
Host network for the pod. |
init_containers |
typing.List[ContainerProps] |
List of initialization containers belonging to the pod. |
isolate |
bool |
Isolates the pod. |
restart_policy |
RestartPolicy |
Restart policy for all containers within the pod. |
security_context |
PodSecurityContextProps |
SecurityContext holds pod-level security attributes and common container settings. |
service_account |
IServiceAccount |
A service account provides an identity for processes that run in a Pod. |
share_process_namespace |
bool |
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod. |
termination_grace_period |
cdk8s.Duration |
Grace period until the pod is terminated. |
volumes |
typing.List[Volume] |
List of volumes that can be mounted by containers belonging to the pod. |
pod_metadata |
cdk8s.ApiObjectMetadata |
The pod metadata of this workload. |
select |
bool |
Automatically allocates a pod label selector for this workload and add it to the pod metadata. |
spread |
bool |
Automatically spread pods across hostname and zones. |
metadataOptional ¶
metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
Metadata that all persisted resources must have, which includes all objects users must create.
automount_service_account_tokenOptional ¶
automount_service_account_token: bool
- Type: bool
- Default: false
Indicates whether a service account token should be automatically mounted.
containersOptional ¶
containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No containers. Note that a pod spec must include at least one container.
List of containers belonging to the pod.
Containers cannot currently be added or removed. There must be at least one container in a Pod.
You can add additionnal containers using podSpec.addContainer()
dnsOptional ¶
dns: PodDnsProps
- Type: PodDnsProps
- Default: policy: DnsPolicy.CLUSTER_FIRST hostnameAsFQDN: false
DNS settings for the pod.
https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
docker_registry_authOptional ¶
docker_registry_auth: ISecret
- Type: ISecret
- Default: No auth. Images are assumed to be publicly available.
A secret containing docker credentials for authenticating to a registry.
enable_service_linksOptional ¶
enable_service_links: bool
- Type: bool
- Default: true
Indicates whether information about services should be injected into pod’s environment variables, matching the syntax of Docker links.
host_aliasesOptional ¶
host_aliases: typing.List[HostAlias]
- Type: typing.List[HostAlias]
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod’s hosts file.
host_networkOptional ¶
host_network: bool
- Type: bool
- Default: false
Host network for the pod.
init_containersOptional ¶
init_containers: typing.List[ContainerProps]
- Type: typing.List[ContainerProps]
- Default: No init containers.
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 ,removed or updated.
https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
isolateOptional ¶
isolate: bool
- Type: bool
- Default: false
Isolates the pod.
This will prevent any ingress or egress connections to / from this pod.
You can however allow explicit connections post instantiation by using the .connections property.
restart_policyOptional ¶
restart_policy: RestartPolicy
- Type: RestartPolicy
- Default: RestartPolicy.ALWAYS
Restart policy for all containers within the pod.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy
security_contextOptional ¶
security_context: PodSecurityContextProps
- Type: PodSecurityContextProps
- Default: fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS ensureNonRoot: true
SecurityContext holds pod-level security attributes and common container settings.
service_accountOptional ¶
service_account: IServiceAccount
- Type: IServiceAccount
- Default: No service account.
A service account provides an identity for processes that run in a Pod.
When you (a human) access the cluster (for example, using kubectl), you are authenticated by the apiserver as a particular User Account (currently this is usually admin, unless your cluster administrator has customized your cluster). Processes in containers inside pods can also contact the apiserver. When they do, they are authenticated as a particular Service Account (for example, default).
https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
share_process_namespaceOptional ¶
share_process_namespace: bool
- Type: bool
- Default: false
When process namespace sharing is enabled, processes in a container are visible to all other containers in the same pod.
https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/
termination_grace_periodOptional ¶
termination_grace_period: Duration
- Type: cdk8s.Duration
- Default: Duration.seconds(30)
Grace period until the pod is terminated.
volumesOptional ¶
volumes: typing.List[Volume]
- Type: typing.List[Volume]
- Default: No volumes.
List of volumes that can be mounted by containers belonging to the pod.
You can also add volumes later using podSpec.addVolume()
pod_metadataOptional ¶
pod_metadata: ApiObjectMetadata
- Type: cdk8s.ApiObjectMetadata
The pod metadata of this workload.
selectOptional ¶
select: bool
- Type: bool
- Default: true
Automatically allocates a pod label selector for this workload and add it to the pod metadata.
This ensures this workload manages pods created by its pod template.
spreadOptional ¶
spread: bool
- Type: bool
- Default: false
Automatically spread pods across hostname and zones.
WorkloadSchedulingSpreadOptions ¶
Options for WorkloadScheduling.spread.
Initializer ¶
import cdk8s_plus_31
cdk8s_plus_31.WorkloadSchedulingSpreadOptions(
topology: Topology = None,
weight: typing.Union[int, float] = None
)
Properties ¶
| Name | Type | Description |
|---|---|---|
topology |
Topology |
Which topology to spread on. |
weight |
typing.Union[int, float] |
Indicates the spread is optional, with this weight score. |
topologyOptional ¶
topology: Topology
- Type: Topology
- Default: Topology.HOSTNAME
Which topology to spread on.
weightOptional ¶
weight: typing.Union[int, float]
- Type: typing.Union[int, float]
- Default: no weight. spread is assumed to be required.
Indicates the spread is optional, with this weight score.
Classes ¶
ApiResource ¶
- Implements: IApiResource, IApiEndpoint
Represents information about an API resource type.
Methods ¶
| Name | Description |
|---|---|
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
Static Functions ¶
| Name | Description |
|---|---|
custom |
API resource information for a custom resource type. |
custom ¶
import cdk8s_plus_31
cdk8s_plus_31.ApiResource.custom(
api_group: str,
resource_type: str
)
API resource information for a custom resource type.
api_groupRequired ¶
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
- Type: str
The name of the resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
Properties ¶
| Name | Type | Description |
|---|---|---|
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of the resource type as it appears in the relevant API endpoint. |
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of the resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
Constants ¶
| Name | Type | Description |
|---|---|---|
API_SERVICES |
ApiResource |
API resource information for APIService. |
BINDINGS |
ApiResource |
API resource information for Binding. |
CERTIFICATE_SIGNING_REQUESTS |
ApiResource |
API resource information for CertificateSigningRequest. |
CLUSTER_ROLE_BINDINGS |
ApiResource |
API resource information for ClusterRoleBinding. |
CLUSTER_ROLES |
ApiResource |
API resource information for ClusterRole. |
COMPONENT_STATUSES |
ApiResource |
API resource information for ComponentStatus. |
CONFIG_MAPS |
ApiResource |
API resource information for ConfigMap. |
CONTROLLER_REVISIONS |
ApiResource |
API resource information for ControllerRevision. |
CRON_JOBS |
ApiResource |
API resource information for CronJob. |
CSI_DRIVERS |
ApiResource |
API resource information for CSIDriver. |
CSI_NODES |
ApiResource |
API resource information for CSINode. |
CSI_STORAGE_CAPACITIES |
ApiResource |
API resource information for CSIStorageCapacity. |
CUSTOM_RESOURCE_DEFINITIONS |
ApiResource |
API resource information for CustomResourceDefinition. |
DAEMON_SETS |
ApiResource |
API resource information for DaemonSet. |
DEPLOYMENTS |
ApiResource |
API resource information for Deployment. |
ENDPOINT_SLICES |
ApiResource |
API resource information for EndpointSlice. |
ENDPOINTS |
ApiResource |
API resource information for Endpoints. |
EVENTS |
ApiResource |
API resource information for Event. |
FLOW_SCHEMAS |
ApiResource |
API resource information for FlowSchema. |
HORIZONTAL_POD_AUTOSCALERS |
ApiResource |
API resource information for HorizontalPodAutoscaler. |
INGRESS_CLASSES |
ApiResource |
API resource information for IngressClass. |
INGRESSES |
ApiResource |
API resource information for Ingress. |
JOBS |
ApiResource |
API resource information for Job. |
LEASES |
ApiResource |
API resource information for Lease. |
LIMIT_RANGES |
ApiResource |
API resource information for LimitRange. |
LOCAL_SUBJECT_ACCESS_REVIEWS |
ApiResource |
API resource information for LocalSubjectAccessReview. |
MUTATING_WEBHOOK_CONFIGURATIONS |
ApiResource |
API resource information for MutatingWebhookConfiguration. |
NAMESPACES |
ApiResource |
API resource information for Namespace. |
NETWORK_POLICIES |
ApiResource |
API resource information for NetworkPolicy. |
NODES |
ApiResource |
API resource information for Node. |
PERSISTENT_VOLUME_CLAIMS |
ApiResource |
API resource information for PersistentVolumeClaim. |
PERSISTENT_VOLUMES |
ApiResource |
API resource information for PersistentVolume. |
POD_DISRUPTION_BUDGETS |
ApiResource |
API resource information for PodDisruptionBudget. |
POD_TEMPLATES |
ApiResource |
API resource information for PodTemplate. |
PODS |
ApiResource |
API resource information for Pod. |
PRIORITY_CLASSES |
ApiResource |
API resource information for PriorityClass. |
PRIORITY_LEVEL_CONFIGURATIONS |
ApiResource |
API resource information for PriorityLevelConfiguration. |
REPLICA_SETS |
ApiResource |
API resource information for ReplicaSet. |
REPLICATION_CONTROLLERS |
ApiResource |
API resource information for ReplicationController. |
RESOURCE_QUOTAS |
ApiResource |
API resource information for ResourceQuota. |
ROLE_BINDINGS |
ApiResource |
API resource information for RoleBinding. |
ROLES |
ApiResource |
API resource information for Role. |
RUNTIME_CLASSES |
ApiResource |
API resource information for RuntimeClass. |
SECRETS |
ApiResource |
API resource information for Secret. |
SELF_SUBJECT_ACCESS_REVIEWS |
ApiResource |
API resource information for SelfSubjectAccessReview. |
SELF_SUBJECT_RULES_REVIEWS |
ApiResource |
API resource information for SelfSubjectRulesReview. |
SERVICE_ACCOUNTS |
ApiResource |
API resource information for ServiceAccount. |
SERVICES |
ApiResource |
API resource information for Service. |
STATEFUL_SETS |
ApiResource |
API resource information for StatefulSet. |
STORAGE_CLASSES |
ApiResource |
API resource information for StorageClass. |
SUBJECT_ACCESS_REVIEWS |
ApiResource |
API resource information for SubjectAccessReview. |
TOKEN_REVIEWS |
ApiResource |
API resource information for TokenReview. |
VALIDATING_WEBHOOK_CONFIGURATIONS |
ApiResource |
API resource information for ValidatingWebhookConfiguration. |
VOLUME_ATTACHMENTS |
ApiResource |
API resource information for VolumeAttachment. |
API_SERVICESRequired ¶
API_SERVICES: ApiResource
- Type: ApiResource
API resource information for APIService.
BINDINGSRequired ¶
BINDINGS: ApiResource
- Type: ApiResource
API resource information for Binding.
CERTIFICATE_SIGNING_REQUESTSRequired ¶
CERTIFICATE_SIGNING_REQUESTS: ApiResource
- Type: ApiResource
API resource information for CertificateSigningRequest.
CLUSTER_ROLE_BINDINGSRequired ¶
CLUSTER_ROLE_BINDINGS: ApiResource
- Type: ApiResource
API resource information for ClusterRoleBinding.
CLUSTER_ROLESRequired ¶
CLUSTER_ROLES: ApiResource
- Type: ApiResource
API resource information for ClusterRole.
COMPONENT_STATUSESRequired ¶
COMPONENT_STATUSES: ApiResource
- Type: ApiResource
API resource information for ComponentStatus.
CONFIG_MAPSRequired ¶
CONFIG_MAPS: ApiResource
- Type: ApiResource
API resource information for ConfigMap.
CONTROLLER_REVISIONSRequired ¶
CONTROLLER_REVISIONS: ApiResource
- Type: ApiResource
API resource information for ControllerRevision.
CRON_JOBSRequired ¶
CRON_JOBS: ApiResource
- Type: ApiResource
API resource information for CronJob.
CSI_DRIVERSRequired ¶
CSI_DRIVERS: ApiResource
- Type: ApiResource
API resource information for CSIDriver.
CSI_NODESRequired ¶
CSI_NODES: ApiResource
- Type: ApiResource
API resource information for CSINode.
CSI_STORAGE_CAPACITIESRequired ¶
CSI_STORAGE_CAPACITIES: ApiResource
- Type: ApiResource
API resource information for CSIStorageCapacity.
CUSTOM_RESOURCE_DEFINITIONSRequired ¶
CUSTOM_RESOURCE_DEFINITIONS: ApiResource
- Type: ApiResource
API resource information for CustomResourceDefinition.
DAEMON_SETSRequired ¶
DAEMON_SETS: ApiResource
- Type: ApiResource
API resource information for DaemonSet.
DEPLOYMENTSRequired ¶
DEPLOYMENTS: ApiResource
- Type: ApiResource
API resource information for Deployment.
ENDPOINT_SLICESRequired ¶
ENDPOINT_SLICES: ApiResource
- Type: ApiResource
API resource information for EndpointSlice.
ENDPOINTSRequired ¶
ENDPOINTS: ApiResource
- Type: ApiResource
API resource information for Endpoints.
EVENTSRequired ¶
EVENTS: ApiResource
- Type: ApiResource
API resource information for Event.
FLOW_SCHEMASRequired ¶
FLOW_SCHEMAS: ApiResource
- Type: ApiResource
API resource information for FlowSchema.
HORIZONTAL_POD_AUTOSCALERSRequired ¶
HORIZONTAL_POD_AUTOSCALERS: ApiResource
- Type: ApiResource
API resource information for HorizontalPodAutoscaler.
INGRESS_CLASSESRequired ¶
INGRESS_CLASSES: ApiResource
- Type: ApiResource
API resource information for IngressClass.
INGRESSESRequired ¶
INGRESSES: ApiResource
- Type: ApiResource
API resource information for Ingress.
JOBSRequired ¶
JOBS: ApiResource
- Type: ApiResource
API resource information for Job.
LEASESRequired ¶
LEASES: ApiResource
- Type: ApiResource
API resource information for Lease.
LIMIT_RANGESRequired ¶
LIMIT_RANGES: ApiResource
- Type: ApiResource
API resource information for LimitRange.
LOCAL_SUBJECT_ACCESS_REVIEWSRequired ¶
LOCAL_SUBJECT_ACCESS_REVIEWS: ApiResource
- Type: ApiResource
API resource information for LocalSubjectAccessReview.
MUTATING_WEBHOOK_CONFIGURATIONSRequired ¶
MUTATING_WEBHOOK_CONFIGURATIONS: ApiResource
- Type: ApiResource
API resource information for MutatingWebhookConfiguration.
NAMESPACESRequired ¶
NAMESPACES: ApiResource
- Type: ApiResource
API resource information for Namespace.
NETWORK_POLICIESRequired ¶
NETWORK_POLICIES: ApiResource
- Type: ApiResource
API resource information for NetworkPolicy.
NODESRequired ¶
NODES: ApiResource
- Type: ApiResource
API resource information for Node.
PERSISTENT_VOLUME_CLAIMSRequired ¶
PERSISTENT_VOLUME_CLAIMS: ApiResource
- Type: ApiResource
API resource information for PersistentVolumeClaim.
PERSISTENT_VOLUMESRequired ¶
PERSISTENT_VOLUMES: ApiResource
- Type: ApiResource
API resource information for PersistentVolume.
POD_DISRUPTION_BUDGETSRequired ¶
POD_DISRUPTION_BUDGETS: ApiResource
- Type: ApiResource
API resource information for PodDisruptionBudget.
POD_TEMPLATESRequired ¶
POD_TEMPLATES: ApiResource
- Type: ApiResource
API resource information for PodTemplate.
PODSRequired ¶
PODS: ApiResource
- Type: ApiResource
API resource information for Pod.
PRIORITY_CLASSESRequired ¶
PRIORITY_CLASSES: ApiResource
- Type: ApiResource
API resource information for PriorityClass.
PRIORITY_LEVEL_CONFIGURATIONSRequired ¶
PRIORITY_LEVEL_CONFIGURATIONS: ApiResource
- Type: ApiResource
API resource information for PriorityLevelConfiguration.
REPLICA_SETSRequired ¶
REPLICA_SETS: ApiResource
- Type: ApiResource
API resource information for ReplicaSet.
REPLICATION_CONTROLLERSRequired ¶
REPLICATION_CONTROLLERS: ApiResource
- Type: ApiResource
API resource information for ReplicationController.
RESOURCE_QUOTASRequired ¶
RESOURCE_QUOTAS: ApiResource
- Type: ApiResource
API resource information for ResourceQuota.
ROLE_BINDINGSRequired ¶
ROLE_BINDINGS: ApiResource
- Type: ApiResource
API resource information for RoleBinding.
ROLESRequired ¶
ROLES: ApiResource
- Type: ApiResource
API resource information for Role.
RUNTIME_CLASSESRequired ¶
RUNTIME_CLASSES: ApiResource
- Type: ApiResource
API resource information for RuntimeClass.
SECRETSRequired ¶
SECRETS: ApiResource
- Type: ApiResource
API resource information for Secret.
SELF_SUBJECT_ACCESS_REVIEWSRequired ¶
SELF_SUBJECT_ACCESS_REVIEWS: ApiResource
- Type: ApiResource
API resource information for SelfSubjectAccessReview.
SELF_SUBJECT_RULES_REVIEWSRequired ¶
SELF_SUBJECT_RULES_REVIEWS: ApiResource
- Type: ApiResource
API resource information for SelfSubjectRulesReview.
SERVICE_ACCOUNTSRequired ¶
SERVICE_ACCOUNTS: ApiResource
- Type: ApiResource
API resource information for ServiceAccount.
SERVICESRequired ¶
SERVICES: ApiResource
- Type: ApiResource
API resource information for Service.
STATEFUL_SETSRequired ¶
STATEFUL_SETS: ApiResource
- Type: ApiResource
API resource information for StatefulSet.
STORAGE_CLASSESRequired ¶
STORAGE_CLASSES: ApiResource
- Type: ApiResource
API resource information for StorageClass.
SUBJECT_ACCESS_REVIEWSRequired ¶
SUBJECT_ACCESS_REVIEWS: ApiResource
- Type: ApiResource
API resource information for SubjectAccessReview.
TOKEN_REVIEWSRequired ¶
TOKEN_REVIEWS: ApiResource
- Type: ApiResource
API resource information for TokenReview.
VALIDATING_WEBHOOK_CONFIGURATIONSRequired ¶
VALIDATING_WEBHOOK_CONFIGURATIONS: ApiResource
- Type: ApiResource
API resource information for ValidatingWebhookConfiguration.
VOLUME_ATTACHMENTSRequired ¶
VOLUME_ATTACHMENTS: ApiResource
- Type: ApiResource
API resource information for VolumeAttachment.
Container ¶
A single application container that you want to run within a pod.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Container(
args: typing.List[str] = None,
command: typing.List[str] = None,
env_from: typing.List[EnvFrom] = None,
env_variables: typing.Mapping[EnvValue] = None,
image_pull_policy: ImagePullPolicy = None,
lifecycle: ContainerLifecycle = None,
liveness: Probe = None,
name: str = None,
port: typing.Union[int, float] = None,
port_number: typing.Union[int, float] = None,
ports: typing.List[ContainerPort] = None,
readiness: Probe = None,
resources: ContainerResources = None,
restart_policy: ContainerRestartPolicy = None,
security_context: ContainerSecurityContextProps = None,
startup: Probe = None,
volume_mounts: typing.List[VolumeMount] = None,
working_dir: str = None,
image: str
)
| Name | Type | Description |
|---|---|---|
args |
typing.List[str] |
Arguments to the entrypoint. The docker image’s CMD is used if command is not provided. |
command |
typing.List[str] |
Entrypoint array. |
env_from |
typing.List[EnvFrom] |
List of sources to populate environment variables in the container. |
env_variables |
typing.Mapping[EnvValue] |
Environment variables to set in the container. |
image_pull_policy |
ImagePullPolicy |
Image pull policy for this container. |
lifecycle |
ContainerLifecycle |
Describes actions that the management system should take in response to container lifecycle events. |
liveness |
Probe |
Periodic probe of container liveness. |
name |
str |
Name of the container specified as a DNS_LABEL. |
port |
typing.Union[int, float] |
No description. |
port_number |
typing.Union[int, float] |
Number of port to expose on the pod’s IP address. |
ports |
typing.List[ContainerPort] |
List of ports to expose from this container. |
readiness |
Probe |
Determines when the container is ready to serve traffic. |
resources |
ContainerResources |
Compute resources (CPU and memory requests and limits) required by the container. |
restart_policy |
ContainerRestartPolicy |
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always. |
security_context |
ContainerSecurityContextProps |
SecurityContext defines the security options the container should be run with. |
startup |
Probe |
StartupProbe indicates that the Pod has successfully initialized. |
volume_mounts |
typing.List[VolumeMount] |
Pod volumes to mount into the container’s filesystem. |
working_dir |
str |
Container’s working directory. |
image |
str |
Docker image name. |
argsOptional ¶
- Type: typing.List[str]
- Default: []
Arguments to the entrypoint. The docker image’s CMD is used if command 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
commandOptional ¶
- Type: typing.List[str]
- Default: The docker image’s ENTRYPOINT.
Entrypoint array.
Not executed within a shell. The docker 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. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(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
env_fromOptional ¶
- Type: typing.List[EnvFrom]
- Default: No sources.
List of sources to populate environment variables in the container.
When a key exists in multiple sources, the value associated with
the last source will take precedence. Values defined by the envVariables property
with a duplicate key will take precedence.
env_variablesOptional ¶
- Type: typing.Mapping[EnvValue]
- Default: No environment variables.
Environment variables to set in the container.
image_pull_policyOptional ¶
- Type: ImagePullPolicy
- Default: ImagePullPolicy.ALWAYS
Image pull policy for this container.
lifecycleOptional ¶
- Type: ContainerLifecycle
Describes actions that the management system should take in response to container lifecycle events.
livenessOptional ¶
- Type: Probe
- Default: no liveness probe is defined
Periodic probe of container liveness.
Container will be restarted if the probe fails.
nameOptional ¶
- Type: str
- Default: ‘main’
Name of the container specified as a DNS_LABEL.
Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
~~port~~Optional ¶
-
Deprecated: - use
portNumber. -
Type: typing.Union[int, float]
port_numberOptional ¶
- Type: typing.Union[int, float]
- Default: Only the ports mentiond in the
portsproperty are exposed.
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
This is a convinience property if all you need a single TCP numbered port.
In case more advanced configuartion is required, use the ports property.
This port is added to the list of ports mentioned in the ports property.
portsOptional ¶
- Type: typing.List[ContainerPort]
- Default: Only the port mentioned in the
portNumberproperty is exposed.
List of ports to expose from this container.
readinessOptional ¶
- Type: Probe
- Default: no readiness probe is defined
Determines when the container is ready to serve traffic.
resourcesOptional ¶
- Type: ContainerResources
- Default: cpu: request: 1000 millis limit: 1500 millis memory: request: 512 mebibytes limit: 2048 mebibytes
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
- Type: ContainerRestartPolicy
- Default: no restart policy is defined and the pod restart policy is applied
Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
security_contextOptional ¶
- Type: ContainerSecurityContextProps
- Default: ensureNonRoot: true privileged: false readOnlyRootFilesystem: true allowPrivilegeEscalation: false user: 25000 group: 26000
SecurityContext defines the security options the container should be run with.
If set, the fields override equivalent fields of the pod’s security context.
https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
startupOptional ¶
- Type: Probe
- Default: If a port is provided, then knocks on that port to determine when the container is ready for readiness and liveness probe checks. Otherwise, no startup probe is defined.
StartupProbe indicates that the Pod has successfully initialized.
If specified, no other probes are executed until this completes successfully
volume_mountsOptional ¶
- Type: typing.List[VolumeMount]
Pod volumes to mount into the container’s filesystem.
Cannot be updated.
working_dirOptional ¶
- Type: str
- Default: The container runtime’s default.
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.
imageRequired ¶
- Type: str
Docker image name.
Methods ¶
| Name | Description |
|---|---|
add_port |
Add a port to expose from this container. |
mount |
Mount a volume to a specific path so that it is accessible by the container. |
add_port ¶
def add_port(
number: typing.Union[int, float],
host_ip: str = None,
host_port: typing.Union[int, float] = None,
name: str = None,
protocol: Protocol = None
) -> None
Add a port to expose from this container.
numberRequired ¶
- Type: typing.Union[int, float]
Number of port to expose on the pod’s IP address.
This must be a valid port number, 0 < x < 65536.
host_ipOptional ¶
- Type: str
- Default: 127.0.0.1.
What host IP to bind the external port to.
host_portOptional ¶
- Type: typing.Union[int, float]
- Default: auto generated by kubernetes and might change on restarts.
Number of port to expose on the host.
If specified, this must be a valid port number, 0 < x < 65536. Most containers do not need this.
nameOptional ¶
- Type: str
- Default: port is not named.
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.
protocolOptional ¶
- Type: Protocol
- Default: Protocol.TCP
Protocol for port.
Must be UDP, TCP, or SCTP. Defaults to “TCP”.
mount ¶
def mount(
path: str,
storage: IStorage,
propagation: MountPropagation = None,
read_only: bool = None,
sub_path: str = None,
sub_path_expr: str = None
) -> None
Mount a volume to a specific path so that it is accessible by the container.
Every pod that is configured to use this container will autmoatically have access to the volume.
pathRequired ¶
- Type: str
The desired path in the container.
storageRequired ¶
- Type: IStorage
The storage to mount.
propagationOptional ¶
- Type: MountPropagation
- Default: MountPropagation.NONE
Determines how mounts are propagated from the host to container and the other way around.
When not set, MountPropagationNone is used.
Mount propagation allows for sharing volumes mounted by a Container to other Containers in the same Pod, or even to other Pods on the same node.
read_onlyOptional ¶
- Type: bool
- Default: false
Mounted read-only if true, read-write otherwise (false or unspecified).
Defaults to false.
sub_pathOptional ¶
- Type: str
- Default: “” the volume’s root
Path within the volume from which the container’s volume should be mounted.).
sub_path_exprOptional ¶
- Type: str
- Default: “” volume’s root.
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.
Properties ¶
| Name | Type | Description |
|---|---|---|
env |
Env |
The environment of the container. |
image |
str |
The container image. |
image_pull_policy |
ImagePullPolicy |
Image pull policy for this container. |
mounts |
typing.List[VolumeMount] |
Volume mounts configured for this container. |
name |
str |
The name of the container. |
ports |
typing.List[ContainerPort] |
Ports exposed by this containers. |
security_context |
ContainerSecurityContext |
The security context of the container. |
args |
typing.List[str] |
Arguments to the entrypoint. |
command |
typing.List[str] |
Entrypoint array (the command to execute when the container starts). |
port |
typing.Union[int, float] |
No description. |
port_number |
typing.Union[int, float] |
The port number that was configured for this container. |
resources |
ContainerResources |
Compute resources (CPU and memory requests and limits) required by the container. |
restart_policy |
ContainerRestartPolicy |
The restart policy of the container. |
working_dir |
str |
The working directory inside the container. |
envRequired ¶
env: Env
- Type: Env
The environment of the container.
imageRequired ¶
image: str
- Type: str
The container image.
image_pull_policyRequired ¶
image_pull_policy: ImagePullPolicy
- Type: ImagePullPolicy
Image pull policy for this container.
mountsRequired ¶
mounts: typing.List[VolumeMount]
- Type: typing.List[VolumeMount]
Volume mounts configured for this container.
nameRequired ¶
name: str
- Type: str
The name of the container.
portsRequired ¶
ports: typing.List[ContainerPort]
- Type: typing.List[ContainerPort]
Ports exposed by this containers.
Returns a copy, use addPort to modify.
security_contextRequired ¶
security_context: ContainerSecurityContext
- Type: ContainerSecurityContext
The security context of the container.
argsOptional ¶
args: typing.List[str]
- Type: typing.List[str]
Arguments to the entrypoint.
commandOptional ¶
command: typing.List[str]
- Type: typing.List[str]
Entrypoint array (the command to execute when the container starts).
~~port~~Optional ¶
- Deprecated: - use
portNumber.
port: typing.Union[int, float]
- Type: typing.Union[int, float]
port_numberOptional ¶
port_number: typing.Union[int, float]
- Type: typing.Union[int, float]
The port number that was configured for this container.
If undefined, either the container doesn’t expose a port, or its
port configuration is stored in the ports field.
resourcesOptional ¶
resources: ContainerResources
- Type: ContainerResources
Compute resources (CPU and memory requests and limits) required by the container.
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
restart_policyOptional ¶
restart_policy: ContainerRestartPolicy
- Type: ContainerRestartPolicy
The restart policy of the container.
working_dirOptional ¶
working_dir: str
- Type: str
The working directory inside the container.
ContainerSecurityContext ¶
Container security attributes and settings.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.ContainerSecurityContext(
allow_privilege_escalation: bool = None,
capabilities: ContainerSecutiryContextCapabilities = None,
ensure_non_root: bool = None,
group: typing.Union[int, float] = None,
privileged: bool = None,
read_only_root_filesystem: bool = None,
seccomp_profile: SeccompProfile = None,
user: typing.Union[int, float] = None
)
| Name | Type | Description |
|---|---|---|
allow_privilege_escalation |
bool |
Whether a process can gain more privileges than its parent process. |
capabilities |
ContainerSecutiryContextCapabilities |
POSIX capabilities for running containers. |
ensure_non_root |
bool |
Indicates that the container must run as a non-root user. |
group |
typing.Union[int, float] |
The GID to run the entrypoint of the container process. |
privileged |
bool |
Run container in privileged mode. |
read_only_root_filesystem |
bool |
Whether this container has a read-only root filesystem. |
seccomp_profile |
SeccompProfile |
Container’s seccomp profile settings. |
user |
typing.Union[int, float] |
The UID to run the entrypoint of the container process. |
allow_privilege_escalationOptional ¶
- Type: bool
- Default: false
Whether a process can gain more privileges than its parent process.
capabilitiesOptional ¶
- Type: ContainerSecutiryContextCapabilities
- Default: none
POSIX capabilities for running containers.
ensure_non_rootOptional ¶
- Type: bool
- Default: true
Indicates that the container must run as a non-root user.
If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does.
groupOptional ¶
- Type: typing.Union[int, float]
- Default: 26000. An arbitrary number bigger than 9999 is selected here. This is so that the container is blocked to access host files even if somehow it manages to get access to host file system.
The GID to run the entrypoint of the container process.
privilegedOptional ¶
- Type: bool
- Default: false
Run container in privileged mode.
Processes in privileged containers are essentially equivalent to root on the host.
read_only_root_filesystemOptional ¶
- Type: bool
- Default: true
Whether this container has a read-only root filesystem.
seccomp_profileOptional ¶
- Type: SeccompProfile
- Default: none
Container’s seccomp profile settings.
Only one profile source may be set
userOptional ¶
- Type: typing.Union[int, float]
- Default: 25000. An arbitrary number bigger than 9999 is selected here. This is so that the container is blocked to access host files even if somehow it manages to get access to host file system.
The UID to run the entrypoint of the container process.
Properties ¶
| Name | Type | Description |
|---|---|---|
ensure_non_root |
bool |
No description. |
privileged |
bool |
No description. |
read_only_root_filesystem |
bool |
No description. |
allow_privilege_escalation |
bool |
No description. |
capabilities |
ContainerSecutiryContextCapabilities |
No description. |
group |
typing.Union[int, float] |
No description. |
seccomp_profile |
SeccompProfile |
No description. |
user |
typing.Union[int, float] |
No description. |
ensure_non_rootRequired ¶
ensure_non_root: bool
- Type: bool
privilegedRequired ¶
privileged: bool
- Type: bool
read_only_root_filesystemRequired ¶
read_only_root_filesystem: bool
- Type: bool
allow_privilege_escalationOptional ¶
allow_privilege_escalation: bool
- Type: bool
capabilitiesOptional ¶
capabilities: ContainerSecutiryContextCapabilities
groupOptional ¶
group: typing.Union[int, float]
- Type: typing.Union[int, float]
seccomp_profileOptional ¶
seccomp_profile: SeccompProfile
- Type: SeccompProfile
userOptional ¶
user: typing.Union[int, float]
- Type: typing.Union[int, float]
Cpu ¶
Represents the amount of CPU.
The amount can be passed as millis or units.
Static Functions ¶
| Name | Description |
|---|---|
millis |
No description. |
units |
No description. |
millis ¶
import cdk8s_plus_31
cdk8s_plus_31.Cpu.millis(
amount: typing.Union[int, float]
)
amountRequired ¶
- Type: typing.Union[int, float]
units ¶
import cdk8s_plus_31
cdk8s_plus_31.Cpu.units(
amount: typing.Union[int, float]
)
amountRequired ¶
- Type: typing.Union[int, float]
Properties ¶
| Name | Type | Description |
|---|---|---|
amount |
str |
No description. |
amountRequired ¶
amount: str
- Type: str
DeploymentStrategy ¶
Deployment strategies.
Static Functions ¶
| Name | Description |
|---|---|
recreate |
All existing Pods are killed before new ones are created. |
rolling_update |
No description. |
recreate ¶
import cdk8s_plus_31
cdk8s_plus_31.DeploymentStrategy.recreate()
All existing Pods are killed before new ones are created.
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#recreate-deployment
rolling_update ¶
import cdk8s_plus_31
cdk8s_plus_31.DeploymentStrategy.rolling_update(
max_surge: PercentOrAbsolute = None,
max_unavailable: PercentOrAbsolute = None
)
max_surgeOptional ¶
- Type: PercentOrAbsolute
- Default: ‘25%’
The maximum number of pods that can be scheduled above the desired number of pods.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding up.
This can not be 0 if maxUnavailable is 0.
Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when the rolling update starts, such that the total number of old and new pods do not exceed 130% of desired pods. Once old pods have been killed, new ReplicaSet can be scaled up further, ensuring that total number of pods running at any time during the update is at most 130% of desired pods.
max_unavailableOptional ¶
- Type: PercentOrAbsolute
- Default: ‘25%’
The maximum number of pods that can be unavailable during the update.
Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%).
Absolute number is calculated from percentage by rounding down.
This can not be 0 if maxSurge is 0.
Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods immediately when the rolling update starts. Once new pods are ready, old ReplicaSet can be scaled down further, followed by scaling up the new ReplicaSet, ensuring that the total number of pods available at all times during the update is at least 70% of desired pods.
Env ¶
Container environment variables.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Env(
sources: typing.List[EnvFrom],
variables: typing.Mapping[EnvValue]
)
| Name | Type | Description |
|---|---|---|
sources |
typing.List[EnvFrom] |
No description. |
variables |
typing.Mapping[EnvValue] |
No description. |
sourcesRequired ¶
- Type: typing.List[EnvFrom]
variablesRequired ¶
- Type: typing.Mapping[EnvValue]
Methods ¶
| Name | Description |
|---|---|
add_variable |
Add a single variable by name and value. |
copy_from |
Add a collection of variables by copying from another source. |
add_variable ¶
def add_variable(
name: str,
value: EnvValue
) -> None
Add a single variable by name and value.
The variable value can come from various dynamic sources such a secrets of config maps.
Use EnvValue.fromXXX to select sources.
nameRequired ¶
- Type: str
valueRequired ¶
- Type: EnvValue
copy_from ¶
def copy_from(
from: EnvFrom
) -> None
Add a collection of variables by copying from another source.
Use Env.fromXXX functions to select sources.
fromRequired ¶
- Type: EnvFrom
Static Functions ¶
| Name | Description |
|---|---|
from_config_map |
Selects a ConfigMap to populate the environment variables with. |
from_secret |
Selects a Secret to populate the environment variables with. |
from_config_map ¶
import cdk8s_plus_31
cdk8s_plus_31.Env.from_config_map(
config_map: IConfigMap,
prefix: str = None
)
Selects a ConfigMap to populate the environment variables with.
The contents of the target ConfigMap’s Data field will represent the key-value pairs as environment variables.
config_mapRequired ¶
- Type: IConfigMap
prefixOptional ¶
- Type: str
from_secret ¶
import cdk8s_plus_31
cdk8s_plus_31.Env.from_secret(
secr: ISecret
)
Selects a Secret to populate the environment variables with.
The contents of the target Secret’s Data field will represent the key-value pairs as environment variables.
secrRequired ¶
- Type: ISecret
Properties ¶
| Name | Type | Description |
|---|---|---|
sources |
typing.List[EnvFrom] |
The list of sources used to populate the container environment, in addition to the variables. |
variables |
typing.Mapping[EnvValue] |
The environment variables for this container. |
sourcesRequired ¶
sources: typing.List[EnvFrom]
- Type: typing.List[EnvFrom]
The list of sources used to populate the container environment, in addition to the variables.
Returns a copy. To add a source use container.env.copyFrom().
variablesRequired ¶
variables: typing.Mapping[EnvValue]
- Type: typing.Mapping[EnvValue]
The environment variables for this container.
Returns a copy. To add environment variables use container.env.addVariable().
EnvFrom ¶
A collection of env variables defined in other resources.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvFrom(
config_map: IConfigMap = None,
prefix: str = None,
sec: ISecret = None
)
| Name | Type | Description |
|---|---|---|
config_map |
IConfigMap |
No description. |
prefix |
str |
No description. |
sec |
ISecret |
No description. |
config_mapOptional ¶
- Type: IConfigMap
prefixOptional ¶
- Type: str
secOptional ¶
- Type: ISecret
EnvValue ¶
Utility class for creating reading env values from various sources.
Static Functions ¶
| Name | Description |
|---|---|
from_config_map |
Create a value by reading a specific key inside a config map. |
from_field_ref |
Create a value from a field reference. |
from_process |
Create a value from a key in the current process environment. |
from_resource |
Create a value from a resource. |
from_secret_value |
Defines an environment value from a secret JSON value. |
from_value |
Create a value from the given argument. |
from_config_map ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValue.from_config_map(
config_map: IConfigMap,
key: str,
optional: bool = None
)
Create a value by reading a specific key inside a config map.
config_mapRequired ¶
- Type: IConfigMap
The config map.
keyRequired ¶
- Type: str
The key to extract the value from.
optionalOptional ¶
- Type: bool
- Default: false
Specify whether the ConfigMap or its key must be defined.
from_field_ref ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValue.from_field_ref(
field_path: EnvFieldPaths,
api_version: str = None,
key: str = None
)
Create a value from a field reference.
field_pathRequired ¶
- Type: EnvFieldPaths
: The field reference.
api_versionOptional ¶
- Type: str
Version of the schema the FieldPath is written in terms of.
keyOptional ¶
- Type: str
The key to select the pod label or annotation.
from_process ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValue.from_process(
key: str,
required: bool = None
)
Create a value from a key in the current process environment.
keyRequired ¶
- Type: str
The key to read.
requiredOptional ¶
- Type: bool
- Default: false
Specify whether the key must exist in the environment.
If this is set to true, and the key does not exist, an error will thrown.
from_resource ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValue.from_resource(
resource: ResourceFieldPaths,
container: Container = None,
divisor: str = None
)
Create a value from a resource.
resourceRequired ¶
- Type: ResourceFieldPaths
: Resource to select the value from.
containerOptional ¶
- Type: Container
The container to select the value from.
divisorOptional ¶
- Type: str
The output format of the exposed resource.
from_secret_value ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValue.from_secret_value(
key: str,
secret: ISecret,
optional: bool = None
)
Defines an environment value from a secret JSON value.
keyRequired ¶
- Type: str
The JSON key.
secretRequired ¶
- Type: ISecret
The secret.
optionalOptional ¶
- Type: bool
- Default: false
Specify whether the Secret or its key must be defined.
from_value ¶
import cdk8s_plus_31
cdk8s_plus_31.EnvValue.from_value(
value: str
)
Create a value from the given argument.
valueRequired ¶
- Type: str
The value.
Properties ¶
| Name | Type | Description |
|---|---|---|
value |
typing.Any |
No description. |
value_from |
typing.Any |
No description. |
valueOptional ¶
value: typing.Any
- Type: typing.Any
value_fromOptional ¶
value_from: typing.Any
- Type: typing.Any
Handler ¶
Defines a specific action that should be taken.
Static Functions ¶
| Name | Description |
|---|---|
from_command |
Defines a handler based on a command which is executed within the container. |
from_http_get |
Defines a handler based on an HTTP GET request to the IP address of the container. |
from_tcp_socket |
Defines a handler based opening a connection to a TCP socket on the container. |
from_command ¶
import cdk8s_plus_31
cdk8s_plus_31.Handler.from_command(
command: typing.List[str]
)
Defines a handler based on a command which is executed within the container.
commandRequired ¶
- Type: typing.List[str]
The command to execute.
from_http_get ¶
import cdk8s_plus_31
cdk8s_plus_31.Handler.from_http_get(
path: str,
port: typing.Union[int, float] = None
)
Defines a handler based on an HTTP GET request to the IP address of the container.
pathRequired ¶
- Type: str
The URL path to hit.
portOptional ¶
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to use when sending the GET request.
from_tcp_socket ¶
import cdk8s_plus_31
cdk8s_plus_31.Handler.from_tcp_socket(
host: str = None,
port: typing.Union[int, float] = None
)
Defines a handler based opening a connection to a TCP socket on the container.
hostOptional ¶
- Type: str
- Default: defaults to the pod IP
The host name to connect to on the container.
portOptional ¶
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to connect to on the container.
IngressBackend ¶
The backend for an ingress path.
Static Functions ¶
| Name | Description |
|---|---|
from_resource |
A Resource backend is an ObjectRef to another Kubernetes resource within the same namespace as the Ingress object. |
from_service |
A Kubernetes Service to use as the backend for this path. |
from_resource ¶
import cdk8s_plus_31
cdk8s_plus_31.IngressBackend.from_resource(
resource: IResource
)
A Resource backend is an ObjectRef to another Kubernetes resource within the same namespace as the Ingress object.
A common usage for a Resource backend is to ingress data to an object storage backend with static assets.
resourceRequired ¶
- Type: IResource
from_service ¶
import cdk8s_plus_31
cdk8s_plus_31.IngressBackend.from_service(
serv: Service,
port: typing.Union[int, float] = None
)
A Kubernetes Service to use as the backend for this path.
servRequired ¶
- Type: Service
The service object.
portOptional ¶
- Type: typing.Union[int, float]
- Default: if the service exposes a single port, this port will be used.
The port to use to access the service.
- This option will fail if the service does not expose any ports.
- If the service exposes multiple ports, this option must be specified.
- If the service exposes a single port, this option is optional and if specified, it must be the same port exposed by the service.
IntOrString ¶
Static Functions ¶
| Name | Description |
|---|---|
from_number |
No description. |
from_string |
No description. |
from_number ¶
from cdk8s_plus_31 import k8s
k8s.IntOrString.from_number(
value: typing.Union[int, float]
)
valueRequired ¶
- Type: typing.Union[int, float]
from_string ¶
from cdk8s_plus_31 import k8s
k8s.IntOrString.from_string(
value: str
)
valueRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
value |
str | typing.Union[int, float] |
No description. |
valueRequired ¶
value: str | typing.Union[int, float]
- Type: str | typing.Union[int, float]
LabeledNode ¶
A node that is matched by label selectors.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.LabeledNode(
label_selector: typing.List[NodeLabelQuery]
)
| Name | Type | Description |
|---|---|---|
label_selector |
typing.List[NodeLabelQuery] |
No description. |
label_selectorRequired ¶
- Type: typing.List[NodeLabelQuery]
Properties ¶
| Name | Type | Description |
|---|---|---|
label_selector |
typing.List[NodeLabelQuery] |
No description. |
label_selectorRequired ¶
label_selector: typing.List[NodeLabelQuery]
- Type: typing.List[NodeLabelQuery]
LabelExpression ¶
Represents a query that can be performed against resources with labels.
Static Functions ¶
| Name | Description |
|---|---|
does_not_exist |
Requires label key to not exist. |
exists |
Requires label key to exist. |
in |
Requires value of label key to be one of values. |
not_in |
Requires value of label key to be none of values. |
does_not_exist ¶
import cdk8s_plus_31
cdk8s_plus_31.LabelExpression.does_not_exist(
key: str
)
Requires label key to not exist.
keyRequired ¶
- Type: str
exists ¶
import cdk8s_plus_31
cdk8s_plus_31.LabelExpression.exists(
key: str
)
Requires label key to exist.
keyRequired ¶
- Type: str
in ¶
import cdk8s_plus_31
cdk8s_plus_31.LabelExpression.in(
key: str,
values: typing.List[str]
)
Requires value of label key to be one of values.
keyRequired ¶
- Type: str
valuesRequired ¶
- Type: typing.List[str]
not_in ¶
import cdk8s_plus_31
cdk8s_plus_31.LabelExpression.not_in(
key: str,
values: typing.List[str]
)
Requires value of label key to be none of values.
keyRequired ¶
- Type: str
valuesRequired ¶
- Type: typing.List[str]
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
No description. |
operator |
str |
No description. |
values |
typing.List[str] |
No description. |
keyRequired ¶
key: str
- Type: str
operatorRequired ¶
operator: str
- Type: str
valuesOptional ¶
values: typing.List[str]
- Type: typing.List[str]
LabelSelector ¶
Match a resource by labels.
Methods ¶
| Name | Description |
|---|---|
is_empty |
No description. |
is_empty ¶
def is_empty() -> bool
Static Functions ¶
| Name | Description |
|---|---|
of |
No description. |
of ¶
import cdk8s_plus_31
cdk8s_plus_31.LabelSelector.of(
expressions: typing.List[LabelExpression] = None,
labels: typing.Mapping[str] = None
)
expressionsOptional ¶
- Type: typing.List[LabelExpression]
Expression based label matchers.
labelsOptional ¶
- Type: typing.Mapping[str]
Strict label matchers.
Metric ¶
A metric condition that HorizontalPodAutoscaler’s scale on.
Static Functions ¶
| Name | Description |
|---|---|
container_cpu |
Metric that tracks the CPU of a container. |
container_ephemeral_storage |
Metric that tracks the local ephemeral storage of a container. |
container_memory |
Metric that tracks the Memory of a container. |
container_storage |
Metric that tracks the volume size of a container. |
external |
A global metric that is not associated with any Kubernetes object. |
object |
Metric that describes a metric of a kubernetes object. |
pods |
A pod metric that will be averaged across all pods of the current scale target. |
resource_cpu |
Tracks the available CPU of the pods in a target. |
resource_ephemeral_storage |
Tracks the available Ephemeral Storage of the pods in a target. |
resource_memory |
Tracks the available Memory of the pods in a target. |
resource_storage |
Tracks the available Storage of the pods in a target. |
container_cpu ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.container_cpu(
container: Container,
target: MetricTarget
)
Metric that tracks the CPU of a container.
This metric will be tracked across all pods of the current scale target.
containerRequired ¶
- Type: Container
Container where the metric can be found.
targetRequired ¶
- Type: MetricTarget
Target metric value that will trigger scaling.
container_ephemeral_storage ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.container_ephemeral_storage(
container: Container,
target: MetricTarget
)
Metric that tracks the local ephemeral storage of a container.
This metric will be tracked across all pods of the current scale target.
containerRequired ¶
- Type: Container
Container where the metric can be found.
targetRequired ¶
- Type: MetricTarget
Target metric value that will trigger scaling.
container_memory ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.container_memory(
container: Container,
target: MetricTarget
)
Metric that tracks the Memory of a container.
This metric will be tracked across all pods of the current scale target.
containerRequired ¶
- Type: Container
Container where the metric can be found.
targetRequired ¶
- Type: MetricTarget
Target metric value that will trigger scaling.
container_storage ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.container_storage(
container: Container,
target: MetricTarget
)
Metric that tracks the volume size of a container.
This metric will be tracked across all pods of the current scale target.
containerRequired ¶
- Type: Container
Container where the metric can be found.
targetRequired ¶
- Type: MetricTarget
Target metric value that will trigger scaling.
external ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.external(
name: str,
target: MetricTarget,
label_selector: LabelSelector = None
)
A global metric that is not associated with any Kubernetes object.
Allows for autoscaling based on information coming from components running outside of the cluster.
Use case:
- Scale up when the length of an SQS queue is greater than 10 messages.
- Scale down when an outside load balancer’s queries are less than 10000 per second.
nameRequired ¶
- Type: str
The name of the metric to scale on.
targetRequired ¶
- Type: MetricTarget
The target metric value that will trigger scaling.
label_selectorOptional ¶
- Type: LabelSelector
- Default: Just the metric ‘name’ will be used to gather metrics.
A selector to find a metric by label.
When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
object ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.object(
name: str,
target: MetricTarget,
label_selector: LabelSelector = None,
object: IResource
)
Metric that describes a metric of a kubernetes object.
Use case:
- Scale on a Kubernetes Ingress’s hits-per-second metric.
nameRequired ¶
- Type: str
The name of the metric to scale on.
targetRequired ¶
- Type: MetricTarget
The target metric value that will trigger scaling.
label_selectorOptional ¶
- Type: LabelSelector
- Default: Just the metric ‘name’ will be used to gather metrics.
A selector to find a metric by label.
When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
objectRequired ¶
- Type: IResource
Resource where the metric can be found.
pods ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.pods(
name: str,
target: MetricTarget,
label_selector: LabelSelector = None
)
A pod metric that will be averaged across all pods of the current scale target.
Use case:
- Average CPU utilization across all pods
- Transactions processed per second across all pods
nameRequired ¶
- Type: str
The name of the metric to scale on.
targetRequired ¶
- Type: MetricTarget
The target metric value that will trigger scaling.
label_selectorOptional ¶
- Type: LabelSelector
- Default: Just the metric ‘name’ will be used to gather metrics.
A selector to find a metric by label.
When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping.
resource_cpu ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.resource_cpu(
target: MetricTarget
)
Tracks the available CPU of the pods in a target.
Note: Since the resource usages of all the containers are summed up the total pod utilization may not accurately represent the individual container resource usage. This could lead to situations where a single container might be running with high usage and the HPA will not scale out because the overall pod usage is still within acceptable limits.
Use case:
- Scale up when CPU is above 40%.
targetRequired ¶
- Type: MetricTarget
resource_ephemeral_storage ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.resource_ephemeral_storage(
target: MetricTarget
)
Tracks the available Ephemeral Storage of the pods in a target.
Note: Since the resource usages of all the containers are summed up the total pod utilization may not accurately represent the individual container resource usage. This could lead to situations where a single container might be running with high usage and the HPA will not scale out because the overall pod usage is still within acceptable limits.
targetRequired ¶
- Type: MetricTarget
resource_memory ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.resource_memory(
target: MetricTarget
)
Tracks the available Memory of the pods in a target.
Note: Since the resource usages of all the containers are summed up the total pod utilization may not accurately represent the individual container resource usage. This could lead to situations where a single container might be running with high usage and the HPA will not scale out because the overall pod usage is still within acceptable limits.
Use case:
- Scale up when Memory is above 512MB.
targetRequired ¶
- Type: MetricTarget
resource_storage ¶
import cdk8s_plus_31
cdk8s_plus_31.Metric.resource_storage(
target: MetricTarget
)
Tracks the available Storage of the pods in a target.
Note: Since the resource usages of all the containers are summed up the total pod utilization may not accurately represent the individual container resource usage. This could lead to situations where a single container might be running with high usage and the HPA will not scale out because the overall pod usage is still within acceptable limits.
targetRequired ¶
- Type: MetricTarget
Properties ¶
| Name | Type | Description |
|---|---|---|
type |
str |
No description. |
typeRequired ¶
type: str
- Type: str
MetricTarget ¶
A metric condition that will trigger scaling behavior when satisfied.
Example
# Example automatically generated from non-compiling source. May contain errors.
MetricTarget.average_utilization(70)
Static Functions ¶
| Name | Description |
|---|---|
average_utilization |
Target a percentage value across all relevant pods. |
average_value |
Target the average value across all relevant pods. |
value |
Target a specific target value. |
average_utilization ¶
import cdk8s_plus_31
cdk8s_plus_31.MetricTarget.average_utilization(
average_utilization: typing.Union[int, float]
)
Target a percentage value across all relevant pods.
average_utilizationRequired ¶
- Type: typing.Union[int, float]
The percentage of the utilization metric.
e.g. 50 for 50%.
average_value ¶
import cdk8s_plus_31
cdk8s_plus_31.MetricTarget.average_value(
average_value: typing.Union[int, float]
)
Target the average value across all relevant pods.
average_valueRequired ¶
- Type: typing.Union[int, float]
The average metric value.
value ¶
import cdk8s_plus_31
cdk8s_plus_31.MetricTarget.value(
value: typing.Union[int, float]
)
Target a specific target value.
valueRequired ¶
- Type: typing.Union[int, float]
The target value.
NamedNode ¶
A node that is matched by its name.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.NamedNode(
name: str
)
| Name | Type | Description |
|---|---|---|
name |
str |
No description. |
nameRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
name |
str |
No description. |
nameRequired ¶
name: str
- Type: str
NetworkPolicyPort ¶
Describes a port to allow traffic on.
Static Functions ¶
| Name | Description |
|---|---|
all_tcp |
Any TCP traffic. |
all_udp |
Any UDP traffic. |
of |
Custom port configuration. |
tcp |
Distinct TCP ports. |
tcp_range |
A TCP port range. |
udp |
Distinct UDP ports. |
udp_range |
A UDP port range. |
all_tcp ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyPort.all_tcp()
Any TCP traffic.
all_udp ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyPort.all_udp()
Any UDP traffic.
of ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyPort.of(
end_port: typing.Union[int, float] = None,
port: typing.Union[int, float] = None,
protocol: NetworkProtocol = None
)
Custom port configuration.
end_portOptional ¶
- Type: typing.Union[int, float]
- Default: not a port range.
End port (relative to port).
Only applies if port is defined.
Use this to specify a port range, rather that a specific one.
portOptional ¶
- Type: typing.Union[int, float]
- Default: all ports are allowed.
Specific port number.
protocolOptional ¶
- Type: NetworkProtocol
- Default: NetworkProtocol.TCP
Protocol.
tcp ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyPort.tcp(
port: typing.Union[int, float]
)
Distinct TCP ports.
portRequired ¶
- Type: typing.Union[int, float]
tcp_range ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyPort.tcp_range(
start_port: typing.Union[int, float],
end_port: typing.Union[int, float]
)
A TCP port range.
start_portRequired ¶
- Type: typing.Union[int, float]
end_portRequired ¶
- Type: typing.Union[int, float]
udp ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyPort.udp(
port: typing.Union[int, float]
)
Distinct UDP ports.
portRequired ¶
- Type: typing.Union[int, float]
udp_range ¶
import cdk8s_plus_31
cdk8s_plus_31.NetworkPolicyPort.udp_range(
start_port: typing.Union[int, float],
end_port: typing.Union[int, float]
)
A UDP port range.
start_portRequired ¶
- Type: typing.Union[int, float]
end_portRequired ¶
- Type: typing.Union[int, float]
Node ¶
Represents a node in the cluster.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.Node()
| Name | Type | Description |
|---|---|---|
Static Functions ¶
| Name | Description |
|---|---|
labeled |
Match a node by its labels. |
named |
Match a node by its name. |
tainted |
Match a node by its taints. |
labeled ¶
import cdk8s_plus_31
cdk8s_plus_31.Node.labeled(
label_selector: *NodeLabelQuery
)
Match a node by its labels.
label_selectorRequired ¶
- Type: *NodeLabelQuery
named ¶
import cdk8s_plus_31
cdk8s_plus_31.Node.named(
node_name: str
)
Match a node by its name.
node_nameRequired ¶
- Type: str
tainted ¶
import cdk8s_plus_31
cdk8s_plus_31.Node.tainted(
taint_selector: *NodeTaintQuery
)
Match a node by its taints.
taint_selectorRequired ¶
- Type: *NodeTaintQuery
NodeLabelQuery ¶
Represents a query that can be performed against nodes with labels.
Static Functions ¶
| Name | Description |
|---|---|
does_not_exist |
Requires label key to not exist. |
exists |
Requires label key to exist. |
gt |
Requires value of label key to greater than all elements in values. |
in |
Requires value of label key to be one of values. |
is |
Requires value of label key to equal value. |
lt |
Requires value of label key to less than all elements in values. |
not_in |
Requires value of label key to be none of values. |
does_not_exist ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeLabelQuery.does_not_exist(
key: str
)
Requires label key to not exist.
keyRequired ¶
- Type: str
exists ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeLabelQuery.exists(
key: str
)
Requires label key to exist.
keyRequired ¶
- Type: str
gt ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeLabelQuery.gt(
key: str,
values: typing.List[str]
)
Requires value of label key to greater than all elements in values.
keyRequired ¶
- Type: str
valuesRequired ¶
- Type: typing.List[str]
in ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeLabelQuery.in(
key: str,
values: typing.List[str]
)
Requires value of label key to be one of values.
keyRequired ¶
- Type: str
valuesRequired ¶
- Type: typing.List[str]
is ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeLabelQuery.is(
key: str,
value: str
)
Requires value of label key to equal value.
keyRequired ¶
- Type: str
valueRequired ¶
- Type: str
lt ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeLabelQuery.lt(
key: str,
values: typing.List[str]
)
Requires value of label key to less than all elements in values.
keyRequired ¶
- Type: str
valuesRequired ¶
- Type: typing.List[str]
not_in ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeLabelQuery.not_in(
key: str,
values: typing.List[str]
)
Requires value of label key to be none of values.
keyRequired ¶
- Type: str
valuesRequired ¶
- Type: typing.List[str]
NodeTaintQuery ¶
Taint queries that can be perfomed against nodes.
Static Functions ¶
| Name | Description |
|---|---|
any |
Matches any taint. |
exists |
Matches a tain with any value of a specific key. |
is |
Matches a taint with a specific key and value. |
any ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeTaintQuery.any()
Matches any taint.
exists ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeTaintQuery.exists(
key: str,
effect: TaintEffect = None,
evict_after: Duration = None
)
Matches a tain with any value of a specific key.
keyRequired ¶
- Type: str
effectOptional ¶
- Type: TaintEffect
- Default: all effects are matched.
The taint effect to match.
evict_afterOptional ¶
- Type: cdk8s.Duration
- Default: bound forever.
How much time should a pod that tolerates the NO_EXECUTE effect be bound to the node.
Only applies for the NO_EXECUTE effect.
is ¶
import cdk8s_plus_31
cdk8s_plus_31.NodeTaintQuery.is(
key: str,
value: str,
effect: TaintEffect = None,
evict_after: Duration = None
)
Matches a taint with a specific key and value.
keyRequired ¶
- Type: str
valueRequired ¶
- Type: str
effectOptional ¶
- Type: TaintEffect
- Default: all effects are matched.
The taint effect to match.
evict_afterOptional ¶
- Type: cdk8s.Duration
- Default: bound forever.
How much time should a pod that tolerates the NO_EXECUTE effect be bound to the node.
Only applies for the NO_EXECUTE effect.
NonApiResource ¶
- Implements: IApiEndpoint
Factory for creating non api resources.
Methods ¶
| Name | Description |
|---|---|
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
Static Functions ¶
| Name | Description |
|---|---|
of |
No description. |
of ¶
import cdk8s_plus_31
cdk8s_plus_31.NonApiResource.of(
url: str
)
urlRequired ¶
- Type: str
PercentOrAbsolute ¶
Union like class repsenting either a ration in percents or an absolute number.
Methods ¶
| Name | Description |
|---|---|
is_zero |
No description. |
is_zero ¶
def is_zero() -> bool
Static Functions ¶
| Name | Description |
|---|---|
absolute |
Absolute number. |
percent |
Percent ratio. |
absolute ¶
import cdk8s_plus_31
cdk8s_plus_31.PercentOrAbsolute.absolute(
num: typing.Union[int, float]
)
Absolute number.
numRequired ¶
- Type: typing.Union[int, float]
percent ¶
import cdk8s_plus_31
cdk8s_plus_31.PercentOrAbsolute.percent(
percent: typing.Union[int, float]
)
Percent ratio.
percentRequired ¶
- Type: typing.Union[int, float]
Properties ¶
| Name | Type | Description |
|---|---|---|
value |
typing.Any |
No description. |
valueRequired ¶
value: typing.Any
- Type: typing.Any
PodConnections ¶
Controls network isolation rules for inter-pod communication.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.PodConnections(
instance: AbstractPod
)
| Name | Type | Description |
|---|---|---|
instance |
AbstractPod |
No description. |
instanceRequired ¶
- Type: AbstractPod
Methods ¶
| Name | Description |
|---|---|
allow_from |
Allow network traffic from the peer to this pod. |
allow_to |
Allow network traffic from this pod to the peer. |
isolate |
Sets the default network policy for Pod/Workload to have all egress and ingress connections as disabled. |
allow_from ¶
def allow_from(
peer: INetworkPolicyPeer,
isolation: PodConnectionsIsolation = None,
ports: typing.List[NetworkPolicyPort] = None
) -> None
Allow network traffic from the peer to this pod.
By default, this will create an ingress network policy for this pod, and an egress
network policy for the peer. This is required if both sides are already isolated.
Use options.isolation to control this behavior.
Example
# Example automatically generated from non-compiling source. May contain errors.
# create only an egress policy that selects the 'web' pod to allow outgoing traffic
# to the 'redis' pod. this requires the 'redis' pod to not be isolated for ingress.
redis.connections.allow_from(web, isolation=Isolation.PEER)
# create only an ingress policy that selects the 'redis' peer to allow incoming traffic
# from the 'web' pod. this requires the 'web' pod to not be isolated for egress.
redis.connections.allow_from(web, isolation=Isolation.POD)
peerRequired ¶
- Type: INetworkPolicyPeer
isolationOptional ¶
- Type: PodConnectionsIsolation
- Default: unset, isolates both the pod and the peer.
Which isolation should be applied to establish the connection.
portsOptional ¶
- Type: typing.List[NetworkPolicyPort]
- Default: The pod ports.
Ports to allow incoming traffic to.
allow_to ¶
def allow_to(
peer: INetworkPolicyPeer,
isolation: PodConnectionsIsolation = None,
ports: typing.List[NetworkPolicyPort] = None
) -> None
Allow network traffic from this pod to the peer.
By default, this will create an egress network policy for this pod, and an ingress
network policy for the peer. This is required if both sides are already isolated.
Use options.isolation to control this behavior.
Example
# Example automatically generated from non-compiling source. May contain errors.
# create only an egress policy that selects the 'web' pod to allow outgoing traffic
# to the 'redis' pod. this requires the 'redis' pod to not be isolated for ingress.
web.connections.allow_to(redis, isolation=Isolation.POD)
# create only an ingress policy that selects the 'redis' peer to allow incoming traffic
# from the 'web' pod. this requires the 'web' pod to not be isolated for egress.
web.connections.allow_to(redis, isolation=Isolation.PEER)
peerRequired ¶
- Type: INetworkPolicyPeer
isolationOptional ¶
- Type: PodConnectionsIsolation
- Default: unset, isolates both the pod and the peer.
Which isolation should be applied to establish the connection.
portsOptional ¶
- Type: typing.List[NetworkPolicyPort]
- Default: If the peer is a managed pod, take its ports. Otherwise, all ports are allowed.
Ports to allow outgoing traffic to.
isolate ¶
def isolate() -> None
Sets the default network policy for Pod/Workload to have all egress and ingress connections as disabled.
PodDns ¶
Holds dns settings of the pod.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.PodDns(
hostname: str = None,
hostname_as_fqd_n: bool = None,
nameservers: typing.List[str] = None,
options: typing.List[DnsOption] = None,
policy: DnsPolicy = None,
searches: typing.List[str] = None,
subdomain: str = None
)
| Name | Type | Description |
|---|---|---|
hostname |
str |
Specifies the hostname of the Pod. |
hostname_as_fqd_n |
bool |
If true the pod’s hostname will be configured as the pod’s FQDN, rather than the leaf name (the default). |
nameservers |
typing.List[str] |
A list of IP addresses that will be used as DNS servers for the Pod. |
options |
typing.List[DnsOption] |
List of objects where each object may have a name property (required) and a value property (optional). |
policy |
DnsPolicy |
Set DNS policy for the pod. |
searches |
typing.List[str] |
A list of DNS search domains for hostname lookup in the Pod. |
subdomain |
str |
If specified, the fully qualified Pod hostname will be “ |
hostnameOptional ¶
- Type: str
- Default: Set to a system-defined value.
Specifies the hostname of the Pod.
hostname_as_fqd_nOptional ¶
- Type: bool
- Default: false
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.
nameserversOptional ¶
- Type: typing.List[str]
A list of IP addresses that will be used as DNS servers for the Pod.
There can be at most 3 IP addresses specified. When the policy is set to “NONE”, the list must contain at least one IP address, otherwise this property is optional. The servers listed will be combined to the base nameservers generated from the specified DNS policy with duplicate addresses removed.
optionsOptional ¶
- Type: typing.List[DnsOption]
List of objects where each object may have a name property (required) and a value property (optional).
The contents in this property will be merged to the options generated from the specified DNS policy. Duplicate entries are removed.
policyOptional ¶
- Type: DnsPolicy
- Default: DnsPolicy.CLUSTER_FIRST
Set DNS policy for the pod.
If policy is set to None, other configuration must be supplied.
searchesOptional ¶
- Type: typing.List[str]
A list of DNS search domains for hostname lookup in the Pod.
When specified, the provided list will be merged into the base search domain names generated from the chosen DNS policy. Duplicate domain names are removed.
Kubernetes allows for at most 6 search domains.
subdomainOptional ¶
- Type: str
- Default: No subdomain.
If specified, the fully qualified Pod hostname will be “
Methods ¶
| Name | Description |
|---|---|
add_nameserver |
Add a nameserver. |
add_option |
Add a custom option. |
add_search |
Add a search domain. |
add_nameserver ¶
def add_nameserver(
nameservers: *str
) -> None
Add a nameserver.
nameserversRequired ¶
- Type: *str
add_option ¶
def add_option(
name: str,
value: str = None
) -> None
Add a custom option.
nameRequired ¶
- Type: str
Option name.
valueOptional ¶
- Type: str
- Default: No value.
Option value.
add_search ¶
def add_search(
searches: *str
) -> None
Add a search domain.
searchesRequired ¶
- Type: *str
Properties ¶
| Name | Type | Description |
|---|---|---|
hostname_as_fqd_n |
bool |
Whether or not the pods hostname is set to its FQDN. |
nameservers |
typing.List[str] |
Nameservers defined for this pod. |
options |
typing.List[DnsOption] |
Custom dns options defined for this pod. |
policy |
DnsPolicy |
The DNS policy of this pod. |
searches |
typing.List[str] |
Search domains defined for this pod. |
hostname |
str |
The configured hostname of the pod. |
subdomain |
str |
The configured subdomain of the pod. |
hostname_as_fqd_nRequired ¶
hostname_as_fqd_n: bool
- Type: bool
Whether or not the pods hostname is set to its FQDN.
nameserversRequired ¶
nameservers: typing.List[str]
- Type: typing.List[str]
Nameservers defined for this pod.
optionsRequired ¶
options: typing.List[DnsOption]
- Type: typing.List[DnsOption]
Custom dns options defined for this pod.
policyRequired ¶
policy: DnsPolicy
- Type: DnsPolicy
The DNS policy of this pod.
searchesRequired ¶
searches: typing.List[str]
- Type: typing.List[str]
Search domains defined for this pod.
hostnameOptional ¶
hostname: str
- Type: str
The configured hostname of the pod.
Undefined means its set to a system-defined value.
subdomainOptional ¶
subdomain: str
- Type: str
The configured subdomain of the pod.
PodScheduling ¶
Controls the pod scheduling strategy.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.PodScheduling(
instance: AbstractPod
)
| Name | Type | Description |
|---|---|---|
instance |
AbstractPod |
No description. |
instanceRequired ¶
- Type: AbstractPod
Methods ¶
| Name | Description |
|---|---|
assign |
Assign this pod a specific node by name. |
attract |
Attract this pod to a node matched by selectors. You can select a node by using Node.labeled(). |
colocate |
Co-locate this pod with a scheduling selection. |
separate |
Seperate this pod from a scheduling selection. |
tolerate |
Allow this pod to tolerate taints matching these tolerations. |
assign ¶
def assign(
node: NamedNode
) -> None
Assign this pod a specific node by name.
The scheduler ignores the Pod, and the kubelet on the named node tries to place the Pod on that node. Overrules any affinity rules of the pod.
Some limitations of static assignment are:
- If the named node does not exist, the Pod will not run, and in some cases may be automatically deleted.
- If the named node does not have the resources to accommodate the Pod, the Pod will fail and its reason will indicate why, for example OutOfmemory or OutOfcpu.
- Node names in cloud environments are not always predictable or stable.
Will throw is the pod is already assigned to named node.
Under the hood, this method utilizes the nodeName property.
nodeRequired ¶
- Type: NamedNode
attract ¶
def attract(
node: LabeledNode,
weight: typing.Union[int, float] = None
) -> None
Attract this pod to a node matched by selectors. You can select a node by using Node.labeled().
Attracting to multiple nodes (i.e invoking this method multiple times) acts as an OR condition, meaning the pod will be assigned to either one of the nodes.
Under the hood, this method utilizes the nodeAffinity property.
https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
nodeRequired ¶
- Type: LabeledNode
weightOptional ¶
- Type: typing.Union[int, float]
- Default: no weight. assignment is assumed to be required (hard).
Indicates the attraction is optional (soft), with this weight score.
colocate ¶
def colocate(
selector: IPodSelector,
topology: Topology = None,
weight: typing.Union[int, float] = None
) -> None
Co-locate this pod with a scheduling selection.
A selection can be one of:
- An instance of a
Pod. - An instance of a
Workload(e.gDeployment,StatefulSet). - An un-managed pod that can be selected via
Pods.select().
Co-locating with multiple selections ((i.e invoking this method multiple times)) acts as an AND condition. meaning the pod will be assigned to a node that satisfies all selections (i.e runs at least one pod that satisifies each selection).
Under the hood, this method utilizes the podAffinity property.
selectorRequired ¶
- Type: IPodSelector
topologyOptional ¶
- Type: Topology
- Default: Topology.HOSTNAME
Which topology to coloate on.
weightOptional ¶
- Type: typing.Union[int, float]
- Default: no weight. co-location is assumed to be required (hard).
Indicates the co-location is optional (soft), with this weight score.
separate ¶
def separate(
selector: IPodSelector,
topology: Topology = None,
weight: typing.Union[int, float] = None
) -> None
Seperate this pod from a scheduling selection.
A selection can be one of:
- An instance of a
Pod. - An instance of a
Workload(e.gDeployment,StatefulSet). - An un-managed pod that can be selected via
Pods.select().
Seperating from multiple selections acts as an AND condition. meaning the pod will not be assigned to a node that satisfies all selections (i.e runs at least one pod that satisifies each selection).
Under the hood, this method utilizes the podAntiAffinity property.
selectorRequired ¶
- Type: IPodSelector
topologyOptional ¶
- Type: Topology
- Default: Topology.HOSTNAME
Which topology to separate on.
weightOptional ¶
- Type: typing.Union[int, float]
- Default: no weight. separation is assumed to be required (hard).
Indicates the separation is optional (soft), with this weight score.
tolerate ¶
def tolerate(
node: TaintedNode
) -> None
Allow this pod to tolerate taints matching these tolerations.
You can put multiple taints on the same node and multiple tolerations on the same pod. The way Kubernetes processes multiple taints and tolerations is like a filter: start with all of a node’s taints, then ignore the ones for which the pod has a matching toleration; the remaining un-ignored taints have the indicated effects on the pod. In particular:
- if there is at least one un-ignored taint with effect NoSchedule then Kubernetes will not schedule the pod onto that node
- if there is no un-ignored taint with effect NoSchedule but there is at least one un-ignored taint with effect PreferNoSchedule then Kubernetes will try to not schedule the pod onto the node
- if there is at least one un-ignored taint with effect NoExecute then the pod will be evicted from the node (if it is already running on the node), and will not be scheduled onto the node (if it is not yet running on the node).
Under the hood, this method utilizes the tolerations property.
https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
nodeRequired ¶
- Type: TaintedNode
PodSecurityContext ¶
Holds pod-level security attributes and common container settings.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.PodSecurityContext(
ensure_non_root: bool = None,
fs_group: typing.Union[int, float] = None,
fs_group_change_policy: FsGroupChangePolicy = None,
group: typing.Union[int, float] = None,
sysctls: typing.List[Sysctl] = None,
user: typing.Union[int, float] = None
)
| Name | Type | Description |
|---|---|---|
ensure_non_root |
bool |
Indicates that the container must run as a non-root user. |
fs_group |
typing.Union[int, float] |
Modify the ownership and permissions of pod volumes to this GID. |
fs_group_change_policy |
FsGroupChangePolicy |
Defines behavior of changing ownership and permission of the volume before being exposed inside Pod. |
group |
typing.Union[int, float] |
The GID to run the entrypoint of the container process. |
sysctls |
typing.List[Sysctl] |
Sysctls hold a list of namespaced sysctls used for the pod. |
user |
typing.Union[int, float] |
The UID to run the entrypoint of the container process. |
ensure_non_rootOptional ¶
- Type: bool
- Default: true
Indicates that the container must run as a non-root user.
If true, the Kubelet will validate the image at runtime to ensure that it does not run as UID 0 (root) and fail to start the container if it does.
fs_groupOptional ¶
- Type: typing.Union[int, float]
- Default: Volume ownership is not changed.
Modify the ownership and permissions of pod volumes to this GID.
fs_group_change_policyOptional ¶
- Type: FsGroupChangePolicy
- Default: FsGroupChangePolicy.ALWAYS
Defines behavior of changing ownership and permission of the volume before being exposed inside Pod.
This field will only apply to volume types which support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir.
groupOptional ¶
- Type: typing.Union[int, float]
- Default: Group configured by container runtime
The GID to run the entrypoint of the container process.
sysctlsOptional ¶
- Type: typing.List[Sysctl]
- Default: No sysctls
Sysctls hold a list of namespaced sysctls used for the pod.
Pods with unsupported sysctls (by the container runtime) might fail to launch.
userOptional ¶
- Type: typing.Union[int, float]
- Default: User specified in image metadata
The UID to run the entrypoint of the container process.
Properties ¶
| Name | Type | Description |
|---|---|---|
ensure_non_root |
bool |
No description. |
fs_group_change_policy |
FsGroupChangePolicy |
No description. |
sysctls |
typing.List[Sysctl] |
No description. |
fs_group |
typing.Union[int, float] |
No description. |
group |
typing.Union[int, float] |
No description. |
user |
typing.Union[int, float] |
No description. |
ensure_non_rootRequired ¶
ensure_non_root: bool
- Type: bool
fs_group_change_policyRequired ¶
fs_group_change_policy: FsGroupChangePolicy
- Type: FsGroupChangePolicy
sysctlsRequired ¶
sysctls: typing.List[Sysctl]
- Type: typing.List[Sysctl]
fs_groupOptional ¶
fs_group: typing.Union[int, float]
- Type: typing.Union[int, float]
groupOptional ¶
group: typing.Union[int, float]
- Type: typing.Union[int, float]
userOptional ¶
user: typing.Union[int, float]
- Type: typing.Union[int, float]
Probe ¶
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.
Static Functions ¶
| Name | Description |
|---|---|
from_command |
Defines a probe based on a command which is executed within the container. |
from_grpc |
Defines a probe based on a gRPC request to the container. |
from_http_get |
Defines a probe based on an HTTP GET request to the IP address of the container. |
from_tcp_socket |
Defines a probe based opening a connection to a TCP socket on the container. |
from_command ¶
import cdk8s_plus_31
cdk8s_plus_31.Probe.from_command(
command: typing.List[str],
failure_threshold: typing.Union[int, float] = None,
initial_delay_seconds: Duration = None,
period_seconds: Duration = None,
success_threshold: typing.Union[int, float] = None,
timeout_seconds: Duration = None
)
Defines a probe based on a command which is executed within the container.
commandRequired ¶
- Type: typing.List[str]
The command to execute.
failure_thresholdOptional ¶
- Type: typing.Union[int, float]
- Default: 3
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
initial_delay_secondsOptional ¶
- Type: cdk8s.Duration
- Default: immediate
Number of seconds after the container has started before liveness probes are initiated.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_secondsOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(10) Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
- Type: typing.Union[int, float]
- Default: 1 Must be 1 for liveness and startup. Minimum value is 1.
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.
timeout_secondsOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(1)
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
from_grpc ¶
import cdk8s_plus_31
cdk8s_plus_31.Probe.from_grpc(
failure_threshold: typing.Union[int, float] = None,
initial_delay_seconds: Duration = None,
period_seconds: Duration = None,
success_threshold: typing.Union[int, float] = None,
timeout_seconds: Duration = None,
port: typing.Union[int, float] = None,
service: str = None
)
Defines a probe based on a gRPC request to the container.
failure_thresholdOptional ¶
- Type: typing.Union[int, float]
- Default: 3
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
initial_delay_secondsOptional ¶
- Type: cdk8s.Duration
- Default: immediate
Number of seconds after the container has started before liveness probes are initiated.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_secondsOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(10) Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
- Type: typing.Union[int, float]
- Default: 1 Must be 1 for liveness and startup. Minimum value is 1.
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.
timeout_secondsOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(1)
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
portOptional ¶
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to connect to on the container.
serviceOptional ¶
- Type: str
- Default: If this is not specified, the default behavior is defined by gRPC.
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).
from_http_get ¶
import cdk8s_plus_31
cdk8s_plus_31.Probe.from_http_get(
path: str,
failure_threshold: typing.Union[int, float] = None,
initial_delay_seconds: Duration = None,
period_seconds: Duration = None,
success_threshold: typing.Union[int, float] = None,
timeout_seconds: Duration = None,
host: str = None,
http_headers: typing.List[HttpHeader] = None,
port: typing.Union[int, float] = None,
scheme: ConnectionScheme = None
)
Defines a probe based on an HTTP GET request to the IP address of the container.
pathRequired ¶
- Type: str
The URL path to hit.
failure_thresholdOptional ¶
- Type: typing.Union[int, float]
- Default: 3
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
initial_delay_secondsOptional ¶
- Type: cdk8s.Duration
- Default: immediate
Number of seconds after the container has started before liveness probes are initiated.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_secondsOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(10) Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
- Type: typing.Union[int, float]
- Default: 1 Must be 1 for liveness and startup. Minimum value is 1.
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.
timeout_secondsOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(1)
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
hostOptional ¶
- Type: str
- Default: defaults to the pod IP
The host name to connect to on the container.
http_headersOptional ¶
- Type: typing.List[HttpHeader]
- Default: no custom headers are set
Custom HTTP headers to set in the probe request.
Note that HTTP allows repeated headers.
portOptional ¶
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to use when sending the GET request.
schemeOptional ¶
- Type: ConnectionScheme
- Default: ConnectionScheme.HTTP
Scheme to use for connecting to the host (HTTP or HTTPS).
from_tcp_socket ¶
import cdk8s_plus_31
cdk8s_plus_31.Probe.from_tcp_socket(
failure_threshold: typing.Union[int, float] = None,
initial_delay_seconds: Duration = None,
period_seconds: Duration = None,
success_threshold: typing.Union[int, float] = None,
timeout_seconds: Duration = None,
host: str = None,
port: typing.Union[int, float] = None
)
Defines a probe based opening a connection to a TCP socket on the container.
failure_thresholdOptional ¶
- Type: typing.Union[int, float]
- Default: 3
Minimum consecutive failures for the probe to be considered failed after having succeeded.
Defaults to 3. Minimum value is 1.
initial_delay_secondsOptional ¶
- Type: cdk8s.Duration
- Default: immediate
Number of seconds after the container has started before liveness probes are initiated.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
period_secondsOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(10) Minimum value is 1.
How often (in seconds) to perform the probe.
Default to 10 seconds. Minimum value is 1.
success_thresholdOptional ¶
- Type: typing.Union[int, float]
- Default: 1 Must be 1 for liveness and startup. Minimum value is 1.
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.
timeout_secondsOptional ¶
- Type: cdk8s.Duration
- Default: Duration.seconds(1)
Number of seconds after which the probe times out.
Defaults to 1 second. Minimum value is 1.
https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
hostOptional ¶
- Type: str
- Default: defaults to the pod IP
The host name to connect to on the container.
portOptional ¶
- Type: typing.Union[int, float]
- Default: defaults to
container.port.
The TCP port to connect to on the container.
Quantity ¶
Static Functions ¶
| Name | Description |
|---|---|
from_number |
No description. |
from_string |
No description. |
from_number ¶
from cdk8s_plus_31 import k8s
k8s.Quantity.from_number(
value: typing.Union[int, float]
)
valueRequired ¶
- Type: typing.Union[int, float]
from_string ¶
from cdk8s_plus_31 import k8s
k8s.Quantity.from_string(
value: str
)
valueRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
value |
str | typing.Union[int, float] |
No description. |
valueRequired ¶
value: str | typing.Union[int, float]
- Type: str | typing.Union[int, float]
Replicas ¶
The amount of replicas that will change.
Static Functions ¶
| Name | Description |
|---|---|
absolute |
Changes the pods by a percentage of the it’s current value. |
percent |
Changes the pods by a percentage of the it’s current value. |
absolute ¶
import cdk8s_plus_31
cdk8s_plus_31.Replicas.absolute(
value: typing.Union[int, float]
)
Changes the pods by a percentage of the it’s current value.
valueRequired ¶
- Type: typing.Union[int, float]
The amount of change to apply.
Must be greater than 0.
percent ¶
import cdk8s_plus_31
cdk8s_plus_31.Replicas.percent(
value: typing.Union[int, float]
)
Changes the pods by a percentage of the it’s current value.
valueRequired ¶
- Type: typing.Union[int, float]
The percentage of change to apply.
Must be greater than 0.
ResourcePermissions ¶
Controls permissions for operations on resources.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.ResourcePermissions(
instance: Resource
)
| Name | Type | Description |
|---|---|---|
instance |
Resource |
No description. |
instanceRequired ¶
- Type: Resource
Methods ¶
| Name | Description |
|---|---|
grant_read |
Grants the list of subjects permissions to read this resource. |
grant_read_write |
Grants the list of subjects permissions to read and write this resource. |
grant_read ¶
def grant_read(
subjects: *ISubject
) -> RoleBinding
Grants the list of subjects permissions to read this resource.
subjectsRequired ¶
- Type: *ISubject
grant_read_write ¶
def grant_read_write(
subjects: *ISubject
) -> RoleBinding
Grants the list of subjects permissions to read and write this resource.
subjectsRequired ¶
- Type: *ISubject
StatefulSetUpdateStrategy ¶
StatefulSet update strategies.
Static Functions ¶
| Name | Description |
|---|---|
on_delete |
The controller will not automatically update the Pods in a StatefulSet. |
rolling_update |
The controller will delete and recreate each Pod in the StatefulSet. |
on_delete ¶
import cdk8s_plus_31
cdk8s_plus_31.StatefulSetUpdateStrategy.on_delete()
The controller will not automatically update the Pods in a StatefulSet.
Users must manually delete Pods to cause the controller to create new Pods that reflect modifications.
rolling_update ¶
import cdk8s_plus_31
cdk8s_plus_31.StatefulSetUpdateStrategy.rolling_update(
partition: typing.Union[int, float] = None
)
The controller will delete and recreate each Pod in the StatefulSet.
It will proceed in the same order as Pod termination (from the largest ordinal to the smallest), updating each Pod one at a time. The Kubernetes control plane waits until an updated Pod is Running and Ready prior to updating its predecessor.
partitionOptional ¶
- Type: typing.Union[int, float]
- Default: 0
If specified, all Pods with an ordinal that is greater than or equal to the partition will be updated when the StatefulSet’s .spec.template is updated. All Pods with an ordinal that is less than the partition will not be updated, and, even if they are deleted, they will be recreated at the previous version.
If the partition is greater than replicas, updates to the pod template will not be propagated to Pods. In most cases you will not need to use a partition, but they are useful if you want to stage an update, roll out a canary, or perform a phased roll out.
https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
TaintedNode ¶
A node that is matched by taint selectors.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.TaintedNode(
taint_selector: typing.List[NodeTaintQuery]
)
| Name | Type | Description |
|---|---|---|
taint_selector |
typing.List[NodeTaintQuery] |
No description. |
taint_selectorRequired ¶
- Type: typing.List[NodeTaintQuery]
Properties ¶
| Name | Type | Description |
|---|---|---|
taint_selector |
typing.List[NodeTaintQuery] |
No description. |
taint_selectorRequired ¶
taint_selector: typing.List[NodeTaintQuery]
- Type: typing.List[NodeTaintQuery]
Topology ¶
Available topology domains.
Static Functions ¶
| Name | Description |
|---|---|
custom |
Custom key for the node label that the system uses to denote the topology domain. |
custom ¶
import cdk8s_plus_31
cdk8s_plus_31.Topology.custom(
key: str
)
Custom key for the node label that the system uses to denote the topology domain.
keyRequired ¶
- Type: str
Properties ¶
| Name | Type | Description |
|---|---|---|
key |
str |
No description. |
keyRequired ¶
key: str
- Type: str
Constants ¶
| Name | Type | Description |
|---|---|---|
HOSTNAME |
Topology |
A hostname represents a single node in the cluster. |
REGION |
Topology |
A region represents a larger domain, made up of one or more zones. |
ZONE |
Topology |
A zone represents a logical failure domain. |
HOSTNAMERequired ¶
HOSTNAME: Topology
- Type: Topology
A hostname represents a single node in the cluster.
https://kubernetes.io/docs/reference/labels-annotations-taints/#kubernetesiohostname
REGIONRequired ¶
REGION: Topology
- Type: Topology
A region represents a larger domain, made up of one or more zones.
It is uncommon for Kubernetes clusters to span multiple regions. While the exact definition of a zone or region is left to infrastructure implementations, common properties of a region include higher network latency between them than within them, non-zero cost for network traffic between them, and failure independence from other zones or regions.
For example, nodes within a region might share power infrastructure (e.g. a UPS or generator), but nodes in different regions typically would not.
https://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesioregion
ZONERequired ¶
ZONE: Topology
- Type: Topology
A zone represents a logical failure domain.
It is common for Kubernetes clusters to span multiple zones for increased availability. While the exact definition of a zone is left to infrastructure implementations, common properties of a zone include very low network latency within a zone, no-cost network traffic within a zone, and failure independence from other zones. For example, nodes within a zone might share a network switch, but nodes in different zones should not.
https://kubernetes.io/docs/reference/labels-annotations-taints/#topologykubernetesiozone
WorkloadScheduling ¶
Controls the pod scheduling strategy of this workload.
It offers some additional API’s on top of the core pod scheduling.
Initializers ¶
import cdk8s_plus_31
cdk8s_plus_31.WorkloadScheduling(
instance: AbstractPod
)
| Name | Type | Description |
|---|---|---|
instance |
AbstractPod |
No description. |
instanceRequired ¶
- Type: AbstractPod
Methods ¶
| Name | Description |
|---|---|
assign |
Assign this pod a specific node by name. |
attract |
Attract this pod to a node matched by selectors. You can select a node by using Node.labeled(). |
colocate |
Co-locate this pod with a scheduling selection. |
separate |
Seperate this pod from a scheduling selection. |
tolerate |
Allow this pod to tolerate taints matching these tolerations. |
spread |
Spread the pods in this workload by the topology key. |
assign ¶
def assign(
node: NamedNode
) -> None
Assign this pod a specific node by name.
The scheduler ignores the Pod, and the kubelet on the named node tries to place the Pod on that node. Overrules any affinity rules of the pod.
Some limitations of static assignment are:
- If the named node does not exist, the Pod will not run, and in some cases may be automatically deleted.
- If the named node does not have the resources to accommodate the Pod, the Pod will fail and its reason will indicate why, for example OutOfmemory or OutOfcpu.
- Node names in cloud environments are not always predictable or stable.
Will throw is the pod is already assigned to named node.
Under the hood, this method utilizes the nodeName property.
nodeRequired ¶
- Type: NamedNode
attract ¶
def attract(
node: LabeledNode,
weight: typing.Union[int, float] = None
) -> None
Attract this pod to a node matched by selectors. You can select a node by using Node.labeled().
Attracting to multiple nodes (i.e invoking this method multiple times) acts as an OR condition, meaning the pod will be assigned to either one of the nodes.
Under the hood, this method utilizes the nodeAffinity property.
https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
nodeRequired ¶
- Type: LabeledNode
weightOptional ¶
- Type: typing.Union[int, float]
- Default: no weight. assignment is assumed to be required (hard).
Indicates the attraction is optional (soft), with this weight score.
colocate ¶
def colocate(
selector: IPodSelector,
topology: Topology = None,
weight: typing.Union[int, float] = None
) -> None
Co-locate this pod with a scheduling selection.
A selection can be one of:
- An instance of a
Pod. - An instance of a
Workload(e.gDeployment,StatefulSet). - An un-managed pod that can be selected via
Pods.select().
Co-locating with multiple selections ((i.e invoking this method multiple times)) acts as an AND condition. meaning the pod will be assigned to a node that satisfies all selections (i.e runs at least one pod that satisifies each selection).
Under the hood, this method utilizes the podAffinity property.
selectorRequired ¶
- Type: IPodSelector
topologyOptional ¶
- Type: Topology
- Default: Topology.HOSTNAME
Which topology to coloate on.
weightOptional ¶
- Type: typing.Union[int, float]
- Default: no weight. co-location is assumed to be required (hard).
Indicates the co-location is optional (soft), with this weight score.
separate ¶
def separate(
selector: IPodSelector,
topology: Topology = None,
weight: typing.Union[int, float] = None
) -> None
Seperate this pod from a scheduling selection.
A selection can be one of:
- An instance of a
Pod. - An instance of a
Workload(e.gDeployment,StatefulSet). - An un-managed pod that can be selected via
Pods.select().
Seperating from multiple selections acts as an AND condition. meaning the pod will not be assigned to a node that satisfies all selections (i.e runs at least one pod that satisifies each selection).
Under the hood, this method utilizes the podAntiAffinity property.
selectorRequired ¶
- Type: IPodSelector
topologyOptional ¶
- Type: Topology
- Default: Topology.HOSTNAME
Which topology to separate on.
weightOptional ¶
- Type: typing.Union[int, float]
- Default: no weight. separation is assumed to be required (hard).
Indicates the separation is optional (soft), with this weight score.
tolerate ¶
def tolerate(
node: TaintedNode
) -> None
Allow this pod to tolerate taints matching these tolerations.
You can put multiple taints on the same node and multiple tolerations on the same pod. The way Kubernetes processes multiple taints and tolerations is like a filter: start with all of a node’s taints, then ignore the ones for which the pod has a matching toleration; the remaining un-ignored taints have the indicated effects on the pod. In particular:
- if there is at least one un-ignored taint with effect NoSchedule then Kubernetes will not schedule the pod onto that node
- if there is no un-ignored taint with effect NoSchedule but there is at least one un-ignored taint with effect PreferNoSchedule then Kubernetes will try to not schedule the pod onto the node
- if there is at least one un-ignored taint with effect NoExecute then the pod will be evicted from the node (if it is already running on the node), and will not be scheduled onto the node (if it is not yet running on the node).
Under the hood, this method utilizes the tolerations property.
https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
nodeRequired ¶
- Type: TaintedNode
spread ¶
def spread(
topology: Topology = None,
weight: typing.Union[int, float] = None
) -> None
Spread the pods in this workload by the topology key.
A spread is a separation of the pod from itself and is used to balance out pod replicas across a given topology.
topologyOptional ¶
- Type: Topology
- Default: Topology.HOSTNAME
Which topology to spread on.
weightOptional ¶
- Type: typing.Union[int, float]
- Default: no weight. spread is assumed to be required.
Indicates the spread is optional, with this weight score.
Protocols ¶
IApiEndpoint ¶
- Implemented By: AbstractPod, ApiResource, AwsElasticBlockStorePersistentVolume, AzureDiskPersistentVolume, BasicAuthSecret, ClusterRole, ClusterRoleBinding, ConfigMap, CronJob, DaemonSet, Deployment, DockerConfigSecret, GCEPersistentDiskPersistentVolume, HorizontalPodAutoscaler, Ingress, Job, Namespace, NetworkPolicy, NonApiResource, PersistentVolume, PersistentVolumeClaim, Pod, Resource, Role, RoleBinding, Secret, Service, ServiceAccount, ServiceAccountTokenSecret, SshAuthSecret, StatefulSet, TlsSecret, Workload, IApiEndpoint
An API Endpoint can either be a resource descriptor (e.g /pods) or a non resource url (e.g /healthz). It must be one or the other, and not both.
Methods ¶
| Name | Description |
|---|---|
as_api_resource |
Return the IApiResource this object represents. |
as_non_api_resource |
Return the non resource url this object represents. |
as_api_resource ¶
def as_api_resource() -> IApiResource
Return the IApiResource this object represents.
as_non_api_resource ¶
def as_non_api_resource() -> str
Return the non resource url this object represents.
IApiResource ¶
- Implemented By: AbstractPod, ApiResource, AwsElasticBlockStorePersistentVolume, AzureDiskPersistentVolume, BasicAuthSecret, ClusterRole, ClusterRoleBinding, ConfigMap, CronJob, DaemonSet, Deployment, DockerConfigSecret, GCEPersistentDiskPersistentVolume, HorizontalPodAutoscaler, Ingress, Job, Namespace, NetworkPolicy, PersistentVolume, PersistentVolumeClaim, Pod, Resource, Role, RoleBinding, Secret, Service, ServiceAccount, ServiceAccountTokenSecret, SshAuthSecret, StatefulSet, TlsSecret, Workload, IApiResource, IClusterRole, IConfigMap, IPersistentVolume, IPersistentVolumeClaim, IResource, IRole, ISecret, IServiceAccount
Represents a resource or collection of resources.
Properties ¶
| Name | Type | Description |
|---|---|---|
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
IClusterRole ¶
-
Extends: IResource
-
Implemented By: ClusterRole, IClusterRole
Represents a cluster-level role.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
name |
str |
The Kubernetes name of this resource. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
nameRequired ¶
name: str
- Type: str
The Kubernetes name of this resource.
IConfigMap ¶
-
Extends: IResource
-
Implemented By: ConfigMap, IConfigMap
Represents a config map.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
name |
str |
The Kubernetes name of this resource. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
nameRequired ¶
name: str
- Type: str
The Kubernetes name of this resource.
INamespaceSelector ¶
-
Extends: constructs.IConstruct
-
Implemented By: Namespace, Namespaces, INamespaceSelector
Represents an object that can select namespaces.
Methods ¶
| Name | Description |
|---|---|
to_namespace_selector_config |
Return the configuration of this selector. |
to_namespace_selector_config ¶
def to_namespace_selector_config() -> NamespaceSelectorConfig
Return the configuration of this selector.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
INetworkPolicyPeer ¶
-
Extends: constructs.IConstruct
-
Implemented By: AbstractPod, CronJob, DaemonSet, Deployment, Job, Namespace, Namespaces, NetworkPolicyIpBlock, Pod, StatefulSet, Workload, INetworkPolicyPeer
Describes a peer to allow traffic to/from.
Methods ¶
| Name | Description |
|---|---|
to_network_policy_peer_config |
Return the configuration of this peer. |
to_pod_selector |
Convert the peer into a pod selector, if possible. |
to_network_policy_peer_config ¶
def to_network_policy_peer_config() -> NetworkPolicyPeerConfig
Return the configuration of this peer.
to_pod_selector ¶
def to_pod_selector() -> IPodSelector
Convert the peer into a pod selector, if possible.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
IPersistentVolume ¶
-
Extends: IResource
-
Implemented By: AwsElasticBlockStorePersistentVolume, AzureDiskPersistentVolume, GCEPersistentDiskPersistentVolume, PersistentVolume, IPersistentVolume
Contract of a PersistentVolumeClaim.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
name |
str |
The Kubernetes name of this resource. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
nameRequired ¶
name: str
- Type: str
The Kubernetes name of this resource.
IPersistentVolumeClaim ¶
-
Extends: IResource
-
Implemented By: PersistentVolumeClaim, IPersistentVolumeClaim
Contract of a PersistentVolumeClaim.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
name |
str |
The Kubernetes name of this resource. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
nameRequired ¶
name: str
- Type: str
The Kubernetes name of this resource.
IPodSelector ¶
-
Extends: constructs.IConstruct
-
Implemented By: AbstractPod, CronJob, DaemonSet, Deployment, Job, Pod, Pods, StatefulSet, Workload, IPodSelector
Represents an object that can select pods.
Methods ¶
| Name | Description |
|---|---|
to_pod_selector_config |
Return the configuration of this selector. |
to_pod_selector_config ¶
def to_pod_selector_config() -> PodSelectorConfig
Return the configuration of this selector.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
IResource ¶
-
Extends: constructs.IConstruct, IApiResource
-
Implemented By: AbstractPod, AwsElasticBlockStorePersistentVolume, AzureDiskPersistentVolume, BasicAuthSecret, ClusterRole, ClusterRoleBinding, ConfigMap, CronJob, DaemonSet, Deployment, DockerConfigSecret, GCEPersistentDiskPersistentVolume, HorizontalPodAutoscaler, Ingress, Job, Namespace, NetworkPolicy, PersistentVolume, PersistentVolumeClaim, Pod, Resource, Role, RoleBinding, Secret, Service, ServiceAccount, ServiceAccountTokenSecret, SshAuthSecret, StatefulSet, TlsSecret, Workload, IClusterRole, IConfigMap, IPersistentVolume, IPersistentVolumeClaim, IResource, IRole, ISecret, IServiceAccount
Represents a resource.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
name |
str |
The Kubernetes name of this resource. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
nameRequired ¶
name: str
- Type: str
The Kubernetes name of this resource.
IRole ¶
-
Extends: IResource
-
Implemented By: ClusterRole, Role, IRole
A reference to any Role or ClusterRole.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
name |
str |
The Kubernetes name of this resource. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
nameRequired ¶
name: str
- Type: str
The Kubernetes name of this resource.
IScalable ¶
- Implemented By: Deployment, StatefulSet, IScalable
Represents a scalable workload.
Methods ¶
| Name | Description |
|---|---|
mark_has_autoscaler |
Called on all IScalable targets when they are associated with an autoscaler. |
to_scaling_target |
Return the target spec properties of this Scalable. |
mark_has_autoscaler ¶
def mark_has_autoscaler() -> None
Called on all IScalable targets when they are associated with an autoscaler.
to_scaling_target ¶
def to_scaling_target() -> ScalingTarget
Return the target spec properties of this Scalable.
Properties ¶
| Name | Type | Description |
|---|---|---|
has_autoscaler |
bool |
If this is a target of an autoscaler. |
has_autoscalerRequired ¶
has_autoscaler: bool
- Type: bool
If this is a target of an autoscaler.
ISecret ¶
-
Extends: IResource
-
Implemented By: BasicAuthSecret, DockerConfigSecret, Secret, ServiceAccountTokenSecret, SshAuthSecret, TlsSecret, ISecret
Methods ¶
| Name | Description |
|---|---|
env_value |
Returns EnvValue object from a secret’s key. |
env_value ¶
def env_value(
key: str,
optional: bool = None
) -> EnvValue
Returns EnvValue object from a secret’s key.
keyRequired ¶
- Type: str
Secret’s key.
optionalOptional ¶
- Type: bool
- Default: false
Specify whether the Secret or its key must be defined.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
name |
str |
The Kubernetes name of this resource. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
nameRequired ¶
name: str
- Type: str
The Kubernetes name of this resource.
IServiceAccount ¶
-
Implemented By: ServiceAccount, IServiceAccount
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
api_group |
str |
The group portion of the API version (e.g. authorization.k8s.io). |
resource_type |
str |
The name of a resource type as it appears in the relevant API endpoint. |
resource_name |
str |
The unique, namespace-global, name of an object inside the Kubernetes cluster. |
api_version |
str |
The object’s API version (e.g. “authorization.k8s.io/v1”). |
kind |
str |
The object kind (e.g. “Deployment”). |
name |
str |
The Kubernetes name of this resource. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
api_groupRequired ¶
api_group: str
- Type: str
The group portion of the API version (e.g. authorization.k8s.io).
resource_typeRequired ¶
resource_type: str
- Type: str
The name of a resource type as it appears in the relevant API endpoint.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
Example
# Example automatically generated from non-compiling source. May contain errors.
-"pods"or"pods/log"
resource_nameOptional ¶
resource_name: str
- Type: str
The unique, namespace-global, name of an object inside the Kubernetes cluster.
If this is omitted, the ApiResource should represent all objects of the given type.
api_versionRequired ¶
api_version: str
- Type: str
The object’s API version (e.g. “authorization.k8s.io/v1”).
kindRequired ¶
kind: str
- Type: str
The object kind (e.g. “Deployment”).
nameRequired ¶
name: str
- Type: str
The Kubernetes name of this resource.
IStorage ¶
-
Extends: constructs.IConstruct
-
Implemented By: AwsElasticBlockStorePersistentVolume, AzureDiskPersistentVolume, GCEPersistentDiskPersistentVolume, PersistentVolume, Volume, IStorage
Represents a piece of storage in the cluster.
Methods ¶
| Name | Description |
|---|---|
as_volume |
Convert the piece of storage into a concrete volume. |
as_volume ¶
def as_volume() -> Volume
Convert the piece of storage into a concrete volume.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
ISubject ¶
-
Extends: constructs.IConstruct
-
Implemented By: AbstractPod, CronJob, DaemonSet, Deployment, Group, Job, Pod, ServiceAccount, StatefulSet, User, Workload, IServiceAccount, ISubject
Represents an object that can be used as a role binding subject.
Methods ¶
| Name | Description |
|---|---|
to_subject_configuration |
Return the subject configuration. |
to_subject_configuration ¶
def to_subject_configuration() -> SubjectConfiguration
Return the subject configuration.
Properties ¶
| Name | Type | Description |
|---|---|---|
node |
constructs.Node |
The tree node. |
nodeRequired ¶
node: Node
- Type: constructs.Node
The tree node.
Enums ¶
AzureDiskPersistentVolumeCachingMode ¶
Azure disk caching modes.
Members ¶
| Name | Description |
|---|---|
NONE |
None. |
READ_ONLY |
ReadOnly. |
READ_WRITE |
ReadWrite. |
NONE ¶
None.
READ_ONLY ¶
ReadOnly.
READ_WRITE ¶
ReadWrite.
AzureDiskPersistentVolumeKind ¶
Azure Disk kinds.
Members ¶
| Name | Description |
|---|---|
SHARED |
Multiple blob disks per storage account. |
DEDICATED |
Single blob disk per storage account. |
MANAGED |
Azure managed data disk. |
SHARED ¶
Multiple blob disks per storage account.
DEDICATED ¶
Single blob disk per storage account.
MANAGED ¶
Azure managed data disk.
Capability ¶
Capability - complete list of POSIX capabilities.
Members ¶
| Name | Description |
|---|---|
ALL |
ALL. |
AUDIT_CONTROL |
CAP_AUDIT_CONTROL. |
AUDIT_READ |
CAP_AUDIT_READ. |
AUDIT_WRITE |
CAP_AUDIT_WRITE. |
BLOCK_SUSPEND |
CAP_BLOCK_SUSPEND. |
BPF |
CAP_BPF. |
CHECKPOINT_RESTORE |
CAP_CHECKPOINT_RESTORE. |
CHOWN |
CAP_CHOWN. |
DAC_OVERRIDE |
CAP_DAC_OVERRIDE. |
DAC_READ_SEARCH |
CAP_DAC_READ_SEARCH. |
FOWNER |
CAP_FOWNER. |
FSETID |
CAP_FSETID. |
IPC_LOCK |
CAP_IPC_LOCK. |
IPC_OWNER |
CAP_IPC_OWNER. |
KILL |
CAP_KILL. |
LEASE |
CAP_LEASE. |
LINUX_IMMUTABLE |
CAP_LINUX_IMMUTABLE. |
MAC_ADMIN |
CAP_MAC_ADMIN. |
MAC_OVERRIDE |
CAP_MAC_OVERRIDE. |
MKNOD |
CAP_MKNOD. |
NET_ADMIN |
CAP_NET_ADMIN. |
NET_BIND_SERVICE |
CAP_NET_BIND_SERVICE. |
NET_BROADCAST |
CAP_NET_BROADCAST. |
NET_RAW |
CAP_NET_RAW. |
PERFMON |
CAP_PERFMON. |
SETGID |
CAP_SETGID. |
SETFCAP |
CAP_SETFCAP. |
SETPCAP |
CAP_SETPCAP. |
SETUID |
CAP_SETUID. |
SYS_ADMIN |
CAP_SYS_ADMIN. |
SYS_BOOT |
CAP_SYS_BOOT. |
SYS_CHROOT |
CAP_SYS_CHROOT. |
SYS_MODULE |
CAP_SYS_MODULE. |
SYS_NICE |
CAP_SYS_NICE. |
SYS_PACCT |
CAP_SYS_PACCT. |
SYS_PTRACE |
CAP_SYS_PTRACE. |
SYS_RAWIO |
CAP_SYS_RAWIO. |
SYS_RESOURCE |
CAP_SYS_RESOURCE. |
SYS_TIME |
CAP_SYS_TIME. |
SYS_TTY_CONFIG |
CAP_SYS_TTY_CONFIG. |
SYSLOG |
CAP_SYSLOG. |
WAKE_ALARM |
CAP_WAKE_ALARM. |
ALL ¶
ALL.
AUDIT_CONTROL ¶
CAP_AUDIT_CONTROL.
AUDIT_READ ¶
CAP_AUDIT_READ.
AUDIT_WRITE ¶
CAP_AUDIT_WRITE.
BLOCK_SUSPEND ¶
CAP_BLOCK_SUSPEND.
BPF ¶
CAP_BPF.
CHECKPOINT_RESTORE ¶
CAP_CHECKPOINT_RESTORE.
CHOWN ¶
CAP_CHOWN.
DAC_OVERRIDE ¶
CAP_DAC_OVERRIDE.
DAC_READ_SEARCH ¶
CAP_DAC_READ_SEARCH.
FOWNER ¶
CAP_FOWNER.
FSETID ¶
CAP_FSETID.
IPC_LOCK ¶
CAP_IPC_LOCK.
IPC_OWNER ¶
CAP_IPC_OWNER.
KILL ¶
CAP_KILL.
LEASE ¶
CAP_LEASE.
LINUX_IMMUTABLE ¶
CAP_LINUX_IMMUTABLE.
MAC_ADMIN ¶
CAP_MAC_ADMIN.
MAC_OVERRIDE ¶
CAP_MAC_OVERRIDE.
MKNOD ¶
CAP_MKNOD.
NET_ADMIN ¶
CAP_NET_ADMIN.
NET_BIND_SERVICE ¶
CAP_NET_BIND_SERVICE.
NET_BROADCAST ¶
CAP_NET_BROADCAST.
NET_RAW ¶
CAP_NET_RAW.
PERFMON ¶
CAP_PERFMON.
SETGID ¶
CAP_SETGID.
SETFCAP ¶
CAP_SETFCAP.
SETPCAP ¶
CAP_SETPCAP.
SETUID ¶
CAP_SETUID.
SYS_ADMIN ¶
CAP_SYS_ADMIN.
SYS_BOOT ¶
CAP_SYS_BOOT.
SYS_CHROOT ¶
CAP_SYS_CHROOT.
SYS_MODULE ¶
CAP_SYS_MODULE.
SYS_NICE ¶
CAP_SYS_NICE.
SYS_PACCT ¶
CAP_SYS_PACCT.
SYS_PTRACE ¶
CAP_SYS_PTRACE.
SYS_RAWIO ¶
CAP_SYS_RAWIO.
SYS_RESOURCE ¶
CAP_SYS_RESOURCE.
SYS_TIME ¶
CAP_SYS_TIME.
SYS_TTY_CONFIG ¶
CAP_SYS_TTY_CONFIG.
SYSLOG ¶
CAP_SYSLOG.
WAKE_ALARM ¶
CAP_WAKE_ALARM.
ConcurrencyPolicy ¶
Concurrency policy for CronJobs.
Members ¶
| Name | Description |
|---|---|
ALLOW |
This policy allows to run job concurrently. |
FORBID |
This policy does not allow to run job concurrently. |
REPLACE |
This policy replaces the currently running job if a new job is being scheduled. |
ALLOW ¶
This policy allows to run job concurrently.
FORBID ¶
This policy does not allow to run job concurrently.
It does not let a new job to be scheduled if the previous one is not finished yet.
REPLACE ¶
This policy replaces the currently running job if a new job is being scheduled.
ConnectionScheme ¶
Members ¶
| Name | Description |
|---|---|
HTTP |
Use HTTP request for connecting to host. |
HTTPS |
Use HTTPS request for connecting to host. |
HTTP ¶
Use HTTP request for connecting to host.
HTTPS ¶
Use HTTPS request for connecting to host.
ContainerRestartPolicy ¶
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.
https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
Members ¶
| Name | Description |
|---|---|
ALWAYS |
If an init container is created with its restartPolicy set to Always, it will start and remain running during the entire life of the Pod. |
ALWAYS ¶
If an init container is created with its restartPolicy set to Always, it will start and remain running during the entire life of the Pod.
For regular containers, this is ignored by Kubernetes.
DnsPolicy ¶
Pod DNS policies.
Members ¶
| Name | Description |
|---|---|
CLUSTER_FIRST |
Any DNS query that does not match the configured cluster domain suffix, such as “www.kubernetes.io”, is forwarded to the upstream nameserver inherited from the node. Cluster administrators may have extra stub-domain and upstream DNS servers configured. |
CLUSTER_FIRST_WITH_HOST_NET |
For Pods running with hostNetwork, you should explicitly set its DNS policy “ClusterFirstWithHostNet”. |
DEFAULT |
The Pod inherits the name resolution configuration from the node that the pods run on. |
NONE |
It allows a Pod to ignore DNS settings from the Kubernetes environment. |
CLUSTER_FIRST ¶
Any DNS query that does not match the configured cluster domain suffix, such as “www.kubernetes.io”, is forwarded to the upstream nameserver inherited from the node. Cluster administrators may have extra stub-domain and upstream DNS servers configured.
CLUSTER_FIRST_WITH_HOST_NET ¶
For Pods running with hostNetwork, you should explicitly set its DNS policy “ClusterFirstWithHostNet”.
DEFAULT ¶
The Pod inherits the name resolution configuration from the node that the pods run on.
NONE ¶
It allows a Pod to ignore DNS settings from the Kubernetes environment.
All DNS settings are supposed to be provided using the dnsConfig field in the Pod Spec.
EmptyDirMedium ¶
The medium on which to store the volume.
Members ¶
| Name | Description |
|---|---|
DEFAULT |
The default volume of the backing node. |
MEMORY |
Mount a tmpfs (RAM-backed filesystem) for you instead. |
DEFAULT ¶
The default volume of the backing node.
MEMORY ¶
Mount a tmpfs (RAM-backed filesystem) for you instead.
While tmpfs is very fast, be aware that unlike disks, tmpfs is cleared on node reboot and any files you write will count against your Container’s memory limit.
EnvFieldPaths ¶
Members ¶
| Name | Description |
|---|---|
POD_NAME |
The name of the pod. |
POD_NAMESPACE |
The namespace of the pod. |
POD_UID |
The uid of the pod. |
POD_LABEL |
The labels of the pod. |
POD_ANNOTATION |
The annotations of the pod. |
POD_IP |
The ipAddress of the pod. |
SERVICE_ACCOUNT_NAME |
The service account name of the pod. |
NODE_NAME |
The name of the node. |
NODE_IP |
The ipAddress of the node. |
POD_IPS |
The ipAddresess of the pod. |
POD_NAME ¶
The name of the pod.
POD_NAMESPACE ¶
The namespace of the pod.
POD_UID ¶
The uid of the pod.
POD_LABEL ¶
The labels of the pod.
POD_ANNOTATION ¶
The annotations of the pod.
POD_IP ¶
The ipAddress of the pod.
SERVICE_ACCOUNT_NAME ¶
The service account name of the pod.
NODE_NAME ¶
The name of the node.
NODE_IP ¶
The ipAddress of the node.
POD_IPS ¶
The ipAddresess of the pod.
FsGroupChangePolicy ¶
Members ¶
| Name | Description |
|---|---|
ON_ROOT_MISMATCH |
Only change permissions and ownership if permission and ownership of root directory does not match with expected permissions of the volume. |
ALWAYS |
Always change permission and ownership of the volume when volume is mounted. |
ON_ROOT_MISMATCH ¶
Only change permissions and ownership if permission and ownership of root directory does not match with expected permissions of the volume.
This could help shorten the time it takes to change ownership and permission of a volume
ALWAYS ¶
Always change permission and ownership of the volume when volume is mounted.
HostPathVolumeType ¶
Host path types.
Members ¶
| Name | Description |
|---|---|
DEFAULT |
Empty string (default) is for backward compatibility, which means that no checks will be performed before mounting the hostPath volume. |
DIRECTORY_OR_CREATE |
If nothing exists at the given path, an empty directory will be created there as needed with permission set to 0755, having the same group and ownership with Kubelet. |
DIRECTORY |
A directory must exist at the given path. |
FILE_OR_CREATE |
If nothing exists at the given path, an empty file will be created there as needed with permission set to 0644, having the same group and ownership with Kubelet. |
FILE |
A file must exist at the given path. |
SOCKET |
A UNIX socket must exist at the given path. |
CHAR_DEVICE |
A character device must exist at the given path. |
BLOCK_DEVICE |
A block device must exist at the given path. |
DEFAULT ¶
Empty string (default) is for backward compatibility, which means that no checks will be performed before mounting the hostPath volume.
DIRECTORY_OR_CREATE ¶
If nothing exists at the given path, an empty directory will be created there as needed with permission set to 0755, having the same group and ownership with Kubelet.
DIRECTORY ¶
A directory must exist at the given path.
FILE_OR_CREATE ¶
If nothing exists at the given path, an empty file will be created there as needed with permission set to 0644, having the same group and ownership with Kubelet.
FILE ¶
A file must exist at the given path.
SOCKET ¶
A UNIX socket must exist at the given path.
CHAR_DEVICE ¶
A character device must exist at the given path.
BLOCK_DEVICE ¶
A block device must exist at the given path.
HttpIngressPathType ¶
Specify how the path is matched against request paths.
https://kubernetes.io/docs/concepts/services-networking/ingress/#path-types
Members ¶
| Name | Description |
|---|---|
PREFIX |
Matches the URL path exactly. |
EXACT |
Matches based on a URL path prefix split by ‘/’. |
IMPLEMENTATION_SPECIFIC |
Matching is specified by the underlying IngressClass. |
PREFIX ¶
Matches the URL path exactly.
EXACT ¶
Matches based on a URL path prefix split by ‘/’.
IMPLEMENTATION_SPECIFIC ¶
Matching is specified by the underlying IngressClass.
ImagePullPolicy ¶
Members ¶
| Name | Description |
|---|---|
ALWAYS |
Every time the kubelet launches a container, the kubelet queries the container image registry to resolve the name to an image digest. |
IF_NOT_PRESENT |
The image is pulled only if it is not already present locally. |
NEVER |
The image is assumed to exist locally. |
ALWAYS ¶
Every time the kubelet launches a container, the kubelet queries the container image registry to resolve the name to an image digest.
If the kubelet has a container image with that exact digest cached locally, the kubelet uses its cached image; otherwise, the kubelet downloads (pulls) the image with the resolved digest, and uses that image to launch the container.
Default is Always if ImagePullPolicy is omitted and either the image tag is :latest or the image tag is omitted.
IF_NOT_PRESENT ¶
The image is pulled only if it is not already present locally.
Default is IfNotPresent if ImagePullPolicy is omitted and the image tag is present but not :latest
NEVER ¶
The image is assumed to exist locally.
No attempt is made to pull the image.
IoK8SApimachineryPkgApisMetaV1DeleteOptionsKind ¶
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
Members ¶
| Name | Description |
|---|---|
DELETE_OPTIONS |
DeleteOptions. |
DELETE_OPTIONS ¶
DeleteOptions.
MountPropagation ¶
Members ¶
| Name | Description |
|---|---|
NONE |
This volume mount will not receive any subsequent mounts that are mounted to this volume or any of its subdirectories by the host. |
HOST_TO_CONTAINER |
This volume mount will receive all subsequent mounts that are mounted to this volume or any of its subdirectories. |
BIDIRECTIONAL |
This volume mount behaves the same the HostToContainer mount. |
NONE ¶
This volume mount will not receive any subsequent mounts that are mounted to this volume or any of its subdirectories by the host.
In similar fashion, no mounts created by the Container will be visible on the host.
This is the default mode.
This mode is equal to private mount propagation as described in the Linux
kernel documentation
HOST_TO_CONTAINER ¶
This volume mount will receive all subsequent mounts that are mounted to this volume or any of its subdirectories.
In other words, if the host mounts anything inside the volume mount, the Container will see it mounted there.
Similarly, if any Pod with Bidirectional mount propagation to the same volume mounts anything there, the Container with HostToContainer mount propagation will see it.
This mode is equal to rslave mount propagation as described in the Linux
kernel documentation
BIDIRECTIONAL ¶
This volume mount behaves the same the HostToContainer mount.
In addition, all volume mounts created by the Container will be propagated back to the host and to all Containers of all Pods that use the same volume
A typical use case for this mode is a Pod with a FlexVolume or CSI driver or a Pod that needs to mount something on the host using a hostPath volume.
This mode is equal to rshared mount propagation as described in the Linux
kernel documentation
Caution: Bidirectional mount propagation can be dangerous. It can damage the host operating system and therefore it is allowed only in privileged Containers. Familiarity with Linux kernel behavior is strongly recommended. In addition, any volume mounts created by Containers in Pods must be destroyed (unmounted) by the Containers on termination.
NetworkPolicyTrafficDefault ¶
Default behaviors of network traffic in policies.
Members ¶
| Name | Description |
|---|---|
DENY |
The policy denies all traffic. |
ALLOW |
The policy allows all traffic (either ingress or egress). |
DENY ¶
The policy denies all traffic.
Since rules are additive, additional rules or policies can allow specific traffic.
ALLOW ¶
The policy allows all traffic (either ingress or egress).
Since rules are additive, no additional rule or policies can subsequently deny the traffic.
NetworkProtocol ¶
Network protocols.
Members ¶
| Name | Description |
|---|---|
TCP |
TCP. |
UDP |
UDP. |
SCTP |
SCTP. |
TCP ¶
TCP.
UDP ¶
UDP.
SCTP ¶
SCTP.
PersistentVolumeAccessMode ¶
Access Modes.
Members ¶
| Name | Description |
|---|---|
READ_WRITE_ONCE |
The volume can be mounted as read-write by a single node. |
READ_ONLY_MANY |
The volume can be mounted as read-only by many nodes. |
READ_WRITE_MANY |
The volume can be mounted as read-write by many nodes. |
READ_WRITE_ONCE_POD |
The volume can be mounted as read-write by a single Pod. |
READ_WRITE_ONCE ¶
The volume can be mounted as read-write by a single node.
ReadWriteOnce access mode still can allow multiple pods to access the volume when the pods are running on the same node.
READ_ONLY_MANY ¶
The volume can be mounted as read-only by many nodes.
READ_WRITE_MANY ¶
The volume can be mounted as read-write by many nodes.
READ_WRITE_ONCE_POD ¶
The volume can be mounted as read-write by a single Pod.
Use ReadWriteOncePod access mode if you want to ensure that only one pod across whole cluster can read that PVC or write to it. This is only supported for CSI volumes and Kubernetes version 1.22+.
PersistentVolumeMode ¶
Volume Modes.
Members ¶
| Name | Description |
|---|---|
FILE_SYSTEM |
Volume is ounted into Pods into a directory. |
BLOCK |
Use a volume as a raw block device. |
FILE_SYSTEM ¶
Volume is ounted into Pods into a directory.
If the volume is backed by a block device and the device is empty, Kubernetes creates a filesystem on the device before mounting it for the first time.
BLOCK ¶
Use a volume as a raw block device.
Such volume is presented into a Pod as a block device, without any filesystem on it. This mode is useful to provide a Pod the fastest possible way to access a volume, without any filesystem layer between the Pod and the volume. On the other hand, the application running in the Pod must know how to handle a raw block device
PersistentVolumeReclaimPolicy ¶
Reclaim Policies.
Members ¶
| Name | Description |
|---|---|
RETAIN |
The Retain reclaim policy allows for manual reclamation of the resource. |
DELETE |
For volume plugins that support the Delete reclaim policy, deletion removes both the PersistentVolume object from Kubernetes, as well as the associated storage asset in the external infrastructure, such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume. |
RETAIN ¶
The Retain reclaim policy allows for manual reclamation of the resource.
When the PersistentVolumeClaim is deleted, the PersistentVolume still exists and the volume is considered “released”. But it is not yet available for another claim because the previous claimant’s data remains on the volume. An administrator can manually reclaim the volume with the following steps:
- Delete the PersistentVolume. The associated storage asset in external infrastructure (such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume) still exists after the PV is deleted.
- Manually clean up the data on the associated storage asset accordingly.
- Manually delete the associated storage asset.
If you want to reuse the same storage asset, create a new PersistentVolume with the same storage asset definition.
DELETE ¶
For volume plugins that support the Delete reclaim policy, deletion removes both the PersistentVolume object from Kubernetes, as well as the associated storage asset in the external infrastructure, such as an AWS EBS, GCE PD, Azure Disk, or Cinder volume.
Volumes that were dynamically provisioned inherit the reclaim policy of their StorageClass, which defaults to Delete. The administrator should configure the StorageClass according to users’ expectations; otherwise, the PV must be edited or patched after it is created
PodConnectionsIsolation ¶
Isolation determines which policies are created when allowing connections from a a pod / workload to peers.
Members ¶
| Name | Description |
|---|---|
POD |
Only creates network policies that select the pod. |
PEER |
Only creates network policies that select the peer. |
POD ¶
Only creates network policies that select the pod.
PEER ¶
Only creates network policies that select the peer.
PodManagementPolicy ¶
Controls how pods are created during initial scale up, when replacing pods on nodes, or when scaling down.
The default policy is OrderedReady, where pods are created in increasing order
(pod-0, then pod-1, etc) and the controller will wait until each pod is ready before
continuing. When scaling down, the pods are removed in the opposite order.
The alternative policy is Parallel which will create pods in parallel to match the
desired scale without waiting, and on scale down will delete all pods at once.
Members ¶
| Name | Description |
|---|---|
ORDERED_READY |
No description. |
PARALLEL |
No description. |
ORDERED_READY ¶
PARALLEL ¶
Protocol ¶
Network protocols.
Members ¶
| Name | Description |
|---|---|
TCP |
TCP. |
UDP |
UDP. |
SCTP |
SCTP. |
TCP ¶
TCP.
UDP ¶
UDP.
SCTP ¶
SCTP.
ResourceFieldPaths ¶
Members ¶
| Name | Description |
|---|---|
CPU_LIMIT |
CPU limit of the container. |
MEMORY_LIMIT |
Memory limit of the container. |
CPU_REQUEST |
CPU request of the container. |
MEMORY_REQUEST |
Memory request of the container. |
STORAGE_LIMIT |
Ephemeral storage limit of the container. |
STORAGE_REQUEST |
Ephemeral storage request of the container. |
CPU_LIMIT ¶
CPU limit of the container.
MEMORY_LIMIT ¶
Memory limit of the container.
CPU_REQUEST ¶
CPU request of the container.
MEMORY_REQUEST ¶
Memory request of the container.
STORAGE_LIMIT ¶
Ephemeral storage limit of the container.
STORAGE_REQUEST ¶
Ephemeral storage request of the container.
RestartPolicy ¶
Restart policy for all containers within the pod.
Members ¶
| Name | Description |
|---|---|
ALWAYS |
Always restart the pod after it exits. |
ON_FAILURE |
Only restart if the pod exits with a non-zero exit code. |
NEVER |
Never restart the pod. |
ALWAYS ¶
Always restart the pod after it exits.
ON_FAILURE ¶
Only restart if the pod exits with a non-zero exit code.
NEVER ¶
Never restart the pod.
ScalingStrategy ¶
Members ¶
| Name | Description |
|---|---|
MAX_CHANGE |
Use the policy that provisions the most changes. |
MIN_CHANGE |
Use the policy that provisions the least amount of changes. |
DISABLED |
Disables scaling in this direction. |
MAX_CHANGE ¶
Use the policy that provisions the most changes.
MIN_CHANGE ¶
Use the policy that provisions the least amount of changes.
~~DISABLED~~ ¶
- Deprecated: - Omit the ScalingRule instead
Disables scaling in this direction.
SeccompProfileType ¶
Members ¶
| Name | Description |
|---|---|
LOCALHOST |
A profile defined in a file on the node should be used. |
RUNTIME_DEFAULT |
The container runtime default profile should be used. |
UNCONFINED |
No profile should be applied. |
LOCALHOST ¶
A profile defined in a file on the node should be used.
RUNTIME_DEFAULT ¶
The container runtime default profile should be used.
UNCONFINED ¶
No profile should be applied.
ServiceType ¶
For some parts of your application (for example, frontends) you may want to expose a Service onto an external IP address, that’s outside of your cluster.
Kubernetes ServiceTypes allow you to specify what kind of Service you want. The default is ClusterIP.
Members ¶
| Name | Description |
|---|---|
CLUSTER_IP |
Exposes the Service on a cluster-internal IP. |
NODE_PORT |
Exposes the Service on each Node’s IP at a static port (the NodePort). |
LOAD_BALANCER |
Exposes the Service externally using a cloud provider’s load balancer. |
EXTERNAL_NAME |
Maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record with its value. No proxying of any kind is set up. |
CLUSTER_IP ¶
Exposes the Service on a cluster-internal IP.
Choosing this value makes the Service only reachable from within the cluster. This is the default ServiceType
NODE_PORT ¶
Exposes the Service on each Node’s IP at a static port (the NodePort).
A ClusterIP Service, to which the NodePort Service routes, is automatically created.
You’ll be able to contact the NodePort Service, from outside the cluster,
by requesting
LOAD_BALANCER ¶
Exposes the Service externally using a cloud provider’s load balancer.
NodePort and ClusterIP Services, to which the external load balancer routes, are automatically created.
EXTERNAL_NAME ¶
Maps the Service to the contents of the externalName field (e.g. foo.bar.example.com), by returning a CNAME record with its value. No proxying of any kind is set up.
Note: You need either kube-dns version 1.7 or CoreDNS version 0.0.8 or higher to use the ExternalName type.
TaintEffect ¶
Taint effects.
Members ¶
| Name | Description |
|---|---|
NO_SCHEDULE |
This means that no pod will be able to schedule onto the node unless it has a matching toleration. |
PREFER_NO_SCHEDULE |
This is a “preference” or “soft” version of NO_SCHEDULE – the system will try to avoid placing a pod that does not tolerate the taint on the node, but it is not required. |
NO_EXECUTE |
This affects pods that are already running on the node as follows:. |
NO_SCHEDULE ¶
This means that no pod will be able to schedule onto the node unless it has a matching toleration.
PREFER_NO_SCHEDULE ¶
This is a “preference” or “soft” version of NO_SCHEDULE – the system will try to avoid placing a pod that does not tolerate the taint on the node, but it is not required.
NO_EXECUTE ¶
This affects pods that are already running on the node as follows:.
- Pods that do not tolerate the taint are evicted immediately.
- Pods that tolerate the taint without specifying
durationremain bound forever. - Pods that tolerate the taint with a specified
durationremain bound for the specified amount of time.