render-diff

command module
v0.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2025 License: MPL-2.0 Imports: 1 Imported by: 0

README

Render-Diff

render-diff provides a fast and local preview of rendered Kubernetes manifest changes.

It compares your locally rendered Helm chart or Kustomize overlay against the rendered output from a target Git ref (for example, main or develop), and prints a colored diff of the resulting YAML manifests.

It will default to a simple text based diff, but can use the dyff rendering engine with the --semantic flag.

Requirements

  • make
  • git
  • Go 1.24 or newer

Installation

You can install render-diff directly using go install:

go install github.com/mozilla/mozcloud/tools/render-diff@latest

Flags

Flag Shorthand Description Default
--path -p (Required) Relative path to the chart or kustomization directory. .
--ref -r Target Git ref to compare against. main
--values -f "Path to an additional values file (can be specified multiple times). The chart's default values.yaml is always loaded first" []
--release-name "Helm release name to use when rendering templates. Defaults to chart name" ""
--update -u Update helm chart dependencies. Required if lockfile does not match dependencies false
--semantic -s Enable semantic diffing of k8s manifests (using dyff) false
--no-color Output in plain style without any highlighting false
--debug -d Enable verbose logging for debugging false
--version Prints the application version.
--help -h Show help information.

Examples

Run this tool from within your Git repository. For Helm charts, values.yaml is automatically included.

Checking a Helm Chart diff against another target ref and piping to less
  • render-diff --path ./examples/helm/helloWorld --values values-dev.yaml --ref development | less -R
Checking Kustomize diff against the default (main) branch
  • render-diff -p ./examples/kustomize/helloWorld
Checking Kustomize diff against a tag
  • render-diff -p ./examples/kustomize/helloWorld -r tags/v0.5.1

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd implements the command-line interface for render-diff using the Cobra library.
Package cmd implements the command-line interface for render-diff using the Cobra library.
internal
diff
Package diff provides functions for comparing rendered manifests It includes our simple CreateDiff functions as well as a semantic diff using the homeport/dyff module for more advanced diff features
Package diff provides functions for comparing rendered manifests It includes our simple CreateDiff functions as well as a semantic diff using the homeport/dyff module for more advanced diff features
git
Package git provides functions for setting up a temporary git work tree
Package git provides functions for setting up a temporary git work tree
helm
Package helm provides functions to render helm charts, load multiple values files provided as a cli flag and check if the provided path is a helm chart
Package helm provides functions to render helm charts, load multiple values files provided as a cli flag and check if the provided path is a helm chart
kustomize
Package kustomize provides functions to build kustomizations, and check if the provided path contains kustomizations
Package kustomize provides functions to build kustomizations, and check if the provided path contains kustomizations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL