CAPA

Free CAPA practice questions

10 questions from our CAPA practice tests, each with the correct answer and a written explanation. Read them with the answers shown, or switch to quiz mode and answer first.

Back to the CAPA practice exams

Question 1 of 10, Argo Workflows

In a DAG template, a task named notify-failure must run only when the task build ends in the Failed phase. Which configuration on notify-failure achieves this?

  1. Adependencies: [build], combined with continueOn: failed set on the notify-failure task itself
  2. Bdepends: "build.Failed", so it is scheduled only when build finishes in the Failed phase Correct answer
  3. Cdepends: "build.Errored", because a non-zero container exit code is reported as Errored
  4. Dwhen: "{{tasks.build.status}} == Failed" without declaring any dependency on the build task

Answer and explanation: The enhanced depends syntax lets a task depend on a specific result of another task, such as build.Failed. A plain dependencies list requires build to succeed, and continueOn belongs on the task that may fail, not the dependent. A when clause without a dependency is evaluated before build finishes. A non-zero exit of the main container is reported as Failed; Errored is used for system-level problems.

Question 2 of 10, Argo Workflows

A container template writes a release version to /tmp/version.txt, and a later step needs that value as an input parameter. What should the first template declare?

  1. AAn output artifact with path /tmp/version.txt, read later through the steps.<name>.outputs.result variable
  2. BAn output parameter with valueFrom.path: /tmp/version.txt, read later through steps.<name>.outputs.parameters Correct answer
  3. CNothing extra; outputs.result is filled automatically with the contents of files written under /tmp
  4. DAn emptyDir volume mounted at /tmp in both templates so the second pod can read the same file

Answer and explanation: Output parameters with valueFrom.path read a small value from a file in the container and expose it to later steps. An artifact is stored in the artifact repository and is not exposed through outputs.result. An emptyDir lives inside one pod, so a different step pod cannot see it. outputs.result holds standard output of script and container templates, not file contents.

Question 3 of 10, Argo Workflows

Many workflows in a namespace should store their output artifacts in the same S3 bucket without repeating the bucket and credential details in every workflow. What is the recommended approach?

  1. AMount the bucket into every step pod with a CSI driver and write each output file to the mount path
  2. BDefine a default artifact repository in the namespace's artifact-repositories ConfigMap or in the controller config Correct answer
  3. CSet an AWS_BUCKET environment variable on the workflow controller Deployment so it applies everywhere
  4. DAdd the bucket details to every WorkflowTemplate under spec.arguments.artifacts as a shared default value

Answer and explanation: Argo Workflows supports a default artifact repository configured in the workflow-controller ConfigMap or per namespace in an artifact-repositories ConfigMap, so templates only declare keys or paths. Arguments do not define repositories, a CSI mount bypasses artifact tracking, and the controller does not read a bucket from an environment variable.

Question 4 of 10, Argo Workflows

A platform team wants a library of reusable templates that workflows in every namespace of the cluster can reference. Which resource should they create?

  1. AA ConfigMap in kube-system labelled so that the workflow controller loads it as a template library
  2. BA CronWorkflow with suspend: true that is used only as a container for the shared templates
  3. CA WorkflowTemplate in the argo namespace, which becomes visible to every namespace automatically
  4. DA ClusterWorkflowTemplate, referenced from workflows through templateRef with clusterScope: true Correct answer

Answer and explanation: ClusterWorkflowTemplates are cluster-scoped and are referenced with templateRef plus clusterScope: true (or workflowTemplateRef with clusterScope). A WorkflowTemplate is namespaced and only usable from its own namespace. A suspended CronWorkflow is not a template library, and the controller does not load templates from labelled ConfigMaps.

Question 5 of 10, Argo CD

An Argo CD Application shows Sync Status Synced but Health Status Degraded. What does this combination indicate?

  1. AGit and the cluster differ, and automated sync is paused until the drift is resolved
  2. BThe live resources match Git, but at least one of them reports an unhealthy state Correct answer
  3. CThe last sync operation failed, so Argo CD rolled resources back to the previous revision
  4. DThe repo-server could not render manifests, so the comparison uses a cached revision

Answer and explanation: Sync status compares desired state in Git with live state, while health status reflects whether the resources are working, for example a Deployment that cannot become available. Synced means there is no drift. A failed sync shows in the operation state rather than as an automatic rollback, and a manifest generation failure shows as a ComparisonError with Unknown sync status.

Question 6 of 10, Argo CD

Teams want to create Argo CD Application resources in their own namespaces rather than in the argocd namespace. What must be configured?

  1. ARun a separate Argo CD instance per namespace, since Applications must sit beside it
  2. BLabel every team namespace with argocd.argoproj.io/managed-by set to argocd
  3. CAdd the namespaces to application.namespaces and to the AppProject's sourceNamespaces Correct answer
  4. DSet spec.project to the namespace name so the controller discovers the Application

Answer and explanation: The Applications in any namespace feature requires listing allowed namespaces in the application.namespaces parameter of the server and controller and permitting them in the AppProject sourceNamespaces field. Separate instances are unnecessary, the managed-by label is used by the Argo CD Operator for target namespaces, and the project name is unrelated to discovery.

Question 7 of 10, Argo CD

A team installs a public Helm chart from a chart repository but wants to keep its values files in their own Git repository, without wrapping the chart in an umbrella chart. Which Application feature supports this?

  1. AAn ApplicationSet Git files generator that merges the values file into the chart's default values
  2. Bspec.sources with the chart as one source and the Git repo as a ref source used through $values in valueFiles Correct answer
  3. CA Kustomize overlay that uses helmCharts to download the chart and merge in the values file from Git
  4. Dspec.source.helm.valuesObject that points at the Git repository path where the values file is stored

Answer and explanation: Multiple sources let one source be a Helm chart and another a Git repository with ref: values, so valueFiles can use $values/path. valuesObject holds inline values only, the Kustomize helmCharts approach effectively wraps the chart and needs extra build options, and the Git files generator produces template parameters rather than merging values files.

Question 8 of 10, Argo Rollouts

A metric must be measured five times at one-minute intervals, and the analysis must fail if more than one measurement fails. Which settings meet this?

  1. Acount: 5, initialDelay: 1m, consecutiveErrorLimit: 1
  2. Bcount: 5, interval: 1m, failureLimit: 1 Correct answer
  3. Ccount: 1, interval: 5m, failureLimit: 1
  4. Dcount: 5, interval: 1m, failureLimit: 2

Answer and explanation: count sets the number of measurements, interval the spacing, and the metric fails once failed measurements exceed failureLimit, so a limit of 1 fails on the second failure. A limit of 2 tolerates two failures, count 1 takes a single measurement, and initialDelay plus consecutiveErrorLimit concern start delay and errors rather than failures.

Question 9 of 10, Argo Rollouts

A canary update gets stuck because new pods never become ready. The team wants the Rollout to abort automatically after 10 minutes without progress. Which configuration does this?

  1. AabortScaleDownDelaySeconds: 600 so that the canary is aborted after 10 minutes
  2. BA pause step of 10 minutes followed by an analysis step that checks readiness
  3. CprogressDeadlineSeconds: 600 together with progressDeadlineAbort: true Correct answer
  4. DprogressDeadlineSeconds: 600 on its own, since the deadline aborts by default

Answer and explanation: Exceeding progressDeadlineSeconds marks the Rollout as degraded, and progressDeadlineAbort: true additionally aborts the update. Without that flag the update is not aborted, a pause plus analysis does not detect stalled pods directly, and abortScaleDownDelaySeconds only delays scale-down after an abort.

Question 10 of 10, Argo Events

A Sensor's Argo Workflow trigger fails with a forbidden error when it tries to create Workflows. What is the most likely fix?

  1. AGrant the EventSource's service account permission to create workflows in that namespace
  2. BAdd the Sensor to the allowed clients list of argo-server so that it may submit workflows there
  3. CGrant the Sensor's service account a Role allowing it to create workflows in that namespace Correct answer
  4. DSwitch the EventBus to JetStream so triggers run with the controller's broader permissions

Answer and explanation: Triggers execute in the Sensor pod using the service account set in the Sensor's template, which needs RBAC permission for the resources it creates. The EventSource never creates workflows, the trigger talks to the Kubernetes API rather than argo-server, and the EventBus type does not affect permissions.