diff --git a/Airsonic/airsonic-deployment.yaml b/Airsonic/airsonic-deployment.yaml new file mode 100644 index 00000000..04c19a70 --- /dev/null +++ b/Airsonic/airsonic-deployment.yaml @@ -0,0 +1,72 @@ +apiVersion: v1 +kind: Service +metadata: + name: airsonic + namespace: airsonic +spec: + type: NodePort + ports: + - name: http + port: 4040 + nodePort: 30780 + targetPort: airsonic-http + selector: + app: airsonic +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: airsonic-pv-claim + namespace: airsonic + labels: + app: airsonic +spec: + accessModes: + - ReadWriteMany + storageClassName: "" + resources: + requests: + storage: 2Gi +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: airsonic + namespace: airsonic + labels: + app: airsonic +spec: + selector: + matchLabels: + app: airsonic + tier: frontend + strategy: + type: Recreate + template: + metadata: + labels: + app: airsonic + tier: frontend + spec: + containers: + - env: + - name: JAVA_OPTS + value: -Dserver.port=4040 + name: airsonic + image: airsonic/airsonic + ports: + - containerPort: 4040 + name: "airsonic-http" + volumeMounts: + - name: airsonic-www-folder + mountPath: /airsonic/data + - name: airsonic-www-folder + mountPath: /airsonic/music + - name: airsonic-www-folder + mountPath: /airsonic/playlists + - name: airsonic-www-folder + mountPath: /airsonic/podcasts + volumes: + - name: airsonic-www-folder + persistentVolumeClaim: + claimName: airsonic-pv-claim diff --git a/Airsonic/creaTodo.sh b/Airsonic/creaTodo.sh new file mode 100755 index 00000000..bc64f404 --- /dev/null +++ b/Airsonic/creaTodo.sh @@ -0,0 +1,4 @@ +kubectl create namespace airsonic +kubectl create -f pv-local-airsonic.yaml +kubectl create -k ./ +#watch kubectl get all diff --git a/Airsonic/entra.sh b/Airsonic/entra.sh new file mode 100644 index 00000000..c3c01cf5 --- /dev/null +++ b/Airsonic/entra.sh @@ -0,0 +1 @@ +kubectl exec -ti deployment.apps/airsonic -- /bin/bash diff --git a/Airsonic/kustomization.yaml b/Airsonic/kustomization.yaml new file mode 100644 index 00000000..c9d67490 --- /dev/null +++ b/Airsonic/kustomization.yaml @@ -0,0 +1,2 @@ +resources: + - airsonic-deployment.yaml diff --git a/Airsonic/logs.sh b/Airsonic/logs.sh new file mode 100644 index 00000000..4f2bb33d --- /dev/null +++ b/Airsonic/logs.sh @@ -0,0 +1 @@ +kubectl -n airsonic logs `kubectl -n airsonic get pod|grep airsonic|cut -f1 -d' '` diff --git a/Airsonic/paraTodo.sh b/Airsonic/paraTodo.sh new file mode 100755 index 00000000..98d18cdc --- /dev/null +++ b/Airsonic/paraTodo.sh @@ -0,0 +1,3 @@ +kubectl delete -k ./ +kubectl delete -f pv-local-airsonic.yaml +kubectl delete namespace airsonic diff --git a/Airsonic/pv-local-airsonic.yaml b/Airsonic/pv-local-airsonic.yaml new file mode 100644 index 00000000..2f27a4e0 --- /dev/null +++ b/Airsonic/pv-local-airsonic.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: airsonic-data-folder +spec: + capacity: + storage: 2Gi + accessModes: + - ReadWriteMany + hostPath: + path: "/mnt/cluster/airsonic" diff --git a/Airsonic/temp/docker-compose.yml b/Airsonic/temp/docker-compose.yml new file mode 100644 index 00000000..c38ed135 --- /dev/null +++ b/Airsonic/temp/docker-compose.yml @@ -0,0 +1,13 @@ +services: + airsonic: + image: airsonic/airsonic + container_name: airsonic + restart: unless-stopped + tty: false + volumes: + - /persisted/airsonic/data:/airsonic/data + - /persisted/airsonic/playlists:/airsonic/playlists + - /persisted/airsonic/podcasts:/airsonic/podcasts + - /music:/airsonic/music + ports: + - 4040:4040 diff --git a/hmdm-docker b/hmdm-docker new file mode 160000 index 00000000..958ffd21 --- /dev/null +++ b/hmdm-docker @@ -0,0 +1 @@ +Subproject commit 958ffd21a8884a2bc5c33f54c52222c96189a8cc