Your repo, your workloads
Workloads on Kestrel deploy through ArgoCD: you commit manifests to a Git repo you control, and an ArgoCD Application keeps your namespaces in sync with it. With the recommended sync policy, kubectl changes to managed resources are reverted within seconds (kubectl on Kestrel).
RCS keeps platform configuration and tenant definitions in its own ubernetes-applications repo. You never commit there; ask RCS by ticket for changes such as a quota increase.
Before the first sync
Section titled “Before the first sync”- Create the destination namespace with
kubectl create namespace <tenant>-prod, or set theCreateNamespace=truesync option. Either way the name needs your<tenant>-prefix. - Create Applications in the ArgoCD UI. Click New App (walkthrough in Your first deployment), then fill in the form or use Edit as YAML and paste the YAML below. Commit the same YAML to your repo as the record of what you created. You can also
kubectl applyit, withmetadata.namespaceset to one of your namespaces instead ofargo-cd.
The canonical Application YAML
Section titled “The canonical Application YAML”apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata: name: <tenant>-my-service namespace: argo-cdspec: project: <tenant> # your AppProject, named after your tenant source: repoURL: https://git.computecanada.ca/<your-group>/<your-repo>.git targetRevision: main path: manifests/my-service destination: server: https://kubernetes.default.svc namespace: <tenant>-prod # must already exist syncPolicy: automated: prune: true selfHeal: true<tenant> is your tenant name: your RAP group name, lowercased (CCInternal-RAID becomes ccinternal-raid). The project field uses the lowercased name too. Destinations are limited to <tenant>-* namespaces.
Private repositories
Section titled “Private repositories”Add credentials in the ArgoCD UI under Settings → Repositories → Connect Repo, and select your project (<tenant>) so the credential is project-scoped. Use a read-only credential, such as a GitLab deploy token with read_repository or an SSH deploy key.
Repo layout
Section titled “Repo layout”One Application per workload
Section titled “One Application per workload”Directoryyour-repo/
Directorymanifests/
Directorymy-service/
- deployment.yaml
- service.yaml
- ingress.yaml
Each workload gets its own Application, created in the UI. Adding files under an existing Application’s path only needs a push.
App-of-apps
Section titled “App-of-apps”For several workloads, create one root Application in the UI whose path is apps/. It syncs the child Application manifests from Git, so adding a workload is just a commit. Because the root Application can only deploy into your tenant namespaces, every child must set metadata.namespace to one of them (not argo-cd):
apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata: name: my-service namespace: <tenant>-prod # a tenant namespace, not argo-cdspec: project: <tenant> source: repoURL: https://git.computecanada.ca/<your-group>/<your-repo>.git targetRevision: main path: manifests/my-service destination: server: https://kubernetes.default.svc namespace: <tenant>-prod syncPolicy: automated: prune: true selfHeal: trueSet the root Application’s destination namespace to the same tenant namespace. See the upstream app-of-apps pattern.
Recommended sync defaults
Section titled “Recommended sync defaults”| Field | Value | Effect |
|---|---|---|
automated.prune | true | Deleting a manifest from Git deletes the resource from the cluster. |
automated.selfHeal | true | Live changes are reverted within seconds. New commits deploy on the next Git poll; click Sync to deploy sooner. |
For how each kubectl verb interacts with selfHeal, and how to pause it, see kubectl on Kestrel.
Keep secrets out of Git in plaintext: commit Sealed Secrets instead.