From 3e72f8ee0b73d7d17dd9e6b9b15ad247a425a64a Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Mon, 20 Nov 2023 08:54:28 +0100 Subject: [PATCH] Ajustes para probar https y podcasts --- Airsonic/airsonic-deployment.yaml | 12 +++-- .../templates/jellyfin-deployment.yaml | 17 +++++++ NuevoHTTPS/certificate.yaml | 12 +++++ NuevoHTTPS/clusterissuer.yaml | 14 ++++++ Podgrab/creaTodo.sh | 5 ++ Podgrab/kustomization.yaml | 5 ++ Podgrab/muevePodcast | 2 + Podgrab/paraTodo.sh | 4 ++ .../podgrab-claim0-persistentvolumeclaim.yaml | 15 ++++++ .../podgrab-claim1-persistentvolumeclaim.yaml | 15 ++++++ Podgrab/podgrab-deployment.yaml | 50 +++++++++++++++++++ Podgrab/podgrab-service.yaml | 22 ++++++++ Podgrab/pv-local-assets.yaml | 14 ++++++ Podgrab/pv-local-config.yaml | 13 +++++ 14 files changed, 195 insertions(+), 5 deletions(-) create mode 100644 NuevoHTTPS/certificate.yaml create mode 100644 NuevoHTTPS/clusterissuer.yaml create mode 100755 Podgrab/creaTodo.sh create mode 100644 Podgrab/kustomization.yaml create mode 100644 Podgrab/muevePodcast create mode 100755 Podgrab/paraTodo.sh create mode 100644 Podgrab/podgrab-claim0-persistentvolumeclaim.yaml create mode 100644 Podgrab/podgrab-claim1-persistentvolumeclaim.yaml create mode 100644 Podgrab/podgrab-deployment.yaml create mode 100644 Podgrab/podgrab-service.yaml create mode 100644 Podgrab/pv-local-assets.yaml create mode 100644 Podgrab/pv-local-config.yaml diff --git a/Airsonic/airsonic-deployment.yaml b/Airsonic/airsonic-deployment.yaml index 0e2d12e2..6011f3e6 100644 --- a/Airsonic/airsonic-deployment.yaml +++ b/Airsonic/airsonic-deployment.yaml @@ -8,7 +8,7 @@ spec: ports: - name: http port: 4040 - nodePort: 30780 + nodePort: 30680 targetPort: airsonic-http selector: app: airsonic @@ -53,22 +53,24 @@ spec: - name: JAVA_OPTS value: -Dserver.port=4040 name: airsonic - #image: airsonic/airsonic - image: docker-registry:32000/airsonic:1.0 + image: airsonic/airsonic + #image: docker-registry:32000/airsonic:1.0 ports: - containerPort: 4040 name: "airsonic-http" volumeMounts: - name: airsonic-www-folder mountPath: /airsonic/data + subPath: data - name: airsonic-www-folder mountPath: /airsonic/music - #- name: airsonic-www-folder - #mountPath: /airsonic/luisa + subPath: music - name: airsonic-www-folder mountPath: /airsonic/playlists + subPath: playlists - name: airsonic-www-folder mountPath: /airsonic/podcasts + subPath: podcasts imagePullSecrets: - name: reg-cred-secret volumes: diff --git a/HelmCharts/jellyfin-chart/templates/jellyfin-deployment.yaml b/HelmCharts/jellyfin-chart/templates/jellyfin-deployment.yaml index c5f42713..bd90fc8e 100644 --- a/HelmCharts/jellyfin-chart/templates/jellyfin-deployment.yaml +++ b/HelmCharts/jellyfin-chart/templates/jellyfin-deployment.yaml @@ -1,3 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: jellyfin + namespace: jellyfin + labels: + app: jellyfin +spec: + type: NodePort + ports: + - port: 8096 + nodePort: 30680 + targetPort: jellyfin + selector: + app: jellyfin + tier: frontend +--- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/NuevoHTTPS/certificate.yaml b/NuevoHTTPS/certificate.yaml new file mode 100644 index 00000000..f55ce624 --- /dev/null +++ b/NuevoHTTPS/certificate.yaml @@ -0,0 +1,12 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: production + namespace: default +spec: + issuerRef: + name: letsencrypt-production + kind: ClusterIssuer + secretName: cert-rey + dnsNames: + - reymota.ddns.net diff --git a/NuevoHTTPS/clusterissuer.yaml b/NuevoHTTPS/clusterissuer.yaml new file mode 100644 index 00000000..2dd7469c --- /dev/null +++ b/NuevoHTTPS/clusterissuer.yaml @@ -0,0 +1,14 @@ +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + name: letsencrypt-production +spec: + acme: + server: https://acme-v02.api.letsencrypt.org/directory + email: creylopez@yahoo.es + privateKeySecretRef: + name: letsencrypt-production-key + solvers: + - http01: + ingress: + class: kong diff --git a/Podgrab/creaTodo.sh b/Podgrab/creaTodo.sh new file mode 100755 index 00000000..5b44422c --- /dev/null +++ b/Podgrab/creaTodo.sh @@ -0,0 +1,5 @@ +kubectl create namespace podgrab +kubectl create -f pv-local-config.yaml +kubectl create -f pv-local-assets.yaml +kubectl create -k ./ +watch kubectl get all -n podgrab diff --git a/Podgrab/kustomization.yaml b/Podgrab/kustomization.yaml new file mode 100644 index 00000000..4d1d69a0 --- /dev/null +++ b/Podgrab/kustomization.yaml @@ -0,0 +1,5 @@ +resources: + - podgrab-claim0-persistentvolumeclaim.yaml + - podgrab-claim1-persistentvolumeclaim.yaml + - podgrab-deployment.yaml + - podgrab-service.yaml diff --git a/Podgrab/muevePodcast b/Podgrab/muevePodcast new file mode 100644 index 00000000..88a9559f --- /dev/null +++ b/Podgrab/muevePodcast @@ -0,0 +1,2 @@ +sudo id3v2 -a "HistoCast" /mnt/Externo/airsonic/podcasts/HistoCast/*.mp3 +sudo mv /mnt/Externo/airsonic/podcasts/HistoCast/*.mp3 /mnt/Externo/nextcloud/server-data/data/creylopez/files/Podcasts diff --git a/Podgrab/paraTodo.sh b/Podgrab/paraTodo.sh new file mode 100755 index 00000000..27898c2a --- /dev/null +++ b/Podgrab/paraTodo.sh @@ -0,0 +1,4 @@ +kubectl delete -k ./ +kubectl delete -f pv-local-config.yaml +kubectl delete -f pv-local-assets.yaml +kubectl delete namespace podgrab diff --git a/Podgrab/podgrab-claim0-persistentvolumeclaim.yaml b/Podgrab/podgrab-claim0-persistentvolumeclaim.yaml new file mode 100644 index 00000000..15c62d01 --- /dev/null +++ b/Podgrab/podgrab-claim0-persistentvolumeclaim.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: podgrab-claim0 + name: podgrab-claim0 + namespace: podgrab +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 5Gi +status: {} diff --git a/Podgrab/podgrab-claim1-persistentvolumeclaim.yaml b/Podgrab/podgrab-claim1-persistentvolumeclaim.yaml new file mode 100644 index 00000000..43ebad3c --- /dev/null +++ b/Podgrab/podgrab-claim1-persistentvolumeclaim.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + creationTimestamp: null + labels: + io.kompose.service: podgrab-claim1 + name: podgrab-claim1 + namespace: podgrab +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 55Gi +status: {} diff --git a/Podgrab/podgrab-deployment.yaml b/Podgrab/podgrab-deployment.yaml new file mode 100644 index 00000000..805781dd --- /dev/null +++ b/Podgrab/podgrab-deployment.yaml @@ -0,0 +1,50 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: podgrab + name: podgrab + namespace: podgrab +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: podgrab + strategy: + type: Recreate + template: + metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: podgrab + spec: + containers: + - env: + - name: CHECK_FREQUENCY + value: "240" + image: akhilrex/podgrab + name: podgrab + ports: + - containerPort: 8080 + resources: {} + volumeMounts: + - mountPath: /config + name: podgrab-claim0 + - mountPath: /assets + name: podgrab-claim1 + restartPolicy: Always + volumes: + - name: podgrab-claim0 + persistentVolumeClaim: + claimName: podgrab-claim0 + - name: podgrab-claim1 + persistentVolumeClaim: + claimName: podgrab-claim1 +status: {} diff --git a/Podgrab/podgrab-service.yaml b/Podgrab/podgrab-service.yaml new file mode 100644 index 00000000..d3616bad --- /dev/null +++ b/Podgrab/podgrab-service.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: Service +metadata: + annotations: + kompose.cmd: kompose convert + kompose.version: 1.26.0 (40646f47) + creationTimestamp: null + labels: + io.kompose.service: podgrab + name: podgrab + namespace: podgrab +spec: + type: NodePort + ports: + - name: "8080" + port: 8080 + nodePort: 30780 + targetPort: 8080 + selector: + io.kompose.service: podgrab +status: + loadBalancer: {} diff --git a/Podgrab/pv-local-assets.yaml b/Podgrab/pv-local-assets.yaml new file mode 100644 index 00000000..25788689 --- /dev/null +++ b/Podgrab/pv-local-assets.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: podgrab-assets + labels: + app: podgrab +spec: + capacity: + storage: 55Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/airsonic/podcasts" + diff --git a/Podgrab/pv-local-config.yaml b/Podgrab/pv-local-config.yaml new file mode 100644 index 00000000..542177d3 --- /dev/null +++ b/Podgrab/pv-local-config.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: podgrab-config + labels: + epp: podgrab +spec: + capacity: + storage: 5Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/mnt/Externo/podgrab/config"