pipeline

package
v0.0.0-...-fa857ea Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PhasesField = "phases"

	// ProgressingStatus indicates that an app is being deployed
	ProgressingStatus = "progressing"
	// DeployedStatus indicates that an app is deployed
	DeployedStatus = "deployed"
	// ErrorStatus indicates that an app has errors
	ErrorStatus = "error"
	// DestroyingStatus indicates that an app is being destroyed
	DestroyingStatus = "destroying"

	// ConfigmapNamePrefix prefix used by the configmaps created by okteto to handle dev environments information
	ConfigmapNamePrefix = "okteto-git-"
)

Variables

This section is empty.

Functions

func AddDevAnnotations

func AddDevAnnotations(ctx context.Context, manifest *model.Manifest, c kubernetes.Interface)

AddDevAnnotations add deploy labels to the deployments/sfs

func AddPhaseDuration

func AddPhaseDuration(ctx context.Context, name, namespace, phase string, duration time.Duration, c kubernetes.Interface) error

AddPhaseDuration adds a new phase to the configmap with the duration in seconds

func GetConfigmapDependencyEnv

func GetConfigmapDependencyEnv(ctx context.Context, name, namespace string, c kubernetes.Interface) (string, error)

GetConfigmapDependencyEnv returns Data["variables"] content from Configmap

func GetConfigmapVariablesEncoded

func GetConfigmapVariablesEncoded(ctx context.Context, name, namespace string, c kubernetes.Interface) (string, error)

GetConfigmapVariablesEncoded returns Data["variables"] content from Configmap

func HasDeployedSomething

func HasDeployedSomething(ctx context.Context, name, ns string, c kubernetes.Interface) (bool, error)

HasDeployedSomething checks if the pipeline has deployed any deployment/statefulset/job

func IsDeployed

func IsDeployed(ctx context.Context, name, namespace string, c kubernetes.Interface) bool

IsDeployed checks if a pipeline has been

func ListDeployments

func ListDeployments(ctx context.Context, name, ns string, c kubernetes.Interface) ([]v1.Deployment, error)

ListDeployments list all the deployments created by the pipeline

func ListStatefulsets

func ListStatefulsets(ctx context.Context, name, ns string, c kubernetes.Interface) ([]v1.StatefulSet, error)

ListStatefulsets list all the sfs created by the pipeline

func SetOutput

func SetOutput(cfg *apiv1.ConfigMap, output string) *apiv1.ConfigMap

SetOutput sets the output of a config map

func TranslateConfigMapAndDeploy

func TranslateConfigMapAndDeploy(ctx context.Context, data *CfgData, c kubernetes.Interface) (*apiv1.ConfigMap, error)

TranslateConfigMapAndDeploy translates the app into a configMap. Name param is the pipeline sanitized name

func TranslatePipelineName

func TranslatePipelineName(name string) string

TranslatePipelineName translate the name into the configmap name

func UpdateConfigMap

func UpdateConfigMap(ctx context.Context, cmap *apiv1.ConfigMap, data *CfgData, c kubernetes.Interface) error

UpdateConfigMap updates the configmaps fields

func UpdateEnvs

func UpdateEnvs(ctx context.Context, name, namespace string, envs []string, c kubernetes.Interface) error

UpdateEnvs updates the configmap adding the envs as data fields

Types

type CfgData

type CfgData struct {
	Name       string
	Namespace  string
	Status     string
	Output     string
	Repository string
	Branch     string
	Filename   string
	Manifest   []byte
	Icon       string
	Variables  []string
}

CfgData represents the data to be include in a configmap

Jump to

Keyboard shortcuts

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