From 1b94a71f02268a3fdff0566d3315555052770978 Mon Sep 17 00:00:00 2001 From: Solaria Date: Sat, 14 Mar 2026 23:32:38 +0000 Subject: [PATCH] Add k3s Helm charts for Opus API and TeX Live API --- deployments/k3s/opus-orchestrator/Chart.yaml | 6 ++ .../templates/deployment.yaml | 56 +++++++++++++++++ .../opus-orchestrator/templates/ingress.yaml | 22 +++++++ deployments/k3s/opus-orchestrator/values.yaml | 61 +++++++++++++++++++ deployments/k3s/texlive-api/Chart.yaml | 6 ++ .../k3s/texlive-api/templates/deployment.yaml | 36 +++++++++++ deployments/k3s/texlive-api/values.yaml | 28 +++++++++ 7 files changed, 215 insertions(+) create mode 100644 deployments/k3s/opus-orchestrator/Chart.yaml create mode 100644 deployments/k3s/opus-orchestrator/templates/deployment.yaml create mode 100644 deployments/k3s/opus-orchestrator/templates/ingress.yaml create mode 100644 deployments/k3s/opus-orchestrator/values.yaml create mode 100644 deployments/k3s/texlive-api/Chart.yaml create mode 100644 deployments/k3s/texlive-api/templates/deployment.yaml create mode 100644 deployments/k3s/texlive-api/values.yaml diff --git a/deployments/k3s/opus-orchestrator/Chart.yaml b/deployments/k3s/opus-orchestrator/Chart.yaml new file mode 100644 index 0000000..1645db4 --- /dev/null +++ b/deployments/k3s/opus-orchestrator/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: opus-orchestrator +description: Opus Orchestrator AI - Book Generation System +type: application +version: 0.1.0 +appVersion: "latest" diff --git a/deployments/k3s/opus-orchestrator/templates/deployment.yaml b/deployments/k3s/opus-orchestrator/templates/deployment.yaml new file mode 100644 index 0000000..189d1b1 --- /dev/null +++ b/deployments/k3s/opus-orchestrator/templates/deployment.yaml @@ -0,0 +1,56 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + labels: + app: opus-orchestrator +spec: + replicas: {{ .Values.api.replicaCount | default 1 }} + selector: + matchLabels: + app: opus-orchestrator + template: + metadata: + labels: + app: opus-orchestrator + spec: + containers: + - name: opus + image: "{{ .Values.api.image.repository }}:{{ .Values.api.image.tag | default "latest" }}" + imagePullPolicy: Always + ports: + - containerPort: {{ .Values.api.service.port | default 8000 }} + env: + - name: MINIMAX_API_KEY + value: {{ .Values.api.env.MINIMAX_API_KEY | quote }} + - name: GITHUB_TOKEN + value: {{ .Values.api.env.GITHUB_TOKEN | quote }} + - name: LOG_LEVEL + value: {{ .Values.api.env.LOG_LEVEL | default "INFO" | quote }} + resources: + {{- toYaml .Values.resources | nindent 10 }} + livenessProbe: + httpGet: + path: /health + port: {{ .Values.api.service.port | default 8000 }} + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /health + port: {{ .Values.api.service.port | default 8000 }} + initialDelaySeconds: 10 + periodSeconds: 5 +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-service +spec: + selector: + app: opus-orchestrator + ports: + - protocol: TCP + port: {{ .Values.api.service.port | default 8000 }} + targetPort: {{ .Values.api.service.port | default 8000 }} + type: {{ .Values.api.service.type | default "ClusterIP" }} diff --git a/deployments/k3s/opus-orchestrator/templates/ingress.yaml b/deployments/k3s/opus-orchestrator/templates/ingress.yaml new file mode 100644 index 0000000..2f00fdd --- /dev/null +++ b/deployments/k3s/opus-orchestrator/templates/ingress.yaml @@ -0,0 +1,22 @@ +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ .Release.Name }}-ingress + annotations: + kubernetes.io/ingress.class: {{ .Values.ingress.className | default "nginx" }} +spec: + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + - path: {{ .path | default "/" }} + pathType: {{ .pathType | default "Prefix" }} + backend: + service: + name: {{ $.Release.Name }}-service + port: + number: {{ $.Values.api.service.port | default 8000 }} + {{- end }} +{{- end }} diff --git a/deployments/k3s/opus-orchestrator/values.yaml b/deployments/k3s/opus-orchestrator/values.yaml new file mode 100644 index 0000000..80015d7 --- /dev/null +++ b/deployments/k3s/opus-orchestrator/values.yaml @@ -0,0 +1,61 @@ +# Opus Orchestrator API +# k3s Helm Chart + +## Install + +```bash +# Add helm repo +helm repo add opus-orchestrator https://mrhavens.github.io/opus-orchestrator + +# Install +helm install opus opus-orchestrator/opus-orchestrator \ + --set api.minimaxApiKey=your_key \ + --set api.githubToken=your_token +``` + +## Values + +```yaml +api: + replicaCount: 1 + + image: + repository: ghcr.io/mrhavens/opus-orchestrator + tag: latest + + service: + type: ClusterIP + port: 8000 + + env: + MINIMAX_API_KEY: "" + GITHUB_TOKEN: "" + LOG_LEVEL: "INFO" + +resources: + limits: + cpu: 2000m + memory: 2Gi + requests: + cpu: 500m + memory: 512Mi + +ingress: + enabled: true + className: nginx + hosts: + - host: opus.internal + paths: + - path: / + pathType: Prefix +``` + +## Deploy + +```bash +# Create namespace +kubectl create namespace opus + +# Deploy +kubectl apply -f values.yaml -n opus +``` diff --git a/deployments/k3s/texlive-api/Chart.yaml b/deployments/k3s/texlive-api/Chart.yaml new file mode 100644 index 0000000..61d220d --- /dev/null +++ b/deployments/k3s/texlive-api/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: texlive-api +description: TeX Live API for LaTeX compilation +type: application +version: 0.1.0 +appVersion: "latest" diff --git a/deployments/k3s/texlive-api/templates/deployment.yaml b/deployments/k3s/texlive-api/templates/deployment.yaml new file mode 100644 index 0000000..0648ec1 --- /dev/null +++ b/deployments/k3s/texlive-api/templates/deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + labels: + app: texlive-api +spec: + replicas: {{ .Values.replicas | default 1 }} + selector: + matchLabels: + app: texlive-api + template: + metadata: + labels: + app: texlive-api + spec: + containers: + - name: texlive + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}" + ports: + - containerPort: {{ .Values.service.port | default 8080 }} + resources: + {{- toYaml .Values.resources | nindent 10 }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-service +spec: + selector: + app: texlive-api + ports: + - protocol: TCP + port: {{ .Values.service.port | default 8080 }} + targetPort: {{ .Values.service.port | default 8080 }} + type: {{ .Values.service.type | default "ClusterIP" }} diff --git a/deployments/k3s/texlive-api/values.yaml b/deployments/k3s/texlive-api/values.yaml new file mode 100644 index 0000000..c756205 --- /dev/null +++ b/deployments/k3s/texlive-api/values.yaml @@ -0,0 +1,28 @@ +# TeX Live API +# k3s Helm Chart + +## Install + +```bash +helm install texlive deployments/k3s/texlive-api/ +``` + +## Values + +```yaml +image: + repository: alex11br/texlive-api + tag: latest + +service: + type: ClusterIP + port: 8080 + +resources: + limits: + cpu: 4000m + memory: 8Gi + requests: + cpu: 2000m + memory: 4Gi +```