Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty topology key for CircularReplication #1352

Open
cangyin opened this issue Feb 23, 2024 · 0 comments
Open

Empty topology key for CircularReplication #1352

cangyin opened this issue Feb 23, 2024 · 0 comments

Comments

@cangyin
Copy link

cangyin commented Feb 23, 2024

Warning  FailedCreate  7m47s (x18 over 18m)  statefulset-controller  create Pod chi-ch-ms1-cluster-0-0-0 in StatefulSet chi-ch-ms1-cluster-0-0 failed error: Pod "chi-ch-ms1-cluster-0-0-0" is invalid: [spec.affinity.podAffinity.requiredDuringSchedulingIgnoredDuringExecution[0].topologyKey: Required value: can not be empty ...

Here the TopologyKey field is not assigned:

case deployment.PodDistributionCircularReplication:
// PodDistribution is known
// PodDistributionCircularReplication is a shortcut to simplify complex set of other distributions
// All shortcuts have to be expanded
if podDistribution.Scope == "" {
podDistribution.Scope = deployment.PodDistributionScopeCluster
}
// TODO need to support multi-cluster
cluster := n.ctx.chi.Spec.Configuration.Clusters[0]
// Expand shortcut
return []api.ChiPodDistribution{
{
Type: deployment.PodDistributionShardAntiAffinity,
Scope: podDistribution.Scope,
},
{
Type: deployment.PodDistributionReplicaAntiAffinity,
Scope: podDistribution.Scope,
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant