Files
homelab/k8s/apps/videohosting/templates/sts-abs.yaml
T
2024-07-17 16:02:18 -04:00

91 lines
2.1 KiB
YAML

{{ if .Values.abs.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: abs-envs
data:
PUID: "1000"
PGID: "1000"
TZ: {{ .Values.global.timezone }}
---
kind: Service
apiVersion: v1
metadata:
name: abs
spec:
selector:
app: abs
type: ClusterIP
ports:
- port: 80
targetPort: 80
name: "http"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: abs
spec:
selector:
matchLabels:
app: abs
replicas: 1
revisionHistoryLimit: 2
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
app: abs
spec:
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: homelab/capacity
operator: In
values:
- high
containers:
- name: abs
image: "{{ .Values.abs.repo }}:{{ .Values.abs.tag }}"
imagePullPolicy: "Always"
envFrom:
- configMapRef:
name: abs-envs
ports:
- containerPort: 80
name: http
resources:
{{ .Values.abs.resources | toYaml | nindent 12 }}
volumeMounts:
- name: nfs-k3s
mountPath: /config
subPath: custom-app/abs/config
- name: nfs-k3s
mountPath: /metadata
subPath: custom-app/abs/metadata
- name: torrents
mountPath: /books
subPath: books
startupProbe:
tcpSocket:
port: http
initialDelaySeconds: 10
failureThreshold: 10
timeoutSeconds: 30
volumes:
- name: torrents
nfs:
server: "{{ $.Values.global.nfs.server }}"
path: "{{ $.Values.global.nfs.additionalShares.torrents }}"
readOnly: true
- name: nfs-k3s
nfs:
server: "{{ $.Values.global.nfs.server }}"
path: "{{ $.Values.global.nfs.share }}"
{{ end }}