ReferenceKubernetes

rke2spray and GitOps Operations Reference

Look up the RKE2 cluster, Ansible lifecycle, GitOps handoff, applications, and verification contracts declared by the current code.

Updated Verified SourceEdit this page

Key facts

  • rke2spray owns hosts, RKE2, cluster-foundation add-ons, and the Argo CD bootstrap
  • The GitOps repository owns platform, data, observability, and storage resources after the root Application
  • Cluster-specific RKE2, CNI, topology, and network values are declared under inventory/<cluster>/
  • GitOps verifies 15 Argo CD Application resources including the root bootstrap, and 299Gi of application PVC requests
  • The NFS endpoint, external L4 load balancer, and absence of external backups define the current availability and recovery boundaries

Scope and authority

  • This page was verified on 2026-08-30 against the current main code in both repositories
    • jongminchung/rke2spray is the cluster source
    • The target repository's bootstrap/, apps/, and tests/ directories define the GitOps contract
    • When prose differs from executable code, inventory, Playbooks, manifests, and verification scripts are authoritative
InformationAuthoritative code
Cluster versions and topologyrke2spray/inventory/<cluster>/
Ansible public APIrke2spray/cluster.yml, root Playbooks, and Makefile
Kubespray compatibilityrke2spray/docs/kubespray-api-compatibility.yml
GitOps handoff gatesrke2spray/extra_playbooks/gitops_bootstrap.yml
Argo CD applicationsbootstrap/templates/applications.yaml
Workload declarationsapps/
Deployment completiontests/integration/verify.sh

Repository ownership

Resource or stateOwnerOwning code
Host preparation and system packagesrke2sprayroles/bootstrap-os, roles/system_packages
RKE2 servers, agents, and embedded etcdrke2sprayroles/kubernetes, roles/etcd
Cilium and the Gateway API foundationrke2sprayInventory and roles/network_plugin
cert-manager, trust-manager, and external-dnsrke2sprayroles/kubernetes-apps/rke2_native
NFS CSI and StorageClassesrke2sprayroles/kubernetes-apps/rke2_native
Argo CD installation and root Applicationrke2sprayroles/kubernetes-apps/argocd, extra_playbooks/gitops_bootstrap.yml
Namespaces, NetworkPolicies, and platform foundationGitOps repositoryapps/platform
PostgreSQL and poolersGitOps repositoryapps/data
ClickStack and OpenTelemetryGitOps repositoryapps/observability
SeaweedFS and its S3 routeGitOps repositoryapps/storage
Rancher and HyperDX public routesGitOps repositoryapps/platform-routes
  • Concurrent ownership of the same Kubernetes resource is not supported
    • An RKE2 manifest owner maps to /var/lib/rancher/rke2/server/manifests/<owner>
    • native-addons-handoff verifies owner, basename, and checksum during an ownership transfer
    • An ownership-only ledger entry transfers ownership without deleting the Kubernetes resource
    • A prune ledger entry is removable only with the exact confirmation value

rke2spray cluster declaration

Topology

ItemDeclaration variable or group
Inventory profileinventory/<cluster>/
RKE2 topologyrke2_topology_mode
Control planekube_control_plane inventory group
Workerskube_node inventory group
DatastoreEmbedded etcd or rke2_external_datastore
Bootstrap hostrke2_bootstrap_server
Failure-domain labelrke2_failure_domain_mode
Registration endpointrke2_registration_address

Versions and networking

ItemDeclaration variable
Kuberneteskube_version
RKE2rke2_version and checksum release lock
CNIkube_network_plugin, cilium_version
RKE2 Cilium chartrke2_cilium_chart_url
kube-proxykube_proxy_remove
Cilium kube-proxy replacementcilium_kube_proxy_replacement
Gateway APIgateway_api_enabled, gateway_api_channel
Gateway exposurecilium_gateway_exposure_mode
Gateway nodescilium_gateway_host_network_nodes
Pod CIDRkube_pods_subnet
Service CIDRkube_service_addresses
cert-managercert_manager_enabled, cert_manager_version
RKE2 ingress controllerrke2_ingress_controller

Storage and snapshots

ItemDeclaration variable
Storage profilerke2_storage_profile
NFS endpointrke2_nfs_server, rke2_nfs_share
NFS versionrke2_nfs_version
RWO contractrke2_storage_contract.durable_rwo
RWX contractrke2_storage_contract.shared_rwx
local-path provisionerlocal_path_provisioner_enabled
etcd snapshot schedulerke2_etcd_snapshot_schedule_cron
etcd snapshot retentionrke2_etcd_snapshot_retention
etcd snapshot compressionrke2_etcd_snapshot_compress
  • durable-rwo and shared-rwx express workload intent and currently share one NFS failure domain
  • Retain and onDelete: retain restrict PV deletion and do not provide NFS data backups

RKE2 native add-on profile

SourceFunction
external-dns.yamlManage the allowed public DNS records
nfs-csi.yamlManage NFS CSI controllers and node plugins
nfs-csi-pdb.yamlManage NFS CSI controller availability policy
reloader.yamlRoll out workloads after Secret or ConfigMap changes
trust-manager.yamlManage the cluster trust bundle

rke2spray operator commands

  • These targets are defined by the repository-root Makefile
TargetMain inputsBehavior
make checkDevelopment toolsRun lint, unit, contract, parity, and syntax checks
make inventory-graphINVENTORY, VAULT_PASSWORD_FILEPrint the resolved inventory graph
make inventory-vault-checkINVENTORY, VAULT_PASSWORD_FILECheck Vault inputs and file mode without SSH
make inventory-preflightInventory and environmentCheck live topology, ports, and storage prerequisites
make cluster-convergeInventory and VaultRun cluster.yml
make cluster-healthInventory and VaultInspect API, Node, etcd, and service health
make cluster-scale NODE=<node>Worker nameReconcile one selected worker with scale.yml
make cluster-add-server NODE=<node>Server nameReconcile one server with cluster.yml --limit
make cluster-upgradeUpdated version lockCordon, drain, change release, and verify readiness
make cluster-snapshot SNAPSHOT=<name>Snapshot nameCreate a manual embedded-etcd snapshot
make cluster-recover SERVER=<server> SNAPSHOT=<path>Server and absolute pathRestore the control plane after checksum validation
make cluster-remove-node NODE=<node>Node and LB-removal confirmationRemove LB, etcd, Kubernetes Node, and RKE2 state
make cluster-rotate-certificatesInventory and VaultRotate RKE2 certificates
make gateway-accessInventory and VaultInspect and verify the Gateway access contract
make gitops-bootstrapGitOps inputs and VaultApply Argo CD and the root Application after readiness gates
make gitops-integrationGITOPS_INTEGRATION_SCRIPTRun a GitOps integration script on the bootstrap server
  • cluster-reset, cluster-recover, cluster-remove-node, add-on pruning, and failure probes can destroy or interrupt state
    • Each target requires a bounded target, confirmation value, or opt-in environment variable
    • Server removal requires prior removal from external LB backends on ports 80, 443, 6443, and 9345
    • Off-host snapshot transfer and retention are outside the rke2spray contract

GitOps handoff contract

Argo CD declaration

ItemDeclared value or variable
Argo CD3.5.1
Argo CD Helm chart10.4.0
helm-secrets4.7.7
SOPS3.13.3
Repositoryargocd_gitops_repo_url
Revisionargocd_gitops_revision
Destinationargocd_gitops_destination_server
Initial-install deferralargocd_defer_install_until_platform_ready
Root apply during normal cluster runargocd_apply_root_application

Bootstrap gates

  • extra_playbooks/gitops_bootstrap.yml requires all of the following conditions

    • RKE2 API /readyz returns ok
    • Every RKE2 Node reports Ready
    • Cilium and CoreDNS rollouts are complete
    • Gateway API CRDs report Established and the Cilium GatewayClass reports Accepted
    • cert-manager and NFS CSI rollouts are complete
    • NFS migration-gate status, database status, StorageClass UID, and cluster UID match the live cluster
  • Secrets move from Ansible Vault into Argo CD Secrets

    • Read-only SSH private key for the Git repository
    • GitHub known-hosts value
    • SOPS age private key
    • Neither repository stores plaintext private keys

GitOps applications

Application inventory

ApplicationWaveSourcePrune
bootstraprootbootstrap/ charttrue
platform-40apps/platformtrue
cloudnative-pg-30chart 0.29.0true
clickstack-operators-30chart 1.1.0true
clickstack-20chart 3.1.1 and SOPS valuesfalse
postgresql-10apps/data/postgresqlfalse
rancher-10chart 2.14.3true
seaweedfs-database-9apps/storage/seaweedfs-databasefalse
seaweedfs-foundation-8apps/storage/seaweedfs-foundationtrue
seaweedfs-7chart 4.42.0false
seaweedfs-route-6apps/storage/seaweedfs-routetrue
otel-agent0OTel chart 0.170.0true
otel-cluster0OTel chart 0.170.0true
otel-gateway0OTel chart 0.170.0false
platform-routes1apps/platform-routestrue
  • Applications with pruning disabled do not use a finalizer
  • Applications with pruning enabled use resources-finalizer.argocd.argoproj.io
  • Every Application uses automated sync and selfHeal: true

Workload topology

WorkloadCurrent topologyPersistent allocation
PostgreSQL3 instances10Gi per instance
PgBouncer RW and RO2 instances eachNone
ClickHouse1 shard × 3 replicas60Gi per replica
Keeper3 replicas2Gi per replica
MongoDB3 replicas5Gi data and 1Gi log
HyperDX2 replicasNone
ClickStack ingestion2 replicasNone
OTel AgentDaemonSet on workersNone
OTel Cluster Collector1 replicaNone
OTel Gateway2 replicas1Gi queue per replica
SeaweedFS Master3 replicas1Gi per replica
SeaweedFS Volume3 replicas20Gi per replica
SeaweedFS Filer2 replicasCNPG metadata
SeaweedFS S32 replicasNone
  • Application PVC requests total 299Gi and the deployment ceiling is 400Gi
  • PostgreSQL, ClickHouse, Keeper, MongoDB, and SeaweedFS Master and Volume replicas spread across three distinct workers

Services and public routes

ClusterIP services

PurposeEndpoint
OTLP gRPCotel-gateway.observability.svc.cluster.local:4317
OTLP HTTPotel-gateway.observability.svc.cluster.local:4318
PostgreSQL RWpostgresql-pooler-rw.postgresql.svc.cluster.local:5432
PostgreSQL ROpostgresql-pooler-ro.postgresql.svc.cluster.local:5432
  • Data services in observability, postgresql, and seaweedfs may not use NodePort or LoadBalancer

Gateway API routes

HostnameBackendListener
<rancher-hostname>cattle-system/rancher:80apps-https
<observability-hostname>observability/clickstack-app:3000apps-https
<s3-hostname>seaweedfs/seaweedfs-s3:8333s3-root-https
<s3-wildcard-hostname>seaweedfs/seaweedfs-s3:8333s3-https

Verification contracts

rke2spray static verification

CommandCoverage
make checkYAML and Ansible lint, unit, role interface, release lock, lifecycle, topology, and syntax
make parityPublic API parity with the pinned Kubespray baseline
make inventory-vault-check.vault_pass mode and inventory Vault values

GitOps static verification

CommandCoverage
tests/static/validate.shPolicy, YAML and shell lint, gitleaks, and SOPS encryption
tests/static/render.shBootstrap chart, upstream charts, and Kustomize rendering
kubeconformKubernetes and extracted CRD schemas

Live-cluster verification

  • tests/integration/verify.sh defines the following completion state

    • All 15 Argo CD Applications report Synced and Healthy
    • Stateful and stateless Application prune and finalizer policies match
    • Three-replica workloads are Ready on three distinct workers
    • Services excluded from public exposure remain ClusterIP
    • No Pod is Pending and every Node root filesystem remains below 60% usage
    • durable-rwo uses nfs.csi.k8s.io, Immediate, Retain, and onDelete=retain
    • All target PVCs use durable-rwo and total 299Gi
    • Gateway HTTPRoute resources report Accepted=True and ResolvedRefs=True
  • Verification that writes or deletes state requires an explicit opt-in variable

    • The NFS performance gate requires RUN_NFS_PERFORMANCE_GATE=true
    • The database gate requires RUN_NFS_DATABASE_GATE=true
    • Workload disruption checks require RUN_DISRUPTIVE_TESTS=true

Limits and recovery boundaries

BoundaryCurrent contract
Single-node failureControl-plane and major stateful-workload replicas provide tolerance
External LB failureInfrastructure failure domain outside both repositories
NFS endpoint failureCan affect every NFS-backed stateful workload
PVC deletionRetain and stateful prune: false restrict automatic deletion
Complete NFS lossNot recoverable from repository assets alone
PostgreSQL backup and PITROut of scope
Existing PVC and legacy workloadsAutomatic migration is out of scope
Off-host etcd snapshot retentionOutside the rke2spray contract
Argo CD SSO and operator RBAC hardeningOut of scope

Documentation update contract

  • Update this page's updatedAt and verifiedAt when any of the following code changes
    • Version, topology, network, or storage inputs in inventory/<cluster>
    • Public operator targets or required variables in Makefile
    • Readiness gates in gitops_bootstrap.yml
    • Applications, waves, chart versions, or prune policies in bootstrap/templates/applications.yaml
    • Replicas, PVCs, Services, or public routes under apps/
    • Completion assertions in tests/integration/verify.sh