añadido apolo
This commit is contained in:
41
apolo/deployments/deploy-app6.yaml
Normal file
41
apolo/deployments/deploy-app6.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-app6
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-app6
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: app6
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-app6
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-app6
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: app6
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: app6
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-app6:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: tcp-app6
|
||||
containerPort: 2525
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 2525 }
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket: { port: 2525 }
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
resources:
|
||||
requests: { cpu: "50m", memory: "64Mi" }
|
||||
limits: { cpu: "500m", memory: "256Mi" }
|
||||
43
apolo/deployments/deploy-colossus.yaml
Normal file
43
apolo/deployments/deploy-colossus.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-colossus
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-colossus
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: colossus
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-colossus
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-colossus
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: colossus
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: colossus
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-webcolossus:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
# Si el contenedor expone / como OK:
|
||||
readinessProbe:
|
||||
httpGet: { path: /, port: 3000 }
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet: { path: /, port: 3000 }
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
# Si más tarde necesitas forzar backend .net en runtime (solo si la imagen lo lee en runtime):
|
||||
# env:
|
||||
# - name: NEXT_PUBLIC_APP_BASE_URL
|
||||
# value: "https://backend.apolo.c2et.net"
|
||||
52
apolo/deployments/deploy-consumer.yaml
Normal file
52
apolo/deployments/deploy-consumer.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-consumer
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-consumer
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: consumer
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-consumer
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-consumer
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: consumer
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: consumer
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-consumer:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: apolo-backend-secret
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: apolo-db-url
|
||||
key: DATABASE_URL
|
||||
- name: MESSENGER_TRANSPORT_DSN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: apolo-rabbit-dsn
|
||||
key: MESSENGER_TRANSPORT_DSN
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "128Mi"
|
||||
limits:
|
||||
cpu: "500m"
|
||||
memory: "512Mi"
|
||||
# Si necesitas que este pod resuelva FQDN internos a 200.10 vía tu CoreDNS:
|
||||
# dnsPolicy: None
|
||||
# dnsConfig:
|
||||
# nameservers: [ "192.168.200.11" ]
|
||||
49
apolo/deployments/deploy-coredns.yaml
Normal file
49
apolo/deployments/deploy-coredns.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: coredns-custom
|
||||
namespace: apolo
|
||||
labels:
|
||||
app: coredns-custom
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: coredns-custom
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: coredns-custom
|
||||
spec:
|
||||
containers:
|
||||
- name: coredns
|
||||
image: coredns/coredns:1.11.1
|
||||
args: ["-conf", "/etc/coredns/Corefile"]
|
||||
ports:
|
||||
- name: dns-udp
|
||||
containerPort: 53
|
||||
protocol: UDP
|
||||
- name: dns-tcp
|
||||
containerPort: 53
|
||||
protocol: TCP
|
||||
- name: metrics
|
||||
containerPort: 9153
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet: { path: /health, port: 8080 }
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet: { path: /health, port: 8080 }
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 20
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /etc/coredns
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: coredns-custom
|
||||
items:
|
||||
- key: Corefile
|
||||
path: Corefile
|
||||
48
apolo/deployments/deploy-drone.yaml
Normal file
48
apolo/deployments/deploy-drone.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-drone
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-drone
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: drone
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-drone
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-drone
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: drone
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: drone
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-drone:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
# Si Drone necesita otras vars del backend, puedes añadir:
|
||||
# envFrom:
|
||||
# - secretRef: { name: apolo-backend-secret }
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: apolo-drone-secret
|
||||
# Al ser worker, no exponemos puertos
|
||||
resources:
|
||||
requests: { cpu: "100m", memory: "128Mi" }
|
||||
limits: { cpu: "500m", memory: "512Mi" }
|
||||
# (Opcional) probes sencillos; quítalos si la imagen no los tolera
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["/bin/sh","-lc","ps -o pid= 1 >/dev/null 2>&1"]
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/sh","-lc","ps -o pid= 1 >/dev/null 2>&1"]
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
109
apolo/deployments/deploy-ejabberd.yaml
Normal file
109
apolo/deployments/deploy-ejabberd.yaml
Normal file
@@ -0,0 +1,109 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-ejabberd
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-ejabberd
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: ejabberd
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-ejabberd
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-ejabberd
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: ejabberd
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
|
||||
# >>> Asegura permisos/ownership en volúmenes
|
||||
securityContext:
|
||||
runAsUser: 9000
|
||||
runAsGroup: 9000
|
||||
fsGroup: 9000
|
||||
fsGroupChangePolicy: "OnRootMismatch"
|
||||
|
||||
initContainers:
|
||||
- name: make-chat-pem
|
||||
image: alpine:latest
|
||||
command: ["/bin/sh","-lc"]
|
||||
args:
|
||||
- |
|
||||
set -eu
|
||||
mkdir -p /work/conf
|
||||
cat /tls/tls.key /tls/tls.crt > /work/conf/chat.pem
|
||||
chmod 600 /work/conf/chat.pem
|
||||
volumeMounts:
|
||||
- { name: tls, mountPath: /tls, readOnly: true }
|
||||
- { name: conf, mountPath: /work/conf }
|
||||
|
||||
- name: fix-perms
|
||||
image: alpine:latest
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
runAsGroup: 0
|
||||
command: ["/bin/sh","-lc"]
|
||||
args:
|
||||
- |
|
||||
set -eu
|
||||
chown -R 9000:9000 /home/ejabberd/database || true
|
||||
chown -R 9000:9000 /home/ejabberd/logs || true
|
||||
chown -R 9000:9000 /home/ejabberd/conf || true
|
||||
volumeMounts:
|
||||
- { name: data, mountPath: /home/ejabberd/database }
|
||||
- { name: logs, mountPath: /home/ejabberd/logs }
|
||||
- { name: conf, mountPath: /home/ejabberd/conf }
|
||||
|
||||
containers:
|
||||
- name: ejabberd
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-ejabberd:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: apolo-ejabberd-secret
|
||||
ports:
|
||||
- { name: c2s, containerPort: 5222, protocol: TCP }
|
||||
- { name: s2s, containerPort: 5269, protocol: TCP }
|
||||
- { name: https, containerPort: 5443, protocol: TCP }
|
||||
- { name: http, containerPort: 5280, protocol: TCP }
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 5222 }
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket: { port: 5222 }
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
volumeMounts:
|
||||
- { name: data, mountPath: /home/ejabberd/database }
|
||||
- { name: logs, mountPath: /home/ejabberd/logs }
|
||||
- { name: conf, mountPath: /home/ejabberd/conf }
|
||||
- { name: confmap, mountPath: /home/ejabberd/conf/ejabberd.yml, subPath: ejabberd.yml }
|
||||
# inetrc opcional (para callar el warning)
|
||||
- { name: inetrc, mountPath: /home/ejabberd/conf/inetrc, subPath: inetrc, readOnly: true }
|
||||
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: apolo-ejabberd-data
|
||||
- name: logs
|
||||
persistentVolumeClaim:
|
||||
claimName: apolo-ejabberd-logs
|
||||
- name: conf
|
||||
emptyDir: {}
|
||||
- name: confmap
|
||||
configMap:
|
||||
name: apolo-ejabberd-config
|
||||
- name: tls
|
||||
secret:
|
||||
secretName: chat-tls
|
||||
- name: inetrc
|
||||
configMap:
|
||||
name: apolo-ejabberd-inetrc
|
||||
optional: true
|
||||
42
apolo/deployments/deploy-kms.yaml
Normal file
42
apolo/deployments/deploy-kms.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-kms
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-kms
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: kurento
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-kms
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-kms
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: kurento
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: kurento-media-server
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-kurento-media-server:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: apolo-kms-env
|
||||
ports:
|
||||
- name: ws
|
||||
containerPort: 8888
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 8888 }
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket: { port: 8888 }
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
52
apolo/deployments/deploy-kurento-api.yaml
Normal file
52
apolo/deployments/deploy-kurento-api.yaml
Normal file
@@ -0,0 +1,52 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-kurento-api
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-kurento-api
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: kurento-api
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-kurento-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-kurento-api
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: kurento-api
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: kurento-api
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-kurento-api:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: apolo-kurento-api-config
|
||||
- secretRef:
|
||||
name: apolo-kurento-api-secret
|
||||
ports:
|
||||
- name: https
|
||||
containerPort: 3000
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: tls
|
||||
mountPath: /app/keys
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: tls
|
||||
secret:
|
||||
secretName: meeting-tls
|
||||
items:
|
||||
- key: tls.key
|
||||
path: kurento.key
|
||||
- key: tls.crt
|
||||
path: kurento.crt
|
||||
# algunas apps piden "ca.crt"; reutilizamos el fullchain
|
||||
- key: tls.crt
|
||||
path: ca.crt
|
||||
49
apolo/deployments/deploy-mediamtx.yaml
Normal file
49
apolo/deployments/deploy-mediamtx.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-mediamtx
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-mediamtx
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: media
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-mediamtx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-mediamtx
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: media
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: mediamtx
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-media-server:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: apolo-mediamtx-env
|
||||
ports:
|
||||
- name: rtmp
|
||||
containerPort: 1935
|
||||
protocol: TCP
|
||||
- name: rtsp
|
||||
containerPort: 8554
|
||||
protocol: TCP
|
||||
- name: hls
|
||||
containerPort: 8887
|
||||
protocol: TCP
|
||||
# Probes sencillas por TCP en RTSP/RTMP. Ajusta si tu build expone health HTTP.
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 8554 }
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket: { port: 8554 }
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
43
apolo/deployments/deploy-nakama.yaml
Normal file
43
apolo/deployments/deploy-nakama.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-nakama
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-nakama
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: nakama
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-nakama
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-nakama
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: nakama
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: nakama
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-nakama:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 7350
|
||||
- name: grpc
|
||||
containerPort: 7351
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 7350 }
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket: { port: 7350 }
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
resources:
|
||||
requests: { cpu: "100m", memory: "128Mi" }
|
||||
limits: { cpu: "500m", memory: "512Mi" }
|
||||
54
apolo/deployments/deploy-php.yaml
Normal file
54
apolo/deployments/deploy-php.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-php
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-php
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: php
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-php
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-php
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: php
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: php-fpm
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-php:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: php-fpm
|
||||
containerPort: 9000
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: apolo-backend-secret
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: apolo-db-url
|
||||
key: DATABASE_URL
|
||||
- name: MESSENGER_TRANSPORT_DSN
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: apolo-rabbit-dsn
|
||||
key: MESSENGER_TRANSPORT_DSN
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 9000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 9000
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
66
apolo/deployments/deploy-portal.yaml
Normal file
66
apolo/deployments/deploy-portal.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-portal
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-portal
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: portal
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-portal
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-portal
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: portal
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
# Contenedor de la app (como venías)
|
||||
- name: portal
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-portal-https:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: app
|
||||
containerPort: 3000
|
||||
readinessProbe:
|
||||
httpGet: { path: /, port: 3000 }
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet: { path: /, port: 3000 }
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
|
||||
# Sidecar NGINX con sub_filter
|
||||
- name: nginx-proxy
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: proxy-conf
|
||||
mountPath: /etc/nginx/conf.d/default.conf
|
||||
subPath: default.conf
|
||||
readinessProbe:
|
||||
httpGet: { path: /, port: 8080 }
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
httpGet: { path: /, port: 8080 }
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
|
||||
volumes:
|
||||
- name: proxy-conf
|
||||
configMap:
|
||||
name: apolo-portal-proxy
|
||||
items:
|
||||
- key: default.conf
|
||||
path: default.conf
|
||||
68
apolo/deployments/deploy-postgres.yaml
Normal file
68
apolo/deployments/deploy-postgres.yaml
Normal file
@@ -0,0 +1,68 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-postgres
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-postgres
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: postgres
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-postgres
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: postgres
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
securityContext:
|
||||
fsGroup: 999
|
||||
initContainers:
|
||||
- name: init-pgdata
|
||||
image: busybox:1.36
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
mkdir -p /var/lib/postgresql/data/pgdata
|
||||
chown -R 999:999 /var/lib/postgresql/data
|
||||
chmod 700 /var/lib/postgresql/data/pgdata
|
||||
volumeMounts:
|
||||
- name: pgdata
|
||||
mountPath: /var/lib/postgresql/data
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
containers:
|
||||
- name: postgres
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-db:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
env:
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: apolo-db-secret
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["/bin/sh","-c","pg_isready -U $POSTGRES_USER -d $POSTGRES_DB -h 127.0.0.1"]
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket: { port: 5432 }
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
volumes:
|
||||
- name: pgdata
|
||||
persistentVolumeClaim:
|
||||
claimName: apolo-pgdata
|
||||
48
apolo/deployments/deploy-rabbitmq.yaml
Normal file
48
apolo/deployments/deploy-rabbitmq.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-rabbitmq
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-rabbitmq
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: rabbitmq
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-rabbitmq
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-rabbitmq
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: rabbitmq
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: rabbitmq
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-rabbitmq:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: apolo-rabbitmq-secret
|
||||
ports:
|
||||
- { name: amqp, containerPort: 5672 }
|
||||
- { name: mgmt, containerPort: 15672 }
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 5672 }
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket: { port: 5672 }
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 20
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/rabbitmq
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: apolo-rabbitmq-data
|
||||
45
apolo/deployments/deploy-streamer.yaml
Normal file
45
apolo/deployments/deploy-streamer.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-streamer
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-streamer
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: streamer
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-streamer
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-streamer
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: streamer
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: streamer
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-streamer-server:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ["npm","start"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: apolo-streamer-config
|
||||
- secretRef:
|
||||
name: apolo-streamer-secret
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
tcpSocket: { port: 80 }
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket: { port: 80 }
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
43
apolo/deployments/deploy-web.yaml
Normal file
43
apolo/deployments/deploy-web.yaml
Normal file
@@ -0,0 +1,43 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-web
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-web
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-web
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: web
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: nginx
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-web:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: apolo-web-config
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 80
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 80
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
42
apolo/deployments/deploy-websocket.yaml
Normal file
42
apolo/deployments/deploy-websocket.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: apolo-websocket
|
||||
namespace: apolo
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-websocket
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: websocket
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: apolo-websocket
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: apolo-websocket
|
||||
app.kubernetes.io/part-of: apolo
|
||||
app.kubernetes.io/component: websocket
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-cred
|
||||
containers:
|
||||
- name: websocket
|
||||
image: harbor.c2et.com/xrf-ssl/xrf-websocket:6.0
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: ws
|
||||
containerPort: 6001
|
||||
- name: admin
|
||||
containerPort: 9601
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 6001
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 6001
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 20
|
||||
Reference in New Issue
Block a user