Documentation ¶
Overview ¶
Package app creates new apps for interaction with in a devenv.
Index ¶
- Constants
- func Delete(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, ...) error
- func Deploy(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, ...) error
- func E2E(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, ...) error
- func Run(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, ...) error
- func RunStop(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, ...) error
- func Shell(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, ...) error
- type App
- func (a *App) Close() error
- func (a *App) Delete(ctx context.Context) error
- func (a *App) DeleteDevspace(ctx context.Context) error
- func (a *App) Deploy(ctx context.Context, waitForPodsToBeReady bool) error
- func (a *App) DeployDevspace(ctx context.Context, waitForPodsToBeReady bool) error
- func (a *App) Dev(ctx context.Context, opts RunOptions) error
- func (app *App) Handle(ctx context.Context, log logrus.FieldLogger) error
- func (a *App) RunStop(ctx context.Context) error
- func (a *App) Shell(ctx context.Context, deploymentProfile string) error
- type DeploymentOptions
- type RunOptions
- type Type
Constants ¶
const ( TypeBootstrap Type = "bootstrap" TypeLegacy Type = "legacy" DeleteJobAnnotation = "outreach.io/db-migration-delete" AppVersionLocal = "local" AppVersionLatest = "latest" ConfigFileName = "devenv.yaml" )
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, b *box.Config, conf *rest.Config, appNameOrPath string, kr kubernetesruntime.RuntimeConfig, useDevspace bool) error
Delete deletes application from DevEnv
func Deploy ¶
func Deploy(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, b *box.Config, conf *rest.Config, appNameOrPath string, kr kubernetesruntime.RuntimeConfig, opts DeploymentOptions) error
Deploy is a wrapper around NewApp().Deploy() that automatically closes the app and deploys it into the devenv
func E2E ¶
func E2E(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, b *box.Config, conf *rest.Config, appNameOrPath string, kr kubernetesruntime.RuntimeConfig, opts RunOptions) error
E2E is a wrapper around NewApp().Dev() that sets up the e2e environment
func Run ¶
func Run(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, b *box.Config, conf *rest.Config, appNameOrPath string, kr kubernetesruntime.RuntimeConfig, opts RunOptions) error
Run is a wrapper around NewApp().Dev()
func RunStop ¶
func RunStop(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, b *box.Config, conf *rest.Config, appNameOrPath string, kr kubernetesruntime.RuntimeConfig) error
RunStop is a wrapper around NewApp().RunStop()
func Shell ¶
func Shell(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, b *box.Config, conf *rest.Config, appNameOrPath string, kr kubernetesruntime.RuntimeConfig, deploymentProfile string) error
Run is a wrapper around NewApp().Run()
Types ¶
type App ¶
type App struct { // Type is the type of application this is Type Type // Path, if set, is the path that should be used to deploy this application // this will be used over the github repository Path string // Local is wether this app was downloaded or is local Local bool // RepositoryName is the repository name for this application RepositoryName string // Version is the version of this application that should be deployed. // This is only used if RepositoryName is set and being used. This has no // effect when Path is set. Version string // contains filtered or unexported fields }
func NewApp ¶
func NewApp(ctx context.Context, log logrus.FieldLogger, k kubernetes.Interface, b *box.Config, conf *rest.Config, appNameOrPath string, kr *kubernetesruntime.RuntimeConfig) (*App, error)
NewApp creates a new App for interaction with in a devenv. It will not clone remote repository, call ensureRepositoryIsCloned for this purpose.
func (*App) Close ¶
Close cleans up all resources of this application outside of the application itself.
func (*App) DeleteDevspace ¶
DeleteDevspace deletes the application using devspace purge commnad
func (*App) DeployDevspace ¶
Deploy deploys the application into the devenv using devspace deploy command
func (*App) Dev ¶
func (a *App) Dev(ctx context.Context, opts RunOptions) error
Dev starts the development mode for the application.
func (*App) Handle ¶ added in v1.51.0
Handle handles the retrieval of the latest version based on the versionResolver config
type DeploymentOptions ¶
type DeploymentOptions struct { // UseDevspace is the flag that determines whether to use devspace for deployment or not. UseDevspace bool // SkipDeployed is the flag that determines whether to skip deploying the app when already deployed to devenv or not. SkipDeployed bool // DeployDependencies is the flag that determines whether to deploy app dependencies or not. DeployDependencies bool // WaitForPodsToBeReady indicates if we need to wait for all pods to be ready before proceeding WaitForPodsToBeReady bool }
DeploymentOptions are the options for deploying the app into devenv.
type RunOptions ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package cmds contains logic for interacting with command line and environment variables
|
Package cmds contains logic for interacting with command line and environment variables |
Package config contains logic for reading and parsing of devenv config
|
Package config contains logic for reading and parsing of devenv config |
Package repository contains logic for cloning remote repositories
|
Package repository contains logic for cloning remote repositories |
Package resolvers contains implementation of version resolver
|
Package resolvers contains implementation of version resolver |
github
Package github implements the VersionResolver interface using Github as the backing version store.
|
Package github implements the VersionResolver interface using Github as the backing version store. |
maestro
Package maestro contains a VersionResolver implementation using Maestro, and internal service in use at Outreach, as the source of truth for the latest version of applications.
|
Package maestro contains a VersionResolver implementation using Maestro, and internal service in use at Outreach, as the source of truth for the latest version of applications. |
maestro/client
Package client contains implementation for maestro client
|
Package client contains implementation for maestro client |
mock
Package mock implements a VersionResolver implementation for use in testing.
|
Package mock implements a VersionResolver implementation for use in testing. |
types
Package types contains the different data types used in versionresolver
|
Package types contains the different data types used in versionresolver |