k8wiz
Flux CD
Medium
Concepts

Which file in a Git repository tells source-controller to leave files out of the artifact it builds?

Select your answer:

Show answer and explanation

Answer: .sourceignore

Explanation

A .sourceignore file uses .gitignore syntax, and the GitRepository's spec.ignore field does the same from the cluster side. Leaving out CI workflows and docs matters when a Kustomization would otherwise try to apply every YAML file under its path.