Help us shape the future of Go! Take the 2026 Go Developer Survey

executors

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 32 Imported by: 5

Documentation

Index

Constants

View Source
const (
	STEP_NAME_REGEX              = "create-env-%s-gb-%d"
	TEMPLATE_NAME_REGEX          = "%s-gb-%d"
	WORKFLOW_MINIO_CRED          = "workflow-minio-cred"
	CRED_ACCESS_KEY              = "accessKey"
	CRED_SECRET_KEY              = "secretKey"
	S3_ENDPOINT_URL              = "s3.amazonaws.com"
	DEVTRON_WORKFLOW_LABEL_KEY   = "devtron.ai/workflow-purpose"
	DEVTRON_WORKFLOW_LABEL_VALUE = "cd"
	WORKFLOW_GENERATE_NAME_REGEX = "%s-"
	RESOURCE_CREATE_ACTION       = "create"
)
View Source
const (
	WorkflowJobBackoffLimit = 0
	WorkflowJobFinalizer    = "foregroundDeletion"
)

Variables

View Source
var AccessKeySelector = &k8sApiV1.SecretKeySelector{Key: CRED_ACCESS_KEY, LocalObjectReference: k8sApiV1.LocalObjectReference{Name: WORKFLOW_MINIO_CRED}}
View Source
var ArgoWorkflowOwnerRef = k8sMetaV1.OwnerReference{APIVersion: "argoproj.io/v1alpha1", Kind: "Workflow", Name: "{{workflow.name}}", UID: "{{workflow.uid}}", BlockOwnerDeletion: &[]bool{true}[0]}
View Source
var SecretKeySelector = &k8sApiV1.SecretKeySelector{Key: CRED_SECRET_KEY, LocalObjectReference: k8sApiV1.LocalObjectReference{Name: WORKFLOW_MINIO_CRED}}

Functions

func AddTemplatesForGlobalSecretsInWorkflowTemplate

func AddTemplatesForGlobalSecretsInWorkflowTemplate(globalCmCsConfigs []*bean.GlobalCMCSDto, steps *[]argoWfApiV1.ParallelSteps, volumes *[]k8sApiV1.Volume, templates *[]argoWfApiV1.Template) error

func CheckIfReTriggerRequired

func CheckIfReTriggerRequired(status, message, workflowRunnerStatus string) bool

func ExtractVolumes added in v1.2.2

func ExtractVolumes(configMaps []apiBean.ConfigSecretMap, secrets []apiBean.ConfigSecretMap) []k8sApiV1.Volume

func GetClientInstance

func GetClientInstance(config *rest.Config, namespace string) (argoWfClientV1.WorkflowInterface, error)

func GetFromGlobalCmCsDtos

func GetFromGlobalCmCsDtos(globalCmCsConfigs []*bean.GlobalCMCSDto) ([]apiBean.ConfigSecretMap, []apiBean.ConfigSecretMap, error)

Types

type ArgoWorkflowExecutor

type ArgoWorkflowExecutor interface {
	WorkflowExecutor
}

type ArgoWorkflowExecutorImpl

type ArgoWorkflowExecutorImpl struct {
	// contains filtered or unexported fields
}

func NewArgoWorkflowExecutorImpl

func NewArgoWorkflowExecutorImpl(logger *zap.SugaredLogger) *ArgoWorkflowExecutorImpl

func (*ArgoWorkflowExecutorImpl) ExecuteWorkflow

func (impl *ArgoWorkflowExecutorImpl) ExecuteWorkflow(workflowTemplate bean.WorkflowTemplate) (*unstructured.UnstructuredList, error)

func (*ArgoWorkflowExecutorImpl) GetWorkflow added in v0.6.26

func (impl *ArgoWorkflowExecutorImpl) GetWorkflow(workflowName string, namespace string, clusterConfig *rest.Config) (*unstructured.UnstructuredList, error)

func (*ArgoWorkflowExecutorImpl) GetWorkflowStatus added in v0.6.26

func (impl *ArgoWorkflowExecutorImpl) GetWorkflowStatus(workflowName string, namespace string, clusterConfig *rest.Config) (*types.WorkflowStatus, error)

func (*ArgoWorkflowExecutorImpl) TerminateDanglingWorkflow added in v1.0.0

func (impl *ArgoWorkflowExecutorImpl) TerminateDanglingWorkflow(workflowGenerateName string, namespace string, clusterConfig *rest.Config) error

func (*ArgoWorkflowExecutorImpl) TerminateWorkflow

func (impl *ArgoWorkflowExecutorImpl) TerminateWorkflow(workflowName string, namespace string, clusterConfig *rest.Config) error

type SystemWorkflowExecutor

type SystemWorkflowExecutor interface {
	WorkflowExecutor
}

type SystemWorkflowExecutorImpl

type SystemWorkflowExecutorImpl struct {
	// contains filtered or unexported fields
}

func NewSystemWorkflowExecutorImpl

func NewSystemWorkflowExecutorImpl(logger *zap.SugaredLogger, k8sUtil *k8s.K8sServiceImpl) *SystemWorkflowExecutorImpl

func (*SystemWorkflowExecutorImpl) ExecuteWorkflow

func (impl *SystemWorkflowExecutorImpl) ExecuteWorkflow(workflowTemplate bean.WorkflowTemplate) (*unstructured.UnstructuredList, error)

func (*SystemWorkflowExecutorImpl) GetWorkflow added in v0.6.26

func (impl *SystemWorkflowExecutorImpl) GetWorkflow(workflowName string, namespace string, clusterConfig *rest.Config) (*unstructured.UnstructuredList, error)

func (*SystemWorkflowExecutorImpl) GetWorkflowStatus added in v0.6.26

func (impl *SystemWorkflowExecutorImpl) GetWorkflowStatus(workflowName string, namespace string, clusterConfig *rest.Config) (*types2.WorkflowStatus, error)

func (*SystemWorkflowExecutorImpl) TerminateDanglingWorkflow added in v1.0.0

func (impl *SystemWorkflowExecutorImpl) TerminateDanglingWorkflow(workflowGenerateName string, namespace string, clusterConfig *rest.Config) error

func (*SystemWorkflowExecutorImpl) TerminateWorkflow

func (impl *SystemWorkflowExecutorImpl) TerminateWorkflow(workflowName string, namespace string, clusterConfig *rest.Config) error

type WorkflowExecutor

type WorkflowExecutor interface {
	ExecuteWorkflow(workflowTemplate bean.WorkflowTemplate) (*unstructured.UnstructuredList, error)
	TerminateWorkflow(workflowName string, namespace string, clusterConfig *rest.Config) error
	GetWorkflow(workflowName string, namespace string, clusterConfig *rest.Config) (*unstructured.UnstructuredList, error)
	GetWorkflowStatus(workflowName string, namespace string, clusterConfig *rest.Config) (*types.WorkflowStatus, error)
	TerminateDanglingWorkflow(workflowGenerateName string, namespace string, clusterConfig *rest.Config) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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