From 112cf5742d65ac41ffd94680d4dce349626010a4 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 14 Apr 2026 15:32:21 +0300 Subject: Add goprecords service deployment for f3s. Introduce Docker build/push workflow, Helm manifests, and ArgoCD application wiring for goprecords so the cluster can deploy the new daemon API service from the private registry. Made-with: Cursor --- f3s/goprecords/helm-chart/Chart.yaml | 5 ++ .../helm-chart/templates/deployment.yaml | 57 ++++++++++++++++++++++ f3s/goprecords/helm-chart/templates/ingress.yaml | 45 +++++++++++++++++ .../helm-chart/templates/persistent-volumes.yaml | 27 ++++++++++ f3s/goprecords/helm-chart/templates/service.yaml | 15 ++++++ 5 files changed, 149 insertions(+) create mode 100644 f3s/goprecords/helm-chart/Chart.yaml create mode 100644 f3s/goprecords/helm-chart/templates/deployment.yaml create mode 100644 f3s/goprecords/helm-chart/templates/ingress.yaml create mode 100644 f3s/goprecords/helm-chart/templates/persistent-volumes.yaml create mode 100644 f3s/goprecords/helm-chart/templates/service.yaml (limited to 'f3s/goprecords/helm-chart') diff --git a/f3s/goprecords/helm-chart/Chart.yaml b/f3s/goprecords/helm-chart/Chart.yaml new file mode 100644 index 0000000..d0c4329 --- /dev/null +++ b/f3s/goprecords/helm-chart/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: goprecords +description: A Helm chart for deploying goprecords daemon API. +version: 0.1.0 +appVersion: "0.3.0" diff --git a/f3s/goprecords/helm-chart/templates/deployment.yaml b/f3s/goprecords/helm-chart/templates/deployment.yaml new file mode 100644 index 0000000..2d460d4 --- /dev/null +++ b/f3s/goprecords/helm-chart/templates/deployment.yaml @@ -0,0 +1,57 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: goprecords + namespace: services +spec: + replicas: 1 + selector: + matchLabels: + app: goprecords + template: + metadata: + labels: + app: goprecords + spec: + containers: + - name: goprecords + image: registry.lan.buetow.org:30001/goprecords:0.3.0 + imagePullPolicy: Always + args: + - -daemon + - -listen=:8080 + - -stats-dir=/data/stats + ports: + - containerPort: 8080 + name: http + protocol: TCP + readinessProbe: + httpGet: + path: /readyz + port: 8080 + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: /livez + port: 8080 + initialDelaySeconds: 15 + periodSeconds: 20 + resources: + requests: + memory: "64Mi" + cpu: "50m" + limits: + memory: "256Mi" + cpu: "500m" + securityContext: + allowPrivilegeEscalation: false + runAsUser: 0 + runAsGroup: 0 + volumeMounts: + - name: goprecords-stats + mountPath: /data/stats + volumes: + - name: goprecords-stats + persistentVolumeClaim: + claimName: goprecords-stats-pvc diff --git a/f3s/goprecords/helm-chart/templates/ingress.yaml b/f3s/goprecords/helm-chart/templates/ingress.yaml new file mode 100644 index 0000000..45aecd1 --- /dev/null +++ b/f3s/goprecords/helm-chart/templates/ingress.yaml @@ -0,0 +1,45 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: goprecords-ingress + namespace: services + annotations: + spec.ingressClassName: traefik + traefik.ingress.kubernetes.io/router.entrypoints: web +spec: + rules: + - host: goprecords.f3s.buetow.org + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: goprecords-service + port: + number: 80 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: goprecords-ingress-lan + namespace: services + annotations: + spec.ingressClassName: traefik + traefik.ingress.kubernetes.io/router.entrypoints: web,websecure +spec: + tls: + - hosts: + - goprecords.f3s.lan.buetow.org + secretName: f3s-lan-tls + rules: + - host: goprecords.f3s.lan.buetow.org + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: goprecords-service + port: + number: 80 diff --git a/f3s/goprecords/helm-chart/templates/persistent-volumes.yaml b/f3s/goprecords/helm-chart/templates/persistent-volumes.yaml new file mode 100644 index 0000000..3559be4 --- /dev/null +++ b/f3s/goprecords/helm-chart/templates/persistent-volumes.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: goprecords-stats-pv +spec: + capacity: + storage: 5Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: /data/nfs/k3svolumes/goprecords/stats + type: DirectoryOrCreate +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: goprecords-stats-pvc + namespace: services +spec: + storageClassName: "" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi diff --git a/f3s/goprecords/helm-chart/templates/service.yaml b/f3s/goprecords/helm-chart/templates/service.yaml new file mode 100644 index 0000000..9266d46 --- /dev/null +++ b/f3s/goprecords/helm-chart/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: goprecords + name: goprecords-service + namespace: services +spec: + ports: + - name: http + port: 80 + protocol: TCP + targetPort: 8080 + selector: + app: goprecords -- cgit v1.2.3