Path: blob/main/install/installer/pkg/components/cluster/resourcequota.go
2501 views
// Copyright (c) 2021 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34package cluster56import (7"github.com/gitpod-io/gitpod/installer/pkg/common"8corev1 "k8s.io/api/core/v1"9"k8s.io/apimachinery/pkg/api/resource"10metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"11"k8s.io/apimachinery/pkg/runtime"12)1314func resourcequota(ctx *common.RenderContext) ([]runtime.Object, error) {15return []runtime.Object{&corev1.ResourceQuota{16TypeMeta: common.TypeMetaResourceQuota,17ObjectMeta: metav1.ObjectMeta{18Name: "gitpod-resource-quota",19Namespace: ctx.Namespace,20},21Spec: corev1.ResourceQuotaSpec{22Hard: map[corev1.ResourceName]resource.Quantity{23"pods": resource.MustParse("10k"),24},25ScopeSelector: &corev1.ScopeSelector{26MatchExpressions: []corev1.ScopedResourceSelectorRequirement{27{28Operator: corev1.ScopeSelectorOpIn,29ScopeName: corev1.ResourceQuotaScopePriorityClass,30Values: []string{common.SystemNodeCritical},31},32},33},34},35}}, nil36}373839