Now UnitedDeployment controller provides a new way to manage pods in multi-pool by using multiple workloads.
Each workload managed by UnitedDeployment is called a pool. Each pool should at least provide the capacity to run the replicas number of pods.
The below sample yaml presents a UnitedDeployment which manages three Deployment instances in one pool(cloud).
We can see the workloadTemplate.DeploymentTemplate configuration to describe a Deployment template, and pool named cloud which has nodeSelectorTerm and replicas field. So use workloadTemplate and topology.pools configuration, UnitedDeployment's Pods are evenly distributed across all pools.
When an UnitedDeployment CR is created, a workload created progress will be triggered. Each workload will inherits this spec.workloadTemplate configuration. Each workload will be patch to spec.workloadTemplate configuration use it's Replicas field.
Therefore, until now, each workload has been able to modify the template differently based on its Replicas configuration.
However, in a real edge scenario, the user may not only want to modify the Replicas configuration, but other configurations will also be modified. Here are a few scenario examples:
1 User wants to upgrade the image version in a certain Pool and verify it. After successful verification, upgrade the image's version in all pools in full amount.
2 Users use a Pool to represent a node Pool, each node Pool will be built under a different image repository, so the image name may be different
Host configuration, scale and access pressure are different in different node pools, so pod's containers.resources.request and containers.resources.limit may also be different.
so unitedDeployment controller need support patch feature for pool.
Now UnitedDeployment controller provides a new way to manage pods in multi-pool by using multiple workloads. Each workload managed by UnitedDeployment is called a pool. Each pool should at least provide the capacity to run the replicas number of pods.
The below sample yaml presents a UnitedDeployment which manages three Deployment instances in one pool(cloud).
We can see the
workloadTemplate.DeploymentTemplate
configuration to describe a Deployment template, and pool namedcloud
which hasnodeSelectorTerm
andreplicas
field. So useworkloadTemplate
andtopology.pools
configuration, UnitedDeployment's Pods are evenly distributed across all pools.When an UnitedDeployment CR is created, a workload created progress will be triggered. Each workload will inherits this
spec.workloadTemplate
configuration. Each workload will be patch tospec.workloadTemplate
configuration use it'sReplicas
field.Therefore, until now, each workload has been able to modify the template differently based on its
Replicas
configuration. However, in a real edge scenario, the user may not only want to modify theReplicas
configuration, but other configurations will also be modified. Here are a few scenario examples:1 User wants to upgrade the image version in a certain Pool and verify it. After successful verification, upgrade the image's version in all pools in full amount.
2 Users use a Pool to represent a node Pool, each node Pool will be built under a different image repository, so the image name may be different
containers.resources.request
andcontainers.resources.limit
may also be different.so unitedDeployment controller need support patch feature for pool.