92 lines
2.5 KiB
YAML
92 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: notify-push
|
|
namespace: nextcloud
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: notify-push
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: notify-push
|
|
spec:
|
|
initContainers:
|
|
- name: fetch-notify-push
|
|
image: alpine:3.21
|
|
command: ["sh","-lc"]
|
|
args:
|
|
- |
|
|
set -eu
|
|
apk add --no-cache curl
|
|
VER="1.3.0"
|
|
URL="https://github.com/nextcloud/notify_push/releases/download/v${VER}/notify_push-aarch64-unknown-linux-musl"
|
|
echo "Downloading $URL"
|
|
curl -fsSL "$URL" -o /shared/notify_push
|
|
chmod +x /shared/notify_push
|
|
/shared/notify_push --help | head -n 5
|
|
volumeMounts:
|
|
- name: shared
|
|
mountPath: /shared
|
|
|
|
containers:
|
|
- name: notify-push
|
|
image: alpine:3.21
|
|
command: ["/shared/notify_push"]
|
|
args:
|
|
- "--port"
|
|
- "7867"
|
|
ports:
|
|
- name: http
|
|
containerPort: 7867
|
|
env:
|
|
# Nextcloud
|
|
- name: NEXTCLOUD_URL
|
|
value: "https://nextcloud.immich-ad.ovh"
|
|
envFrom:
|
|
- secretRef:
|
|
name: notify-push-db
|
|
- secretRef:
|
|
name: notify-push-redis
|
|
# # Redis
|
|
# - name: REDIS_HOST
|
|
# value: "nextcloud-redis-master"
|
|
# - name: REDIS_PASSWORD
|
|
# valueFrom:
|
|
# secretKeyRef:
|
|
# name: nextcloud-redis
|
|
# key: redis-password
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 256Mi
|
|
# readinessProbe:
|
|
# httpGet:
|
|
# path: /
|
|
# port: 7867
|
|
# initialDelaySeconds: 10
|
|
# periodSeconds: 10
|
|
# livenessProbe:
|
|
# httpGet:
|
|
# path: /
|
|
# port: 7867
|
|
# initialDelaySeconds: 30
|
|
# periodSeconds: 20
|
|
volumeMounts:
|
|
- name: shared
|
|
mountPath: /shared
|
|
- name: nextcloud-data
|
|
mountPath: /nextcloud
|
|
readOnly: true
|
|
|
|
volumes:
|
|
- name: shared
|
|
emptyDir: {}
|
|
- name: nextcloud-data
|
|
persistentVolumeClaim:
|
|
claimName: pvc-nextcloud-data |