Refactor Argus,Gotify,Lighttpd
This commit is contained in:
4
services/Lighttpd/_namespace-lighttpd.yml
Normal file
4
services/Lighttpd/_namespace-lighttpd.yml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: lighttpd
|
@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: configmap-lighttpd-conf
|
||||
namespace: lighttpd
|
||||
data:
|
||||
lighttpd.conf: |
|
||||
server.modules = (
|
||||
@ -37,41 +38,3 @@ data:
|
||||
include_shell "cat /etc/lighttpd/vhosts.d/*.conf"
|
||||
.htpasswd: |
|
||||
readaccess:7eds8PvDwgkWvFZRnyKpTUDTzgi87mh4
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: configmap-lighttpd-vhosts
|
||||
data:
|
||||
bessems.com.conf: |
|
||||
$HTTP["host"] =~ "^bessems\.(com|eu)$" {
|
||||
server.document-root = "/var/www/bessems.com/"
|
||||
}
|
||||
gabaldon.eu.conf: |
|
||||
$HTTP["host"] =~ "^gabaldon\.(eu|nl)$" {
|
||||
server.document-root = "/var/www/gabaldon.eu/"
|
||||
}
|
||||
sn.itch.fyi.conf: |
|
||||
$HTTP["host"] == "sn.itch.fyi" {
|
||||
server.document-root = "/var/www/sn.itch.fyi/"
|
||||
|
||||
index-file.names += ("/_h5ai/public/index.php")
|
||||
}
|
||||
$HTTP["url"] =~ "^/repository|^/Repository" {
|
||||
auth.require = (
|
||||
"" => (
|
||||
"method" => "basic",
|
||||
"realm" => "Restricted access",
|
||||
"require" => "user=readaccess"
|
||||
)
|
||||
)
|
||||
}
|
||||
spamasaurus.com.conf: |
|
||||
$HTTP["host"] == "spamasaurus.com" {
|
||||
server.document-root = "/var/www/spamasaurus.com/public"
|
||||
|
||||
index-file.names += ("spamasaurusRex.login.php")
|
||||
}
|
||||
$HTTP["url"] =~ "^/.well-known/" {
|
||||
mimetype.assign += ( "server" => "application/json" )
|
||||
}
|
38
services/Lighttpd/configmap-configmap-lighttpd-vhosts.yaml
Normal file
38
services/Lighttpd/configmap-configmap-lighttpd-vhosts.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: configmap-lighttpd-vhosts
|
||||
namespace: lighttpd
|
||||
data:
|
||||
bessems.com.conf: |
|
||||
$HTTP["host"] =~ "^bessems\.(com|eu)$" {
|
||||
server.document-root = "/var/www/bessems.com/"
|
||||
}
|
||||
gabaldon.eu.conf: |
|
||||
$HTTP["host"] =~ "^gabaldon\.(eu|nl)$" {
|
||||
server.document-root = "/var/www/gabaldon.eu/"
|
||||
}
|
||||
sn.itch.fyi.conf: |
|
||||
$HTTP["host"] == "sn.itch.fyi" {
|
||||
server.document-root = "/var/www/sn.itch.fyi/"
|
||||
|
||||
index-file.names += ("/_h5ai/public/index.php")
|
||||
}
|
||||
$HTTP["url"] =~ "^/repository|^/Repository" {
|
||||
auth.require = (
|
||||
"" => (
|
||||
"method" => "basic",
|
||||
"realm" => "Restricted access",
|
||||
"require" => "user=readaccess"
|
||||
)
|
||||
)
|
||||
}
|
||||
spamasaurus.com.conf: |
|
||||
$HTTP["host"] == "spamasaurus.com" {
|
||||
server.document-root = "/var/www/spamasaurus.com/public"
|
||||
|
||||
index-file.names += ("spamasaurusRex.login.php")
|
||||
}
|
||||
$HTTP["url"] =~ "^/.well-known/" {
|
||||
mimetype.assign += ( "server" => "application/json" )
|
||||
}
|
@ -1,141 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: lighttpd
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
name: web
|
||||
port: 8080
|
||||
selector:
|
||||
app: lighttpd
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: lighttpd
|
||||
labels:
|
||||
app: lighttpd
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: lighttpd
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: lighttpd
|
||||
spec:
|
||||
containers:
|
||||
- name: lighttpd-php-pwsh
|
||||
image: bv11-cr01.bessems.eu/library/lighttpd-php-powershell
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: configmap-lighttpd-conf
|
||||
mountPath: /etc/lighttpd/lighttpd.conf
|
||||
subPath: lighttpd.conf
|
||||
- name: configmap-lighttpd-conf
|
||||
mountPath: /etc/lighttpd/.htpasswd
|
||||
subPath: .htpasswd
|
||||
- name: configmap-lighttpd-vhosts
|
||||
mountPath: /etc/lighttpd/vhosts.d
|
||||
- name: flexvolsmb-lighttpd-data
|
||||
mountPath: /data/scripts
|
||||
- name: flexvolsmb-lighttpd-websites
|
||||
mountPath: /var/www/
|
||||
volumes:
|
||||
- name: configmap-lighttpd-conf
|
||||
configMap:
|
||||
name: configmap-lighttpd-conf
|
||||
- name: configmap-lighttpd-vhosts
|
||||
configMap:
|
||||
name: configmap-lighttpd-vhosts
|
||||
- name: flexvolsmb-lighttpd-data
|
||||
persistentVolumeClaim:
|
||||
claimName: flexvolsmb-lighttpd-data
|
||||
- name: flexvolsmb-lighttpd-websites
|
||||
persistentVolumeClaim:
|
||||
claimName: flexvolsmb-lighttpd-websites
|
||||
---
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: lighttpd
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`bessems.com`) || Host(`bessems.eu`) || Host(`gabaldon.eu`) || Host(`gabaldon.nl`) || Host(`sn.itch.fyi`) || Host(`spamasaurus.com`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: lighttpd
|
||||
port: 8080
|
||||
middlewares:
|
||||
- name: security-headers@file
|
||||
- name: compression@file
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: flexvolsmb-lighttpd-data
|
||||
spec:
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: flexvolsmb-lighttpd-data
|
||||
flexVolume:
|
||||
driver: mount/smb
|
||||
secretRef:
|
||||
name: smb-secret
|
||||
options:
|
||||
opts: domain=bessems.eu,file_mode=0777,dir_mode=0777,iocharset=utf8
|
||||
server: 192.168.11.225
|
||||
share: /K3s.Volumes/lighttpd/data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: flexvolsmb-lighttpd-websites
|
||||
spec:
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: flexvolsmb-lighttpd-websites
|
||||
flexVolume:
|
||||
driver: mount/smb
|
||||
secretRef:
|
||||
name: smb-secret
|
||||
options:
|
||||
opts: domain=bessems.eu,file_mode=0777,dir_mode=0777,iocharset=utf8,nobrl
|
||||
server: 192.168.11.225
|
||||
share: /K3s.Volumes/lighttpd/websites
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: flexvolsmb-lighttpd-data
|
||||
namespace: default
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: flexvolsmb-lighttpd-data
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: flexvolsmb-lighttpd-websites
|
||||
namespace: default
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: flexvolsmb-lighttpd-websites
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
49
services/Lighttpd/deployment-lighttpd.yaml
Normal file
49
services/Lighttpd/deployment-lighttpd.yaml
Normal file
@ -0,0 +1,49 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: lighttpd
|
||||
namespace: lighttpd
|
||||
labels:
|
||||
app: lighttpd
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: lighttpd
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: lighttpd
|
||||
spec:
|
||||
containers:
|
||||
- name: lighttpd-php-pwsh
|
||||
image: djpbessems/lighttpd-php-powershell
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 8080
|
||||
volumeMounts:
|
||||
- name: configmap-lighttpd-conf
|
||||
mountPath: /etc/lighttpd/lighttpd.conf
|
||||
subPath: lighttpd.conf
|
||||
- name: configmap-lighttpd-conf
|
||||
mountPath: /etc/lighttpd/.htpasswd
|
||||
subPath: .htpasswd
|
||||
- name: configmap-lighttpd-vhosts
|
||||
mountPath: /etc/lighttpd/vhosts.d
|
||||
- name: flexvolsmb-lighttpd-data
|
||||
mountPath: /data/scripts
|
||||
- name: flexvolsmb-lighttpd-websites
|
||||
mountPath: /var/www/
|
||||
volumes:
|
||||
- name: configmap-lighttpd-conf
|
||||
configMap:
|
||||
name: configmap-lighttpd-conf
|
||||
- name: configmap-lighttpd-vhosts
|
||||
configMap:
|
||||
name: configmap-lighttpd-vhosts
|
||||
- name: flexvolsmb-lighttpd-data
|
||||
persistentVolumeClaim:
|
||||
claimName: flexvolsmb-lighttpd-data
|
||||
- name: flexvolsmb-lighttpd-websites
|
||||
persistentVolumeClaim:
|
||||
claimName: flexvolsmb-lighttpd-websites
|
17
services/Lighttpd/ingressroute-lighttpd.yaml
Normal file
17
services/Lighttpd/ingressroute-lighttpd.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: lighttpd
|
||||
namespace: lighttpd
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`bessems.com`) || Host(`bessems.eu`) || Host(`gabaldon.eu`) || Host(`gabaldon.nl`) || Host(`sn.itch.fyi`) || Host(`spamasaurus.com`)
|
||||
kind: Rule
|
||||
services:
|
||||
- name: lighttpd
|
||||
port: 8080
|
||||
middlewares:
|
||||
- name: security-headers@file
|
||||
- name: compression@file
|
@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: flexvolsmb-lighttpd-data
|
||||
spec:
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: flexvolsmb-lighttpd-data
|
||||
flexVolume:
|
||||
driver: mount/smb
|
||||
secretRef:
|
||||
name: flexvolsmb-credentials
|
||||
options:
|
||||
opts: file_mode=0777,dir_mode=0777,iocharset=utf8
|
||||
server: 192.168.154.225
|
||||
share: /K3s.Volumes/lighttpd/data
|
@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: flexvolsmb-lighttpd-websites
|
||||
spec:
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: flexvolsmb-lighttpd-websites
|
||||
flexVolume:
|
||||
driver: mount/smb
|
||||
secretRef:
|
||||
name: flexvolsmb-credentials
|
||||
options:
|
||||
opts: file_mode=0777,dir_mode=0777,iocharset=utf8,nobrl
|
||||
server: 192.168.154.225
|
||||
share: /K3s.Volumes/lighttpd/websites
|
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: flexvolsmb-lighttpd-data
|
||||
namespace: lighttpd
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: flexvolsmb-lighttpd-data
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: flexvolsmb-lighttpd-websites
|
||||
namespace: lighttpd
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: flexvolsmb-lighttpd-websites
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
16
services/Lighttpd/sealedsecret-flexvolsmb-credentials.yaml
Normal file
16
services/Lighttpd/sealedsecret-flexvolsmb-credentials.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
apiVersion: bitnami.com/v1alpha1
|
||||
kind: SealedSecret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: flexvolsmb-credentials
|
||||
namespace: lighttpd
|
||||
spec:
|
||||
encryptedData:
|
||||
password: AgAc9UFx4rs5SmuntY7dUxf80geDlDc/zn9SaGWu4Z5n9aWJZZWlrAAq081fTeb4jjiR3bjdlKqgwLkKiIgkYlp1nBgfLsLo5rE49c8eo+s0x+0L2gVj9ArqHWD5hw76evnD73AU3zuQGNoHg7x7iUmyCtBk9kLDQTXWsLkSnb0HLB7knOqQjK8C1uC4eTdjQRLmhevQAl/oxiDZ8lf/xkj7GH3o0Gp6DKiGetnKYsaJJGPeImdAQzHMlH7F0ypQGMeyWU9zh4ro8a8G+Sxorjz45ws/ORpN6jWifnDX0xshVjsVM/hD98xui7thsf++B8JxZK0i+sls0zpgtJvKyzJJytOXknPNMyqG+S5QN94iFfoCnP1ZgBGdEJVI7c+RXFekenXSNgrCqjCEHy+L09AjTXOwrtPfQovhw7ai7lAsE6f4N5uU8XbYdbqh6jG442ZowWyl0vpVa1Ea93Fy205vxoncasAiO0UT0UcMxekZ5jzeJU8crxieCtck7Z65GsHWuoWLSH2PX43k1JSKMG5zbZNvOszjR58fXHdj/HjXug9K5hHJekNk0A4+iAY/SwdzxaTCKbQgly4HTHX2JqBHMXRDYGm15qns/R5O48XcEs7aEWWVDvYyeiDrSM0il/29kMNb+vwzaPOdSwfb5GShZcirRWQgAdPdEM36Z6O1h+EoeazO6/Hj+JYf+DcX8/5DuC1nTkhQj9NFmoLzrHtc
|
||||
username: AgDW9pYxGa/I0NBjXWcqcHZY2ZSY9IUd/sOyg40e6T5wPSioUgWqn3tf3EzNqUVJsSJndKWZnagXZGMafkYS3WYOsrIiSR4jyAtHc7t7D9TGw8dEzXeP8UF+ICCpd3YzD7856+Xov9pmXziHS1gT5hqywdFEruoiR9gtbrdEqG0PHFt96Bcve5JillbFWh2VsRBe4gMKoRfjGHd69voGsqkn3H4VwHITRWixNploRXOyq1+hO49Ka+Rs4TbQvXWTVAyqYZEWWKC9W0S8CN3mhzBDg+JNHSzsd1BqQNQ+lJ9S12gaTphWH5v+IUSlCWsIGDjwC5oKTzy5IYcw5V/DcfMl8/vYexb2dB4nQo0vJb1Ip+HPrBSl3HvV/Vz7Tq2fXN0h7QvyUjeEsTQaMrYe47AuMBCiNcmUY5z1KwNMfNjXSYbJEqLZ25ABj2xNq2GefZhWcBOl3zkQExgGfrmfh8eSzThMkfY8NpWho9DfitD44a9B9J2hGn5H/eUKbEJXLYs8JKXXBfSYZQJS7ac/ub/iPDfefSPPXeJFPBZIwnSP/khp9D/6/4tVQyT1XijJBrD2FkcX6nE5fcrnVmJtGEv6YBkOSyszJqtTBjXbHQuNnyCc2R//ybPev+CIyGvD2uZwN5b/8nKbABweLPRKpRJlM2v4e1N/Y70hxSOIN5iFd7FSG/8QV0U8Jm6ZI7xkoHAAitu8A2U=
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: flexvolsmb-credentials
|
||||
namespace: lighttpd
|
||||
type: mount/smb
|
12
services/Lighttpd/service-lighttpd.yaml
Normal file
12
services/Lighttpd/service-lighttpd.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: lighttpd
|
||||
namespace: lighttpd
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
name: web
|
||||
port: 8080
|
||||
selector:
|
||||
app: lighttpd
|
Reference in New Issue
Block a user