Skip to main content

How to Investigate Divergence Errors

The divergence pipelines alert us if the state of the cluster does not match the source code in our git repositories.

Usually, the pipeline failure will include the terraform plan output that explains exactly what has diverged.

Reproduce the plan

To run the same terraform plan command as the pipeline does:

  • Ensure you have the following environment variables set:
  • Start in a working copy of the cloud-platform-infrastructure repo
  • cd into the directory matching the pipeline which is failing:
Pipeline Directory
divergence-kops terraform/cloud-platform
divergence-k8s-components terraform/cloud-platform-components
divergence-eks terraform/cloud-platform-eks
divergence-eks-components terraform/cloud-platform-eks/components
divergence-networking terraform/cloud-platform-network
  • Check you’re using the correct terraform workspace (e.g. terraform workspace select live-1)
  • Check you’re targeting the correct kubernetes cluster, by running kubectl cluster-info
  • Run the terraform plan
terraform init
terraform plan

You should see the same differences as reported in the divergence pipeline.

This page was last reviewed on 11 May 2021. It needs to be reviewed again on 11 August 2021 by the page owner #cloud-platform .
This page was set to be reviewed before 11 August 2021 by the page owner #cloud-platform. This might mean the content is out of date.