feat: separate nginx deployment to serve Element Desktop setup scripts
This commit is contained in:
parent
cf8bc00613
commit
80fa13b63f
@ -61,37 +61,6 @@ spec:
|
|||||||
enabled: true
|
enabled: true
|
||||||
ingress:
|
ingress:
|
||||||
host: axion1337.chat
|
host: axion1337.chat
|
||||||
podAnnotations:
|
|
||||||
# Force pod restart bei ConfigMap Änderungen
|
|
||||||
checksum/config: "element-web-docs"
|
|
||||||
additional:
|
|
||||||
initContainers:
|
|
||||||
- name: copy-docs
|
|
||||||
image: busybox:1.36
|
|
||||||
command:
|
|
||||||
- sh
|
|
||||||
- -c
|
|
||||||
- |
|
|
||||||
mkdir -p /html/docs/setup
|
|
||||||
cp /config/README-Element-Setup.md /html/docs/setup/
|
|
||||||
cp /config/element-setup-windows.cmd /html/docs/setup/
|
|
||||||
cp /config/element-setup-macos.command /html/docs/setup/
|
|
||||||
cp /config/element-setup-linux.sh /html/docs/setup/
|
|
||||||
chmod 644 /html/docs/setup/*
|
|
||||||
volumeMounts:
|
|
||||||
- name: element-web-docs
|
|
||||||
mountPath: /config
|
|
||||||
- name: html-docs
|
|
||||||
mountPath: /html
|
|
||||||
volumes:
|
|
||||||
- name: element-web-docs
|
|
||||||
configMap:
|
|
||||||
name: ess-element-web-docs
|
|
||||||
- name: html-docs
|
|
||||||
emptyDir: {}
|
|
||||||
volumeMounts:
|
|
||||||
- name: html-docs
|
|
||||||
mountPath: /usr/share/nginx/html/docs
|
|
||||||
|
|
||||||
# Element Admin
|
# Element Admin
|
||||||
elementAdmin:
|
elementAdmin:
|
||||||
|
|||||||
108
apps/production/element-web-docs-server.yaml
Normal file
108
apps/production/element-web-docs-server.yaml
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: element-web-docs
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: element-web-docs
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: element-web-docs
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: nginx:1.26-alpine
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
volumeMounts:
|
||||||
|
- name: config
|
||||||
|
mountPath: /config
|
||||||
|
- name: nginx-conf
|
||||||
|
mountPath: /etc/nginx/conf.d/default.conf
|
||||||
|
subPath: nginx.conf
|
||||||
|
- name: html
|
||||||
|
mountPath: /usr/share/nginx/html
|
||||||
|
lifecycle:
|
||||||
|
postStart:
|
||||||
|
exec:
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- |
|
||||||
|
mkdir -p /usr/share/nginx/html/docs/setup
|
||||||
|
cp /config/README-Element-Setup.md /usr/share/nginx/html/docs/setup/
|
||||||
|
cp /config/element-setup-windows.cmd /usr/share/nginx/html/docs/setup/
|
||||||
|
cp /config/element-setup-macos.command /usr/share/nginx/html/docs/setup/
|
||||||
|
cp /config/element-setup-linux.sh /usr/share/nginx/html/docs/setup/
|
||||||
|
chmod 644 /usr/share/nginx/html/docs/setup/*
|
||||||
|
volumes:
|
||||||
|
- name: config
|
||||||
|
configMap:
|
||||||
|
name: ess-element-web-docs
|
||||||
|
- name: nginx-conf
|
||||||
|
configMap:
|
||||||
|
name: element-web-docs-nginx
|
||||||
|
- name: html
|
||||||
|
emptyDir: {}
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: element-web-docs
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: element-web-docs
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 8080
|
||||||
|
type: ClusterIP
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: element-web-docs
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: axion1337.chat
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /docs/setup
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: element-web-docs
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: element-web-docs-nginx
|
||||||
|
namespace: matrix
|
||||||
|
data:
|
||||||
|
nginx.conf: |
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
|
||||||
|
location /docs/setup/ {
|
||||||
|
autoindex on;
|
||||||
|
add_header Content-Type application/octet-stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -8,6 +8,7 @@ resources:
|
|||||||
- custom-configs/element-values.yaml
|
- custom-configs/element-values.yaml
|
||||||
- custom-configs/mas-secret.yaml
|
- custom-configs/mas-secret.yaml
|
||||||
- element-web-docs-configmap.yaml
|
- element-web-docs-configmap.yaml
|
||||||
|
- element-web-docs-server.yaml
|
||||||
# HelmRelease (muss ganz unten stehen, damit die ConfigMaps vorher da sind!)
|
# HelmRelease (muss ganz unten stehen, damit die ConfigMaps vorher da sind!)
|
||||||
- element-server-suite.yaml
|
- element-server-suite.yaml
|
||||||
# Custom Apex Ingress für Element Web + Well-Known auf axion1337.chat
|
# Custom Apex Ingress für Element Web + Well-Known auf axion1337.chat
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user