Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/install/installer/pkg/common/toleration.go
2500 views
1
// Copyright (c) 2025 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
package common
6
7
import (
8
configv1 "github.com/gitpod-io/gitpod/installer/pkg/config/v1"
9
corev1 "k8s.io/api/core/v1"
10
)
11
12
const (
13
RegistryFacadeTaintKey = "gitpod.io/registry-facade-not-ready"
14
WsDaemonTaintKey = "gitpod.io/ws-daemon-not-ready"
15
)
16
17
func WithTolerationWorkspaceComponentNotReady(ctx *RenderContext) []corev1.Toleration {
18
if ctx.Config.Kind != configv1.InstallationFull {
19
return []corev1.Toleration{}
20
}
21
return []corev1.Toleration{
22
{
23
Key: RegistryFacadeTaintKey,
24
Operator: corev1.TolerationOpExists,
25
Effect: corev1.TaintEffectNoSchedule,
26
},
27
{
28
Key: WsDaemonTaintKey,
29
Operator: corev1.TolerationOpExists,
30
Effect: corev1.TaintEffectNoSchedule,
31
},
32
}
33
}
34
35