Class KubernetesPatch.Builder

java.lang.Object
software.amazon.awscdk.services.eks.KubernetesPatch.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<KubernetesPatch>
Enclosing class:
KubernetesPatch

@Stability(Stable) public static final class KubernetesPatch.Builder extends Object implements software.amazon.jsii.Builder<KubernetesPatch>
A fluent builder for KubernetesPatch.
  • Method Details

    • create

      @Stability(Stable) public static KubernetesPatch.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of KubernetesPatch.Builder.
    • applyPatch

      @Stability(Stable) public KubernetesPatch.Builder applyPatch(Map<String,? extends Object> applyPatch)
      The JSON object to pass to kubectl patch when the resource is created/updated.

      Parameters:
      applyPatch - The JSON object to pass to kubectl patch when the resource is created/updated. This parameter is required.
      Returns:
      this
    • cluster

      @Stability(Stable) public KubernetesPatch.Builder cluster(ICluster cluster)
      The cluster to apply the patch to.

      [disable-awslint:ref-via-interface]

      Parameters:
      cluster - The cluster to apply the patch to. This parameter is required.
      Returns:
      this
    • resourceName

      @Stability(Stable) public KubernetesPatch.Builder resourceName(String resourceName)
      The full name of the resource to patch (e.g. deployment/coredns).

      Parameters:
      resourceName - The full name of the resource to patch (e.g. deployment/coredns). This parameter is required.
      Returns:
      this
    • restorePatch

      @Stability(Stable) public KubernetesPatch.Builder restorePatch(Map<String,? extends Object> restorePatch)
      The JSON object to pass to kubectl patch when the resource is removed.

      Parameters:
      restorePatch - The JSON object to pass to kubectl patch when the resource is removed. This parameter is required.
      Returns:
      this
    • patchType

      @Stability(Stable) public KubernetesPatch.Builder patchType(PatchType patchType)
      The patch type to pass to kubectl patch.

      The default type used by kubectl patch is "strategic".

      Default: PatchType.STRATEGIC

      Parameters:
      patchType - The patch type to pass to kubectl patch. This parameter is required.
      Returns:
      this
    • removalPolicy

      @Stability(Stable) public KubernetesPatch.Builder removalPolicy(RemovalPolicy removalPolicy)
      The removal policy applied to the custom resource that manages the Kubernetes patch.

      The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations:

      • The resource is removed from the template, so CloudFormation stops managing it
      • A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it
      • The stack is deleted, so CloudFormation stops managing all resources in it

      Default: RemovalPolicy.DESTROY

      Parameters:
      removalPolicy - The removal policy applied to the custom resource that manages the Kubernetes patch. This parameter is required.
      Returns:
      this
    • resourceNamespace

      @Stability(Stable) public KubernetesPatch.Builder resourceNamespace(String resourceNamespace)
      The kubernetes API namespace.

      Default: "default"

      Parameters:
      resourceNamespace - The kubernetes API namespace. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public KubernetesPatch build()
      Specified by:
      build in interface software.amazon.jsii.Builder<KubernetesPatch>
      Returns:
      a newly built instance of KubernetesPatch.