Skip to content

Commit e359b40

Browse files
authored
Merge pull request #6522 from devtron-labs/ci-danging-pod
fix: CI dangling pod after aborting build
2 parents aebe5d3 + cd0ee66 commit e359b40

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pkg/pipeline/executors/ArgoWorkflowExecutor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ func (impl *ArgoWorkflowExecutorImpl) ExecuteWorkflow(workflowTemplate bean.Work
152152
},
153153
Templates: templates,
154154
Volumes: workflowTemplate.Volumes,
155+
PodGC: &v1alpha1.PodGC{
156+
Strategy: v1alpha1.PodGCOnWorkflowCompletion,
157+
},
155158
},
156159
}
157160
)

pkg/pipeline/types/CiCdConfig.go

Lines changed: 2 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,7 +150,7 @@ 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."`
155155
BaseLogLocationPath string `env:"BASE_LOG_LOCATION_PATH" envDefault:"/home/devtron/" description:"Used to store, download logs of ci workflow, artifact"`
156156
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."`

0 commit comments

Comments
 (0)