From d488f53a9f664710ba4961bb8eb61d80c15501d1 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Mon, 24 Apr 2023 14:47:54 +0200 Subject: [PATCH] Cambio todo a Externo --- Firefly/k8s-cluster/pv-local-ff.yaml | 2 +- Firefly/k8s-cluster/pv-local-mysql.yaml | 2 +- Gogs/pv-local-gogs.yaml | 2 +- Gogs/pv-local-mysql-gogs.yaml | 2 +- .../templates/pv-local-kanboard.yaml | 2 +- .../templates/pv-local-mysql-kb.yaml | 2 +- .../templates/pv-local-mediawiki.yaml | 2 +- .../templates/pv-local-mysql-mw.yaml | 2 +- .../templates/miweb-deployment.yaml | 14 - .../templates => }/pv-local-miweb.yaml | 0 .../templates/pv-local-vaultwarden.yaml | 2 +- K8S-dashboard/CrearDashboard.sh | 29 -- K8S-dashboard/EliminaDahsboard.sh | 1 - K8S-dashboard/Token20220901 | 1 - K8S-dashboard/cluster-role.yaml | 12 - K8S-dashboard/recommended.yaml | 304 ------------------ K8S-dashboard/service-account.yaml | 5 - MiRegistry/nohacefalta-step-05.sh | 3 + MiRegistry/registry-pv.yaml | 3 +- MiRegistry/step-05.sh | 2 - MiRegistry/step-06-deployment.sh | 3 + MiRegistry/step-06.sh | 2 - ...torage.yaml => cluster-storage-class.yaml} | 2 +- StorageClass/dirscluster.txt | 18 ++ StorageClass/externo-storage-class.yaml | 6 + StorageClass/portainer.yaml | 152 --------- .../{pv-local.yaml => pv-local-miweb.yaml} | 12 +- StorageClass/pvc-miweb.yaml | 11 + borraEvicted.sh | 5 +- borraMal.sh | 21 ++ detectadMal | 7 + pepe | 7 + 32 files changed, 98 insertions(+), 540 deletions(-) rename HelmCharts/{miweb-chart/templates => }/pv-local-miweb.yaml (100%) delete mode 100644 K8S-dashboard/CrearDashboard.sh delete mode 100644 K8S-dashboard/EliminaDahsboard.sh delete mode 100644 K8S-dashboard/Token20220901 delete mode 100644 K8S-dashboard/cluster-role.yaml delete mode 100644 K8S-dashboard/recommended.yaml delete mode 100644 K8S-dashboard/service-account.yaml create mode 100644 MiRegistry/nohacefalta-step-05.sh delete mode 100644 MiRegistry/step-05.sh create mode 100644 MiRegistry/step-06-deployment.sh delete mode 100644 MiRegistry/step-06.sh rename StorageClass/{local-storage.yaml => cluster-storage-class.yaml} (85%) create mode 100644 StorageClass/dirscluster.txt create mode 100644 StorageClass/externo-storage-class.yaml delete mode 100644 StorageClass/portainer.yaml rename StorageClass/{pv-local.yaml => pv-local-miweb.yaml} (68%) create mode 100644 StorageClass/pvc-miweb.yaml create mode 100644 borraMal.sh create mode 100755 detectadMal create mode 100644 pepe diff --git a/Firefly/k8s-cluster/pv-local-ff.yaml b/Firefly/k8s-cluster/pv-local-ff.yaml index 6708ab54..c977ee39 100644 --- a/Firefly/k8s-cluster/pv-local-ff.yaml +++ b/Firefly/k8s-cluster/pv-local-ff.yaml @@ -8,4 +8,4 @@ spec: accessModes: - ReadWriteOnce hostPath: - path: "/mnt/cluster/fireflyiii/firefly-uploads" + path: "/mnt/Externo/fireflyiii/firefly-uploads" diff --git a/Firefly/k8s-cluster/pv-local-mysql.yaml b/Firefly/k8s-cluster/pv-local-mysql.yaml index 31830bb1..ba66bbf5 100644 --- a/Firefly/k8s-cluster/pv-local-mysql.yaml +++ b/Firefly/k8s-cluster/pv-local-mysql.yaml @@ -8,4 +8,4 @@ spec: accessModes: - ReadWriteOnce hostPath: - path: "/mnt/cluster/fireflyiii/firefly-db" + path: "/mnt/Externo/fireflyiii/firefly-db" diff --git a/Gogs/pv-local-gogs.yaml b/Gogs/pv-local-gogs.yaml index 95f62ede..584287fc 100644 --- a/Gogs/pv-local-gogs.yaml +++ b/Gogs/pv-local-gogs.yaml @@ -8,4 +8,4 @@ spec: accessModes: - ReadWriteOnce hostPath: - path: "/mnt/cluster/gogs/gogs_data" + path: "/mnt/Externo/gogs/gogs_data" diff --git a/Gogs/pv-local-mysql-gogs.yaml b/Gogs/pv-local-mysql-gogs.yaml index 0dc28822..f8bddf3b 100644 --- a/Gogs/pv-local-mysql-gogs.yaml +++ b/Gogs/pv-local-mysql-gogs.yaml @@ -8,4 +8,4 @@ spec: accessModes: - ReadWriteOnce hostPath: - path: "/mnt/cluster/gogs/gogs_db" + path: "/mnt/Externo/gogs/gogs_db" diff --git a/HelmCharts/kanboard-chart/templates/pv-local-kanboard.yaml b/HelmCharts/kanboard-chart/templates/pv-local-kanboard.yaml index 323e4cd9..3bbf7e25 100644 --- a/HelmCharts/kanboard-chart/templates/pv-local-kanboard.yaml +++ b/HelmCharts/kanboard-chart/templates/pv-local-kanboard.yaml @@ -8,5 +8,5 @@ spec: accessModes: - ReadWriteOnce hostPath: - path: "/mnt/cluster/kanboard/kanboard" + path: "/mnt/Externo/kanboard/kanboard" diff --git a/HelmCharts/kanboard-chart/templates/pv-local-mysql-kb.yaml b/HelmCharts/kanboard-chart/templates/pv-local-mysql-kb.yaml index c388a88f..9d9660da 100644 --- a/HelmCharts/kanboard-chart/templates/pv-local-mysql-kb.yaml +++ b/HelmCharts/kanboard-chart/templates/pv-local-mysql-kb.yaml @@ -8,4 +8,4 @@ spec: accessModes: - ReadWriteOnce hostPath: - path: "/mnt/cluster/kanboard/kanboard-db" + path: "/mnt/Externo/kanboard/kanboard-db" diff --git a/HelmCharts/mediawiki-chart/templates/pv-local-mediawiki.yaml b/HelmCharts/mediawiki-chart/templates/pv-local-mediawiki.yaml index 8fda6221..baadc320 100644 --- a/HelmCharts/mediawiki-chart/templates/pv-local-mediawiki.yaml +++ b/HelmCharts/mediawiki-chart/templates/pv-local-mediawiki.yaml @@ -8,5 +8,5 @@ spec: accessModes: - ReadWriteOnce hostPath: - path: "/mnt/cluster/mediawiki/mediawiki" + path: "/mnt/Externo/mediawiki/mediawiki" diff --git a/HelmCharts/mediawiki-chart/templates/pv-local-mysql-mw.yaml b/HelmCharts/mediawiki-chart/templates/pv-local-mysql-mw.yaml index 6dc453f9..0a758938 100644 --- a/HelmCharts/mediawiki-chart/templates/pv-local-mysql-mw.yaml +++ b/HelmCharts/mediawiki-chart/templates/pv-local-mysql-mw.yaml @@ -8,4 +8,4 @@ spec: accessModes: - ReadWriteOnce hostPath: - path: "/mnt/cluster/mediawiki/mediawiki-db" + path: "/mnt/Externo/mediawiki/mediawiki-db" diff --git a/HelmCharts/miweb-chart/templates/miweb-deployment.yaml b/HelmCharts/miweb-chart/templates/miweb-deployment.yaml index 84eeaa94..35548c08 100644 --- a/HelmCharts/miweb-chart/templates/miweb-deployment.yaml +++ b/HelmCharts/miweb-chart/templates/miweb-deployment.yaml @@ -12,20 +12,6 @@ spec: selector: app: miweb --- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: miweb-pv-claim - labels: - app: miweb -spec: - accessModes: - - ReadWriteMany - storageClassName: "" - resources: - requests: - storage: 2Gi ---- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/HelmCharts/miweb-chart/templates/pv-local-miweb.yaml b/HelmCharts/pv-local-miweb.yaml similarity index 100% rename from HelmCharts/miweb-chart/templates/pv-local-miweb.yaml rename to HelmCharts/pv-local-miweb.yaml diff --git a/HelmCharts/vaultwarden-chart/templates/pv-local-vaultwarden.yaml b/HelmCharts/vaultwarden-chart/templates/pv-local-vaultwarden.yaml index 1ebf965b..c6281758 100644 --- a/HelmCharts/vaultwarden-chart/templates/pv-local-vaultwarden.yaml +++ b/HelmCharts/vaultwarden-chart/templates/pv-local-vaultwarden.yaml @@ -8,5 +8,5 @@ spec: accessModes: - ReadWriteOnce hostPath: - path: "/mnt/cluster/vaultwarden" + path: "/mnt/Externo/vaultwarden" diff --git a/K8S-dashboard/CrearDashboard.sh b/K8S-dashboard/CrearDashboard.sh deleted file mode 100644 index f8fd6b5e..00000000 --- a/K8S-dashboard/CrearDashboard.sh +++ /dev/null @@ -1,29 +0,0 @@ -kubectl create -f recommended.yaml -kubectl -n kubernetes-dashboard edit service kubernetes-dashboard -kubectl -n kubernetes-dashboard get service kubernetes-dashboard - -cat < /tmp/podsmal + +if [ $? -eq 0 ]; then + # hay algo que no es Running, por lo tanto, está mal + df | grep sd >> /tmp/podsmal + sudo -u creylopez cat /tmp/podsmal | mail -s "Algunos pod están funcionando mal" "creylopez@yahoo.es" +fi diff --git a/pepe b/pepe new file mode 100644 index 00000000..fe9fd423 --- /dev/null +++ b/pepe @@ -0,0 +1,7 @@ +[?1049h[>4;2m[?1h=[?2004h[?12h[?12l[?25l"borraMal.sh" 10L, 189C#!/bin/bash + + +kubectl get pod -A | grep Running | while read -r line; doecho "$line"ns=`echo $line| cut -c1-19`pod=`echo $line|cut -c20-63`echo "Namespace: $ns, Pod: $pod" + +done +~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 5,13-20 Todo[?25h[?25lType :qa and press to exit Vim5,13-20 Todo[?25h[?25l5,13-20 Todo[?25h[?25l5,13-20 Todo[?25h[?25l5,13-20 Todo[?25h \ No newline at end of file