commands

package
v0.0.0-...-7870e0e Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecOktetoBuildCmd

func ExecOktetoBuildCmd(cmd *exec.Cmd) error

ExecOktetoBuildCmd runs an okteto build command

func GetOktetoBuildCmd

func GetOktetoBuildCmd(oktetoPath string, buildOptions *BuildOptions) *exec.Cmd

GetOktetoBuildCmd returns an exec.Cmd with the needed values given buildOpts

func GetOktetoDeployCmdOutput

func GetOktetoDeployCmdOutput(oktetoPath string, deployOptions *DeployOptions) ([]byte, error)

GetOktetoDeployCmdOutput runs an okteto deploy command

func HasUpCommandFinished

func HasUpCommandFinished(pid int) bool

HasUpCommandFinished checks if up command has finished correctly

func RunExecCommand

func RunExecCommand(oktetoPath string, execOptions *ExecOptions) (string, error)

RunExecCommand runs an exec command

func RunKubectlApply

func RunKubectlApply(kubectlBinary string, kubectlOpts *KubectlOptions) error

RunKubectlApply runs kubectl apply command

func RunKubectlRolloutDeployment

func RunKubectlRolloutDeployment(kubectlBinary string, kubectlOpts *KubectlOptions, revision int) (string, error)

RunKubectlRolloutDeployment runs kubectl rollout command

func RunKubectlRolloutStatefulset

func RunKubectlRolloutStatefulset(kubectlBinary string, kubectlOpts *KubectlOptions) (string, error)

RunKubectlRolloutStatefulset runs kubectl rollout command

func RunOktetoBuild

func RunOktetoBuild(oktetoPath string, buildOptions *BuildOptions) error

RunOktetoBuild runs an okteto build command

func RunOktetoCreateNamespace

func RunOktetoCreateNamespace(oktetoPath string, namespaceOpts *NamespaceOptions) error

RunOktetoCreateNamespace runs okteto namespace create

func RunOktetoDeleteNamespace

func RunOktetoDeleteNamespace(oktetoPath string, namespaceOpts *NamespaceOptions) error

RunOktetoDeleteNamespace runs okteto namespace delete

func RunOktetoDeploy

func RunOktetoDeploy(oktetoPath string, deployOptions *DeployOptions) error

RunOktetoDeploy runs an okteto deploy command

func RunOktetoDeployAndGetOutput

func RunOktetoDeployAndGetOutput(oktetoPath string, deployOptions *DeployOptions) (string, error)

RunOktetoDeployAndGetOutput runs an okteto deploy command and returns the output

func RunOktetoDeployPipeline

func RunOktetoDeployPipeline(oktetoPath string, deployOptions *DeployPipelineOptions) error

RunOktetoDeployPipeline runs an okteto deploy command

func RunOktetoDeployPreview

func RunOktetoDeployPreview(oktetoPath string, deployOptions *DeployPreviewOptions) error

RunOktetoDeployPreview runs an okteto deploy command

func RunOktetoDestroy

func RunOktetoDestroy(oktetoPath string, destroyOptions *DestroyOptions) error

RunOktetoDestroy runs an okteto destroy command

func RunOktetoDestroyAndGetOutput

func RunOktetoDestroyAndGetOutput(oktetoPath string, destroyOptions *DestroyOptions) (string, error)

RunOktetoDestroyAndGetOutput runs an okteto destroy command and returns the output

func RunOktetoDestroyRemote

func RunOktetoDestroyRemote(oktetoPath string, destroyOptions *DestroyOptions) error

RunOktetoDestroyRemote runs an okteto destroy command in remote

func RunOktetoDown

func RunOktetoDown(oktetoPath string, downOpts *DownOptions) error

RunOktetoDown runs an okteto down command

func RunOktetoEndpoints

func RunOktetoEndpoints(oktetoPath string, endpointsOptions *EndpointOptions) ([]byte, error)

RunOktetoEndpoints runs an okteto deploy command

func RunOktetoKubeconfig

func RunOktetoKubeconfig(oktetoPath, oktetoHome string) error

RunOktetoKubeconfig runs okteto kubeconfig command

func RunOktetoKubetoken

func RunOktetoKubetoken(oktetoPath, oktetoHome string) (bytes.Buffer, error)

RunOktetoKubetoken runs okteto kubetoken command

func RunOktetoNamespace

func RunOktetoNamespace(oktetoPath string, namespaceOpts *NamespaceOptions) error

RunOktetoNamespace runs okteto namespace command

func RunOktetoPipelineDestroy

func RunOktetoPipelineDestroy(oktetoPath string, destroyOptions *DestroyPipelineOptions) error

RunOktetoPipelineDestroy runs an okteto destroy command

func RunOktetoPreviewDestroy

func RunOktetoPreviewDestroy(oktetoPath string, destroyOptions *DestroyPreviewOptions) error

RunOktetoPreviewDestroy runs an okteto destroy command

func RunOktetoPush

func RunOktetoPush(oktetoPath, workdir string) error

RunOktetoPush runs an okteto push command

func RunOktetoStackDeploy

func RunOktetoStackDeploy(oktetoPath string, deployOptions *StackDeployOptions) error

RunOktetoStackDeploy runs an okteto deploy command

func RunOktetoStackDestroy

func RunOktetoStackDestroy(oktetoPath string, destroyOptions *StackDestroyOptions) error

RunOktetoStackDestroy runs an okteto deploy command

func RunOktetoUpAndWaitWithOutput

func RunOktetoUpAndWaitWithOutput(oktetoPath string, upOptions *UpOptions) (bytes.Buffer, error)

Types

type BuildOptions

type BuildOptions struct {
	Workdir      string
	ManifestPath string
	Tag          string
	Namespace    string
	OktetoHome   string
	Token        string
	SvcsToBuild  []string
	NoCache      bool
}

BuildOptions defines the options that can be added to a build command

type DeployOptions

type DeployOptions struct {
	Workdir          string
	ManifestPath     string
	LogLevel         string
	LogOutput        string
	Namespace        string
	OktetoHome       string
	Token            string
	Name             string
	Variables        []string
	ServicesToDeploy []string
	Build            bool
	IsRemote         bool
}

DeployOptions defines the options that can be added to a deploy command

type DeployPipelineOptions

type DeployPipelineOptions struct {
	Workdir     string
	Namespace   string
	Branch      string
	Repository  string
	OktetoHome  string
	Token       string
	Name        string
	Labels      []string
	ReuseParams bool
	Wait        bool
}

DeployPipelineOptions defines the options that can be added to a deploy command

type DeployPreviewOptions

type DeployPreviewOptions struct {
	Workdir    string
	Namespace  string
	Scope      string
	Branch     string
	Repository string
	OktetoHome string
	Token      string
	Wait       bool
}

DeployPreviewOptions defines the options that can be added to a deploy command

type DestroyOptions

type DestroyOptions struct {
	Workdir      string
	ManifestPath string
	Namespace    string
	OktetoHome   string
	Token        string
	Name         string
	IsRemote     bool
}

DestroyOptions defines the options that can be added to a deploy command

type DestroyPipelineOptions

type DestroyPipelineOptions struct {
	Workdir    string
	Namespace  string
	Name       string
	OktetoHome string
	Token      string
}

DestroyPipelineOptions defines the options that can be added to a deploy command

type DestroyPreviewOptions

type DestroyPreviewOptions struct {
	Workdir    string
	Namespace  string
	OktetoHome string
	Token      string
}

DestroyPreviewOptions defines the options that can be added to a deploy command

type DownOptions

type DownOptions struct {
	Namespace    string
	ManifestPath string
	Workdir      string
	OktetoHome   string
	Token        string
	Service      string
}

DownOptions has the options for okteto down command

type EndpointOptions

type EndpointOptions struct {
	Workdir    string
	Output     string
	Namespace  string
	OktetoHome string
}

EndpointOptions defines the options that can be added to a deploy command

type ExecOptions

type ExecOptions struct {
	Namespace    string
	ManifestPath string
	OktetoHome   string
	Token        string
	Service      string
	Command      []string
}

ExecOptions are the options to add to an exec command

type KubectlOptions

type KubectlOptions struct {
	Workdir    string
	Namespace  string
	Name       string
	File       string
	ConfigFile string
}

KubectlOptions defines the options that can be added to a build command

type NamespaceOptions

type NamespaceOptions struct {
	Namespace  string
	OktetoHome string
	Token      string
}

NamespaceOptions defines the options that can be added to a build command

type StackDeployOptions

type StackDeployOptions struct {
	Workdir      string
	ManifestPath string
	OktetoHome   string
	Token        string
	Namespace    string
	Build        bool
}

StackDeployOptions defines the options that can be added to a deploy command

type StackDestroyOptions

type StackDestroyOptions struct {
	Workdir      string
	ManifestPath string
	OktetoHome   string
	Token        string
	Namespace    string
}

StackDestroyOptions defines the options that can be added to a deploy command

type UpCommandProcessResult

type UpCommandProcessResult struct {
	WaitGroup *sync.WaitGroup
	ErrorChan chan error
	Pid       *os.Process
	Output    bytes.Buffer
}

UpCommandProcessResult has the information about the command process

func RunOktetoUp

func RunOktetoUp(oktetoPath string, upOptions *UpOptions) (*UpCommandProcessResult, error)

RunOktetoUp runs an okteto up command

type UpOptions

type UpOptions struct {
	Name         string
	Namespace    string
	Service      string
	ManifestPath string
	Workdir      string
	OktetoHome   string
	Token        string
	Deploy       bool
}

UpOptions has the options for okteto up command

Jump to

Keyboard shortcuts

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