Interface KubernetesPatchProps

All Superinterfaces:
All Known Implementing Classes:

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:37.920Z") @Stability(Stable) public interface KubernetesPatchProps extends
Properties for KubernetesPatch.


 Cluster cluster;
 KubernetesPatch.Builder.create(this, "hello-kub-deployment-label")
         .applyPatch(Map.of("spec", Map.of("replicas", 5)))
         .restorePatch(Map.of("spec", Map.of("replicas", 3)))
  • Method Details

    • getApplyPatch

      @Stability(Stable) @NotNull Map<String,Object> getApplyPatch()
      The JSON object to pass to kubectl patch when the resource is created/updated.
    • getCluster

      @Stability(Stable) @NotNull ICluster getCluster()
      The cluster to apply the patch to.


    • getResourceName

      @Stability(Stable) @NotNull String getResourceName()
      The full name of the resource to patch (e.g. deployment/coredns).
    • getRestorePatch

      @Stability(Stable) @NotNull Map<String,Object> getRestorePatch()
      The JSON object to pass to kubectl patch when the resource is removed.
    • getPatchType

      @Stability(Stable) @Nullable default PatchType getPatchType()
      The patch type to pass to kubectl patch.

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

      Default: PatchType.STRATEGIC

    • getResourceNamespace

      @Stability(Stable) @Nullable default String getResourceNamespace()
      The kubernetes API namespace.

      Default: "default"

    • builder

      @Stability(Stable) static KubernetesPatchProps.Builder builder()
      a KubernetesPatchProps.Builder of KubernetesPatchProps