Skip to content

Commit

Permalink
nodezone schedule plugin (#265)
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaByte875 authored Sep 12, 2023
1 parent 15ee7c2 commit 0cd35fa
Show file tree
Hide file tree
Showing 22 changed files with 1,397 additions and 697 deletions.
6 changes: 3 additions & 3 deletions apis/apps/v1alpha1/nebulacluster_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ const (
agentPortNameGRPC = "grpc"
defaultAgentImage = "vesoft/nebula-agent"
defaultAlpineImage = "vesoft/nebula-alpine:latest"

ZoneSuffix = "zone"
)

func getComponentName(clusterName string, typ ComponentType) string {
Expand Down Expand Up @@ -606,9 +608,7 @@ func generateStatefulSet(c NebulaClusterComponent, cm *corev1.ConfigMap) (*appsv
ServiceAccountName: NebulaServiceAccountName,
}

if nc.Spec.SchedulerName == corev1.DefaultSchedulerName {
podSpec.TopologySpreadConstraints = getTopologySpreadConstraints(nc.Spec.TopologySpreadConstraints, componentLabel)
}
podSpec.TopologySpreadConstraints = getTopologySpreadConstraints(nc.Spec.TopologySpreadConstraints, componentLabel)

volumeClaim, err := c.GenerateVolumeClaim()
if err != nil {
Expand Down
Loading

0 comments on commit 0cd35fa

Please sign in to comment.