Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- (Feature) Chart By Tag filter
- (Feature) Add Gateway Config condition
- (Bugfix) Fix AnyPB Parsing in Meta Service
- (Feature) Add Arch Tolerations
Copy link

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The changelog entry uses 'Arch' as an abbreviation. Consider using the full word 'Architecture' for clarity: '- (Feature) Add Architecture Tolerations'

Suggested change
- (Feature) Add Arch Tolerations
- (Feature) Add Architecture Tolerations

Copilot uses AI. Check for mistakes.


## [1.3.0](https://github.com/arangodb/kube-arangodb/tree/1.3.0) (2025-08-01)
- (Feature) (Platform) Storage Debug
Expand Down
3 changes: 3 additions & 0 deletions chart/kube-arangodb-arm64/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ spec:
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 5
- key: "kubernetes.io/arch"
operator: "Exists"
effect: "NoSchedule"
{{- if .Values.operator.tolerations }}
{{ toYaml .Values.operator.tolerations | indent 8 }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ spec:
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 5
- key: "kubernetes.io/arch"
operator: "Exists"
effect: "NoSchedule"
{{- if .Values.operator.tolerations }}
{{ toYaml .Values.operator.tolerations | indent 8 }}
{{- end }}
3 changes: 3 additions & 0 deletions chart/kube-arangodb-enterprise/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ spec:
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 5
- key: "kubernetes.io/arch"
operator: "Exists"
effect: "NoSchedule"
{{- if .Values.operator.tolerations }}
{{ toYaml .Values.operator.tolerations | indent 8 }}
{{- end }}
3 changes: 3 additions & 0 deletions chart/kube-arangodb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ spec:
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 5
- key: "kubernetes.io/arch"
operator: "Exists"
effect: "NoSchedule"
{{- if .Values.operator.tolerations }}
{{ toYaml .Values.operator.tolerations | indent 8 }}
{{- end }}
2 changes: 2 additions & 0 deletions pkg/deployment/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ func (i *ImageUpdatePod) GetTolerations() []core.Toleration {
}
}

ts = tolerations.AddTolerationIfNotFound(ts,
tolerations.NewNoScheduleToleration(tolerations.TolerationArchitecture, tolerations.TolerationDuration{Forever: true}))
ts = tolerations.AddTolerationIfNotFound(ts,
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeNotReady, shortDur))
ts = tolerations.AddTolerationIfNotFound(ts,
Expand Down
1 change: 1 addition & 0 deletions pkg/deployment/images_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,7 @@ func getTestTolerations() []core.Toleration {
}

return []core.Toleration{
tolerations.NewNoScheduleToleration(tolerations.TolerationArchitecture, tolerations.TolerationDuration{Forever: true}),
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeNotReady, shortDur),
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeUnreachable, shortDur),
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeAlphaUnreachable, shortDur),
Expand Down
6 changes: 4 additions & 2 deletions pkg/deployment/resources/pod_creator_tolerations.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2024 ArangoDB GmbH, Cologne, Germany
// Copyright 2024-2025 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -61,8 +61,10 @@ func CreatePodTolerations(mode api.DeploymentMode, group api.ServerGroup) []core
notReadyDur.TimeSpan = 15 * time.Second
unreachableDur.TimeSpan = 15 * time.Second
}
return []core.Toleration{tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeNotReady, notReadyDur),
return []core.Toleration{
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeNotReady, notReadyDur),
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeUnreachable, unreachableDur),
tolerations.NewNoExecuteToleration(tolerations.TolerationKeyNodeAlphaUnreachable, unreachableDur),
tolerations.NewNoScheduleToleration(tolerations.TolerationArchitecture, tolerations.TolerationDuration{Forever: true}),
}
}
20 changes: 18 additions & 2 deletions pkg/util/k8sutil/tolerations/tolerations.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// DISCLAIMER
//
// Copyright 2016-2024 ArangoDB GmbH, Cologne, Germany
// Copyright 2016-2025 ArangoDB GmbH, Cologne, Germany
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -27,6 +27,7 @@ import (
)

const (
TolerationArchitecture = "kubernetes.io/arch"
TolerationKeyNodeNotReady = "node.kubernetes.io/not-ready"
TolerationKeyNodeAlphaUnreachable = "node.alpha.kubernetes.io/unreachable"
TolerationKeyNodeUnreachable = "node.kubernetes.io/unreachable"
Expand All @@ -44,7 +45,22 @@ func NewNoExecuteToleration(key string, duration TolerationDuration) core.Tolera
t := core.Toleration{
Key: key,
Operator: "Exists",
Effect: "NoExecute",
Effect: core.TaintEffectNoExecute,
Copy link

Copilot AI Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change modifies existing behavior by replacing the string literal 'NoExecute' with the constant core.TaintEffectNoExecute. While this is generally a good practice, it should be verified that this doesn't break any existing functionality that might depend on the string comparison.

Copilot uses AI. Check for mistakes.

}
if !duration.Forever {
tolerationSeconds := int64(duration.TimeSpan.Seconds())
t.TolerationSeconds = &tolerationSeconds
}
return t
}

// NewNoScheduleToleration is a helper to create a Toleration with
// Key=key, Operator='Exists' Effect='NoSchedule', TolerationSeconds=tolerationDuration.Seconds().
func NewNoScheduleToleration(key string, duration TolerationDuration) core.Toleration {
t := core.Toleration{
Key: key,
Operator: "Exists",
Effect: core.TaintEffectNoSchedule,
}
if !duration.Forever {
tolerationSeconds := int64(duration.TimeSpan.Seconds())
Expand Down