Documentation ¶
Index ¶
- Constants
- func AddDevAnnotations(ctx context.Context, manifest *model.Manifest, c kubernetes.Interface)
- func AddPhaseDuration(ctx context.Context, name, namespace, phase string, duration time.Duration, ...) error
- func GetConfigmapDependencyEnv(ctx context.Context, name, namespace string, c kubernetes.Interface) (string, error)
- func GetConfigmapVariablesEncoded(ctx context.Context, name, namespace string, c kubernetes.Interface) (string, error)
- func HasDeployedSomething(ctx context.Context, name, ns string, c kubernetes.Interface) (bool, error)
- func IsDeployed(ctx context.Context, name, namespace string, c kubernetes.Interface) bool
- func ListDeployments(ctx context.Context, name, ns string, c kubernetes.Interface) ([]v1.Deployment, error)
- func ListStatefulsets(ctx context.Context, name, ns string, c kubernetes.Interface) ([]v1.StatefulSet, error)
- func SetOutput(cfg *apiv1.ConfigMap, output string) *apiv1.ConfigMap
- func TranslateConfigMapAndDeploy(ctx context.Context, data *CfgData, c kubernetes.Interface) (*apiv1.ConfigMap, error)
- func TranslatePipelineName(name string) string
- func UpdateConfigMap(ctx context.Context, cmap *apiv1.ConfigMap, data *CfgData, ...) error
- func UpdateEnvs(ctx context.Context, name, namespace string, envs []string, ...) error
- type CfgData
Constants ¶
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 ¶
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 ¶
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 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 ¶
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