Compare source code or dry runs across branches and environments.
Changes are reviewed to avoid misconfigurations, yet most Git providers only show you the difference between your source code. Small deviations between assumed and actual output of Helm or Kustomize are a common root cause of security incidents.
Alternatively, use compare to understand differences between environments or as a GitOps time machine during incidents to troubleshoot what changed from the last stable point in time.
Compare resources from scratch by going to the compare activity in the IDE's sidebar. You will have to configure both resource sets.
You can select your current workspace (i.e. the current branch with all its changes) or a clean git commit from any branch. Continue by choosing files or Helm / Kustomize Dry Run with its desired Values file / Overlay. You can refresh or clear the resource set by clicking on the icons in the selector.
The share button facilitates collaboration by having a URL that applies the same resource sets.
A blue tag will appear between two resources when there is a difference. Click it to view a diff editor which highlights the changes. Afterwards the back button in the header brings you back to the list of comparisons.
The name will be greyed out when the resource does not exist in a resource set. Click the name of the existing resource to inspect the content in an editor.
Compare During PR Reviews
You can conveniently compare changes while reviewing a PR through our GitHub integration. A Bot will augment your PR with a comment that adds quicklinks to prefilled comparisons. Use it to avoid surprises by reviewing the configuration that will actually be deployed.
When the list of comparisons becomes long, you will find that it's handy to apply a filter or search the resource name. You can also change how comparisons appear in your list:
View allshows a union of resources. All resources from both left and right columns will appear.
Only matchingshows an intersection of the resources. Only resources that exist in both columns will appear.
Only non-matchingshows different resources. Resources that do not exist in either of the columns will appear.
View left joinwill show all resources from the left column, but only matching resources in the right column.
View right joinwill show all resources from the right column, but only matching resources in the left column.
Override Default Namespace
When deploying you can often set the name space at the last moment, compare that with a Dry Run and you will find a mismatch in the namespace which is set to 'default'. You can override the default namespace within the compare header.