byoc

package
v0.0.0-...-e14b4d4 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	DefangPrefix           = pkg.Getenv("DEFANG_PREFIX", "Defang") // prefix for all resources created by Defang
	DefangPulumiBackend    = os.Getenv("DEFANG_PULUMI_BACKEND")
	PulumiConfigPassphrase = pkg.Getenv("PULUMI_CONFIG_PASSPHRASE", "asdf")
)

Functions

func DebugPulumi

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

func GetPrivateDomain

func GetPrivateDomain(projectName string) string

func GetPulumiBackend

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

func MakeEnv

func MakeEnv(key string, value any) string

func ParsePulumiStackObject

func ParsePulumiStackObject(ctx context.Context, obj Obj, bucket, prefix string, objLoader func(ctx context.Context, bucket, object string) ([]byte, error)) (string, error)

Types

type ByocBaseClient

type ByocBaseClient struct {
	client.RetryDelayer

	PulumiStack             string
	SetupDone               bool
	ShouldDelegateSubdomain bool
	TenantName              string
	CanIUseConfig
	// contains filtered or unexported fields
}

func NewByocBaseClient

func NewByocBaseClient(ctx context.Context, tenantName types.TenantName, backend ProjectBackend) *ByocBaseClient

func (*ByocBaseClient) Debug

func (*ByocBaseClient) GetEndpoint

func (b *ByocBaseClient) GetEndpoint(fqn 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, fqn string) string

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

func (*ByocBaseClient) GetProjectDomain

func (b *ByocBaseClient) GetProjectDomain(projectName, zone string) string

func (*ByocBaseClient) GetProjectLastCDImage

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

func (*ByocBaseClient) GetPublicFqdn

func (b *ByocBaseClient) GetPublicFqdn(projectName, delegateDomain, fqn 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) RemoteProjectName

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

func (*ByocBaseClient) ServiceDNS

func (b *ByocBaseClient) ServiceDNS(name 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`

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 HasStackSupport

type HasStackSupport interface {
	GetStackName() 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 Obj

type Obj interface {
	Name() string
	Size() int64
}

type ProjectBackend

type ProjectBackend interface {
	BootstrapList(context.Context) ([]string, error)
	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