Skip to content

Commit

Permalink
Merge pull request #238 from zzzhangqi/main
Browse files Browse the repository at this point in the history
fix: del pod antiaffininty
  • Loading branch information
zzzhangqi authored Apr 28, 2024
2 parents beac613 + 85c2c4e commit cebc4bb
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion controllers/handler/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (a *api) deployment() client.Object {
Spec: corev1.PodSpec{
ImagePullSecrets: imagePullSecrets(a.component, a.cluster),
TerminationGracePeriodSeconds: commonutil.Int64(0),
Affinity: antiAffinityForRequiredNodes([]string{APIName}),
// Affinity: antiAffinityForRequiredNodes([]string{APIName}),
Containers: []corev1.Container{
{
Name: APIName,
Expand Down
2 changes: 1 addition & 1 deletion controllers/handler/app-ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (a *appui) deploymentForAppUI() client.Object {
Spec: corev1.PodSpec{
ImagePullSecrets: imagePullSecrets(a.component, a.cluster),
TerminationGracePeriodSeconds: commonutil.Int64(0),
Affinity: antiAffinityForRequiredNodes([]string{AppUIName}),
// Affinity: antiAffinityForRequiredNodes([]string{AppUIName}),
Containers: []corev1.Container{
{
Name: AppUIName,
Expand Down
2 changes: 1 addition & 1 deletion controllers/handler/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ func antiAffinityForRequiredNodes(componentLabelName []string) *corev1.Affinity
},
},
},
TopologyKey: "kubernetes.io/hostname,k3s.io/hostname",
TopologyKey: "kubernetes.io/hostname",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion controllers/handler/hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (h *hub) deployment() client.Object {
Spec: corev1.PodSpec{
ImagePullSecrets: imagePullSecrets(h.component, h.cluster),
TerminationGracePeriodSeconds: commonutil.Int64(0),
Affinity: antiAffinityForRequiredNodes([]string{HubName}),
// Affinity: antiAffinityForRequiredNodes([]string{HubName}),
Containers: []corev1.Container{
{
Name: "rbd-hub",
Expand Down
2 changes: 1 addition & 1 deletion controllers/handler/mq.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (m *mq) deployment() client.Object {
Spec: corev1.PodSpec{
TerminationGracePeriodSeconds: commonutil.Int64(0),
ImagePullSecrets: imagePullSecrets(m.component, m.cluster),
Affinity: antiAffinityForRequiredNodes([]string{MQName}),
// Affinity: antiAffinityForRequiredNodes([]string{MQName}),
Containers: []corev1.Container{
{
Name: MQName,
Expand Down
2 changes: 1 addition & 1 deletion controllers/handler/resource_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (r *resourceProxy) resource() []client.Object {
Spec: corev1.PodSpec{
ImagePullSecrets: imagePullSecrets(r.component, r.cluster),
TerminationGracePeriodSeconds: commonutil.Int64(0),
Affinity: antiAffinityForRequiredNodes([]string{ResourceProxyName}),
// Affinity: antiAffinityForRequiredNodes([]string{ResourceProxyName}),
Containers: []corev1.Container{
{
Name: ResourceProxyName,
Expand Down
2 changes: 1 addition & 1 deletion controllers/handler/webcli.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func (w *webcli) deployment() client.Object {
ImagePullSecrets: imagePullSecrets(w.component, w.cluster),
ServiceAccountName: "rainbond-operator",
TerminationGracePeriodSeconds: commonutil.Int64(0),
Affinity: antiAffinityForRequiredNodes([]string{WebCliName}),
// Affinity: antiAffinityForRequiredNodes([]string{WebCliName}),
Containers: []corev1.Container{
{
Name: WebCliName,
Expand Down
2 changes: 1 addition & 1 deletion controllers/handler/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (w *worker) deployment() client.Object {
TerminationGracePeriodSeconds: commonutil.Int64(0),
ServiceAccountName: "rainbond-operator",
ImagePullSecrets: imagePullSecrets(w.component, w.cluster),
Affinity: antiAffinityForRequiredNodes([]string{WorkerName}),
// Affinity: antiAffinityForRequiredNodes([]string{WorkerName}),
Containers: []corev1.Container{
{
Name: WorkerName,
Expand Down

0 comments on commit cebc4bb

Please sign in to comment.