Files
argocd-apps/argocd/projects/platform.yaml
T
unkinben ee76ec199b feat(kanidm): deploy Kanidm 1.10.3 with 2-replica replication
## Summary

- Deploys Kanidm 1.10.3 (ghcr.io/kanidm/server:1.10.3) as a 2-replica
  StatefulSet with built-in replication enabled
- Domain: auth.unkin.net (primary WebAuthn origin); au.auth.unkin.net
  is an additional hostname for this au-syd1 instance
- TLS: cert-manager Certificate (vault-issuer) covering auth.unkin.net,
  au.auth.unkin.net, kanidm.k8s.syd1.au.unkin.net, and internal
  headless pod DNS names — Kanidm terminates TLS itself (passthrough)
- Gateway: TLS passthrough on port 443 via TLSRoute; HTTP on port 80
  redirects to HTTPS; external-dns creates kanidm.k8s.syd1.au.unkin.net
  (not used in server.toml; canonical origin is auth.unkin.net only)
- Replication: init container generates per-pod server.toml with the
  correct repl:// origin (kanidm-{N}.kanidm-headless.kanidm.svc);
  populate kanidm-repl-peers ConfigMap post-deployment after running
  `kanidmd show-replication-certificate` on each pod
- Storage: 10Gi cephrbd-fast-delete PVC per pod via volumeClaimTemplates
- Security: runAsUser/runAsGroup 1000, runAsNonRoot, no privilege
  escalation, allowPrivilegeEscalation=false
- ArgoCD: platform ApplicationSet and Project updated for kanidm namespace

## Requires

- PR benvin/kanidm-artifactapi (add ^kanidm/ to ghcr immutable patterns)
  to be merged first so artifactapi can cache ghcr.io/kanidm/server

## Post-deployment steps

1. Wait for both pods to reach Running state
2. Exchange replication certificates between pods:
   kubectl exec -n kanidm kanidm-0 -- kanidmd show-replication-certificate
   kubectl exec -n kanidm kanidm-1 -- kanidmd show-replication-certificate
3. Edit kanidm-repl-peers ConfigMap with both nodes' certs
   (see template in configmap.yaml comments)
4. kubectl rollout restart statefulset/kanidm -n kanidm

## Test plan

- [x] Sandbox tested in sandbox-kanidm: all 11 resources server dry-run OK
- [ ] After merge: ArgoCD syncs kanidm namespace
- [ ] Verify auth.unkin.net and au.auth.unkin.net reachable via Gateway
- [ ] Verify kanidm.k8s.syd1.au.unkin.net DNS record created by external-dns
- [ ] Complete replication cert exchange and verify replication active
2026-05-24 19:42:32 +10:00

76 lines
2.4 KiB
YAML

---
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: platform
namespace: argocd
spec:
description: Platform infrastructure and core services
sourceRepos:
- https://git.unkin.net/unkin/argocd-apps
- https://artifactapi.k8s.syd1.au.unkin.net/api/v1/virtual/helm
- https://purelb.github.io/purelb/charts
- oci://gcr.io/k8s-staging-nfd/charts
- oci://ghcr.io/woodpecker-ci/helm/woodpecker
destinations:
- namespace: '*-system'
server: https://kubernetes.default.svc
- namespace: 'artifactapi'
server: https://kubernetes.default.svc
- namespace: 'cert-manager'
server: https://kubernetes.default.svc
- namespace: 'certificates'
server: https://kubernetes.default.svc
- namespace: 'consul'
server: https://kubernetes.default.svc
- namespace: 'externaldns'
server: https://kubernetes.default.svc
- namespace: 'jfrog'
server: https://kubernetes.default.svc
- namespace: 'kanidm'
server: https://kubernetes.default.svc
- namespace: 'node-feature-discovery'
server: https://kubernetes.default.svc
- namespace: 'purelb'
server: https://kubernetes.default.svc
- namespace: 'puppet'
server: https://kubernetes.default.svc
- namespace: 'reposync'
server: https://kubernetes.default.svc
- namespace: 'vault'
server: https://kubernetes.default.svc
- namespace: 'woodpecker'
server: https://kubernetes.default.svc
clusterResourceWhitelist:
- group: ''
kind: Namespace
- group: 'rbac.authorization.k8s.io'
kind: ClusterRole
- group: 'rbac.authorization.k8s.io'
kind: ClusterRoleBinding
- group: 'apiextensions.k8s.io'
kind: CustomResourceDefinition
- group: 'admissionregistration.k8s.io'
kind: MutatingWebhookConfiguration
- group: 'admissionregistration.k8s.io'
kind: ValidatingWebhookConfiguration
- group: 'scheduling.k8s.io'
kind: PriorityClass
- group: 'purelb.io'
kind: '*'
- group: 'nfd.k8s-sigs.io'
kind: NodeFeatureRule
- group: 'deviceplugin.intel.com'
kind: '*'
- group: 'cert-manager.io'
kind: Certificate
- group: 'cert-manager.io'
kind: Issuer
- group: 'gateway.networking.k8s.io'
kind: GatewayClass
- group: 'networking.k8s.io'
kind: IngressClass
namespaceResourceWhitelist:
- group: '*'
kind: '*'