Browse Source

Quito HTTPS y añado SpagoBI

main
Celestino Rey 2 years ago
parent
commit
be12478e42
38 changed files with 555 additions and 250 deletions
  1. +3
    -0
      Comunes/creaImagenSpagoBI.sh
  2. +0
    -14
      HTTPS/certbot-claim0-persistentvolumeclaim.yaml
  3. +0
    -14
      HTTPS/certbot-claim1-persistentvolumeclaim.yaml
  4. +0
    -44
      HTTPS/certbot-deployment.yaml
  5. +0
    -1
      HTTPS/certbot/conf/accounts/acme-v02.api.letsencrypt.org/directory/c969070eddffc3f18a9faeeb772e0d49/meta.json
  6. +0
    -1
      HTTPS/certbot/conf/accounts/acme-v02.api.letsencrypt.org/directory/c969070eddffc3f18a9faeeb772e0d49/private_key.json
  7. +0
    -1
      HTTPS/certbot/conf/accounts/acme-v02.api.letsencrypt.org/directory/c969070eddffc3f18a9faeeb772e0d49/regr.json
  8. +0
    -8
      HTTPS/certbot/conf/csr/0000_csr-certbot.pem
  9. +0
    -7
      HTTPS/certbot/conf/csr/0001_csr-certbot.pem
  10. +0
    -5
      HTTPS/certbot/conf/keys/0000_key-certbot.pem
  11. +0
    -5
      HTTPS/certbot/conf/keys/0001_key-certbot.pem
  12. +0
    -17
      HTTPS/docker-compose.yml
  13. +0
    -17
      HTTPS/docker-compose.yml.copia
  14. +8
    -0
      HTTPS/kustomization.yaml
  15. +23
    -0
      HTTPS/miweb-configmap.yaml
  16. +29
    -0
      HTTPS/miweb-deployment.yaml
  17. +21
    -0
      HTTPS/miweb-ingress.yaml
  18. +6
    -0
      HTTPS/miweb-letsencrypt-certs.yaml
  19. +30
    -0
      HTTPS/miweb-letsencrypt-job.yaml
  20. +10
    -0
      HTTPS/miweb-letsencrypt-service.yaml
  21. +12
    -0
      HTTPS/miweb-service.yaml
  22. +0
    -15
      HTTPS/nginx/conf/nginx.conf
  23. +0
    -14
      HTTPS/webserver-claim0-persistentvolumeclaim.yaml
  24. +0
    -14
      HTTPS/webserver-claim1-persistentvolumeclaim.yaml
  25. +0
    -51
      HTTPS/webserver-deployment.yaml
  26. +0
    -22
      HTTPS/webserver-service.yaml
  27. +14
    -0
      HelmCharts/helmSpagoBI.sh
  28. +4
    -0
      HelmCharts/preparaSpagoBI/bi-namespace.yaml
  29. +11
    -0
      HelmCharts/preparaSpagoBI/pv-local-mysql.yaml
  30. +12
    -0
      HelmCharts/preparaSpagoBI/pv-local-spagobi.yaml
  31. +23
    -0
      HelmCharts/spagobi-chart/.helmignore
  32. +24
    -0
      HelmCharts/spagobi-chart/Chart.yaml
  33. +82
    -0
      HelmCharts/spagobi-chart/templates/mysql-deployment.yaml
  34. +56
    -0
      HelmCharts/spagobi-chart/templates/php-deployment.yaml
  35. +11
    -0
      HelmCharts/spagobi-chart/templates/registry-secrets.yaml
  36. +84
    -0
      HelmCharts/spagobi-chart/templates/spagobi-deployment.yaml
  37. +10
    -0
      HelmCharts/spagobi-chart/templates/spagobi-secrets.yaml
  38. +82
    -0
      HelmCharts/spagobi-chart/values.yaml

+ 3
- 0
Comunes/creaImagenSpagoBI.sh View File

@ -0,0 +1,3 @@
docker pull spagobilabs/spagobi:all-in-one
docker tag spagobilabs/spagobi:all-in-one docker-registry:32000/spagobi:1.0
docker push docker-registry:32000/spagobi:1.0

+ 0
- 14
HTTPS/certbot-claim0-persistentvolumeclaim.yaml View File

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

+ 0
- 14
HTTPS/certbot-claim1-persistentvolumeclaim.yaml View File

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

+ 0
- 44
HTTPS/certbot-deployment.yaml View File

@ -1,44 +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: certbot
name: certbot
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: certbot
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: certbot
spec:
containers:
- image: certbot/certbot:latest
name: certbot
resources: {}
volumeMounts:
- mountPath: /var/www/certbot/
name: certbot-claim0
- mountPath: /etc/letsencrypt/
name: certbot-claim1
restartPolicy: Always
volumes:
- name: certbot-claim0
persistentVolumeClaim:
claimName: certbot-claim0
- name: certbot-claim1
persistentVolumeClaim:
claimName: certbot-claim1
status: {}

+ 0
- 1
HTTPS/certbot/conf/accounts/acme-v02.api.letsencrypt.org/directory/c969070eddffc3f18a9faeeb772e0d49/meta.json View File

@ -1 +0,0 @@
{"creation_dt": "2023-02-01T09:26:45Z", "creation_host": "f4594feda273"}

+ 0
- 1
HTTPS/certbot/conf/accounts/acme-v02.api.letsencrypt.org/directory/c969070eddffc3f18a9faeeb772e0d49/private_key.json View File

@ -1 +0,0 @@
{"n": "16P-IALymGf5NQxYwovtP6MbSReUJtQrfIFVYZVV5tWy3y3Qf7gjwwjq4Fa9sHrn_KmUvUkBWtikAohOw8SCv-IUakxjTWIHAEIyjU9oK57olnCmdGnYQWza0ffCU69H3piMagG7es2kl4s24E1dHO37cBm8GQ-UH-0xDZ3CsWoGQLY8u9bGocdQbujozGCsaMxRso4SdkBqB3S-sJEwiKZr4iBlXCnvv0YW6t0WlfqVKzpQvU5u4UW7BBWCoxBTY0Ehj20BYsHC31mXh5d4e4Rn_THzBg9IZsKdEjNbMXETMauaW3JisMgONT8htdQUlQz1lHgWPVKi-iW0dFYJfQ", "e": "AQAB", "d": "LzFf-JQEkTeyCbrPwxX6AHMbEdpD7WKCON-aNr7Gu7vZh2_goU8Enpa5RosdPP4M_tYDLBDJ596hOD-qEzySy9k31BKvKdySASu7ogL2npNKvj_dof0XG6xt0EVrhUKHVU8n7bw-0k-mnZbVVe4AeogXvs8XBBoNdhZEJcF4vjg5pvQcK-HIOi9Fs7yUHaTqo-qQgDRBH7TjY8Uq72X--SOWV05iofQ3--riT0GWWgyld3pDgAHsM8zhyOq8XlItbS3tUTYsc4Lw8vrvx2R7aDWtzCP0LC5E1sO0WhnfHHMdaKWSJ2JDhmiJs3zF__iu95yGYIbe8Z0RX2qnVV32uQ", "p": "-hTTf6UEUOkSN4SxHcluGl0kKk7f9plyUpX5gmtZYg6MSXOAj2DkPWOim5ep_-QJdI-rTnAFbEeXVtxfCkVxmmHIPdaC7pjBA23qcdHWMu8JkrHSEM6nzIl0vI2QgXWZCDuZG6-7jjef8MKpfd1urLMkecDwuK34OhZcT1WNnNU", "q": "3L5_3iZNYLEbusaqy4ndlrPcFhSJ6QMc2PBKi3yCmXootVaL_TmQAtOaMkNdd_NO-KaqVNM9ydnJtQt0EVnG-eEqBmL1nl4L92nnbytlU9VPYDbiWQ9STArqd2Wf2kSYz80mYJ1CF4hJbqVAyrO8aj8h2q2SzpnMhqBF-9EYbgk", "dp": "NfXacPdtR_wSdzJFeVTmUf_49rwQLUiM128O6Go7XiIfeRXYDpfsh6aBBquh_dn5hFIft4wKT4PfDtn8E95KFfK1X0py9AK32wKTjL2nR1Q2r5V46zF8GXErZCfzn0t9mr4pWkT_5j7wXuXR5pup7s-0tiTAjEjVf8slXeTq6oU", "dq": "0Sdu4H5KMqOdMouqqNAoNPKWRhWP1kgsvSBwgVmoJOOqTqeCXJx95y-3mohZt53B5beFDHpawTap9_CyOP5nmbvOpd59-2AA1pxxvNPRXm1umCtorBnoUETHg_m2TIlSgRJQmppmVQW9DilmCqnijIjk-t4bi8YOFEEoDkFAdIE", "qi": "ATb2ooVw9dyrJpGbKedTz-NiGYX7n9oypPUKccy7B-UM8OD2ulmRrs2n8IQsY3JYeYfuAF-FXiRQJWIujpBR-Ao3w4eKU1kf-ucyWLyfLAaCM5F7U6cAaGN3jVblefCrLzbEKpbjc6XJtu6nKYEz1af4yQYcTWFTC4hjZwAvgCw", "kty": "RSA"}

+ 0
- 1
HTTPS/certbot/conf/accounts/acme-v02.api.letsencrypt.org/directory/c969070eddffc3f18a9faeeb772e0d49/regr.json View File

@ -1 +0,0 @@
{"body": {}, "uri": "https://acme-v02.api.letsencrypt.org/acme/acct/943534587"}

+ 0
- 8
HTTPS/certbot/conf/csr/0000_csr-certbot.pem View File

@ -1,8 +0,0 @@
-----BEGIN CERTIFICATE REQUEST-----
MIHvMIGWAgEAMAAwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATars0S63nlblI4
2A31mqLGhFOqrLzHl/PjalG02zLr1KsBzA/6gPdtXXZw91TSjmG9tyHaI7naVTla
jHR6VQghoDQwMgYJKoZIhvcNAQkOMSUwIzAhBgNVHREEGjAYghZyZXltb3RhLmRk
bnMubmV0OjMyMDgwMAoGCCqGSM49BAMCA0gAMEUCIQCDczOIb2HG0Ha/iow9h5zo
bPpPRytdP3GgBHlOlyPujgIgB6E44CIy/6FLACPLJGyRSQ6kxRpsLGiCEHtZJSt9
Vs8=
-----END CERTIFICATE REQUEST-----

+ 0
- 7
HTTPS/certbot/conf/csr/0001_csr-certbot.pem View File

@ -1,7 +0,0 @@
-----BEGIN CERTIFICATE REQUEST-----
MIHpMIGQAgEAMAAwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAT05+0vm9vlNnsf
wiFQLToVJfmAkmbTpLZNKinXw00EtFAJTGff2gZ638zqcu3hXLknbLVj2n8WqHYA
I9F+SEVLoC4wLAYJKoZIhvcNAQkOMR8wHTAbBgNVHREEFDASghByZXltb3RhLmRk
bnMubmV0MAoGCCqGSM49BAMCA0gAMEUCIHkFY6vSjYUB7lLI4uQPVJiwvTohT7Po
D4AjbG7dx+FhAiEA+msGjSQGcyZBL6RVPFaZw0GHaMgAKWCPcNUt0sUFZdI=
-----END CERTIFICATE REQUEST-----

+ 0
- 5
HTTPS/certbot/conf/keys/0000_key-certbot.pem View File

@ -1,5 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgX47hYo5mX70vHNCh
pqXiiET3RBxF7/xnVhzE5TKou0mhRANCAATars0S63nlblI42A31mqLGhFOqrLzH
l/PjalG02zLr1KsBzA/6gPdtXXZw91TSjmG9tyHaI7naVTlajHR6VQgh
-----END PRIVATE KEY-----

+ 0
- 5
HTTPS/certbot/conf/keys/0001_key-certbot.pem View File

@ -1,5 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgU+yxM3TUNGNAUtEF
s1euxemWrCasGvLlDns6/zaZIMChRANCAAT05+0vm9vlNnsfwiFQLToVJfmAkmbT
pLZNKinXw00EtFAJTGff2gZ638zqcu3hXLknbLVj2n8WqHYAI9F+SEVL
-----END PRIVATE KEY-----

+ 0
- 17
HTTPS/docker-compose.yml View File

@ -1,17 +0,0 @@
version: '3'
services:
webserver:
image: nginx:latest
ports:
- 80:80
- 443:443
restart: always
volumes:
- /mnt/cluster/miweb/conf:/etc/nginx/conf.d/:ro
- /mnt/cluster/miweb/www:/var/www/certbot/:ro
certbot:
image: certbot/certbot:latest
volumes:
- /mnt/cluster/miweb/certbot/www/:/var/www/certbot/:rw
- /mnt/cluster/miweb/certbot/conf/:/etc/letsencrypt/:rw

+ 0
- 17
HTTPS/docker-compose.yml.copia View File

@ -1,17 +0,0 @@
version: '3'
services:
webserver:
image: nginx:latest
ports:
- 80:80
- 443:443
restart: always
volumes:
- ./nginx/conf:/etc/nginx/conf.d/:ro
- ./certbot/www:/var/www/certbot/:ro
certbot:
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw

+ 8
- 0
HTTPS/kustomization.yaml View File

@ -0,0 +1,8 @@
resources:
- miweb-configmap.yaml
- miweb-deployment.yaml
- miweb-service.yaml
- miweb-ingress.yaml
- miweb-letsencrypt-job.yaml
- miweb-letsencrypt-service.yaml
- miweb-letsencrypt-certs.yaml

+ 23
- 0
HTTPS/miweb-configmap.yaml View File

@ -0,0 +1,23 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-config
data:
default.conf: |
upstream letsencrypt {
server letsencrypt:80 max_fails=0 fail_timeout=1s;
}
server {
listen 80;
listen [::]:80;
server_name _;
location / {
add_header Content-Type text/plain; # Prevents download
return 200 "¡Hola mundo! Demo de Kubernetes + Let's encrypt.";
}
# Redirect all traffic in /.well-known/ to letsencrypt
location ^~ /.well-known/acme-challenge/ {
proxy_pass http://letsencrypt;
}
}

+ 29
- 0
HTTPS/miweb-deployment.yaml View File

@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx
spec:
selector:
matchLabels:
app: nginx
replicas: 1
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
volumeMounts:
- name: nginx-configs
mountPath: /etc/nginx/conf.d
# Load the configuration files for nginx
volumes:
- name: nginx-configs
configMap:
name: nginx-config

+ 21
- 0
HTTPS/miweb-ingress.yaml View File

@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "kubernetes-demo-app-ingress-service"
spec:
tls:
- hosts:
- reymota.ddns.net
secretName: letsencrypt-certs
rules:
- host: reymota.ddns.net # CHANGE ME!
http:
paths:
# The * is needed so that all traffic gets redirected to nginx
- path: /*
pathType: Prefix
backend:
service:
name: nginx
port:
number: 80

+ 6
- 0
HTTPS/miweb-letsencrypt-certs.yaml View File

@ -0,0 +1,6 @@
apiVersion: v1
kind: Secret
metadata:
name: letsencrypt-certs
type: Opaque
# Create an empty secret (with no data) in order for the update to work

+ 30
- 0
HTTPS/miweb-letsencrypt-job.yaml View File

@ -0,0 +1,30 @@
apiVersion: batch/v1
kind: Job
metadata:
name: letsencrypt-job
labels:
app: letsencrypt
spec:
template:
metadata:
name: letsencrypt
labels:
app: letsencrypt
spec:
containers:
# Bash script that starts an http server and launches certbot
# Fork of github.com/sjenning/kube-nginx-letsencrypt
- image: quay.io/hiphipjorge/kube-nginx-letsencrypt:latest
name: letsencrypt
imagePullPolicy: Always
ports:
- name: letsencrypt
containerPort: 80
env:
- name: DOMAINS
value: reymota.ddns.net # Domain you want to use. CHANGE ME!
- name: EMAIL
value: king.bernard.b@gmail.com # Your email. CHANGE ME!
- name: SECRET
value: letsencrypt-certs
restartPolicy: Never

+ 10
- 0
HTTPS/miweb-letsencrypt-service.yaml View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: letsencrypt
spec:
selector:
app: letsencrypt
ports:
- protocol: "TCP"
port: 80

+ 12
- 0
HTTPS/miweb-service.yaml View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
selector:
app: nginx
type: NodePort
ports:
- protocol: "TCP"
nodePort: 30080
port: 80

+ 0
- 15
HTTPS/nginx/conf/nginx.conf View File

@ -1,15 +0,0 @@
server {
listen 80;
listen [::]:80;
server_name reymota.ddns.net;
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://reymota.ddns.net:30080$request_uri;
}
}

+ 0
- 14
HTTPS/webserver-claim0-persistentvolumeclaim.yaml View File

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

+ 0
- 14
HTTPS/webserver-claim1-persistentvolumeclaim.yaml View File

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

+ 0
- 51
HTTPS/webserver-deployment.yaml View File

@ -1,51 +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: webserver
name: webserver
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: webserver
strategy:
type: Recreate
template:
metadata:
annotations:
kompose.cmd: kompose convert
kompose.version: 1.26.0 (40646f47)
creationTimestamp: null
labels:
io.kompose.service: webserver
spec:
containers:
- image: nginx:latest
name: webserver
ports:
- containerPort: 80
- containerPort: 443
resources: {}
volumeMounts:
- mountPath: /etc/nginx/conf.d/
name: webserver-claim0
readOnly: true
- mountPath: /var/www/certbot/
name: webserver-claim1
readOnly: true
restartPolicy: Always
volumes:
- name: webserver-claim0
persistentVolumeClaim:
claimName: webserver-claim0
readOnly: true
- name: webserver-claim1
persistentVolumeClaim:
claimName: webserver-claim1
readOnly: true
status: {}

+ 0
- 22
HTTPS/webserver-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: webserver
name: webserver
spec:
ports:
- name: "80"
port: 80
targetPort: 80
- name: "443"
port: 443
targetPort: 443
selector:
io.kompose.service: webserver
status:
loadBalancer: {}

+ 14
- 0
HelmCharts/helmSpagoBI.sh View File

@ -0,0 +1,14 @@
#!/bin/bash
if [ "$1" = "i" ]
then
kubectl apply -f ./preparaSpagoBI/bi-namespace.yaml
kubectl apply -f ./preparaSpagoBI/pv-local-mysql.yaml
kubectl apply -f ./preparaSpagoBI/pv-local-spagobi.yaml
helm install spagobi spagobi-chart/
else
helm uninstall spagobi
kubectl delete -f ./preparaSpagoBI/bi-namespace.yaml
kubectl delete -f ./preparaSpagoBI/pv-local-mysql.yaml
kubectl delete -f ./preparaSpagoBI/pv-local-spagobi.yaml
fi

+ 4
- 0
HelmCharts/preparaSpagoBI/bi-namespace.yaml View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: spagobi

+ 11
- 0
HelmCharts/preparaSpagoBI/pv-local-mysql.yaml View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: bi-data
spec:
capacity:
storage: 20Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/Externo/spagobi/spagobi-db"

+ 12
- 0
HelmCharts/preparaSpagoBI/pv-local-spagobi.yaml View File

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

+ 23
- 0
HelmCharts/spagobi-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/spagobi-chart/Chart.yaml View File

@ -0,0 +1,24 @@
apiVersion: v2
name: spagobi-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 recommended to use it with quotes.
appVersion: "1.16.0"

+ 82
- 0
HelmCharts/spagobi-chart/templates/mysql-deployment.yaml View File

@ -0,0 +1,82 @@
apiVersion: v1
kind: Service
metadata:
name: spagobi-mysql
namespace: spagobi
labels:
app: spagobi
spec:
ports:
- port: 3306
selector:
app: spagobi
tier: mysql
clusterIP: None
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-bi-pv-claim
namespace: spagobi
labels:
app: spagobi
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: spagobi-mysql
namespace: spagobi
labels:
app: spagobi
spec:
selector:
matchLabels:
app: spagobi
tier: mysql
strategy:
type: Recreate
template:
metadata:
labels:
app: spagobi
tier: mysql
spec:
containers:
- image: docker-registry:32000/mariadb:1.0
name: mysql
env:
- name: MYSQL_USER
valueFrom:
secretKeyRef:
name: mysqlbi-pass
key: db_user
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: mysqlbi-pass
key: db_pass
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mysqlbi-pass
key: db_root_pass
- name: MYSQL_DATABASE
value: spagobi
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- name: mysql-persistent-storage
mountPath: /var/lib/mysql
imagePullSecrets:
- name: reg-cred-secret
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-bi-pv-claim

+ 56
- 0
HelmCharts/spagobi-chart/templates/php-deployment.yaml View File

@ -0,0 +1,56 @@
apiVersion: v1
kind: Service
metadata:
name: phpmyadmin-spagobi
namespace: spagobi
labels:
app: spagobi
spec:
selector:
app: spagobi
tier: phpmyadmin
type: NodePort
ports:
- name: phpadmin
port: 80
nodePort: 30680
targetPort: phpmyadm
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: phpmyadmin-spagobi
namespace: spagobi
labels:
app: spagobi
spec:
selector:
matchLabels:
app: spagobi
tier: phpmyadmin
strategy:
type: Recreate
template:
metadata:
labels:
app: spagobi
tier: phpmyadmin
spec:
containers:
- name: phpmyadmin
image: docker-registry:32000/phpmyadmin:1.0
ports:
- containerPort: 80
name: phpmyadm
env:
- name: PMA_HOST
value: spagobi-mysql
- name: PMA_PORT
value: "3306"
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: mysqlbi-pass
key: password
imagePullSecrets:
- name: reg-cred-secret

+ 11
- 0
HelmCharts/spagobi-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: spagobi
resourceVersion: "19890385"
uid: 66b3b7c5-26c1-4e5a-af4e-dc973aaafe4b
type: kubernetes.io/dockerconfigjson

+ 84
- 0
HelmCharts/spagobi-chart/templates/spagobi-deployment.yaml View File

@ -0,0 +1,84 @@
apiVersion: v1
kind: Service
metadata:
name: spagobi
namespace: spagobi
labels:
app: spagobi
spec:
type: NodePort
ports:
- port: 8080
nodePort: 30188
targetPort: spagobi
selector:
app: spagobi
tier: frontend
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: bi-pv-claim
namespace: spagobi
labels:
app: spagobi
spec:
accessModes:
- ReadWriteOnce
storageClassName: ""
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: spagobi
namespace: spagobi
labels:
app: spagobi
spec:
selector:
matchLabels:
app: spagobi
tier: frontend
strategy:
type: Recreate
template:
metadata:
labels:
app: spagobi
tier: frontend
spec:
containers:
- image: docker-registry:32000/spagobi:1.0
name: spagobi
env:
- name: DB_ENV_MYSQL_USER
valueFrom:
secretKeyRef:
name: mysqlbi-pass
key: db_user
- name: DB_ENV_MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: mysqlbi-pass
key: db_pass
- name: DB_ENV_MYSQL_DATABASE
value: spagobi
- name: DB_PORT_3306_TCP_ADDR
value: spagobi-mysql
- name: DB_PORT_3306_TCP_PORT
value: "3306"
ports:
- containerPort: 8080
name: spagobi
#volumeMounts:
#- name: spagobi-persistent-storage
#mountPath: /var/www/html
imagePullSecrets:
- name: reg-cred-secret
volumes:
- name: spagobi-persistent-storage
persistentVolumeClaim:
claimName: bi-pv-claim

+ 10
- 0
HelmCharts/spagobi-chart/templates/spagobi-secrets.yaml View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: Secret
metadata:
name: mysqlbi-pass
namespace: spagobi
data:
password: RHNhLTAyMTM=
db_user: cm9vdA==
db_pass: RHNhLTAyMTM=
db_root_pass: RHNhLTAyMTM=

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

@ -0,0 +1,82 @@
# Default values for wordpress-chart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: docker-registry:32000
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
imagePullSecrets: [reg-cred-secret]
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: NodePort
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: {}

Loading…
Cancel
Save