Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 717e434

Browse files
[Bugfix] Add Arch Toleration (#1961)
1 parent 33c2c03 commit 717e434

File tree

9 files changed

+38
-4
lines changed

9 files changed

+38
-4
lines changed

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- (Feature) Chart By Tag filter
1010
- (Feature) Add Gateway Config condition
1111
- (Bugfix) Fix AnyPB Parsing in Meta Service
12+
- (Feature) Add Arch Tolerations
1213

1314
## [1.3.0](https://github.com/arangodb/kube-arangodb/tree/1.3.0) (2025年08月01日)
1415
- (Feature) (Platform) Storage Debug

‎chart/kube-arangodb-arm64/templates/deployment.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ spec:
264264
operator: "Exists"
265265
effect: "NoExecute"
266266
tolerationSeconds: 5
267+
- key: "kubernetes.io/arch"
268+
operator: "Exists"
269+
effect: "NoSchedule"
267270
{{- if .Values.operator.tolerations }}
268271
{{ toYaml .Values.operator.tolerations | indent 8 }}
269272
{{- end }}

‎chart/kube-arangodb-enterprise-arm64/templates/deployment.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ spec:
264264
operator: "Exists"
265265
effect: "NoExecute"
266266
tolerationSeconds: 5
267+
- key: "kubernetes.io/arch"
268+
operator: "Exists"
269+
effect: "NoSchedule"
267270
{{- if .Values.operator.tolerations }}
268271
{{ toYaml .Values.operator.tolerations | indent 8 }}
269272
{{- end }}

‎chart/kube-arangodb-enterprise/templates/deployment.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ spec:
264264
operator: "Exists"
265265
effect: "NoExecute"
266266
tolerationSeconds: 5
267+
- key: "kubernetes.io/arch"
268+
operator: "Exists"
269+
effect: "NoSchedule"
267270
{{- if .Values.operator.tolerations }}
268271
{{ toYaml .Values.operator.tolerations | indent 8 }}
269272
{{- end }}

‎chart/kube-arangodb/templates/deployment.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ spec:
264264
operator: "Exists"
265265
effect: "NoExecute"
266266
tolerationSeconds: 5
267+
- key: "kubernetes.io/arch"
268+
operator: "Exists"
269+
effect: "NoSchedule"
267270
{{- if .Values.operator.tolerations }}
268271
{{ toYaml .Values.operator.tolerations | indent 8 }}
269272
{{- end }}

‎pkg/deployment/images.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ func (i *ImageUpdatePod) GetTolerations() []core.Toleration {
338338
}
339339
}
340340

341+
ts = tolerations.AddTolerationIfNotFound(ts,
342+
tolerations.NewNoScheduleToleration(tolerations.TolerationArchitecture, tolerations.TolerationDuration{Forever: true}))
341343
ts = tolerations.AddTolerationIfNotFound(ts,
342344
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeNotReady, shortDur))
343345
ts = tolerations.AddTolerationIfNotFound(ts,

‎pkg/deployment/images_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ func getTestTolerations() []core.Toleration {
535535
}
536536

537537
return []core.Toleration{
538+
tolerations.NewNoScheduleToleration(tolerations.TolerationArchitecture, tolerations.TolerationDuration{Forever: true}),
538539
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeNotReady, shortDur),
539540
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeUnreachable, shortDur),
540541
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeAlphaUnreachable, shortDur),

‎pkg/deployment/resources/pod_creator_tolerations.go‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DISCLAIMER
33
//
4-
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
4+
// Copyright 2024-2025 ArangoDB GmbH, Cologne, Germany
55
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
@@ -61,8 +61,10 @@ func CreatePodTolerations(mode api.DeploymentMode, group api.ServerGroup) []core
6161
notReadyDur.TimeSpan = 15 * time.Second
6262
unreachableDur.TimeSpan = 15 * time.Second
6363
}
64-
return []core.Toleration{tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeNotReady, notReadyDur),
64+
return []core.Toleration{
65+
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeNotReady, notReadyDur),
6566
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeUnreachable, unreachableDur),
6667
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeAlphaUnreachable, unreachableDur),
68+
tolerations.NewNoScheduleToleration(tolerations.TolerationArchitecture, tolerations.TolerationDuration{Forever: true}),
6769
}
6870
}

‎pkg/util/k8sutil/tolerations/tolerations.go‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// DISCLAIMER
33
//
4-
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
4+
// Copyright 2016-2025 ArangoDB GmbH, Cologne, Germany
55
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import (
2727
)
2828

2929
const (
30+
TolerationArchitecture = "kubernetes.io/arch"
3031
TolerationKeyNodeNotReady = "node.kubernetes.io/not-ready"
3132
TolerationKeyNodeAlphaUnreachable = "node.alpha.kubernetes.io/unreachable"
3233
TolerationKeyNodeUnreachable = "node.kubernetes.io/unreachable"
@@ -44,7 +45,22 @@ func NewNoExecuteToleration(key string, duration TolerationDuration) core.Tolera
4445
t := core.Toleration{
4546
Key: key,
4647
Operator: "Exists",
47-
Effect: "NoExecute",
48+
Effect: core.TaintEffectNoExecute,
49+
}
50+
if !duration.Forever {
51+
tolerationSeconds := int64(duration.TimeSpan.Seconds())
52+
t.TolerationSeconds = &tolerationSeconds
53+
}
54+
return t
55+
}
56+
57+
// NewNoScheduleToleration is a helper to create a Toleration with
58+
// Key=key, Operator='Exists' Effect='NoSchedule', TolerationSeconds=tolerationDuration.Seconds().
59+
func NewNoScheduleToleration(key string, duration TolerationDuration) core.Toleration {
60+
t := core.Toleration{
61+
Key: key,
62+
Operator: "Exists",
63+
Effect: core.TaintEffectNoSchedule,
4864
}
4965
if !duration.Forever {
5066
tolerationSeconds := int64(duration.TimeSpan.Seconds())

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /