CGOA practice question 13 of 15
You are working on a GitOps project and want to ensure that the configuration files are written in a standardized format. What is the recommended way to ensure this?
Full set: 60 questionsGitOps emphasises automated, repeatable workflows. The Linux Foundation’s “Introduction to GitOps” course and the CNCF GitOps Principles both state that configuration files should be statically validated and formatted by automated tooling (linters/formatters) as part of the CI pipeline. Linters provide consistent, objective checks and can be executed on every commit, guaranteeing that all YAML/JSON/Helm files comply with the agreed-upon style without relying on error-prone manual reviews. Therefore, using a linter tool is the recommended approach.
A. Peer reviews help code quality but cannot guarantee uniform formatting; humans are slower and inconsistent compared with automated linting.
B. Ignoring formatting violates GitOps best practices of consistency and continuous verification.
D. Manual per-file inspection is labour-intensive, scales poorly, and is still prone to human error; automation is explicitly recommended instead.
1. The Linux Foundation, “LFS169x: Introduction to GitOps”, Module 4 “Automation & Tooling”, slide 12: “Integrate linters/formatters into CI to enforce configuration standards automatically.”
2. CNCF GitOps Working Group, “GitOps Principles v1.0”, Principle 4 (Continuous Verification), ¶3: “Static analysis tools (linters, validators) SHOULD run on every pull request to guarantee declarative configuration correctness.”
3. Kubernetes Documentation, “Static Code Analysis of Kubernetes Manifests”, Section ‘Using kube-linter’, ¶1–2 (https://kubernetes.io/docs/tasks/). States use of linters to “enforce best-practice formatting and detect misconfigurations.”
4. MIT OpenCourseWare 6.005 “Software Construction”, Lecture 7 notes, p.3: “Automated linting enforces style and invariants more effectively than manual code review.”
Keep practicing
Take the free CGOA practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CGOA practice questions
- Question 1When are progressive delivery patterns useful in software development and deployment?
- Question 2You are deploying a new version of your application using the Blue-Green deployment patte…
- Question 3Which method(s) of accessing the Desired State store does GitOps support?
- Question 4In GitOps, how is the Desired State stored?
- Question 5In a GitOps-managed workflow, what is the correct way to initiate rollback?
- Question 6Which of these is an advantage of using a declarative configuration for your Desired Stat…
