cdk8s-plus-32 (Python) ¶
Constructs ¶
AbstractPod ¶
- Implements: IPodSelector, INetworkPolicyPeer, ISubject
Initializers ¶
import cdk8s_plus_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeApiServiceProps] |
Items is the list of APIService. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeApiServiceProps]
Items is the list of APIService.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeApiServiceProps]
Items is the list of APIService.
metadataOptional ¶
- Type: cdk8s_plus_32.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.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.ObjectReference |
The target object that you want to bind to the standard object. |
metadata |
cdk8s_plus_32.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_32.k8s.ObjectReference
The target object that you want to bind to the standard object.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectReference
The target object that you want to bind to the standard object.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.CertificateSigningRequestSpec |
spec contains the certificate request, and is immutable after creation. |
metadata |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeCertificateSigningRequestProps] |
items is a collection of CertificateSigningRequest objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeCertificateSigningRequestProps]
items is a collection of CertificateSigningRequest objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeCertificateSigningRequestProps]
items is a collection of CertificateSigningRequest objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.AggregationRule |
AggregationRule is an optional field that describes how to build the Rules for this ClusterRole. |
metadata |
cdk8s_plus_32.k8s.ObjectMeta |
Standard object’s metadata. |
rules |
typing.List[cdk8s_plus_32.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_32.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_32.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.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_32.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32.k8s.RoleRef |
RoleRef can only reference a ClusterRole in the global namespace. |
metadata |
cdk8s_plus_32.k8s.ObjectMeta |
Standard object’s metadata. |
subjects |
typing.List[cdk8s_plus_32.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_32.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_32.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.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_32.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32.k8s.KubeClusterRoleBindingProps] |
Items is a list of ClusterRoleBindings. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeClusterRoleBindingProps]
Items is a list of ClusterRoleBindings.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeClusterRoleBindingProps]
Items is a list of ClusterRoleBindings.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeClusterRoleProps] |
Items is a list of ClusterRoles. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeClusterRoleProps]
Items is a list of ClusterRoles.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeClusterRoleProps]
Items is a list of ClusterRoles.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeClusterTrustBundleV1Alpha1Props] |
items is a collection of ClusterTrustBundle objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeClusterTrustBundleV1Alpha1Props]
items is a collection of ClusterTrustBundle objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeClusterTrustBundleV1Alpha1Props]
items is a collection of ClusterTrustBundle objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ClusterTrustBundleSpecV1Alpha1 |
spec contains the signer (if any) and trust anchors. |
metadata |
cdk8s_plus_32.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_32.k8s.ClusterTrustBundleSpecV1Alpha1
spec contains the signer (if any) and trust anchors.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ClusterTrustBundleSpecV1Alpha1
spec contains the signer (if any) and trust anchors.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ComponentCondition] |
List of component conditions observed. |
metadata |
cdk8s_plus_32.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_32.k8s.ComponentCondition]
List of component conditions observed.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ComponentCondition]
List of component conditions observed.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeComponentStatusProps] |
List of ComponentStatus objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeComponentStatusProps]
List of ComponentStatus objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeComponentStatusProps]
List of ComponentStatus objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32 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_32.k8s.KubeConfigMapProps] |
Items is the list of ConfigMaps. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeConfigMapProps]
Items is the list of ConfigMaps.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeConfigMapProps]
Items is the list of ConfigMaps.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32 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_32.k8s.KubeControllerRevisionProps] |
Items is the list of ControllerRevisions. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeControllerRevisionProps]
Items is the list of ControllerRevisions.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeControllerRevisionProps]
Items is the list of ControllerRevisions.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeCronJobProps] |
items is the list of CronJobs. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeCronJobProps]
items is the list of CronJobs.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeCronJobProps]
items is the list of CronJobs.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.CsiDriverSpec |
spec represents the specification of the CSI Driver. |
metadata |
cdk8s_plus_32.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_32.k8s.CsiDriverSpec
spec represents the specification of the CSI Driver.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.CsiDriverSpec
spec represents the specification of the CSI Driver.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeCsiDriverProps] |
items is the list of CSIDriver. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeCsiDriverProps]
items is the list of CSIDriver.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeCsiDriverProps]
items is the list of CSIDriver.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.CsiNodeSpec |
spec is the specification of CSINode. |
metadata |
cdk8s_plus_32.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_32.k8s.CsiNodeSpec
spec is the specification of CSINode.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.CsiNodeSpec
spec is the specification of CSINode.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeCsiNodeProps] |
items is the list of CSINode. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeCsiNodeProps]
items is the list of CSINode.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeCsiNodeProps]
items is the list of CSINode.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.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_32.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_32.k8s.ObjectMeta |
Standard object’s metadata. |
node_topology |
cdk8s_plus_32.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_32.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_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32.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_32.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_32 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_32.k8s.KubeCsiStorageCapacityProps] |
items is the list of CSIStorageCapacity objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeCsiStorageCapacityProps]
items is the list of CSIStorageCapacity objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeCsiStorageCapacityProps]
items is the list of CSIStorageCapacity objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.CustomResourceDefinitionSpec |
spec describes how the user wants the resources to appear. |
metadata |
cdk8s_plus_32.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_32.k8s.CustomResourceDefinitionSpec
spec describes how the user wants the resources to appear.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.CustomResourceDefinitionSpec
spec describes how the user wants the resources to appear.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeCustomResourceDefinitionProps] |
items list individual CustomResourceDefinition objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeCustomResourceDefinitionProps]
items list individual CustomResourceDefinition objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeCustomResourceDefinitionProps]
items list individual CustomResourceDefinition objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeDaemonSetProps] |
A list of daemon sets. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeDaemonSetProps]
A list of daemon sets.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeDaemonSetProps]
A list of daemon sets.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeDeploymentProps] |
Items is the list of Deployments. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeDeploymentProps]
Items is the list of Deployments.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeDeploymentProps]
Items is the list of Deployments.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeDeviceClassV1Alpha3Props] |
Items is the list of resource classes. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeDeviceClassV1Alpha3Props]
Items is the list of resource classes.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeDeviceClassV1Alpha3Props]
Items is the list of resource classes.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeDeviceClassListV1Beta1 ¶
DeviceClassList is a collection of classes.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeDeviceClassListV1Beta1(
scope: Construct,
id: str,
items: typing.List[KubeDeviceClassV1Beta1Props],
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_32.k8s.KubeDeviceClassV1Beta1Props] |
Items is the list of resource classes. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeDeviceClassV1Beta1Props]
Items is the list of resource classes.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.DeviceClassList”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeDeviceClassListV1Beta1.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_32 import k8s
k8s.KubeDeviceClassListV1Beta1.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_32 import k8s
k8s.KubeDeviceClassListV1Beta1.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_32 import k8s
k8s.KubeDeviceClassListV1Beta1.manifest(
items: typing.List[KubeDeviceClassV1Beta1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1beta1.DeviceClassList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_32.k8s.KubeDeviceClassV1Beta1Props]
Items is the list of resource classes.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.DeviceClassList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1beta1.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_32 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_32.k8s.DeviceClassSpecV1Alpha3 |
Spec defines what can be allocated and how to configure it. |
metadata |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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”.
KubeDeviceClassV1Beta1 ¶
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_32 import k8s
k8s.KubeDeviceClassV1Beta1(
scope: Construct,
id: str,
spec: DeviceClassSpecV1Beta1,
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_32.k8s.DeviceClassSpecV1Beta1 |
Spec defines what can be allocated and how to configure it. |
metadata |
cdk8s_plus_32.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_32.k8s.DeviceClassSpecV1Beta1
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_32.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.v1beta1.DeviceClass”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeDeviceClassV1Beta1.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_32 import k8s
k8s.KubeDeviceClassV1Beta1.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_32 import k8s
k8s.KubeDeviceClassV1Beta1.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_32 import k8s
k8s.KubeDeviceClassV1Beta1.manifest(
spec: DeviceClassSpecV1Beta1,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1beta1.DeviceClass”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_32.k8s.DeviceClassSpecV1Beta1
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_32.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.v1beta1.DeviceClass”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1beta1.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
subsets |
typing.List[cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.Endpoint] |
endpoints is a list of unique endpoints in this slice. |
metadata |
cdk8s_plus_32.k8s.ObjectMeta |
Standard object’s metadata. |
ports |
typing.List[cdk8s_plus_32.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_32.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_32.k8s.ObjectMeta
Standard object’s metadata.
portsOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.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_32.k8s.ObjectMeta
Standard object’s metadata.
portsOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32.k8s.KubeEndpointSliceProps] |
items is the list of endpoint slices. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeEndpointSliceProps]
items is the list of endpoint slices.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeEndpointSliceProps]
items is the list of endpoint slices.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeEndpointsProps] |
List of endpoints. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeEndpointsProps]
List of endpoints.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeEndpointsProps]
List of endpoints.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.EventSource |
deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type. |
metadata |
cdk8s_plus_32.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_32.k8s.ObjectReference |
regarding contains the object this Event is about. |
related |
cdk8s_plus_32.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_32.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_32.k8s.EventSource
deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.k8s.EventSource
deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32.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_32.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_32.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_32 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_32.k8s.KubeEventProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeEventProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeEventProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.DeleteOptions |
DeleteOptions may be provided. |
metadata |
cdk8s_plus_32.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_32.k8s.DeleteOptions
DeleteOptions may be provided.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.DeleteOptions
DeleteOptions may be provided.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeFlowSchemaProps] |
items is a list of FlowSchemas. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeFlowSchemaProps]
items is a list of FlowSchemas.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeFlowSchemaProps]
items is a list of FlowSchemas.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeHorizontalPodAutoscaler ¶
configuration of a horizontal pod autoscaler.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.ObjectMeta |
Standard object metadata. |
spec |
cdk8s_plus_32.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_32.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeHorizontalPodAutoscalerProps] |
items is the list of horizontal pod autoscaler objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeHorizontalPodAutoscalerProps]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeHorizontalPodAutoscalerProps]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeHorizontalPodAutoscalerV2Props] |
items is the list of horizontal pod autoscaler objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeHorizontalPodAutoscalerV2Props]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeHorizontalPodAutoscalerV2Props]
items is the list of horizontal pod autoscaler objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
metadata is the standard object metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeIngressClassProps] |
items is the list of IngressClasses. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeIngressClassProps]
items is the list of IngressClasses.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeIngressClassProps]
items is the list of IngressClasses.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeIngressProps] |
items is the list of Ingress. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeIngressProps]
items is the list of Ingress.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeIngressProps]
items is the list of Ingress.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeIpAddressV1Beta1Props] |
items is the list of IPAddresses. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeIpAddressV1Beta1Props]
items is the list of IPAddresses.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeIpAddressV1Beta1Props]
items is the list of IPAddresses.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeJobProps] |
items is the list of Jobs. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeJobProps]
items is the list of Jobs.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeJobProps]
items is the list of Jobs.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
spec |
cdk8s_plus_32.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_32.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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”.
KubeLeaseCandidateListV1Alpha2 ¶
LeaseCandidateList is a list of Lease objects.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeLeaseCandidateListV1Alpha2(
scope: Construct,
id: str,
items: typing.List[KubeLeaseCandidateV1Alpha2Props],
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_32.k8s.KubeLeaseCandidateV1Alpha2Props] |
items is a list of schema objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeLeaseCandidateV1Alpha2Props]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1alpha2.LeaseCandidateList”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeLeaseCandidateListV1Alpha2.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_32 import k8s
k8s.KubeLeaseCandidateListV1Alpha2.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_32 import k8s
k8s.KubeLeaseCandidateListV1Alpha2.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_32 import k8s
k8s.KubeLeaseCandidateListV1Alpha2.manifest(
items: typing.List[KubeLeaseCandidateV1Alpha2Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1alpha2.LeaseCandidateList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_32.k8s.KubeLeaseCandidateV1Alpha2Props]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1alpha2.LeaseCandidateList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.coordination.v1alpha2.LeaseCandidateList”.
KubeLeaseCandidateV1Alpha2 ¶
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_32 import k8s
k8s.KubeLeaseCandidateV1Alpha2(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: LeaseCandidateSpecV1Alpha2 = 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_32.k8s.ObjectMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
spec |
cdk8s_plus_32.k8s.LeaseCandidateSpecV1Alpha2 |
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_32.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.k8s.LeaseCandidateSpecV1Alpha2
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.v1alpha2.LeaseCandidate”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeLeaseCandidateV1Alpha2.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_32 import k8s
k8s.KubeLeaseCandidateV1Alpha2.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_32 import k8s
k8s.KubeLeaseCandidateV1Alpha2.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_32 import k8s
k8s.KubeLeaseCandidateV1Alpha2.manifest(
metadata: ObjectMeta = None,
spec: LeaseCandidateSpecV1Alpha2 = None
)
Renders a Kubernetes manifest for “io.k8s.api.coordination.v1alpha2.LeaseCandidate”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_32.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.k8s.LeaseCandidateSpecV1Alpha2
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.v1alpha2.LeaseCandidate”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.coordination.v1alpha2.LeaseCandidate”.
KubeLeaseList ¶
LeaseList is a list of Lease objects.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.KubeLeaseProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeLeaseProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeLeaseProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeLimitRangeProps] |
Items is a list of LimitRange objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeLimitRangeProps]
Items is a list of LimitRange objects.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeLimitRangeProps]
Items is a list of LimitRange objects.
More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.SubjectAccessReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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”.
KubeMutatingAdmissionPolicyBindingListV1Alpha1 ¶
MutatingAdmissionPolicyBindingList is a list of MutatingAdmissionPolicyBinding.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingListV1Alpha1(
scope: Construct,
id: str,
items: typing.List[KubeMutatingAdmissionPolicyBindingV1Alpha1Props],
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_32.k8s.KubeMutatingAdmissionPolicyBindingV1Alpha1Props] |
List of PolicyBinding. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeMutatingAdmissionPolicyBindingV1Alpha1Props]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_32.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.MutatingAdmissionPolicyBindingList”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingListV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingListV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingListV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingListV1Alpha1.manifest(
items: typing.List[KubeMutatingAdmissionPolicyBindingV1Alpha1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_32.k8s.KubeMutatingAdmissionPolicyBindingV1Alpha1Props]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_32.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.MutatingAdmissionPolicyBindingList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingList”.
KubeMutatingAdmissionPolicyBindingV1Alpha1 ¶
MutatingAdmissionPolicyBinding binds the MutatingAdmissionPolicy with parametrized resources.
MutatingAdmissionPolicyBinding and the optional parameter resource 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. Each evaluation is constrained by a runtime 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_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingV1Alpha1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: MutatingAdmissionPolicyBindingSpecV1Alpha1 = 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_32.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_32.k8s.MutatingAdmissionPolicyBindingSpecV1Alpha1 |
Specification of the desired behavior of the MutatingAdmissionPolicyBinding. |
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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.k8s.MutatingAdmissionPolicyBindingSpecV1Alpha1
Specification of the desired behavior of the MutatingAdmissionPolicyBinding.
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.MutatingAdmissionPolicyBinding”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyBindingV1Alpha1.manifest(
metadata: ObjectMeta = None,
spec: MutatingAdmissionPolicyBindingSpecV1Alpha1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.k8s.MutatingAdmissionPolicyBindingSpecV1Alpha1
Specification of the desired behavior of the MutatingAdmissionPolicyBinding.
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.MutatingAdmissionPolicyBinding”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding”.
KubeMutatingAdmissionPolicyListV1Alpha1 ¶
MutatingAdmissionPolicyList is a list of MutatingAdmissionPolicy.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeMutatingAdmissionPolicyListV1Alpha1(
scope: Construct,
id: str,
items: typing.List[KubeMutatingAdmissionPolicyV1Alpha1Props],
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_32.k8s.KubeMutatingAdmissionPolicyV1Alpha1Props] |
List of ValidatingAdmissionPolicy. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeMutatingAdmissionPolicyV1Alpha1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_32.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.MutatingAdmissionPolicyList”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeMutatingAdmissionPolicyListV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyListV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyListV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyListV1Alpha1.manifest(
items: typing.List[KubeMutatingAdmissionPolicyV1Alpha1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_32.k8s.KubeMutatingAdmissionPolicyV1Alpha1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_32.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.MutatingAdmissionPolicyList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyList”.
KubeMutatingAdmissionPolicyV1Alpha1 ¶
MutatingAdmissionPolicy describes the definition of an admission mutation policy that mutates the object coming into admission chain.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeMutatingAdmissionPolicyV1Alpha1(
scope: Construct,
id: str,
metadata: ObjectMeta = None,
spec: MutatingAdmissionPolicySpecV1Alpha1 = 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_32.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_32.k8s.MutatingAdmissionPolicySpecV1Alpha1 |
Specification of the desired behavior of the MutatingAdmissionPolicy. |
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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.k8s.MutatingAdmissionPolicySpecV1Alpha1
Specification of the desired behavior of the MutatingAdmissionPolicy.
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.MutatingAdmissionPolicy”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeMutatingAdmissionPolicyV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyV1Alpha1.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_32 import k8s
k8s.KubeMutatingAdmissionPolicyV1Alpha1.manifest(
metadata: ObjectMeta = None,
spec: MutatingAdmissionPolicySpecV1Alpha1 = None
)
Renders a Kubernetes manifest for “io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
metadataOptional ¶
- Type: cdk8s_plus_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.k8s.MutatingAdmissionPolicySpecV1Alpha1
Specification of the desired behavior of the MutatingAdmissionPolicy.
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.MutatingAdmissionPolicy”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy”.
KubeMutatingWebhookConfiguration ¶
MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.ObjectMeta |
Standard object metadata; |
webhooks |
typing.List[cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeMutatingWebhookConfigurationProps] |
List of MutatingWebhookConfiguration. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeMutatingWebhookConfigurationProps]
List of MutatingWebhookConfiguration.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeMutatingWebhookConfigurationProps]
List of MutatingWebhookConfiguration.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeNamespaceProps] |
Items is the list of Namespace objects in the list. |
metadata |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeNetworkPolicyProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeNetworkPolicyProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeNetworkPolicyProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeNodeProps] |
List of nodes. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeNodeProps]
List of nodes.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeNodeProps]
List of nodes.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubePersistentVolumeClaimProps] |
items is a list of persistent volume claims. |
metadata |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubePersistentVolumeProps] |
items is a list of persistent volumes. |
metadata |
cdk8s_plus_32.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_32.k8s.KubePersistentVolumeProps]
items is a list of persistent volumes.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubePersistentVolumeProps]
items is a list of persistent volumes.
More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubePodDisruptionBudgetProps] |
Items is a list of PodDisruptionBudgets. |
metadata |
cdk8s_plus_32.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_32.k8s.KubePodDisruptionBudgetProps]
Items is a list of PodDisruptionBudgets.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubePodDisruptionBudgetProps]
Items is a list of PodDisruptionBudgets.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubePodProps] |
List of pods. |
metadata |
cdk8s_plus_32.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_32.k8s.KubePodProps]
List of pods.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubePodProps]
List of pods.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubePodTemplate ¶
PodTemplate describes a template for creating copies of a predefined pod.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
template |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubePodTemplateProps] |
List of pod templates. |
metadata |
cdk8s_plus_32.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_32.k8s.KubePodTemplateProps]
List of pod templates.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubePodTemplateProps]
List of pod templates.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32 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_32.k8s.KubePriorityClassProps] |
items is the list of PriorityClasses. |
metadata |
cdk8s_plus_32.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_32.k8s.KubePriorityClassProps]
items is the list of PriorityClasses.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubePriorityClassProps]
items is the list of PriorityClasses.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
metadata is the standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubePriorityLevelConfigurationProps] |
items is a list of request-priorities. |
metadata |
cdk8s_plus_32.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_32.k8s.KubePriorityLevelConfigurationProps]
items is a list of request-priorities.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubePriorityLevelConfigurationProps]
items is a list of request-priorities.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeReplicaSet ¶
ReplicaSet ensures that a specified number of pod replicas are running at any given time.
Initializers ¶
from cdk8s_plus_32 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_32.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_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeReplicaSetProps] |
List of ReplicaSets. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeReplicaSetProps]
List of ReplicaSets.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeReplicaSetProps]
List of ReplicaSets.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.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_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeReplicationControllerProps] |
List of replication controllers. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeReplicationControllerProps]
List of replication controllers.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeReplicationControllerProps]
List of replication controllers.
More info: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeResourceClaimV1Alpha3Props] |
Items is the list of resource claims. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeResourceClaimV1Alpha3Props]
Items is the list of resource claims.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeResourceClaimV1Alpha3Props]
Items is the list of resource claims.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeResourceClaimListV1Beta1 ¶
ResourceClaimList is a collection of claims.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceClaimListV1Beta1(
scope: Construct,
id: str,
items: typing.List[KubeResourceClaimV1Beta1Props],
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_32.k8s.KubeResourceClaimV1Beta1Props] |
Items is the list of resource claims. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeResourceClaimV1Beta1Props]
Items is the list of resource claims.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceClaimList”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceClaimListV1Beta1.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_32 import k8s
k8s.KubeResourceClaimListV1Beta1.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_32 import k8s
k8s.KubeResourceClaimListV1Beta1.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_32 import k8s
k8s.KubeResourceClaimListV1Beta1.manifest(
items: typing.List[KubeResourceClaimV1Beta1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1beta1.ResourceClaimList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_32.k8s.KubeResourceClaimV1Beta1Props]
Items is the list of resource claims.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceClaimList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1beta1.ResourceClaimList”.
KubeResourceClaimTemplateListV1Alpha3 ¶
ResourceClaimTemplateList is a collection of claim templates.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.KubeResourceClaimTemplateV1Alpha3Props] |
Items is the list of resource claim templates. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeResourceClaimTemplateV1Alpha3Props]
Items is the list of resource claim templates.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeResourceClaimTemplateV1Alpha3Props]
Items is the list of resource claim templates.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeResourceClaimTemplateListV1Beta1 ¶
ResourceClaimTemplateList is a collection of claim templates.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceClaimTemplateListV1Beta1(
scope: Construct,
id: str,
items: typing.List[KubeResourceClaimTemplateV1Beta1Props],
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_32.k8s.KubeResourceClaimTemplateV1Beta1Props] |
Items is the list of resource claim templates. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeResourceClaimTemplateV1Beta1Props]
Items is the list of resource claim templates.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceClaimTemplateList”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceClaimTemplateListV1Beta1.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_32 import k8s
k8s.KubeResourceClaimTemplateListV1Beta1.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_32 import k8s
k8s.KubeResourceClaimTemplateListV1Beta1.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_32 import k8s
k8s.KubeResourceClaimTemplateListV1Beta1.manifest(
items: typing.List[KubeResourceClaimTemplateV1Beta1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1beta1.ResourceClaimTemplateList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_32.k8s.KubeResourceClaimTemplateV1Beta1Props]
Items is the list of resource claim templates.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceClaimTemplateList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1beta1.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_32 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_32.k8s.ResourceClaimTemplateSpecV1Alpha3 |
Describes the ResourceClaim that is to be generated. |
metadata |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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”.
KubeResourceClaimTemplateV1Beta1 ¶
ResourceClaimTemplate is used to produce ResourceClaim objects.
This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceClaimTemplateV1Beta1(
scope: Construct,
id: str,
spec: ResourceClaimTemplateSpecV1Beta1,
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_32.k8s.ResourceClaimTemplateSpecV1Beta1 |
Describes the ResourceClaim that is to be generated. |
metadata |
cdk8s_plus_32.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_32.k8s.ResourceClaimTemplateSpecV1Beta1
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_32.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.v1beta1.ResourceClaimTemplate”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceClaimTemplateV1Beta1.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_32 import k8s
k8s.KubeResourceClaimTemplateV1Beta1.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_32 import k8s
k8s.KubeResourceClaimTemplateV1Beta1.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_32 import k8s
k8s.KubeResourceClaimTemplateV1Beta1.manifest(
spec: ResourceClaimTemplateSpecV1Beta1,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1beta1.ResourceClaimTemplate”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_32.k8s.ResourceClaimTemplateSpecV1Beta1
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_32.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.v1beta1.ResourceClaimTemplate”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1beta1.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_32 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_32.k8s.ResourceClaimSpecV1Alpha3 |
Spec describes what is being requested and how to configure it. |
metadata |
cdk8s_plus_32.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_32.k8s.ResourceClaimSpecV1Alpha3
Spec describes what is being requested and how to configure it.
The spec is immutable.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ResourceClaimSpecV1Alpha3
Spec describes what is being requested and how to configure it.
The spec is immutable.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeResourceClaimV1Beta1 ¶
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_32 import k8s
k8s.KubeResourceClaimV1Beta1(
scope: Construct,
id: str,
spec: ResourceClaimSpecV1Beta1,
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_32.k8s.ResourceClaimSpecV1Beta1 |
Spec describes what is being requested and how to configure it. |
metadata |
cdk8s_plus_32.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_32.k8s.ResourceClaimSpecV1Beta1
Spec describes what is being requested and how to configure it.
The spec is immutable.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceClaim”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceClaimV1Beta1.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_32 import k8s
k8s.KubeResourceClaimV1Beta1.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_32 import k8s
k8s.KubeResourceClaimV1Beta1.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_32 import k8s
k8s.KubeResourceClaimV1Beta1.manifest(
spec: ResourceClaimSpecV1Beta1,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1beta1.ResourceClaim”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_32.k8s.ResourceClaimSpecV1Beta1
Spec describes what is being requested and how to configure it.
The spec is immutable.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceClaim”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1beta1.ResourceClaim”.
KubeResourceQuota ¶
ResourceQuota sets aggregate quota restrictions enforced per namespace.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeResourceQuotaProps] |
Items is a list of ResourceQuota objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeResourceQuotaProps]
Items is a list of ResourceQuota objects.
More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeResourceQuotaProps]
Items is a list of ResourceQuota objects.
More info: https://kubernetes.io/docs/concepts/policy/resource-quotas/
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeResourceSliceListV1Alpha3 ¶
ResourceSliceList is a collection of ResourceSlices.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceSliceListV1Alpha3(
scope: Construct,
id: str,
items: typing.List[KubeResourceSliceV1Alpha3Props],
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_32.k8s.KubeResourceSliceV1Alpha3Props] |
Items is the list of resource ResourceSlices. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeResourceSliceV1Alpha3Props]
Items is the list of resource ResourceSlices.
metadataOptional ¶
- Type: cdk8s_plus_32.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.ResourceSliceList”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceSliceListV1Alpha3.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_32 import k8s
k8s.KubeResourceSliceListV1Alpha3.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_32 import k8s
k8s.KubeResourceSliceListV1Alpha3.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_32 import k8s
k8s.KubeResourceSliceListV1Alpha3.manifest(
items: typing.List[KubeResourceSliceV1Alpha3Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1alpha3.ResourceSliceList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_32.k8s.KubeResourceSliceV1Alpha3Props]
Items is the list of resource ResourceSlices.
metadataOptional ¶
- Type: cdk8s_plus_32.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.ResourceSliceList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1alpha3.ResourceSliceList”.
KubeResourceSliceListV1Beta1 ¶
ResourceSliceList is a collection of ResourceSlices.
Initializers ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceSliceListV1Beta1(
scope: Construct,
id: str,
items: typing.List[KubeResourceSliceV1Beta1Props],
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_32.k8s.KubeResourceSliceV1Beta1Props] |
Items is the list of resource ResourceSlices. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeResourceSliceV1Beta1Props]
Items is the list of resource ResourceSlices.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceSliceList”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceSliceListV1Beta1.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_32 import k8s
k8s.KubeResourceSliceListV1Beta1.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_32 import k8s
k8s.KubeResourceSliceListV1Beta1.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_32 import k8s
k8s.KubeResourceSliceListV1Beta1.manifest(
items: typing.List[KubeResourceSliceV1Beta1Props],
metadata: ListMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1beta1.ResourceSliceList”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
itemsRequired ¶
- Type: typing.List[cdk8s_plus_32.k8s.KubeResourceSliceV1Beta1Props]
Items is the list of resource ResourceSlices.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceSliceList”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1beta1.ResourceSliceList”.
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_32 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_32.k8s.ResourceSliceSpecV1Alpha3 |
Contains the information published by the driver. |
metadata |
cdk8s_plus_32.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_32.k8s.ResourceSliceSpecV1Alpha3
Contains the information published by the driver.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ResourceSliceSpecV1Alpha3
Contains the information published by the driver.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeResourceSliceV1Beta1 ¶
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_32 import k8s
k8s.KubeResourceSliceV1Beta1(
scope: Construct,
id: str,
spec: ResourceSliceSpecV1Beta1,
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_32.k8s.ResourceSliceSpecV1Beta1 |
Contains the information published by the driver. |
metadata |
cdk8s_plus_32.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_32.k8s.ResourceSliceSpecV1Beta1
Contains the information published by the driver.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceSlice”. |
is_construct ¶
from cdk8s_plus_32 import k8s
k8s.KubeResourceSliceV1Beta1.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_32 import k8s
k8s.KubeResourceSliceV1Beta1.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_32 import k8s
k8s.KubeResourceSliceV1Beta1.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_32 import k8s
k8s.KubeResourceSliceV1Beta1.manifest(
spec: ResourceSliceSpecV1Beta1,
metadata: ObjectMeta = None
)
Renders a Kubernetes manifest for “io.k8s.api.resource.v1beta1.ResourceSlice”.
This can be used to inline resource manifests inside other objects (e.g. as templates).
specRequired ¶
- Type: cdk8s_plus_32.k8s.ResourceSliceSpecV1Beta1
Contains the information published by the driver.
Changing the spec automatically increments the metadata.generation number.
metadataOptional ¶
- Type: cdk8s_plus_32.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.v1beta1.ResourceSlice”. |
GVKRequired ¶
GVK: GroupVersionKind
- Type: cdk8s.GroupVersionKind
Returns the apiVersion and kind for “io.k8s.api.resource.v1beta1.ResourceSlice”.
KubeRole ¶
Role is a namespaced, logical grouping of PolicyRules that can be referenced as a unit by a RoleBinding.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
rules |
typing.List[cdk8s_plus_32.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_32.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
Standard object’s metadata.
rulesOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32.k8s.RoleRef |
RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. |
metadata |
cdk8s_plus_32.k8s.ObjectMeta |
Standard object’s metadata. |
subjects |
typing.List[cdk8s_plus_32.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_32.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_32.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.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_32.k8s.ObjectMeta
Standard object’s metadata.
subjectsOptional ¶
- Type: typing.List[cdk8s_plus_32.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_32 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_32.k8s.KubeRoleBindingProps] |
Items is a list of RoleBindings. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeRoleBindingProps]
Items is a list of RoleBindings.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeRoleBindingProps]
Items is a list of RoleBindings.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeRoleProps] |
Items is a list of Roles. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeRoleProps]
Items is a list of Roles.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeRoleProps]
Items is a list of Roles.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. |
overhead |
cdk8s_plus_32.k8s.Overhead |
overhead represents the resource overhead associated with running a pod for a given RuntimeClass. |
scheduling |
cdk8s_plus_32.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_32.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
overheadOptional ¶
- Type: cdk8s_plus_32.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_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
overheadOptional ¶
- Type: cdk8s_plus_32.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_32.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_32 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_32.k8s.KubeRuntimeClassProps] |
items is a list of schema objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeRuntimeClassProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeRuntimeClassProps]
items is a list of schema objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_32.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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32 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_32.k8s.KubeSecretProps] |
Items is a list of secret objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeSecretProps]
Items is a list of secret objects.
More info: https://kubernetes.io/docs/concepts/configuration/secret
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeSecretProps]
Items is a list of secret objects.
More info: https://kubernetes.io/docs/concepts/configuration/secret
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.SelfSubjectAccessReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_32.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_32.k8s.SelfSubjectAccessReviewSpec
Spec holds information about the request being evaluated.
user and groups must be empty
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.SelfSubjectAccessReviewSpec
Spec holds information about the request being evaluated.
user and groups must be empty
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.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_32.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_32 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_32 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_32 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_32 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_32.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”.
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_32 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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32 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_32.k8s.SelfSubjectRulesReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_32.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_32.k8s.SelfSubjectRulesReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.SelfSubjectRulesReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.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_32.k8s.ObjectMeta |
Standard object’s metadata. |
secrets |
typing.List[cdk8s_plus_32.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_32.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_32.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_32.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”. The “kubernetes.io/enforce-mountable-secrets” annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. 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_32 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_32 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_32 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_32 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_32.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_32.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_32.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”. The “kubernetes.io/enforce-mountable-secrets” annotation is deprecated since v1.32. Prefer separate namespaces to isolate access to mounted secrets. 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_32 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_32.k8s.KubeServiceAccountProps] |
List of ServiceAccounts. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeServiceAccountProps]
List of ServiceAccounts.
More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeServiceAccountProps]
List of ServiceAccounts.
More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeServiceCidrv1Beta1Props] |
items is the list of ServiceCIDRs. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeServiceCidrv1Beta1Props]
items is the list of ServiceCIDRs.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeServiceCidrv1Beta1Props]
items is the list of ServiceCIDRs.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeServiceProps] |
List of services. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeServiceProps]
List of services.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeServiceProps]
List of services.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object’s metadata. |
spec |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeStatefulSetProps] |
Items is the list of stateful sets. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeStatefulSetProps]
Items is the list of stateful sets.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeStatefulSetProps]
Items is the list of stateful sets.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.StatusDetails |
Extended data associated with the reason. |
message |
str |
A human-readable description of the status of this operation. |
metadata |
cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.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_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeStorageClassProps] |
items is the list of StorageClasses. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeStorageClassProps]
items is the list of StorageClasses.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeStorageClassProps]
items is the list of StorageClasses.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeStorageVersionV1Alpha1Props] |
Items holds a list of StorageVersion. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeStorageVersionV1Alpha1Props]
Items holds a list of StorageVersion.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeStorageVersionV1Alpha1Props]
Items holds a list of StorageVersion.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeStorageVersionMigrationV1Alpha1Props] |
Items is the list of StorageVersionMigration. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeStorageVersionMigrationV1Alpha1Props]
Items is the list of StorageVersionMigration.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeStorageVersionMigrationV1Alpha1Props]
Items is the list of StorageVersionMigration.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object metadata. |
spec |
cdk8s_plus_32.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_32.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
Standard object metadata.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32 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_32.k8s.SubjectAccessReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_32.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_32.k8s.SubjectAccessReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.SubjectAccessReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.TokenRequestSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_32.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_32.k8s.TokenRequestSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.TokenRequestSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.TokenReviewSpec |
Spec holds information about the request being evaluated. |
metadata |
cdk8s_plus_32.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_32.k8s.TokenReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.TokenReviewSpec
Spec holds information about the request being evaluated.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_32.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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_32.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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeValidatingAdmissionPolicyBindingProps] |
List of PolicyBinding. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeValidatingAdmissionPolicyBindingProps]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeValidatingAdmissionPolicyBindingProps]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeValidatingAdmissionPolicyBindingListV1Beta1 ¶
ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.KubeValidatingAdmissionPolicyBindingV1Beta1Props] |
List of PolicyBinding. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeValidatingAdmissionPolicyBindingV1Beta1Props]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeValidatingAdmissionPolicyBindingV1Beta1Props]
List of PolicyBinding.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
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_32 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_32.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_32.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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeValidatingAdmissionPolicyProps] |
List of ValidatingAdmissionPolicy. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeValidatingAdmissionPolicyProps]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeValidatingAdmissionPolicyProps]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeValidatingAdmissionPolicyListV1Beta1 ¶
ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.KubeValidatingAdmissionPolicyV1Beta1Props] |
List of ValidatingAdmissionPolicy. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeValidatingAdmissionPolicyV1Beta1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeValidatingAdmissionPolicyV1Beta1Props]
List of ValidatingAdmissionPolicy.
metadataOptional ¶
- Type: cdk8s_plus_32.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”.
KubeValidatingAdmissionPolicyV1Beta1 ¶
ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it.
Initializers ¶
from cdk8s_plus_32 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_32.k8s.ObjectMeta |
Standard object metadata; |
spec |
cdk8s_plus_32.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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.ObjectMeta
Standard object metadata;
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata.
specOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.ObjectMeta |
Standard object metadata; |
webhooks |
typing.List[cdk8s_plus_32.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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32.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_32 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_32.k8s.KubeValidatingWebhookConfigurationProps] |
List of ValidatingWebhookConfiguration. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeValidatingWebhookConfigurationProps]
List of ValidatingWebhookConfiguration.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeValidatingWebhookConfigurationProps]
List of ValidatingWebhookConfiguration.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.VolumeAttachmentSpec |
spec represents specification of the desired attach/detach volume behavior. |
metadata |
cdk8s_plus_32.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_32.k8s.VolumeAttachmentSpec
spec represents specification of the desired attach/detach volume behavior.
Populated by the Kubernetes system.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.VolumeAttachmentSpec
spec represents specification of the desired attach/detach volume behavior.
Populated by the Kubernetes system.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeVolumeAttachmentProps] |
items is the list of VolumeAttachments. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeVolumeAttachmentProps]
items is the list of VolumeAttachments.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeVolumeAttachmentProps]
items is the list of VolumeAttachments.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeVolumeAttributesClassV1Alpha1Props] |
items is the list of VolumeAttributesClass objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeVolumeAttributesClassV1Alpha1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeVolumeAttributesClassV1Alpha1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.k8s.KubeVolumeAttributesClassV1Beta1Props] |
items is the list of VolumeAttributesClass objects. |
metadata |
cdk8s_plus_32.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_32.k8s.KubeVolumeAttributesClassV1Beta1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32 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_32 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_32 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_32.k8s.KubeVolumeAttributesClassV1Beta1Props]
items is the list of VolumeAttributesClass objects.
metadataOptional ¶
- Type: cdk8s_plus_32.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_32 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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32 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_32.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_32.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_32 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_32 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_32 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_32 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_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.Namespaces.all(
scope: Construct,
id: str
)
Select all namespaces.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
select ¶
import cdk8s_plus_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.NetworkPolicyIpBlock.any_ipv4(
scope: Construct,
id: str
)
Any IPv4 address.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
any_ipv6 ¶
import cdk8s_plus_32
cdk8s_plus_32.NetworkPolicyIpBlock.any_ipv6(
scope: Construct,
id: str
)
Any IPv6 address.
scopeRequired ¶
- Type: constructs.Construct
idRequired ¶
- Type: str
ipv4 ¶
import cdk8s_plus_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.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_32
cdk8s_plus_32.Serv