Adding a Sub-Domain
Adding a second sub-domain (with two MATRIXX Engines) to the initial deployment results in the following distribution of components across namespaces:
- The masters and agents in cluster 1 namespace
matrixx-operators
. - Agents in cluster 2 namespace
matrixx-operators
. - Engine s1e1 in cluster 1 namespace
matrixx-engine-s1
. - Engine s1e2 in cluster 2 namespace
matrixx-engine-s1
. - Engine s2e1 in cluster 1 namespace
matrixx-engine-s2
. - Engine s2e2 in cluster 2 namespace
matrixx-engine-s2
. - Traffic Routing Agent in cluster 1 namespace
matrixx-tra
.
Create and install in the namespaces with the following commands:
kubectl --context context1 create ns matrixx-engine-s2
kubectl --context context2 create ns matrixx-engine-s2
helm --kube-context context1 upgrade mtx-engine-s1 matrixx/matrixx -n matrixx-engine-s1 -f base.yaml -f topology-additional-subdomain.yaml -f cluster1.yaml --version matrixx_version
helm --kube-context context2 upgrade mtx-engine-s1 matrixx/matrixx -n matrixx-engine-s1 -f base.yaml -f topology-additional-subdomain.yaml -f cluster2.yaml --version matrixx_version
helm --kube-context context1 install mtx-engine-s2 matrixx/matrixx -n matrixx-engine-s2 -f base.yaml -f topology-additional-subdomain.yaml -f cluster1.yaml --version matrixx_version
helm --kube-context context2 install mtx-engine-s2 matrixx/matrixx -n matrixx-engine-s2 -f base.yaml -f topology-additional-subdomain.yaml -f cluster2.yaml --version matrixx_version
helm --kube-context context2 upgrade mtx-operators matrixx/matrixx -n matrixx-operators -f base.yaml -f topology-additional-subdomain.yaml -f cluster2.yaml --version matrixx_version
helm --kube-context context1 upgrade mtx-operators matrixx/matrixx -n matrixx-operators -f base.yaml -f topology-additional-subdomain.yaml -f cluster1.yaml --version matrixx_version
The following topology-additional-subdomain.yaml file adds the second sub-domain:
global:
configurationSources:
pricing-config-s1:
docker:
image: example-pricing-sideloader-s1:matrixx_version
pricing-config-s2:
docker:
image: example-pricing-sideloader-s2:matrixx_version
topology:
operators:
master:
context: context1
namespace: matrixx-operators
agents:
- context: context1
namespace: matrixx-operators
externalAddress: topology-agent-1 external address
- context: context2
namespace: matrixx-operators
externalAddress: topology-agent-2 external address
domains:
- subdomains:
- pricing:
configurationSource:
refName: pricing-config-s1
fileName: mtx_pricing_matrixxOne.xml
engines:
- context: context1
namespace: matrixx-engine-s1
processing:
externalAddress: proc-cls-s1e1 external address
publishing:
externalAddress: publ-cls-s1e1 external address
- context: context2
namespace: matrixx-engine-s1
processing:
externalAddress: proc-cls-s1e2 external address
publishing:
externalAddress: publ-cls-s1e2 external address
- pricing:
configurationSource:
refName: pricing-config-s2
fileName: mtx_pricing_matrixxOne.xml
engines:
- context: context1
namespace: matrixx-engine-s2
processing:
externalAddress: proc-cls-s2e1 external address
publishing:
externalAddress: publ-cls-s2e1 external address
- context: context2
namespace: matrixx-engine-s2
processing:
externalAddress: proc-cls-s2e2 external address
publishing:
externalAddress: publ-cls-s2e2 external address
Finally, upgrade the Traffic Routing Agent (TRA) namespace:
helm --kube-context context1 upgrade mtx-tra matrixx/matrixx -n matrixx-tra -f base.yaml -f topology-additional-subdomain.yaml -f cluster1.yaml -f tra.yaml --version matrixx_version