commit caf7959ba9068cc1059ee4ec618b83afde8edc07 Author: Mira Date: Wed Apr 9 00:28:07 2025 -0400 initial commit diff --git a/adminer.yaml b/adminer.yaml new file mode 100644 index 0000000..f562ace --- /dev/null +++ b/adminer.yaml @@ -0,0 +1,53 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: adminer + name: adminer +spec: + replicas: 1 + selector: + matchLabels: + app: adminer + template: + metadata: + labels: + app: adminer + spec: + containers: + - image: adminer:latest + name: adminer + ports: + - containerPort: 8080 +--- +apiVersion: v1 +kind: Service +metadata: + name: adminer-svc +spec: + type: ClusterIP + selector: + app: adminer + ports: + - port: 8080 + targetPort: 8080 +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: adminer-http + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: web +spec: + rules: + - host: adminer.lipotropin.lan + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: adminer-svc + port: + number: 8080 diff --git a/ntfy.docker.yaml b/ntfy.docker.yaml new file mode 100644 index 0000000..24bf0d9 --- /dev/null +++ b/ntfy.docker.yaml @@ -0,0 +1,26 @@ +services: + ntfy: + image: binwiederhier/ntfy + container_name: ntfy + command: + - serve + environment: + - TZ=America/New_York # optional: set desired timezone + # user: UID:GID # optional: replace with your own user/group or uid/gid + # volumes: + # - $DATA_PATH/ntfy:/var/cache/ntfy + # - $CONF_DIR/ntfy:/etc/ntfy + ports: + - 80:80 + healthcheck: # optional: remember to adapt the host:port to your environment + test: + [ + "CMD-SHELL", + "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1", + ] + interval: 60s + timeout: 10s + retries: 3 + start_period: 40s + restart: unless-stopped + diff --git a/ntfy.yaml b/ntfy.yaml new file mode 100644 index 0000000..d87eff4 --- /dev/null +++ b/ntfy.yaml @@ -0,0 +1,120 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app: ntfy + name: ntfy +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: ntfy + template: + metadata: + labels: + app: ntfy + spec: + containers: + - args: + - serve + env: + - name: TZ + value: America/New_York + image: binwiederhier/ntfy + livenessProbe: + exec: + command: + - wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '"healthy"\s*:\s*true' || exit 1 + failureThreshold: 3 + initialDelaySeconds: 40 + periodSeconds: 60 + timeoutSeconds: 10 + name: ntfy + ports: + - containerPort: 80 + protocol: TCP + volumes: + - name: smb-storage + PersistentVolumeClaim: + claimName: smb-pvc + restartPolicy: Always +--- +apiVersion: v1 +kind: Service +metadata: + labels: + name: ntfy-svc +spec: + ports: + - port: 80 + targetPort: 80 + selector: + app: ntfy +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: adminer-http + annotations: + traefik.ingress.kubernetes.io/router.entrypoints: web +spec: + rules: + - host: ntfy.lipotropin.lan + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: adminer-svc + port: + number: 80 +--- +# TODO: make this use samba +apiVersion: v1 +kind: PersistentVolume +metadata: + name: ntfy-config-pv +spec: + capacity: + storage: 100Gi + volumeMode: Filesystem + accessModes: + - ReadWriteMultiple + persistentVolumeReclaimPolicy: Delete + storageClassName: local-storage + local: + path: /mnt/raid # TODO: make this point to correct dir + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - lipotropin +--- +# TODO: make this use samba +apiVersion: v1 +kind: PersistentVolume +metadata: + name: ntfy-cache-pv +spec: + capacity: + storage: 100Gi + volumeMode: Filesystem + accessModes: + - ReadWriteMultiple + persistentVolumeReclaimPolicy: Delete + storageClassName: local-storage + local: + path: /mnt/raid # TODO: make this point to correct dir + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - lipotropin