k8wiz
Flux CD
Hard
Troubleshooting

A GitRepository has no ref field, and the repository's default branch is main. What does Flux check out?

Select your answer:

Show answer and explanation

Answer: The master branch, the default when no ref is set

Explanation

When spec.ref is empty, source-controller uses a branch named master. If the repository only has main, the GitRepository fails until you set ref.branch: main. flux bootstrap sets the branch for you, so this mostly catches hand-written GitRepository objects.