Add repertory-api backend
This commit is contained in:
parent
d4f904f799
commit
bfde75396d
8 changed files with 199 additions and 1 deletions
96
charts/repertory-api/templates/repertory-api.yaml
Normal file
96
charts/repertory-api/templates/repertory-api.yaml
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: repertory-api
|
||||
namespace: repertory-api
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: repertory-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: repertory-api
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: forgejo-registry
|
||||
containers:
|
||||
- name: repertory-api
|
||||
image: "{{ .Values.registry.host }}/{{ .Values.registry.user }}/repertory-api:latest"
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: repertory-api-secrets
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 5000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 5000
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: repertory-api
|
||||
namespace: repertory-api
|
||||
spec:
|
||||
selector:
|
||||
app: repertory-api
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 5000
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: repertory-api
|
||||
namespace: repertory-api
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- repertory-api.{{ .Values.domain }}
|
||||
secretName: repertory-api-tls
|
||||
rules:
|
||||
- host: repertory-api.{{ .Values.domain }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: repertory-api
|
||||
port:
|
||||
number: 80
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: repertory-api-migrate
|
||||
namespace: repertory-api
|
||||
annotations:
|
||||
argocd.argoproj.io/sync-wave: "1"
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 120
|
||||
template:
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
imagePullSecrets:
|
||||
- name: forgejo-registry
|
||||
containers:
|
||||
- name: migrate
|
||||
image: "{{ .Values.registry.host }}/{{ .Values.registry.user }}/repertory-api:latest"
|
||||
command: ["uv", "run", "alembic", "upgrade", "head"]
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: repertory-api-secrets
|
||||
Loading…
Add table
Add a link
Reference in a new issue