workspace

package
v0.0.0-...-841f565 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineRoot

func DetermineRoot(startingDir string) (string, error)

DetermineRoot recursively searches the current directory and all its parents for .ark/settings.json

func DetermineRootFromCWD

func DetermineRootFromCWD() (string, error)

DetermineRootFromCWD determine the workspace root from the current working directory

Types

type Config

type Config struct {
	K8s                  KubernetesConfig   `json:"kubernetes"`
	Vault                VaultConfig        `json:"vault"`
	FileSystem           FileSystemConfig   `json:"file_system"`
	RemoteCache          RemoteCacheConfig  `json:"remote_cache"`
	Plugins              []Plugin           `json:"plugins"`
	ControlPlane         ControlPlaneConfig `json:"control_plane"`
	User                 UserConfig         `json:"user"`
	Internal             InternalConfig     `json:"internal"`
	VersionCheckDisabled bool               `json:"disable_version_check"`
	// contains filtered or unexported fields
}

Config holds data for configuring a workspace

func LoadConfig

func LoadConfig(startingDir string) (*Config, error)

LoadConfig reads the bytes out of json settings and unmarshalls them into a Config object

func LoadConfigFromCWD

func LoadConfigFromCWD() (*Config, error)

LoadConfigFromCWD reads the bytes out of json settings and unmarshalls them into a Config object from the CWD

func (Config) Dir

func (c Config) Dir() string

func (Config) File

func (c Config) File() string

func (Config) Root

func (c Config) Root() string

type ControlPlaneConfig

type ControlPlaneConfig struct {
	OrgID        string `json:"org_id"`
	ProjectID    string `json:"project_id"`
	ApiURL       string `json:"api_url"`
	EventSinkURL string `json:"event_sink_url"`
	LogSinkURL   string `json:"log_sink_url"`
}

ControlPlaneConfig controls options injected into ark control plane components

type FileSystemConfig

type FileSystemConfig struct {
	Ignore []string `json:"ignore"`
}

FileSystemConfig configures the workspace file system observer

type InformersConfig

type InformersConfig struct {
	ResyncPeriod time.Duration `json:"resyncPeriod"`
}

type InternalConfig

type InternalConfig struct {
	DisableEntrypointInjection bool `json:"disable_entrypoint_injection"`
}

InternalConfig an object which describes arks internal configuration options

type KubernetesConfig

type KubernetesConfig struct {
	SafeContexts []string        `json:"safe_contexts"`
	Namespace    string          `json:"namespace"`
	Informers    InformersConfig `json:"infomers"`
}

KubernetesConfig holds data for applying k8s manifests to clusters

func (KubernetesConfig) GetSafeContexts

func (k8s KubernetesConfig) GetSafeContexts() []string

GetSafeContexts return a list of safe contexts from the workspace if any + ARK_K8S_SAFE_CONTEXTS system environment variable + kube.DefaultSafeContexts

type Plugin

type Plugin struct {
	Name  string `json:"name"`
	Image string `json:"image"`
}

Plugin defines a docker image that can be used as a function the image must take in data from stdin and the output from the plugin is a string

type RemoteCacheConfig

type RemoteCacheConfig struct {
	URL string `json:"url"`
}

RemoteCacheConfig configures the workspace remote cache location

type UserConfig

type UserConfig struct {
	Token string `json:"address"`
}

UserConfig used to authenticate users of the ark control plane

type VaultConfig

type VaultConfig struct {
	Address       string `json:"address"`
	EncryptionKey string `json:"encryption_key"`
}

VaultConfig allows user to set Vault address that's not reliant on an env var

Jump to

Keyboard shortcuts

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