Deploy opencode server to K3s via MetalLB and GitOps workflow #53
Labels
No labels
Monitoring
automation
bug
duplicate
feature
forgejo
help wanted
invalid
k3s
keycloak
ldap
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lab/homelab#53
Loading…
Add table
Add a link
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?
Deploy the remote OpenCode server to K3s as raw manifests plus the standard
Forgejo GitOps workflow. Requires the image from the container-image issue.
Design summary
Decisions already made:
Caddy route, no Authelia, no WAN redirect.
for an agentic tool holding credentials.
private repo).
Tasks
k3s-ha-cluster/opencode/namespace.yaml— namespaceopencodek3s-ha-cluster/opencode/secret.yaml— stringData:OPENCODE_SERVER_PASSWORD,OPENCODE_SERVER_USERNAME=opencode,GIT_TOKEN(Forgejo credential forlabwith repo write onlab/homelab)k3s-ha-cluster/opencode/pvc.yaml— Longhorn PVCopencode-data,10Gi, ReadWriteOnce
k3s-ha-cluster/opencode/service.yaml— LoadBalancer,loadBalancerIP: 192.168.0.225, port 4096k3s-ha-cluster/opencode/deployment.yaml:Verify node image-pull path for the private registry: confirm
/etc/rancher/k3s/registries.yamlon workers already authenticates togit.yukselcloud.com(the forgejo-runner image comes from there), elseadd
imagePullSecrets..forgejo/workflows/deploy-opencode.yaml— standard template:paths: k3s-ha-cluster/opencode/**, stepkubectl -n opencode apply -f k3s-ha-cluster/opencode/. Keepdocker/free of YAML so a plain dir apply stays safe.Acceptance criteria
192.168.0.225curl -u opencode:<pw> http://192.168.0.225:4096/global/healthreturnshealthy: truekubectl -n opencode rollout restart deploy/opencodekeeps prior sessionsand cloned repos (PVC persistence works)
Depends on #52.