Deploy kuberex on saraksh via Flux HelmRelease #8
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#9 End-to-end check from my devices
mikluko/kuberex
#3 Exposure: joining the tailnet
mikluko/kuberex
#4 Pod shape: namespace, pool, sandbox, egress
mikluko/kuberex
#6 OpenBao: identity agent-rex
mikluko/kuberex
#10 Prototype: startup install through a shared overlay
mikluko/kuberex
#12 Helm chart for kuberex
mikluko/kuberex
Reference
mikluko/kuberex#8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Map: #1
Question
Deploy kuberex in
saraksh/kubethrough Flux: a HelmRelease of the kuberex OCI chart in namespaceagents, ServiceAccountrex, pinned tobulgakovwith tolerations forsarak.sh/baremetalandsarak.sh/workstation, hostPath/srv/rexat/var/lib/rex, egress policy from the pod-shape ticket, and an ExternalSecret for the Tailscale join key (kv/k8s/saraksh/agents/rex-tailscale).Open here: how
/srv/rexgets created with uid/gid 999 onbulgakov. Steps for me: mint a one-time pre-authorized Tailscale key, put it in OpenBao, disable key expiry forkuberexafter it enrolls. ConfirmTS_CONTROL_URLreaches tsnet when set. Resolved when the pod is Ready andkuberexis on the tailnet.From the overlay prototype (#10): the pod needs
appArmorProfile: UnconfinedbesideshostUsers: falseandCAP_SYS_ADMIN; overlays useuserxattr. Open here: whether hostPath/srv/rexworks under the user namespace (idmapped mount onbulgakov's filesystem), and its ownership against the image's fixedrexuid.kuberex-tawexists via Flux for trying it.Exposure decided (#3):
--tailscalewith--tailscale-hostname ${TS_HOSTNAME:-kuberex},--tailscale-auth-key-file $TS_AUTHKEY_FILEfrom Secretrex-tailscale(ExternalSecret, OpenBaokv/k8s/agents/rex-tailscale),TS_CONTROL_URLpassed through when set. Steps for me here: mint a one-time pre-authorized key, put it in OpenBao, and disable key expiry forkuberexafter it enrolls. ConfirmTS_CONTROL_URLreaches tsnet.Flux manifests for Rex in saraksh/kubeto Deploy kuberex on saraksh via Flux HelmReleaseChart decided (Helm chart for kuberex):
oci://sarak.sh/mikluko/charts/kuberex,0.x. The HelmRelease here setsstateVolume.hostPath(/srv/rex),tailscale.authKey.existingSecret: rex-tailscale,serviceAccount.name: rex,networkPolicy.enabled: true, plusnodeSelector,tolerationsandresourcesfrom the pod-shape ticket.Decided here:
/srv/rexis a datasetrpool/state/rexonbulgakov, like/srv/jellyfinand/srv/buildkit: encrypted with the node state, mounted byzfs-unlock-statebeforek0sworker, owned999:999(kubelet applies nofsGroupto a hostPath). The HelmRelease mounts it ashostPathtypeDirectory, so an unmounted or missing dataset fails the pod instead of writing into the root filesystem.Manifests drafted and validated (
kubeconform -strict, chart 0.4.0 rendered with the values): namespaceagentswith itsopenbaoSecretStore, Flux Kustomizationkuberex,k8s/apps/kuberexwith OCIRepositorykuberex(0.x), HelmReleaserex, ExternalSecretrex-tailscalefromk8s/saraksh/agents/rex-tailscale(keyauthkey). The emptykuberex-tawnamespace goes.TS_CONTROL_URLis wired through the chart and the entrypoint; unset for Tailscale proper.Waiting on: the dataset on
bulgakov, the join key in OpenBao, then the push tosaraksh/kube.Answer
Deployed by saraksh/kube@2e79b1e: HelmRelease
rex(chartkuberex0.4.0) inagents, pod Running onbulgakov, ExternalSecretrex-tailscalesynced,kuberexon the tailnet at 100.116.215.51./srv/rexisrpool/state/rex, owned999:999, mode 700, inbulgakov.setup.shandzfs-unlock-state; hostPath typeDirectory.kv/k8s/saraksh/agents/rex-tailscale, keyauthkey.0.xhourly, and the chart is released with the image at its version, so every kuberex release rolls out by itself; no image automation or bump PR.kuberex-tawremoved;/srv/rexlisted in docs/backups.md as not backed up.Left for me: disable key expiry for
kuberexin the Tailscale admin.