An ECD Patch is meant to provide a flexible option to define and provision Kubernetes objects that suit your system architecture, or to tailor the ECD to their preferred flavor.
...
The ECD patch functionality can be used either from Desktop Online or directly in the ECD specification YAML.
Patch Format
The Patch format consists of 2 fields; patch
and patchType
, embedded under different K8S Kubernetes objects. The patch
field is the payload itself, which will be used to patch into the ECD Kubernetes objects. patchType
is the field where users can define the patching strategies used to patch the payload.
...
In Desktop Online you can find the corresponding patch for ECD (deployment and pods), Services, HPA/autoscaling and Ingress (Ingress also being under networking) under their respective ECD sections:
...
Patching Strategies
...
JSON Patch (RFC6902)
Merge Patch (RFC7386)
Strategic Merge Patch (K8S Kubernetes custom implementation of Merge Patch)
...
Code Block |
---|
apiVersion: mz.digitalroute.com/v1alpha1 kind: ECDeployment metadata: ... spec: ... ingress: patchType: "application/json-patch+json" patch: | - op: replace path: /metadata/annotations/kubernetesKubernetes.io~1ingress.class value: istio |
...
Basically, an ECD will resulting in creating different K8S Kubernetes objects, 1 of them is Deployment object. The rollout strategy is default to RollingUpdate, through ECD patch we can change it to other strategy such as Recreate. The change can be seen on the spec.strategy.typeon After ECD Patch.
...
In the example below, assuming a 3 nodes implementation K8S Kubernetes cluster, 2 nodes are tainted color=blue and 1 node is tainted color=red, the test is to add toleration to ECD so that it will get deployed into node tainted with color=red.
...
We may also use this functionality to remove a provisioned K8S Kubernetes object. We can use the directive marker ($patch: delete) to remove a volume and volumeMount.
Before ECD Patch | After ECD Patch | ||||
---|---|---|---|---|---|
|
|