Skip to content

Commit e17fec4

Browse files
committed
delete delay duration update
1 parent 56d412e commit e17fec4

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

pkg/pipeline/bean/WorkflowTemplate.go

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,26 @@ type WorkflowTemplate struct {
2828
WorkflowId int
2929
WorkflowRunnerId int
3030
v1.PodSpec
31-
ConfigMaps []bean.ConfigSecretMap
32-
Secrets []bean.ConfigSecretMap
33-
TTLValue *int32
34-
WorkflowRequestJson string
35-
WorkflowNamePrefix string
36-
WfControllerInstanceID string
37-
ClusterConfig *rest.Config
38-
Namespace string
39-
ArchiveLogs bool
40-
BlobStorageConfigured bool
41-
BlobStorageS3Config *blob_storage.BlobStorageS3Config
42-
CloudProvider blob_storage.BlobStorageType
43-
AzureBlobConfig *blob_storage.AzureBlobConfig
44-
GcpBlobConfig *blob_storage.GcpBlobConfig
45-
CloudStorageKey string
46-
PrePostDeploySteps []*StepObject
47-
RefPlugins []*RefPluginObject
48-
TerminationGracePeriod int
49-
WorkflowType string
31+
ConfigMaps []bean.ConfigSecretMap
32+
Secrets []bean.ConfigSecretMap
33+
TTLValue *int32
34+
WorkflowRequestJson string
35+
WorkflowNamePrefix string
36+
WfControllerInstanceID string
37+
ClusterConfig *rest.Config
38+
Namespace string
39+
ArchiveLogs bool
40+
BlobStorageConfigured bool
41+
BlobStorageS3Config *blob_storage.BlobStorageS3Config
42+
CloudProvider blob_storage.BlobStorageType
43+
AzureBlobConfig *blob_storage.AzureBlobConfig
44+
GcpBlobConfig *blob_storage.GcpBlobConfig
45+
CloudStorageKey string
46+
PrePostDeploySteps []*StepObject
47+
RefPlugins []*RefPluginObject
48+
TerminationGracePeriod int
49+
WorkflowType string
50+
PodGCDeleteDelayDuration string
5051
}
5152

5253
const (

pkg/pipeline/executors/ArgoWorkflowExecutor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ func (impl *ArgoWorkflowExecutorImpl) ExecuteWorkflow(workflowTemplate bean.Work
153153
Templates: templates,
154154
Volumes: workflowTemplate.Volumes,
155155
PodGC: &v1alpha1.PodGC{
156-
Strategy: v1alpha1.PodGCOnWorkflowCompletion,
156+
Strategy: v1alpha1.PodGCOnWorkflowCompletion,
157+
DeleteDelayDuration: workflowTemplate.PodGCDeleteDelayDuration,
157158
},
158159
},
159160
}

pkg/pipeline/types/CiCdConfig.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ type CiCdConfig struct {
9797
MaxCiWorkflowRetries int `env:"MAX_CI_WORKFLOW_RETRIES" envDefault:"0" description:"Maximum time CI-workflow create pod if it fails to complete"`
9898
NatsServerHost string `env:"NATS_SERVER_HOST" envDefault:"nats://devtron-nats.devtroncd:4222"`
9999
ImageScanMaxRetries int `env:"IMAGE_SCAN_MAX_RETRIES" envDefault:"3" description:"Max retry count for image-scanning"`
100-
ImageScanRetryDelay int `env:"IMAGE_SCAN_RETRY_DELAY" envDefault:"5" description:"Delay for the image-scaning to start"`
100+
ImageScanRetryDelay int `env:"IMAGE_SCAN_RETRY_DELAY" envDefault:"5" description:"Delay for the image-scaning to start"`
101101
ShowDockerBuildCmdInLogs bool `env:"SHOW_DOCKER_BUILD_ARGS" envDefault:"true" description:"To enable showing the args passed for CI in build logs"`
102102
IgnoreCmCsInCiJob bool `env:"IGNORE_CM_CS_IN_CI_JOB" envDefault:"false" description:"Ignore CM/CS in CI-pipeline as Job"`
103103
//Deprecated: use WorkflowCacheConfig instead
@@ -150,8 +150,9 @@ type CiCdConfig struct {
150150
AzureGatewayConnectionInsecure bool `env:"AZURE_GATEWAY_CONNECTION_INSECURE" envDefault:"true" description:"Azure gateway connection allows insecure if true"`
151151
AzureBlobContainerCiLog string `env:"AZURE_BLOB_CONTAINER_CI_LOG" description:"Log bucket for azure blob storage"`
152152
AzureBlobContainerCiCache string `env:"AZURE_BLOB_CONTAINER_CI_CACHE" description:"Cache bucket name for azure blob storage"`
153-
AzureAccountKey string `env:"AZURE_ACCOUNT_KEY" description:"If blob storage is bieng used of azure then pass the secret key to access the bucket"`
153+
AzureAccountKey string `env:"AZURE_ACCOUNT_KEY" description:"If blob storage is being used of azure then pass the secret key to access the bucket"`
154154
BuildLogTTLValue int `env:"BUILD_LOG_TTL_VALUE_IN_SECS" envDefault:"3600" description:"This is the time that the pods of ci/pre-cd/post-cd live after completion state."`
155+
PodGCDeleteDelayDuration string `env:"POD_GC_DELETE_DELAY_DURATION" envDefault:"150s" description:"This is the time that pods will be delayed for deletion on workflow completion"`
155156
BaseLogLocationPath string `env:"BASE_LOG_LOCATION_PATH" envDefault:"/home/devtron/" description:"Used to store, download logs of ci workflow, artifact"`
156157
InAppLoggingEnabled bool `env:"IN_APP_LOGGING_ENABLED" envDefault:"false" description:"Used in case of argo workflow is enabled. If enabled logs push will be managed by us, else will be managed by argo workflow."`
157158
BuildxProvenanceMode string `env:"BUILDX_PROVENANCE_MODE" envDefault:"" description:"provinance is set to true by default by docker. this will add some build related data in generated build manifest.it also adds some unknown:unknown key:value pair which may not be compatible by some container registries. with buildx k8s driver , provinenance=true is causing issue when push manifest to quay registry, so setting it to false"` // provenance is set to false if this flag is not set

pkg/pipeline/types/Workflow.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ func (workflowRequest *WorkflowRequest) GetWorkflowTemplate(workflowJson []byte,
199199
workflowTemplate.WorkflowRunnerId = workflowRequest.WorkflowRunnerId
200200
workflowTemplate.PrePostDeploySteps = workflowRequest.PrePostDeploySteps
201201
}
202+
workflowTemplate.PodGCDeleteDelayDuration = config.PodGCDeleteDelayDuration
202203
return workflowTemplate
203204
}
204205

0 commit comments

Comments
 (0)