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.
...
In this ECD Services, port 9092 is already defined. Using Strategic Merge Patch, you can add two more ports 9093 and 9094. If you want were to change the type from a Strategic Merge Patch to a Merge Patch in this case, port 9092 would have been removed after the patch.
Code Block |
---|
services: - spec: type: ClusterIP ports: - port: 9092 protocol: TCP targetPort: 9092 ... ... patchType: "application/strategic-merge-patch+json" patch: | spec: ports: - name: "port-1" port: 9093 protocol: TCP targetPort: 9093 - name: "port-2" port: 9094 protocol: UDP targetPort: 9094 ... |
Here is an example changing multiple (sub-)paths in the same deployment/pod patch (also using Strategic Merge Patch):
Code Block |
---|
patchType: "application/strategic-merge-patch+json" patch: | spec: template: spec: hostAliases: - ip: 34.88.208.176 hostnames: - "client" - "client-simulator" - ip: 35.228.46.60 hostnames: - "proxy" - "proxy2" containers: - name: ec1 resources: limits: memory: 1536Mi requests: memory: 1024Mi |
...