Skip to content

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.

  • Create the destination namespace with kubectl create namespace <tenant>-prod, or set the CreateNamespace=true sync 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 apply it, with metadata.namespace set to one of your namespaces instead of argo-cd.
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: <tenant>-my-service
namespace: argo-cd
spec:
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.

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.

  • 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.

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):

apps/my-service.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-service
namespace: <tenant>-prod # a tenant namespace, not argo-cd
spec:
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: true

Set the root Application’s destination namespace to the same tenant namespace. See the upstream app-of-apps pattern.

FieldValueEffect
automated.prunetrueDeleting a manifest from Git deletes the resource from the cluster.
automated.selfHealtrueLive 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.