Path: blob/main/components/image-builder-api/go/config/config.go
2500 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 config56import (7"github.com/gitpod-io/gitpod/common-go/baseserver"8)910type ServiceConfig struct {11Orchestrator Configuration `json:"orchestrator"`12RefCache RefCacheConfig `json:"refCache,omitempty"`1314Server *baseserver.Configuration `json:"server"`15}1617type RefCacheConfig struct {18Interval string `json:"interval"`19Refs []string `json:"refs"`20}2122// Configuration configures the orchestrator23type Configuration struct {24WorkspaceManager WorkspaceManagerConfig `json:"wsman"`2526// PullSecret names a Kubernetes secret which contains a `.dockerconfigjson` entry27// carrying the Docker authentication credentials to interact with the baseImageRepository28// and workspaceImageRepository.29PullSecret string `json:"pullSecret,omitempty"`3031// PullSecretFile points to a mount of the .dockerconfigjson file of the PullSecret.32PullSecretFile string `json:"pullSecretFile,omitempty"`3334// BaseImageRepository configures repository where we'll push base images to.35BaseImageRepository string `json:"baseImageRepository"`3637// WorkspaceImageRepository configures the repository where we'll push the final workspace images to.38// Note that the workspace nodes/kubelets need access to this repository.39WorkspaceImageRepository string `json:"workspaceImageRepository"`4041// BuilderImage is an image ref to the workspace builder image42BuilderImage string `json:"builderImage"`4344// EnableAdditionalECRAuth adds additional ECR auth using IRSA.45// This will attempt to add ECR auth for any ECR repo a user is46// trying to access.47EnableAdditionalECRAuth bool `json:"enableAdditionalECRAuth"`4849// SubassemblyBucketName configures the subassembly bucket50SubassemblyBucketName string `json:"subassemblyBucketName,omitempty"`51// SubassemblyBucketPrefix configures an optional key prefix used for locating subassemblies in the bucket52SubassemblyBucketPrefix string `json:"subassemblyBucketPrefix,omitempty"`53}5455type TLS struct {56Authority string `json:"ca"`57Certificate string `json:"crt"`58PrivateKey string `json:"key"`59}6061// WorkspaceManagerConfig configures the workspace manager connection62type WorkspaceManagerConfig struct {63Address string `json:"address"`64TLS TLS `json:"tls,omitempty"`65// expected to be a wsmanapi.WorkspaceManagerClient - use to avoid dependency on wsmanapi66// this field is used for testing only67Client interface{} `json:"-"`68}697071