Documentation ¶
Index ¶
- func Deploy(ctx context.Context, at AnalyticsTrackerInterface, ...) *cobra.Command
- func Endpoints(ctx context.Context, k8sLogger *io.K8sLogger) *cobra.Command
- func GetCommandFlags(name string, vars []string) ([]string, error)
- func GetDependencyEnvVars(environGetter environGetter) map[string]string
- func NewEndpointGetterInStandaloneMode(k8sLogger *io.K8sLogger) *endpointGetterInStandaloneMode
- func NewEndpointGetterWithOktetoAPI(c *okteto.Client) *endpointGetterWithOktetoAPI
- type AnalyticsTrackerInterface
- type Command
- type ConfigMapHandler
- type Deployer
- type EndpointGetter
- type EndpointsOptions
- type Namer
- type Options
- type Waiter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deploy ¶
func Deploy(ctx context.Context, at AnalyticsTrackerInterface, insightsTracker buildDeployTrackerInterface, ioCtrl *io.Controller, k8sLogger *io.K8sLogger) *cobra.Command
Deploy deploys the okteto manifest
func GetDependencyEnvVars ¶
GetDependencyEnvVars This function gets the variables defined by the dependencies (OKTETO_DEPENDENCY_XXXX) deployed before the deploy phase from the environment. This function is here as the command is the one in charge of deploying dependencies and trigger the rest of the deploy phase.
Types ¶
type AnalyticsTrackerInterface ¶
type AnalyticsTrackerInterface interface { TrackDeploy(dm analytics.DeployMetadata) // contains filtered or unexported methods }
type Command ¶
type Command struct { GetManifest func(path string, fs afero.Fs) (*model.Manifest, error) K8sClientProvider okteto.K8sClientProviderWithLogger Builder builderInterface GetDeployer getDeployerFunc EndpointGetter func(k8sLogger *io.K8sLogger) (EndpointGetter, error) DeployWaiter Waiter CfgMapHandler ConfigMapHandler Fs afero.Fs PipelineCMD pipelineCMD.DeployerInterface AnalyticsTracker AnalyticsTrackerInterface IoCtrl *io.Controller K8sLogger *io.K8sLogger InsightsTracker buildDeployTrackerInterface PipelineType model.Archetype IsRemote bool RunningInInstaller bool // contains filtered or unexported fields }
Command defines the config for deploying an app
type ConfigMapHandler ¶
type ConfigMapHandler interface { TranslateConfigMapAndDeploy(context.Context, *pipeline.CfgData) (*apiv1.ConfigMap, error) UpdateConfigMap(context.Context, *apiv1.ConfigMap, *pipeline.CfgData, error) error UpdateEnvsFromCommands(context.Context, string, string, []string) error GetConfigmapVariablesEncoded(ctx context.Context, name, namespace string) (string, error) AddPhaseDuration(context.Context, string, string, string, time.Duration) error }
ConfigMapHandler defines the different functions to run okteto inside an okteto deploy or an okteto destroy directly
func NewConfigmapHandler ¶
func NewConfigmapHandler(provider okteto.K8sClientProviderWithLogger, k8slogger *io.K8sLogger) ConfigMapHandler
type Deployer ¶
type Deployer interface { Deploy(context.Context, *Options) error CleanUp(ctx context.Context, err error) }
Deployer defines the operations to deploy the custom commands, divert and external resources defined in an Okteto manifest
func GetDeployer ¶
func GetDeployer(ctx context.Context, opts *Options, buildEnvVarsGetter buildEnvVarsGetter, cmapHandler ConfigMapHandler, k8sProvider okteto.K8sClientProviderWithLogger, ioCtrl *io.Controller, k8Logger *io.K8sLogger, dependencyEnvVarsGetter dependencyEnvVarsGetter, ) (Deployer, error)
GetDeployer returns a remote or a local deployer k8sProvider, kubeconfig and portGetter should not be nil values
type EndpointGetter ¶
type EndpointGetter struct { GetManifest func(path string, fs afero.Fs) (*model.Manifest, error) // contains filtered or unexported fields }
func NewEndpointGetter ¶
func NewEndpointGetter(k8sLogger *io.K8sLogger) (EndpointGetter, error)
type EndpointsOptions ¶
type EndpointsOptions struct { Name string ManifestPath string Output string Namespace string K8sContext string }
EndpointsOptions defines the options to get the endpoints
type Namer ¶
type Namer struct { Workdir string KubeClient kubernetes.Interface ManifestName string ManifestPath string }
type Options ¶
type Options struct { Manifest *model.Manifest // ManifestPathFlag is the option -f as introduced by the user when executing this command. // This is stored at the configmap as filename to redeploy from the ui. ManifestPathFlag string // ManifestPath is the path to the manifest used though the command execution. // This might change its value during execution ManifestPath string Name string Namespace string K8sContext string Variables []string ServicesToDeploy []string Timeout time.Duration Build bool Dependencies bool RunWithoutBash bool RunInRemote bool Wait bool ShowCTA bool }
Options represents options for deploy command
type Waiter ¶
type Waiter struct { K8sClientProvider okteto.K8sClientProviderWithLogger K8sLogger *ioCtrl.K8sLogger }
func NewDeployWaiter ¶
func NewDeployWaiter(k8sClientProvider okteto.K8sClientProviderWithLogger, k8slogger *ioCtrl.K8sLogger) Waiter