byoc

package
v0.0.0-...-cd4061d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CdTaskPrefix = "defang-cd" // WARNING: renaming this practically deletes the Pulumi state
)

Variables

View Source
var (
	DefangPulumiBackend    = os.Getenv("DEFANG_PULUMI_BACKEND") // FIXME: allow override in .defang file
	ErrLocalPulumiStopped  = errors.New("local pulumi command succeeded; stopping")
	PulumiConfigPassphrase = pkg.Getenv("PULUMI_CONFIG_PASSPHRASE", "asdf") // FIXME: allow override in .defang file
)

Functions

func DebugPulumiGolang

func DebugPulumiGolang(ctx context.Context, env []string, cmd ...string) error

func DebugPulumiNodeJS

func DebugPulumiNodeJS(ctx context.Context, env []string, cmd ...string) error

func GetPulumiBackend

func GetPulumiBackend(stateUrl string) (string, string, error)

Types

type ByocBaseClient

type ByocBaseClient struct {
	client.RetryDelayer

	Prefix      string
	PulumiStack string
	SetupDone   bool
	TenantLabel types.TenantLabel
	CanIUseConfig
	// contains filtered or unexported fields
}

func NewByocBaseClient

func NewByocBaseClient(tenantLabel types.TenantLabel, backend ProjectBackend, stack string) *ByocBaseClient

func (*ByocBaseClient) Debug

func (*ByocBaseClient) GetEndpoint

func (b *ByocBaseClient) GetEndpoint(serviceName string, projectName, delegateDomain string, port *composeTypes.ServicePortConfig) string

This function was copied from Fabric controller and slightly modified to work with BYOC

func (*ByocBaseClient) GetPrivateFqdn

func (b *ByocBaseClient) GetPrivateFqdn(projectName string, serviceName string) string

This function was copied from Fabric controller and slightly modified to work with BYOC

func (*ByocBaseClient) GetProjectLabel

func (b *ByocBaseClient) GetProjectLabel(projectName string) string

GetProjectLabel returns the DNS-safe project label, including stack (if applicable)

func (*ByocBaseClient) GetProjectUpdatePath

func (b *ByocBaseClient) GetProjectUpdatePath(projectName string) string

func (*ByocBaseClient) GetPublicFqdn

func (b *ByocBaseClient) GetPublicFqdn(projectName, delegateDomain, serviceName string) string

This function was copied from Fabric controller and slightly modified to work with BYOC

func (*ByocBaseClient) GetServiceInfos

func (b *ByocBaseClient) GetServiceInfos(ctx context.Context, projectName, delegateDomain, etag string, services map[string]composeTypes.ServiceConfig) ([]*defangv1.ServiceInfo, error)

func (*ByocBaseClient) GetStackName

func (b *ByocBaseClient) GetStackName() string

func (*ByocBaseClient) GetStackNameForDomain

func (b *ByocBaseClient) GetStackNameForDomain() string

func (*ByocBaseClient) RemoteProjectName

func (b *ByocBaseClient) RemoteProjectName(ctx context.Context) (string, error)

func (*ByocBaseClient) ServicePrivateDNS

func (b *ByocBaseClient) ServicePrivateDNS(serviceName string) string

func (*ByocBaseClient) ServicePublicDNS

func (b *ByocBaseClient) ServicePublicDNS(serviceName string, projectName string) string

func (*ByocBaseClient) SetCanIUseConfig

func (b *ByocBaseClient) SetCanIUseConfig(quotas *defangv1.CanIUseResponse)

func (*ByocBaseClient) StackDir

func (b *ByocBaseClient) StackDir(projectName, name string) string

stackDir returns a stack-qualified path, like the Pulumi TS function `stackDir`

func (*ByocBaseClient) UpdateShardDomain

func (*ByocBaseClient) UpdateShardDomain(ctx context.Context) error

type CanIUseConfig

type CanIUseConfig struct {
	AllowGPU      bool
	AllowScaling  bool
	CDImage       string
	PulumiVersion string
}

type ErrMultipleProjects

type ErrMultipleProjects struct {
	ProjectNames []string
}

func (ErrMultipleProjects) Error

func (mp ErrMultipleProjects) Error() string

type ErrNoPermission

type ErrNoPermission string

func (ErrNoPermission) Error

func (e ErrNoPermission) Error() string

type Node

type Node struct {
	Name        string
	Deps        []string
	ServiceInfo *defangv1.ServiceInfo
	Visited     bool
}

Simple DFS topological sort to make sure the dependencies are created first

type ProjectBackend

type ProjectBackend interface {
	CdCommand(context.Context, client.CdCommandRequest) (types.ETag, error)
	CdList(context.Context, bool) (iter.Seq[state.Info], error)
	GetPrivateDomain(projectName string) string
	GetProjectUpdate(context.Context, string) (*defangv1.ProjectUpdate, error)
}

type ServiceInfoUpdater

type ServiceInfoUpdater interface {
	UpdateServiceInfo(ctx context.Context, serviceInfo *defangv1.ServiceInfo, projectName, delegateDomain string, service composeTypes.ServiceConfig) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL