Skip to content

ArgoCD ApplicationSets Quiz

This quiz tests your understanding of ArgoCD ApplicationSets for templated application generation.

  1. What is the primary purpose of an ApplicationSet?
    • A) To group existing Applications
    • B) To automatically generate multiple Applications from templates
    • C) To create application backups
    • D) To manage application secrets
Show Answer

Answer: B) To automatically generate multiple Applications from templates

Explanation: ApplicationSets use generators and templates to automatically create and manage multiple ArgoCD Applications. They're ideal for deploying applications across multiple clusters or environments.

  1. Which generator would you use to create Applications for each cluster registered in ArgoCD?
    • A) Git generator
    • B) List generator
    • C) Cluster generator
    • D) Matrix generator
Show Answer

Answer: C) Cluster generator

Explanation: The Cluster generator automatically generates Applications for each cluster registered in ArgoCD. It can use label selectors to target specific clusters.

  1. What does the Git directory generator do?
    • A) Creates Applications based on Git branches
    • B) Creates Applications for each directory in a specified path
    • C) Syncs Git credentials
    • D) Manages Git webhooks
Show Answer

Answer: B) Creates Applications for each directory in a specified path

Explanation: The Git directory generator scans a specified directory in a Git repository and creates an Application for each subdirectory found. This is useful for monorepo setups.

  1. How do you combine multiple generators in an ApplicationSet?
    • A) Using the Merge generator
    • B) Using the Matrix generator
    • C) Using the Combine generator
    • D) Both A and B
Show Answer

Answer: D) Both A and B

Explanation: The Matrix generator creates combinations (Cartesian product) of parameters from multiple generators. The Merge generator combines parameters from multiple generators, merging matching entries. Both can be used to combine generators.

  1. What is the purpose of the goTemplate field in ApplicationSet templates?
    • A) To enable Go programming
    • B) To use Go template syntax for more complex templating
    • C) To compile Go applications
    • D) To enable debugging
Show Answer

Answer: B) To use Go template syntax for more complex templating

Explanation: Setting goTemplate: true enables Go template syntax, which provides more powerful templating capabilities like conditionals, loops, and functions compared to the default simple variable substitution.

  1. Which generator would you use to create Applications based on pull requests?
    • A) Git generator
    • B) Pull Request generator
    • C) SCM Provider generator
    • D) Webhook generator
Show Answer

Answer: B) Pull Request generator

Explanation: The Pull Request generator creates Applications for each open pull request in a repository, enabling preview environments for code review. It supports GitHub, GitLab, Bitbucket, and Gitea.

  1. What happens by default when you delete an ApplicationSet?
    • A) Nothing, generated Applications remain
    • B) All generated Applications are deleted
    • C) Applications are orphaned
    • D) A backup is created
Show Answer

Answer: B) All generated Applications are deleted

Explanation: By default, ApplicationSets have a cascading delete policy, meaning when you delete an ApplicationSet, all Applications it generated will also be deleted. This can be changed using the preserveResourcesOnDeletion policy.

  1. How can you prevent an ApplicationSet from deleting generated Applications when the ApplicationSet is removed?
    • A) Set syncPolicy.preserveResourcesOnDeletion: true
    • B) Use the orphan finalizer
    • C) Set the deletion policy annotation
    • D) Remove the owner reference manually
Show Answer

Answer: A) Set syncPolicy.preserveResourcesOnDeletion: true

Explanation: Setting preserveResourcesOnDeletion: true in the ApplicationSet's syncPolicy ensures that generated Applications (and their deployed resources) are preserved when the ApplicationSet is deleted.