Documentation
¶
Index ¶
- type APIConfig
- type BomConfig
- type CAConfig
- type CephConfig
- type CephDBDevices
- type CephDataDevices
- type CephHost
- type CephHostConfig
- type CephOSD
- type CephPlacement
- type CephSSHKey
- type ClusterCertificates
- type ClusterConfig
- type CodesphereComponent
- type CodesphereConfig
- type ComponentConfig
- type CustomDomainsConfig
- type DatacenterConfig
- type DbMigrationConfig
- type DeployConfig
- type ExtraWorkspaceFile
- type FileRef
- type FlavorConfig
- type GatewayConfig
- type GitProviderConfig
- type GitProvidersConfig
- type GlobRef
- type HostingPlan
- type ImageConfig
- type ImageRef
- type InstallVault
- type K8sNode
- type KubernetesConfig
- type ManagedServiceAPI
- type ManagedServiceBackendsConfig
- type ManagedServiceConfig
- type ManifestEntry
- type MetalLBBGP
- type MetalLBBGPConfig
- type MetalLBConfig
- type MetalLBL2
- type MetalLBPool
- type MetalLBPoolDef
- type MigrationsConfig
- type MonitoringConfig
- type OAuthConfig
- type OCIImageIndex
- type PlanParam
- type PlansConfig
- type PostgresConfig
- type PostgresPrimaryConfig
- type PostgresReplicaConfig
- type PrometheusConfig
- type RegistryConfig
- type RemoteWriteConfig
- type RootConfig
- type SSLConfig
- type SecretEntry
- type SecretFields
- type SecretFile
- type SecretsConfig
- type ServicePlan
- type UnderprovisionFactors
- type WorkspaceImagesConfig
- type WorkspacePlan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BomConfig ¶
type BomConfig struct {
Components map[string]ComponentConfig `json:"components"`
Migrations MigrationsConfig `json:"migrations"`
}
BomConfig represents the Bill of Materials configuration
func (*BomConfig) GetCodesphereContainerImages ¶
GetCodesphereContainerImages returns all container images from the codesphere component
func (*BomConfig) ParseBomConfig ¶
ParseBomConfig reads and parses a BOM JSON file
type CephConfig ¶ added in v0.17.0
type CephDBDevices ¶ added in v0.17.0
type CephDataDevices ¶ added in v0.17.0
type CephHostConfig ¶ added in v0.17.0
type CephOSD ¶ added in v0.17.0
type CephOSD struct {
SpecID string `yaml:"specId"`
Placement CephPlacement `yaml:"placement"`
DataDevices CephDataDevices `yaml:"dataDevices"`
DBDevices CephDBDevices `yaml:"dbDevices"`
}
type CephPlacement ¶ added in v0.17.0
type CephPlacement struct {
HostPattern string `yaml:"host_pattern"`
}
type CephSSHKey ¶ added in v0.17.0
type CephSSHKey struct {
PublicKey string `yaml:"publicKey"`
}
type ClusterCertificates ¶ added in v0.17.0
type ClusterCertificates struct {
CA CAConfig `yaml:"ca"`
}
type ClusterConfig ¶ added in v0.17.0
type ClusterConfig struct {
Certificates ClusterCertificates `yaml:"certificates"`
Monitoring *MonitoringConfig `yaml:"monitoring,omitempty"`
Gateway GatewayConfig `yaml:"gateway"`
PublicGateway GatewayConfig `yaml:"publicGateway"`
IngressCAKey string `yaml:"-"`
}
type CodesphereComponent ¶
type CodesphereComponent struct {
ContainerImages map[string]string `json:"containerImages"`
Files map[string]FileRef `json:"files"`
}
CodesphereComponent represents the codesphere-specific component
type CodesphereConfig ¶
type CodesphereConfig struct {
Domain string `yaml:"domain"`
WorkspaceHostingBaseDomain string `yaml:"workspaceHostingBaseDomain"`
PublicIP string `yaml:"publicIp"`
CustomDomains CustomDomainsConfig `yaml:"customDomains"`
DNSServers []string `yaml:"dnsServers"`
Experiments []string `yaml:"experiments"`
ExtraCAPem string `yaml:"extraCaPem,omitempty"`
ExtraWorkspaceEnvVars map[string]string `yaml:"extraWorkspaceEnvVars,omitempty"`
ExtraWorkspaceFiles []ExtraWorkspaceFile `yaml:"extraWorkspaceFiles,omitempty"`
WorkspaceImages *WorkspaceImagesConfig `yaml:"workspaceImages,omitempty"`
DeployConfig DeployConfig `yaml:"deployConfig"`
Plans PlansConfig `yaml:"plans"`
UnderprovisionFactors *UnderprovisionFactors `yaml:"underprovisionFactors,omitempty"`
GitProviders *GitProvidersConfig `yaml:"gitProviders,omitempty"`
ManagedServices []ManagedServiceConfig `yaml:"managedServices,omitempty"`
DomainAuthPrivateKey string `yaml:"-"`
DomainAuthPublicKey string `yaml:"-"`
}
type ComponentConfig ¶
type ComponentConfig struct {
ContainerImages map[string]string `json:"containerImages,omitempty"`
Files map[string]FileRef `json:"files,omitempty"`
}
ComponentConfig represents a component in the BOM
type CustomDomainsConfig ¶ added in v0.17.0
type CustomDomainsConfig struct {
CNameBaseDomain string `yaml:"cNameBaseDomain"`
}
type DatacenterConfig ¶ added in v0.17.0
type DbMigrationConfig ¶
DbMigrationConfig represents database migration configuration
type DeployConfig ¶
type DeployConfig struct {
Images map[string]ImageConfig `yaml:"images"`
}
type ExtraWorkspaceFile ¶ added in v0.17.0
type FileRef ¶
type FileRef struct {
SrcPath string `json:"srcPath,omitempty"`
SrcUrl string `json:"srcUrl,omitempty"`
Executable bool `json:"executable,omitempty"`
Glob *GlobRef `json:"glob,omitempty"`
}
FileRef represents a file reference in the BOM
type FlavorConfig ¶
type GatewayConfig ¶ added in v0.17.0
type GitProviderConfig ¶ added in v0.17.0
type GitProviderConfig struct {
Enabled bool `yaml:"enabled"`
URL string `yaml:"url"`
API APIConfig `yaml:"api"`
OAuth OAuthConfig `yaml:"oauth"`
}
type GitProvidersConfig ¶ added in v0.17.0
type GitProvidersConfig struct {
GitHub *GitProviderConfig `yaml:"github,omitempty"`
GitLab *GitProviderConfig `yaml:"gitlab,omitempty"`
Bitbucket *GitProviderConfig `yaml:"bitbucket,omitempty"`
AzureDevOps *GitProviderConfig `yaml:"azureDevOps,omitempty"`
}
type GlobRef ¶
type GlobRef struct {
Cwd string `json:"cwd"`
Include string `json:"include"`
Exclude []string `json:"exclude,omitempty"`
}
GlobRef represents a glob-based file reference
type HostingPlan ¶ added in v0.17.0
type ImageConfig ¶
type ImageConfig struct {
Name string `yaml:"name"`
SupportedUntil string `yaml:"supportedUntil"`
Flavors map[string]FlavorConfig `yaml:"flavors"`
}
type InstallVault ¶ added in v0.17.0
type InstallVault struct {
Secrets []SecretEntry `yaml:"secrets"`
}
Vault
func (*InstallVault) Marshal ¶ added in v0.17.0
func (v *InstallVault) Marshal() ([]byte, error)
func (*InstallVault) Unmarshal ¶ added in v0.17.0
func (v *InstallVault) Unmarshal(data []byte) error
type KubernetesConfig ¶ added in v0.17.0
type KubernetesConfig struct {
ManagedByCodesphere bool `yaml:"managedByCodesphere"`
APIServerHost string `yaml:"apiServerHost,omitempty"`
ControlPlanes []K8sNode `yaml:"controlPlanes,omitempty"`
Workers []K8sNode `yaml:"workers,omitempty"`
PodCIDR string `yaml:"podCidr,omitempty"`
ServiceCIDR string `yaml:"serviceCidr,omitempty"`
// Internal flag
NeedsKubeConfig bool `yaml:"-"`
}
type ManagedServiceAPI ¶ added in v0.17.0
type ManagedServiceAPI struct {
Endpoint string `yaml:"endpoint"`
}
type ManagedServiceBackendsConfig ¶ added in v0.17.0
type ManagedServiceBackendsConfig struct {
Postgres map[string]interface{} `yaml:"postgres,omitempty"`
}
type ManagedServiceConfig ¶ added in v0.17.0
type ManagedServiceConfig struct {
Name string `yaml:"name"`
API ManagedServiceAPI `yaml:"api"`
Author string `yaml:"author"`
Category string `yaml:"category"`
ConfigSchema map[string]interface{} `yaml:"configSchema"`
DetailsSchema map[string]interface{} `yaml:"detailsSchema"`
SecretsSchema map[string]interface{} `yaml:"secretsSchema"`
Description string `yaml:"description"`
DisplayName string `yaml:"displayName"`
IconURL string `yaml:"iconUrl"`
Plans []ServicePlan `yaml:"plans"`
Version string `yaml:"version"`
}
type ManifestEntry ¶
type ManifestEntry struct {
MediaType string `json:"mediaType"`
Digest string `json:"digest"`
Size int64 `json:"size"`
Annotations map[string]string `json:"annotations,omitempty"` // Use omitempty just in case, though usually present
}
ManifestEntry represents a single manifest entry within the index.
type MetalLBBGP ¶ added in v0.17.0
type MetalLBBGP struct {
Name string `yaml:"name"`
Pools []string `yaml:"pools"`
Config MetalLBBGPConfig `yaml:"config"`
NodeSelectors []map[string]string `yaml:"nodeSelectors,omitempty"`
}
type MetalLBBGPConfig ¶ added in v0.17.0
type MetalLBConfig ¶ added in v0.17.0
type MetalLBConfig struct {
Enabled bool `yaml:"enabled"`
Pools []MetalLBPoolDef `yaml:"pools"`
L2 []MetalLBL2 `yaml:"l2,omitempty"`
BGP []MetalLBBGP `yaml:"bgp,omitempty"`
}
type MetalLBPool ¶ added in v0.17.0
type MetalLBPoolDef ¶ added in v0.17.0
type MigrationsConfig ¶
type MigrationsConfig struct {
Db DbMigrationConfig `json:"db"`
}
MigrationsConfig represents the migrations configuration
type MonitoringConfig ¶ added in v0.17.0
type MonitoringConfig struct {
Prometheus *PrometheusConfig `yaml:"prometheus,omitempty"`
}
type OAuthConfig ¶ added in v0.17.0
type OCIImageIndex ¶
type OCIImageIndex struct {
SchemaVersion int `json:"schemaVersion"`
MediaType string `json:"mediaType"`
Manifests []ManifestEntry `json:"manifests"`
}
OCIImageIndex represents the top-level structure of an OCI Image Index (manifest list).
func (*OCIImageIndex) ExtractImageNames ¶
func (o *OCIImageIndex) ExtractImageNames() ([]string, error)
ExtractImageNames extracts the image names from the OCI image index file.
func (*OCIImageIndex) ParseOCIImageConfig ¶
func (o *OCIImageIndex) ParseOCIImageConfig(filePath string) error
type PlansConfig ¶ added in v0.17.0
type PlansConfig struct {
HostingPlans map[int]HostingPlan `yaml:"hostingPlans"`
WorkspacePlans map[int]WorkspacePlan `yaml:"workspacePlans"`
}
type PostgresConfig ¶ added in v0.17.0
type PostgresConfig struct {
Mode string `yaml:"mode,omitempty"`
CACertPem string `yaml:"caCertPem,omitempty"`
Primary *PostgresPrimaryConfig `yaml:"primary,omitempty"`
Replica *PostgresReplicaConfig `yaml:"replica,omitempty"`
ServerAddress string `yaml:"serverAddress,omitempty"`
// Stored separately in vault
CaCertPrivateKey string `yaml:"-"`
AdminPassword string `yaml:"-"`
ReplicaPassword string `yaml:"-"`
UserPasswords map[string]string `yaml:"-"`
}
type PostgresPrimaryConfig ¶ added in v0.17.0
type PostgresReplicaConfig ¶ added in v0.17.0
type PrometheusConfig ¶ added in v0.17.0
type PrometheusConfig struct {
RemoteWrite *RemoteWriteConfig `yaml:"remoteWrite,omitempty"`
}
type RegistryConfig ¶
type RemoteWriteConfig ¶ added in v0.17.0
type RootConfig ¶
type RootConfig struct {
Datacenter DatacenterConfig `yaml:"dataCenter"`
Secrets SecretsConfig `yaml:"secrets"`
Registry RegistryConfig `yaml:"registry,omitempty"`
Postgres PostgresConfig `yaml:"postgres"`
Ceph CephConfig `yaml:"ceph"`
Kubernetes KubernetesConfig `yaml:"kubernetes"`
Cluster ClusterConfig `yaml:"cluster"`
MetalLB *MetalLBConfig `yaml:"metallb,omitempty"`
Codesphere CodesphereConfig `yaml:"codesphere"`
ManagedServiceBackends *ManagedServiceBackendsConfig `yaml:"managedServiceBackends,omitempty"`
}
RootConfig represents the relevant parts of the configuration file
func (*RootConfig) ExtractBomRefs ¶
func (c *RootConfig) ExtractBomRefs() []string
func (*RootConfig) ExtractVault ¶ added in v0.17.0
func (c *RootConfig) ExtractVault() *InstallVault
func (*RootConfig) ExtractWorkspaceDockerfiles ¶
func (c *RootConfig) ExtractWorkspaceDockerfiles() map[string]string
func (*RootConfig) Marshal ¶ added in v0.17.0
func (c *RootConfig) Marshal() ([]byte, error)
Marshal serializes the RootConfig to YAML
func (*RootConfig) Unmarshal ¶ added in v0.17.0
func (c *RootConfig) Unmarshal(data []byte) error
Unmarshal deserializes YAML data into the RootConfig
type SSLConfig ¶ added in v0.17.0
type SSLConfig struct {
ServerCertPem string `yaml:"serverCertPem"`
}
type SecretEntry ¶ added in v0.17.0
type SecretEntry struct {
Name string `yaml:"name"`
File *SecretFile `yaml:"file,omitempty"`
Fields *SecretFields `yaml:"fields,omitempty"`
}
type SecretFields ¶ added in v0.17.0
type SecretFields struct {
Password string `yaml:"password"`
}
type SecretFile ¶ added in v0.17.0
type SecretsConfig ¶ added in v0.17.0
type SecretsConfig struct {
BaseDir string `yaml:"baseDir"`
}