This commit is contained in:
Tomás Limpinho
2026-01-21 16:51:47 +00:00
parent f7c345e505
commit 9e703cf9fd
12 changed files with 204 additions and 4 deletions

View File

@ -36,4 +36,5 @@
- bazarr
- libreTranslate
- lingarr
- cripto
- cripto
- anchorr

View File

@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: anchorr
namespace: stack-arr
spec:
replicas: 1
selector:
matchLabels:
app: anchorr
template:
metadata:
labels:
app: anchorr
spec:
imagePullSecrets:
- name: regcred
containers:
- name: anchorr
image: nairdah/anchorr:latest
securityContext:
capabilities:
add:
- NET_ADMIN
ports:
- containerPort: 8282
name: webhook
env:
- name: PUID
value: "1013"
- name: PGID
value: "1013"
- name: TZ
value: 'Etc/UTC'
- name: NODE_ENV
value: 'production'
- name: WEBHOOK_PORT
value: '8282'
volumeMounts:
- name: config
mountPath: /usr/src/app/config
volumes:
- name: config
persistentVolumeClaim:
claimName: anchorr-config-pvc

View File

@ -0,0 +1,11 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: anchorr-nfs-csi
namespace: stack-arr
provisioner: nfs.csi.k8s.io
parameters:
server: 192.168.1.22
share: /mnt/fenix-main-nas-pool-0/data/k8s-Volumes/k8s-cluster-iac-deployed/stack-arr/anchorr
allowVolumeExpansion: true
reclaimPolicy: Retain

View File

@ -0,0 +1,29 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: anchorr-config-pv
namespace: stack-arr
spec:
capacity:
storage: 2Gi
storageClassName: anchorr-nfs-csi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
nfs:
server: 192.168.1.22
path: /mnt/fenix-main-nas-pool-0/data/k8s-Volumes/k8s-cluster-iac-deployed/stack-arr/anchorr/config
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: anchorr-config-pvc
namespace: stack-arr
spec:
storageClassName: anchorr-nfs-csi
accessModes:
- ReadWriteOnce
volumeName: anchorr-config-pv
resources:
requests:
storage: 2Gi

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: anchorr-service
namespace: stack-arr
spec:
ports:
- port: 8282
targetPort: 8282
selector:
app: anchorr
type: ClusterIP

View File

@ -0,0 +1,51 @@
- name: Remover o diretório /tmp/stack-arr/anchorr/kubernetes-files
ansible.builtin.file:
path: /tmp/stack-arr/anchorr/kubernetes-files
state: absent
- name: Criar diretório temporário no remoto
file:
path: /tmp/stack-arr/anchorr/kubernetes-files
state: directory
mode: '0755'
- name: Copy file with owner and permissions
ansible.builtin.copy:
src: ../files
dest: /tmp/stack-arr/anchorr/kubernetes-files
owner: fenix
group: root
mode: '0644'
#- name: Obter várias notas do Bitwarden
# shell: |
# echo "unlock"
# BW_SESSION=$(bw unlock {{ bw_password }} --raw)
# echo "get item"
# bw get item "{{ item.id }}" --session $BW_SESSION | jq -r '.notes' > {{ item.dest }}
# loop:
# - { id: "iac.ansible.stackarr.anchorr.secret", dest: "/tmp/stack-arr/anchorr/kubernetes-files/files/anchorr-secret.yaml" }
# args:
# executable: /bin/bash
# environment:
# BW_PASSWORD: "{{ BW_PASSWORD }}"
- name: Listar conteúdo do diretório remoto
shell: ls -l /tmp/stack-arr/anchorr/kubernetes-files/files
register: resultado_ls
- name: Mostrar resultado do ls
debug:
var: resultado_ls.stdout_lines
- name: Aplicar o stolon
become: yes
become_user: fenix
shell: |
kubectl apply -f /tmp/stack-arr/anchorr/kubernetes-files/files/
environment:
KUBECONFIG: /home/fenix/.kube/config

View File

@ -0,0 +1,4 @@
bw_password: "{{ lookup('env', 'BW_PASSWORD') }}"
VAULTWARDEN_LINK: "{{ lookup('env', 'VAULTWARDEN_LINK') }}"
BW_CLIENTID: "{{ lookup('env', 'BW_CLIENTID') }}"
BW_CLIENTSECRET : "{{ lookup('env', 'BW_CLIENTSECRET') }}"

View File

@ -17,7 +17,7 @@ spec:
- name: regcred
containers:
- name: jellyfin
image: lscr.io/linuxserver/jellyfin:10.11.2
image: lscr.io/linuxserver/jellyfin:10.11.5
resources:
limits:
memory: "9G" # Maximum memory allowed

View File

@ -27,4 +27,10 @@ spec:
value: "auto"
- name: TARGET_LANGUAGE
value: "pt"
volumeMounts:
- name: config
mountPath: /app/config
volumes:
- name: config
persistentVolumeClaim:
claimName: lingarr-config-pvc

View File

@ -0,0 +1,11 @@
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: lingarr-nfs-csi
namespace: stack-arr
provisioner: nfs.csi.k8s.io
parameters:
server: 192.168.1.22
share: /mnt/fenix-main-nas-pool-0/data/k8s-Volumes/k8s-cluster-iac-deployed/stack-arr/lingarr
allowVolumeExpansion: true
reclaimPolicy: Retain

View File

@ -0,0 +1,29 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: lingarr-config-pv
namespace: stack-arr
spec:
capacity:
storage: 10Gi
storageClassName: lingarr-nfs-csi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
nfs:
server: 192.168.1.22
path: /mnt/fenix-main-nas-pool-0/data/k8s-Volumes/k8s-cluster-iac-deployed/stack-arr/lingarr/config
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: lingarr-config-pvc
namespace: stack-arr
spec:
storageClassName: lingarr-nfs-csi
accessModes:
- ReadWriteOnce
volumeName: lingarr-config-pv
resources:
requests:
storage: 10Gi

View File

@ -42,7 +42,7 @@ spec:
persistentVolumeReclaimPolicy: Retain
nfs:
server: 192.168.1.22
path: /mnt/fenix-main-nas-pool-0/data/k8s-Volumes/k8s-cluster-iac-deployed/stack-arr/bittorrent/downloads
path: /mnt/fenix-main-nas-pool-0/data/Filmes_e_Series/Downloads
---
apiVersion: v1
kind: PersistentVolumeClaim