KubernetesPatch

class aws_cdk.aws_eks.KubernetesPatch(scope, id, *, apply_patch, cluster, resource_name, restore_patch, patch_type=None, resource_namespace=None)

Bases: aws_cdk.core.Construct

A CloudFormation resource which applies/restores a JSON patch into a Kubernetes resource.

see :see: https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/ stability :stability: experimental

__init__(scope, id, *, apply_patch, cluster, resource_name, restore_patch, patch_type=None, resource_namespace=None)
Parameters
  • scope (Construct) –

  • id (str) –

  • apply_patch (Mapping[str, Any]) – The JSON object to pass to kubectl patch when the resource is created/updated.

  • cluster (Cluster) – The cluster to apply the patch to. [disable-awslint:ref-via-interface]

  • resource_name (str) – The full name of the resource to patch (e.g. deployment/coredns).

  • restore_patch (Mapping[str, Any]) – The JSON object to pass to kubectl patch when the resource is removed.

  • patch_type (Optional[PatchType]) – The patch type to pass to kubectl patch. The default type used by kubectl patch is “strategic”. Default: PatchType.STRATEGIC

  • resource_namespace (Optional[str]) – The kubernetes API namespace. Default: “default”

stability :stability: experimental

Return type

None

Methods

to_string()

Returns a string representation of this construct.

Return type

str

Attributes

node

The construct tree node associated with this construct.

Return type

ConstructNode

Static Methods

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool