Browse Source

Actualizar repo

main
Celestino Rey 2 years ago
parent
commit
5aeab20944
49 changed files with 596 additions and 354 deletions
  1. +3
    -1
      CreaCluster/50-creaCalico.sh
  2. +4
    -0
      CreaCluster/65-instalaCertManager.sh
  3. +24
    -0
      CreaCluster/66-creaIngressController.sh
  4. +4
    -0
      CreaCluster/README.md
  5. +24
    -0
      CreaCluster/Tests/test-resources.yaml
  6. +60
    -0
      CreaCluster/app-verificacion.yaml
  7. BIN
      CreaCluster/cri-dockerd-0.2.6.amd64.tgz
  8. +5
    -5
      Enphase/extrae/app/extrae.sh
  9. +86
    -0
      Enphase/extrae/app/formateado.json
  10. +1
    -0
      Enphase/extrae/app/production.json
  11. +1
    -0
      Enphase/precios/app/pillaPrecios.sh
  12. +18
    -0
      HelmCharts/cluster-ingress.yaml
  13. +5
    -3
      HelmCharts/enphase-chart/templates/extrae-cronjob.yaml
  14. +3
    -0
      HelmCharts/enphase-chart/templates/grafana.yaml
  15. +2
    -0
      HelmCharts/enphase-chart/templates/mysql-deployment-en.yaml
  16. +4
    -2
      HelmCharts/enphase-chart/templates/precios-cronjob.yaml
  17. +17
    -0
      HelmCharts/gestionaApps
  18. +1
    -1
      HelmCharts/mattermost-chart/templates/pv-local-mattermost.yaml
  19. +1
    -1
      HelmCharts/mattermost-chart/templates/pv-local-mysql-mm.yaml
  20. +24
    -0
      HelmCharts/mediawiki-ingress.yaml
  21. BIN
      HelmCharts/nodered-chart-1.0.tgz
  22. +1
    -0
      HelmCharts/vaultwarden-chart/templates/issuer-production.yaml
  23. +2
    -1
      HelmCharts/vaultwarden-chart/templates/vaultwarden-deployment.yaml
  24. +23
    -0
      HelmCharts/vw-chart/.helmignore
  25. +24
    -0
      HelmCharts/vw-chart/Chart.yaml
  26. +19
    -0
      HelmCharts/vw-chart/templates/ca.crt
  27. +27
    -0
      HelmCharts/vw-chart/templates/ca.key
  28. +12
    -0
      HelmCharts/vw-chart/templates/pv-local-vaultwarden.yaml
  29. +11
    -0
      HelmCharts/vw-chart/templates/registry-secrets.yaml
  30. +72
    -0
      HelmCharts/vw-chart/templates/vaultwarden-deployment.yaml
  31. +21
    -0
      HelmCharts/vw-chart/templates/vaultwarden-ingress.yaml
  32. +82
    -0
      HelmCharts/vw-chart/values.yaml
  33. +0
    -13
      Jellyfin/docker-compose.yml
  34. +0
    -14
      Jellyfin/jellyfin-claim0-persistentvolumeclaim.yaml
  35. +0
    -14
      Jellyfin/jellyfin-claim1-persistentvolumeclaim.yaml
  36. +0
    -14
      Jellyfin/jellyfin-claim2-persistentvolumeclaim.yaml
  37. +0
    -14
      Jellyfin/jellyfin-claim3-persistentvolumeclaim.yaml
  38. +0
    -56
      Jellyfin/jellyfin-deployment.yaml
  39. +0
    -50
      Kanboard/db-deployment.yaml
  40. +0
    -14
      Kanboard/db-persistentvolumeclaim.yaml
  41. +0
    -28
      Kanboard/docker-compose.yml
  42. +0
    -14
      Kanboard/kanboard-data-persistentvolumeclaim.yaml
  43. +0
    -55
      Kanboard/kanboard-deployment.yaml
  44. +0
    -14
      Kanboard/kanboard-plugins-persistentvolumeclaim.yaml
  45. +0
    -22
      Kanboard/kanboard-service.yaml
  46. +0
    -14
      Kanboard/kanboard-ssl-persistentvolumeclaim.yaml
  47. +14
    -0
      LetsEncrypt/clusterissuer.yaml
  48. +0
    -4
      LetsEncrypt/instalaCertManager.sh
  49. +1
    -0
      Metallb/obtenExternalIP.sh

+ 3
- 1
CreaCluster/50-creaCalico.sh View File

@ -1,3 +1,5 @@
kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml
#kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml
kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.3/manifests/tigera-operator.yaml
kubectl create -f ./custom-resources.yaml

+ 4
- 0
CreaCluster/65-instalaCertManager.sh View File

@ -0,0 +1,4 @@
# Fuente: https://cert-manager.io/docs/installation/kubectl/
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.1/cert-manager.yaml

+ 24
- 0
CreaCluster/66-creaIngressController.sh View File

@ -0,0 +1,24 @@
# Fuente: https://docs.k0sproject.io/v1.24.4+k0s.0/examples/nginx-ingress/
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.3/deploy/static/provider/baremetal/deploy.yaml
watch kubectl get pods -n ingress-nginx
kubectl get services -n ingress-nginx
kubectl -n ingress-nginx get ingressclasses
kubectl -n ingress-nginx annotate ingressclasses nginx ingressclass.kubernetes.io/is-default-class="true"
echo "Intenta conectar: curl <worker-external-ip>:<node-port>"
echo "La dirección es la del servidor y el puerto NodePort el resultado de kubectl get services -n ingress-nginx"
echo "Como no hay ningún servicio configurado, dará 404 Not Found"
# crear pequeña app verificación
kubectl apply -f app-verificacion.yaml
# conectar (dirección y puerto igual que arriba)
curl k8s-server:32478 -H 'Host: web.example.com'
# resultado correcto:
#
# <html><body><h1>It works!</h1></body></html>
#

+ 4
- 0
CreaCluster/README.md View File

@ -8,3 +8,7 @@ https://blog.radwell.codes/2021/05/provisioning-single-node-kubernetes-cluster-u
## Como resetearlo
https://www.techrunnr.com/how-to-reset-kubernetes-cluster/
## cert-manager
Instrucciones en https://cert-manager.io/docs/installation/kubectl/

+ 24
- 0
CreaCluster/Tests/test-resources.yaml View File

@ -0,0 +1,24 @@
apiVersion: v1
kind: Namespace
metadata:
name: cert-manager-test
---
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: test-selfsigned
namespace: cert-manager-test
spec:
selfSigned: {}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: selfsigned-cert
namespace: cert-manager-test
spec:
dnsNames:
- example.com
secretName: selfsigned-cert-tls
issuerRef:
name: test-selfsigned

+ 60
- 0
CreaCluster/app-verificacion.yaml View File

@ -0,0 +1,60 @@
apiVersion: v1
kind: Namespace
metadata:
name: web
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-server
namespace: web
spec:
selector:
matchLabels:
app: web
template:
metadata:
labels:
app: web
spec:
containers:
- name: httpd
image: httpd:2.4.53-alpine
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: web-server-service
namespace: web
spec:
selector:
app: web
ports:
- protocol: TCP
# port: 5000
port: 80
targetPort: 80
type: LoadBalancer
externalIPs:
- 192.168.1.147
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web-server-ingress
namespace: web
spec:
ingressClassName: nginx
rules:
- host: web.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web-server-service
port:
number: 5000

BIN
CreaCluster/cri-dockerd-0.2.6.amd64.tgz View File


+ 5
- 5
Enphase/extrae/app/extrae.sh View File

@ -33,11 +33,11 @@ pi_whLifetime=`echo $datos|jq .production[0].whLifetime`
# Mostrar resultados
#
#echo "Type: '$pi_type'"
#echo "activeCount: '$pi_activeCount'"
#echo "readingTime: '$pi_readingTime'"
#echo "wNow: '$pi_wNow'"
#echo "whLifetime: '$pi_whLifetime'"
echo "Type: '$pi_type'"
echo "activeCount: '$pi_activeCount'"
echo "readingTime: '$pi_readingTime'"
echo "wNow: '$pi_wNow'"
echo "whLifetime: '$pi_whLifetime'"
# insertar en la tabla


+ 86
- 0
Enphase/extrae/app/formateado.json View File

@ -0,0 +1,86 @@
{
"production": [
{
"type": "inverters",
"activeCount": 9,
"readingTime": 1696834651,
"wNow": 44,
"whLifetime": 280317
},
{
"type": "eim",
"activeCount": 1,
"measurementType": "production",
"readingTime": 1696834652,
"wNow": 57.714,
"whLifetime": 10746201.644,
"varhLeadLifetime": 0.064,
"varhLagLifetime": 2892249.348,
"vahLifetime": 12747185.198,
"rmsCurrent": 0.808,
"rmsVoltage": 228.763,
"reactPwr": 144.055,
"apprntPwr": 183.451,
"pwrFactor": 0.31,
"whToday": 12.644,
"whLastSevenDays": 106938.644,
"vahToday": 1312.198,
"varhLeadToday": 0.064,
"varhLagToday": 1263.348
}
],
"consumption": [
{
"type": "eim",
"activeCount": 1,
"measurementType": "total-consumption",
"readingTime": 1696834652,
"wNow": 221.534,
"whLifetime": 15933238.526,
"varhLeadLifetime": 6361261.526,
"varhLagLifetime": -2714503.178,
"vahLifetime": 18970707.158,
"rmsCurrent": 3.189,
"rmsVoltage": 228.728,
"reactPwr": -304.033,
"apprntPwr": 729.311,
"pwrFactor": 0.3,
"whToday": 2254.526,
"whLastSevenDays": 96.526,
"vahToday": 5011.158,
"varhLeadToday": 4154.526,
"varhLagToday": 0
},
{
"type": "eim",
"activeCount": 1,
"measurementType": "net-consumption",
"readingTime": 1696834652,
"wNow": 163.82,
"whLifetime": 5188228.188,
"varhLeadLifetime": 6361261.59,
"varhLagLifetime": 177746.171,
"vahLifetime": 18970707.158,
"rmsCurrent": 2.38,
"rmsVoltage": 228.728,
"reactPwr": -448.088,
"apprntPwr": 544.464,
"pwrFactor": 0.3,
"whToday": 0,
"whLastSevenDays": 0,
"vahToday": 0,
"varhLeadToday": 0,
"varhLagToday": 0
}
],
"storage": [
{
"type": "acb",
"activeCount": 0,
"readingTime": 0,
"wNow": 0,
"whNow": 0,
"state": "idle"
}
]
}

+ 1
- 0
Enphase/extrae/app/production.json View File

@ -0,0 +1 @@
{"production":[{"type":"inverters","activeCount":9,"readingTime":1696834651,"wNow":44,"whLifetime":280317},{"type":"eim","activeCount":1,"measurementType":"production","readingTime":1696834652,"wNow":57.714,"whLifetime":10746201.644,"varhLeadLifetime":0.064,"varhLagLifetime":2892249.348,"vahLifetime":12747185.198,"rmsCurrent":0.808,"rmsVoltage":228.763,"reactPwr":144.055,"apprntPwr":183.451,"pwrFactor":0.31,"whToday":12.644,"whLastSevenDays":106938.644,"vahToday":1312.198,"varhLeadToday":0.064,"varhLagToday":1263.348}],"consumption":[{"type":"eim","activeCount":1,"measurementType":"total-consumption","readingTime":1696834652,"wNow":221.534,"whLifetime":15933238.526,"varhLeadLifetime":6361261.526,"varhLagLifetime":-2714503.178,"vahLifetime":18970707.158,"rmsCurrent":3.189,"rmsVoltage":228.728,"reactPwr":-304.033,"apprntPwr":729.311,"pwrFactor":0.3,"whToday":2254.526,"whLastSevenDays":96.526,"vahToday":5011.158,"varhLeadToday":4154.526,"varhLagToday":0.0},{"type":"eim","activeCount":1,"measurementType":"net-consumption","readingTime":1696834652,"wNow":163.82,"whLifetime":5188228.188,"varhLeadLifetime":6361261.59,"varhLagLifetime":177746.171,"vahLifetime":18970707.158,"rmsCurrent":2.38,"rmsVoltage":228.728,"reactPwr":-448.088,"apprntPwr":544.464,"pwrFactor":0.3,"whToday":0,"whLastSevenDays":0,"vahToday":0,"varhLeadToday":0,"varhLagToday":0}],"storage":[{"type":"acb","activeCount":0,"readingTime":0,"wNow":0,"whNow":0,"state":"idle"}]}

+ 1
- 0
Enphase/precios/app/pillaPrecios.sh View File

@ -21,6 +21,7 @@ echo $datos|jq -c -r '.[]' | while read linea; do
#echo "insert into precios (date,ischeap,isunderavg,price,units) values('$fechayhora', $ischeap, $isunderavg, $price, '$units');"
#echo "$linea2"
mysql -h $DB_HOST -u root -p'Dsa-0213' enphase <<EOFMYSQL
insert into precios (date,ischeap,isunderavg,price,units) values('$fechayhora', $ischeap, $isunderavg, $price, '$units');
EOFMYSQL


+ 18
- 0
HelmCharts/cluster-ingress.yaml View File

@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: cluster-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: vaultwarden
port:
number: 80

+ 5
- 3
HelmCharts/enphase-chart/templates/extrae-cronjob.yaml View File

@ -12,11 +12,13 @@ spec:
spec:
containers:
- name: extrae
image: docker-registry:32000/extrae:4
image: docker-registry:32000/extrae:5
imagePullPolicy: IfNotPresent
env:
- name: DB_HOST
value: enphase-mysql
# - name: TZ
# value: "Europe/Madrid"
- name: DB_HOST
value: enphase-mysql
restartPolicy: Never
imagePullSecrets:
- name: reg-cred-secret


+ 3
- 0
HelmCharts/enphase-chart/templates/grafana.yaml View File

@ -35,6 +35,9 @@ spec:
- name: grafana
image: grafana/grafana:9.1.0
imagePullPolicy: IfNotPresent
env:
- name: TZ
value: "Europe/Madrid"
ports:
- containerPort: 3000
name: http-grafana


+ 2
- 0
HelmCharts/enphase-chart/templates/mysql-deployment-en.yaml View File

@ -54,6 +54,8 @@ spec:
- image: docker-registry:32000/mariadb:1.0
name: mysql
env:
# - name: TZ
# value: "Europe/Madrid"
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:


+ 4
- 2
HelmCharts/enphase-chart/templates/precios-cronjob.yaml View File

@ -15,8 +15,10 @@ spec:
image: docker-registry:32000/precios:6
imagePullPolicy: IfNotPresent
env:
- name: DB_HOST
value: enphase-mysql
# - name: TZ
# value: "Europe/Madrid"
- name: DB_HOST
value: enphase-mysql
restartPolicy: Never
imagePullSecrets:
- name: reg-cred-secret


+ 17
- 0
HelmCharts/gestionaApps View File

@ -0,0 +1,17 @@
#!/bin/bash
if [ "$1" = "i" ]
then
for i in firefly gogs mealie mediawiki navidrome nextcloud repostajes wordpress
do
helm install $i ./$i-chart --namespace=$i --create-namespace
done
elif [ "$1" = "u" ]
then
for i in firefly gogs mealie mediawiki navidrome nextcloud repostajes wordpress
do
helm uninstall $i -n $i
done
else
echo "Falta comando: i=instalar, u=desinstalar"
fi

+ 1
- 1
HelmCharts/mattermost-chart/templates/pv-local-mattermost.yaml View File

@ -8,5 +8,5 @@ spec:
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/mattermost/mattermost"
path: "/mnt/Externo/mattermost2/mattermost"

+ 1
- 1
HelmCharts/mattermost-chart/templates/pv-local-mysql-mm.yaml View File

@ -8,4 +8,4 @@ spec:
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/mattermost/db"
path: "/mnt/Externo/mattermost2/db"

+ 24
- 0
HelmCharts/mediawiki-ingress.yaml View File

@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: mediawiki-ingress
namespace: mediawiki
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/cluster-issuer: letsencrypt-production
spec:
tls:
- hosts:
- reymota.ddns.net
secretName: letsencrypt-production
rules:
- host: "reymota.ddns.net"
http:
paths:
- pathType: Prefix
path: "/mediawiki"
backend:
service:
name: mediawiki
port:
number: 80

BIN
HelmCharts/nodered-chart-1.0.tgz View File


+ 1
- 0
HelmCharts/vaultwarden-chart/templates/issuer-production.yaml View File

@ -12,3 +12,4 @@ spec:
- http01:
ingress:
class: nginx

+ 2
- 1
HelmCharts/vaultwarden-chart/templates/vaultwarden-deployment.yaml View File

@ -9,7 +9,7 @@ spec:
type: NodePort
ports:
- port: 80
nodePort: 30798
nodePort: 31078
targetPort: vaultwarden
selector:
app: vaultwarden
@ -66,3 +66,4 @@ spec:
- name: vaultwarden-persistent-storage
persistentVolumeClaim:
claimName: vw-pv-claim

+ 23
- 0
HelmCharts/vw-chart/.helmignore View File

@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

+ 24
- 0
HelmCharts/vw-chart/Chart.yaml View File

@ -0,0 +1,24 @@
apiVersion: v2
name: vw-chart
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recomm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2cjAf0NCd/uo4mRqECgYEA1XB/
oJXA2tUYM3rHRGNmcFviKvefk8XVsrEHQfnFr04Uwe6dRZzp7eanNxcEOiK9d401
03N+bRjlrRKUhnqyDsUCYDp7ObwkxQCycIjQst3FuEe83mnuKirUctso8DPTRIfM
r0estywFxKM2Dh03Pxee9+eoTIs2amrUmgYR/bsCgYBmx/CPsvUz24ZlErer9F3S
MYovfVs6HISa2MbUGIVxBZFOS8iPXcy9JTrU3AOtZef0EGkaLhd/uwawG9zxR5N/
xGM3lGhA7HpCylnzBFnkAIaETX6vmHSSYiwosWOWxUUdLYHOdd8Obq9k7qUHBTQ7
n/FXpWD7bUzc2vM8HflBYQKBgBhggeMYV29m2R3ADxQreh6pD9qyb2JUPQTsnRSW
71IHS+2eUA4MTtdh+YUcNtpg71zBHv2oei8BofGzZo05ZC61p4DQDRTZ/SUW4Epk
Bdn35EYYw2RvmsjsHVmE2FcexClWjTUTrZE6EOqVbW4NPisRipFrvtgHKk7bJq70
tIdTAoGBAIKN54AP9ole2XsJA4+bvdRYYvRZ+yXb365y8MyP95oVi4+dxpkgbMoX
wULVI1/aOwqXGZPJNJDMfahD/SPy7jnOgJofUBHwnp4/5asZ/vE4CsXTHnEVYgey
trnmHVEj7GKXKr/Z/smo0J2Z28yT/bAv7N1d4GJ4zxBjVEKazNR1
-----END RSA PRIVATE KEY-----

+ 12
- 0
HelmCharts/vw-chart/templates/pv-local-vaultwarden.yaml View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: vw-folder
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/vaultwarden"

+ 11
- 0
HelmCharts/vw-chart/templates/registry-secrets.yaml View File

@ -0,0 +1,11 @@
apiVersion: v1
data:
.dockerconfigjson: eyJhdXRocyI6eyJkb2NrZXItcmVnaXN0cnk6MzIwMDAiOnsidXNlcm5hbWUiOiJjcmV5bG9wZXoiLCJwYXNzd29yZCI6IlJleS0xMTc2IiwiYXV0aCI6IlkzSmxlV3h2Y0dWNk9sSmxlUzB4TVRjMiJ9fX0=
kind: Secret
metadata:
creationTimestamp: "2023-01-29T10:54:14Z"
name: reg-cred-secret
namespace: vaultwarden
resourceVersion: "19890385"
uid: 66b3b7c5-26c1-4e5a-af4e-dc973aaafe4b
type: kubernetes.io/dockerconfigjson

+ 72
- 0
HelmCharts/vw-chart/templates/vaultwarden-deployment.yaml View File

@ -0,0 +1,72 @@
apiVersion: v1
kind: Service
metadata:
name: vaultwarden
namespace: vaultwarden
labels:
app: vaultwarden
spec:
# type: NodePort
ports:
- port: 80
# nodePort: 31078
targetPort: vaultwarden
protocol: TCP
type: LoadBalancer
externalIPs:
- 192.168.1.147
selector:
app: vaultwarden
tier: frontend
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: vw-pv-claim
namespace: vaultwarden
labels:
app: vaultwarden
spec:
accessModes:
- ReadWriteOnce
storageClassName: ""
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vaultwarden
namespace: vaultwarden
labels:
app: vaultwarden
spec:
selector:
matchLabels:
app: vaultwarden
tier: frontend
strategy:
type: Recreate
template:
metadata:
labels:
app: vaultwarden
tier: frontend
spec:
containers:
# - image: vaultwarden
- image: docker-registry:32000/vaultwarden:1.0
name: vaultwarden
ports:
- containerPort: 80
name: vaultwarden
volumeMounts:
- name: vaultwarden-persistent-storage
mountPath: /data
imagePullSecrets:
- name: reg-cred-secret
volumes:
- name: vaultwarden-persistent-storage
persistentVolumeClaim:
claimName: vw-pv-claim

+ 21
- 0
HelmCharts/vw-chart/templates/vaultwarden-ingress.yaml View File

@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: vaultwarden-ingress
namespace: vaultwarden
spec:
tls:
- hosts:
- reymota.ddns.net
secretName: mi-tls-secret
rules:
- host: "reymota.ddns.net"
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: vaultwarden
port:
number: 80

+ 82
- 0
HelmCharts/vw-chart/values.yaml View File

@ -0,0 +1,82 @@
# Default values for vw-chart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: nginx
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 80
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}

+ 0
- 13
Jellyfin/docker-compose.yml View File

@ -1,13 +0,0 @@
version: '3.5'
services:
jellyfin:
image: jellyfin/jellyfin
container_name: jellyfin
network_mode: "host"
volumes:
- /mnt/Externo/jellyfin/config:/config
- /mnt/Externo/jellyfin/cache:/cache
- /mnt/Externo/jellyfin/media:/media
- /mnt/Externo/jellyfin/media2:/media2:ro
restart: 'unless-stopped'

+ 0
- 14
Jellyfin/jellyfin-claim0-persistentvolumeclaim.yaml View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: jellyfin-claim0
name: jellyfin-claim0
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

+ 0
- 14
Jellyfin/jellyfin-claim1-persistentvolumeclaim.yaml View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: jellyfin-claim1
name: jellyfin-claim1
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

+ 0
- 14
Jellyfin/jellyfin-claim2-persistentvolumeclaim.yaml View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: jellyfin-claim2
name: jellyfin-claim2
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

+ 0
- 14
Jellyfin/jellyfin-claim3-persistentvolumeclaim.yaml View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: jellyfin-claim3
name: jellyfin-claim3
spec:
accessModes:
- ReadOnlyMany
resources:
requests:
storage: 100Mi
status: {}

+ 0
- 56
Jellyfin/jellyfin-deployment.yaml View File

@ -1,56 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: jellyfin
name: jellyfin
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: jellyfin
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: jellyfin
spec:
containers:
- image: jellyfin/jellyfin
name: jellyfin
resources: {}
volumeMounts:
- mountPath: /config
name: jellyfin-claim0
- mountPath: /cache
name: jellyfin-claim1
- mountPath: /media
name: jellyfin-claim2
- mountPath: /media2
name: jellyfin-claim3
readOnly: true
restartPolicy: Always
volumes:
- name: jellyfin-claim0
persistentVolumeClaim:
claimName: jellyfin-claim0
- name: jellyfin-claim1
persistentVolumeClaim:
claimName: jellyfin-claim1
- name: jellyfin-claim2
persistentVolumeClaim:
claimName: jellyfin-claim2
- name: jellyfin-claim3
persistentVolumeClaim:
claimName: jellyfin-claim3
readOnly: true
status: {}

+ 0
- 50
Kanboard/db-deployment.yaml View File

@ -1,50 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: db
name: db
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: db
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: db
spec:
containers:
- args:
- --default-authentication-plugin=mysql_native_password
env:
- name: MYSQL_DATABASE
value: kanboard
- name: MYSQL_PASSWORD
value: kanboard-secret
- name: MYSQL_ROOT_PASSWORD
value: secret
- name: MYSQL_USER
value: kanboard
image: mariadb:latest
name: db
resources: {}
volumeMounts:
- mountPath: /var/lib/mysql
name: db
restartPolicy: Always
volumes:
- name: db
persistentVolumeClaim:
claimName: db
status: {}

+ 0
- 14
Kanboard/db-persistentvolumeclaim.yaml View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: db
name: db
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

+ 0
- 28
Kanboard/docker-compose.yml View File

@ -1,28 +0,0 @@
version: '2'
services:
kanboard:
image: kanboard/kanboard:latest
ports:
- "80:80"
- "443:443"
volumes:
- kanboard_data:/var/www/app/data
- kanboard_plugins:/var/www/app/plugins
- kanboard_ssl:/etc/nginx/ssl
environment:
DATABASE_URL: mysql://kanboard:kanboard-secret@db/kanboard
db:
image: mariadb:latest
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: kanboard
MYSQL_USER: kanboard
MYSQL_PASSWORD: kanboard-secret
volumes:
- db:/var/lib/mysql
volumes:
kanboard_data:
kanboard_plugins:
kanboard_ssl:
db:

+ 0
- 14
Kanboard/kanboard-data-persistentvolumeclaim.yaml View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: kanboard-data
name: kanboard-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

+ 0
- 55
Kanboard/kanboard-deployment.yaml View File

@ -1,55 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: kanboard
name: kanboard
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: kanboard
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: kanboard
spec:
containers:
- env:
- name: DATABASE_URL
value: mysql://kanboard:kanboard-secret@db/kanboard
image: kanboard/kanboard:latest
name: kanboard
ports:
- containerPort: 80
- containerPort: 443
resources: {}
volumeMounts:
- mountPath: /var/www/app/data
name: kanboard-data
- mountPath: /var/www/app/plugins
name: kanboard-plugins
- mountPath: /etc/nginx/ssl
name: kanboard-ssl
restartPolicy: Always
volumes:
- name: kanboard-data
persistentVolumeClaim:
claimName: kanboard-data
- name: kanboard-plugins
persistentVolumeClaim:
claimName: kanboard-plugins
- name: kanboard-ssl
persistentVolumeClaim:
claimName: kanboard-ssl
status: {}

+ 0
- 14
Kanboard/kanboard-plugins-persistentvolumeclaim.yaml View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: kanboard-plugins
name: kanboard-plugins
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

+ 0
- 22
Kanboard/kanboard-service.yaml View File

@ -1,22 +0,0 @@
apiVersion: v1
kind: Service
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: kanboard
name: kanboard
spec:
ports:
- name: "80"
port: 80
targetPort: 80
- name: "443"
port: 443
targetPort: 443
selector:
io.kompose.service: kanboard
status:
loadBalancer: {}

+ 0
- 14
Kanboard/kanboard-ssl-persistentvolumeclaim.yaml View File

@ -1,14 +0,0 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: kanboard-ssl
name: kanboard-ssl
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}

+ 14
- 0
LetsEncrypt/clusterissuer.yaml View File

@ -0,0 +1,14 @@
apiVersion: cert-manager.io/v1
kind: ClusterIssuer # I'm using ClusterIssuer here
metadata:
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: king.bernard.b@gmail.com
privateKeySecretRef:
name: letsencrypt-prod
solvers:
- http01:
ingress:
class: nginx

+ 0
- 4
LetsEncrypt/instalaCertManager.sh View File

@ -1,4 +0,0 @@
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.5.3 --set installCRDs=true

+ 1
- 0
Metallb/obtenExternalIP.sh View File

@ -0,0 +1 @@
kubectl get svc --namespace=ingress-nginx ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}'

Loading…
Cancel
Save