Chapter 11
- Correct answer: (B) False. GateKeeper is a tool originally built by Microsoft on top of OPA, but they are not the same thing.
- Correct answer: (D) Rego is saved as a
ConstraintTemplate
, which is aCustomResourceDefenition
defined by theGateKeeper
project. - Correct answer: (B) Using an automated framework built directly into OPA. OPA's automated testing framework provides a powerful way to pre-validate Rego before deploying to GateKeeper.
- Correct answer: (A) You don't need to as Rego will identify iterative steps. When using loops in Rego, use either the underscore to resolve all values or a placeholder (such as I or j) for array indexes. Rego will fill the counter by iterating over the array.
- Correct answer: (C) Add trace functions to your code and run the
opa test
command with-v
to see execution traces.opa
will tell you where the problem is. Use its built-in tools. - Correct answer: (B) False. Constraint templates can include parameters...