KSail’s ArgoCD bootstrap creates a single Application CR that syncs manifests from a local OCI registry. ApplicationSet extends this by generating multiple Applications from a single template — useful for multi-environment deployments, multi-tenant clusters, and directory-based project structures.
[!NOTE]
The ApplicationSet controller ships with ArgoCD and is automatically available in every KSail ArgoCD cluster — no extra installation is needed.
The directory generator creates one Application per subdirectory in a given path. This is useful for managing multiple independent workloads from a monorepo layout.
This generates three Applications (frontend, backend, monitoring), each deployed to its own namespace.
[!TIP]
When using the local OCI registry, match the repoURL and targetRevision to what KSail configures in the bootstrap Application. You can inspect the bootstrap Application with:
The git generator can also use config.json files in each directory to pass parameters to the template. This enables per-application configuration without duplicating manifests.
KSail’s tenant management generates ArgoCD AppProject and Application resources per tenant. You can replace per-tenant Applications with a single ApplicationSet that auto-discovers tenant directories:
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: tenants
namespace: argocd
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
generators:
- git:
repoURL: oci://<registry>/<project>
revision: dev
directories:
- path: tenants/*
template:
metadata:
name: "tenant-{{.path.basename}}"
spec:
project: "{{.path.basename}}"
source:
repoURL: oci://<registry>/<project>
targetRevision: dev
path: "{{.path.path}}"
destination:
server: https://kubernetes.default.svc
namespace: "{{.path.basename}}"
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
[!IMPORTANT]
Each tenant’s AppProject must exist before the ApplicationSet creates the corresponding Application. Use ksail tenant create to scaffold the AppProject first, or include AppProject manifests in your source directory.
When SOPS is enabled (or auto-detected) and an Age key is available, KSail automatically:
Creates a sops-age Secret in the argocd namespace containing your Age private key
Installs a Config Management Plugin (CMP) sidecar on the ArgoCD repo-server that decrypts SOPS-encrypted manifests before rendering
Encrypted secrets in your source directory are decrypted transparently during sync — no manual plugin setup required. For key resolution details and all spec.cluster.sops options, see Secret Management.
When the ApplicationSet syncs the backend Application, the CMP sidecar detects the sops: metadata block and decrypts the file before applying it to the cluster.
Use ksail workload push and ksail workload reconcile to deploy ApplicationSet manifests — they flow through the same OCI push pipeline as regular manifests.
Combine with multi-environment workflows by using separate ksail.<env>.yaml configs and ApplicationSet generators. See Multi-Environment Workflows for the --config pattern.