Add k3s Helm charts for Opus API and TeX Live API
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: opus-orchestrator
|
||||
description: Opus Orchestrator AI - Book Generation System
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "latest"
|
||||
@@ -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" }}
|
||||
@@ -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 }}
|
||||
@@ -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
|
||||
```
|
||||
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: texlive-api
|
||||
description: TeX Live API for LaTeX compilation
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "latest"
|
||||
@@ -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" }}
|
||||
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user