Skip to content

Keptn non-blocking deployment functionality

Keptn provides an option to disable the default deployment blocking functionality when pre-deployment tasks or evaluations (on KeptnApp or KeptnWorkload level) fail. By populating a KeptnConfig resource and setting the .spec.blockDeployment parameter to false, the blocking behavior for Keptn is disabled and therefore all applications are deployed to the cluster even if the pre-deployment tasks or evaluations fail.

This behavior is valuable if you want to execute a dry-run of the tasks/evaluations for the application but have your application deployed to the cluster regardless of the results of the pre-checks.

If the checks of the application fail, the state of the deployment phase is marked as Warning and you are can inspect which of the checks has failed.

apiVersion: lifecycle.keptn.sh/v1
kind: KeptnAppVersion
metadata:
  name: podtato-head-0.1.0-6b86b273
spec:
  appName: podtato-head
  preDeploymentTasks:
    - failing-task
  revision: 1
  version: 0.1.0
  workloads:
    - name: podtato-head-entry
      version: 0.1.0
status:
  currentPhase: Completed
  postDeploymentEvaluationStatus: Succeeded
  postDeploymentStatus: Succeeded
  preDeploymentEvaluationStatus: Succeeded
  preDeploymentStatus: Warning
  preDeploymentTaskStatus:
    - definitionName: failing-task
      status: Failed
  promotionStatus: Succeeded
  status: Succeeded
  workloadOverallStatus: Succeeded
  workloadStatus:
    - status: Succeeded
      workload:
        name: podtato-head-entry
        version: 0.1.0
---
apiVersion: lifecycle.keptn.sh/v1
kind: KeptnWorkloadVersion
metadata:
  generation: 1
  name: podtato-head-podtato-head-entry-0.1.0
spec:
  app: podtato-head
  version: 0.1.0
  workloadName: podtato-head-podtato-head-entry
status:
  currentPhase: Completed
  deploymentStatus: Succeeded
  postDeploymentEvaluationStatus: Succeeded
  postDeploymentStatus: Warning
  postDeploymentTaskStatus:
    - definitionName: failing-task
      status: Failed
  preDeploymentEvaluationStatus: Succeeded
  preDeploymentStatus: Warning
  preDeploymentTaskStatus:
    - definitionName: failing-task
      status: Failed
  status: Succeeded

Additionally, you are still able to inspect the traces of your application deployment. The failed checks are marked and visible in the traces.

non-blocking-deployment-trace

Comments