Class KubernetesPatchProps
Properties for KubernetesPatch.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EKS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class KubernetesPatchProps : Object, IKubernetesPatchProps
Syntax (vb)
Public Class KubernetesPatchProps
Inherits Object
Implements IKubernetesPatchProps
Remarks
ExampleMetadata: infused
Examples
Cluster cluster;
new KubernetesPatch(this, "hello-kub-deployment-label", new KubernetesPatchProps {
Cluster = cluster,
ResourceName = "deployment/hello-kubernetes",
ApplyPatch = new Dictionary<string, object> { { "spec", new Dictionary<string, int> { { "replicas", 5 } } } },
RestorePatch = new Dictionary<string, object> { { "spec", new Dictionary<string, int> { { "replicas", 3 } } } }
});
Synopsis
Constructors
KubernetesPatchProps() |
Properties
ApplyPatch | The JSON object to pass to |
Cluster | The cluster to apply the patch to. |
PatchType | The patch type to pass to |
ResourceName | The full name of the resource to patch (e.g. |
ResourceNamespace | The kubernetes API namespace. |
RestorePatch | The JSON object to pass to |
Constructors
KubernetesPatchProps()
public KubernetesPatchProps()
Properties
ApplyPatch
The JSON object to pass to kubectl patch
when the resource is created/updated.
public IDictionary<string, object> ApplyPatch { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Cluster
The cluster to apply the patch to.
public ICluster Cluster { get; set; }
Property Value
Remarks
[disable-awslint:ref-via-interface]
PatchType
The patch type to pass to kubectl patch
.
public Nullable<PatchType> PatchType { get; set; }
Property Value
System.Nullable<PatchType>
Remarks
The default type used by kubectl patch
is "strategic".
Default: PatchType.STRATEGIC
ResourceName
The full name of the resource to patch (e.g. deployment/coredns
).
public string ResourceName { get; set; }
Property Value
System.String
ResourceNamespace
The kubernetes API namespace.
public string ResourceNamespace { get; set; }
Property Value
System.String
Remarks
Default: "default"
RestorePatch
The JSON object to pass to kubectl patch
when the resource is removed.
public IDictionary<string, object> RestorePatch { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>