Change umami url and add middleware
This commit is contained in:
parent
6ca563ea5a
commit
40e4e8b13e
|
@ -3,15 +3,17 @@ kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: umami-deployment-ingress
|
name: umami-deployment-ingress
|
||||||
namespace: asraphiel
|
namespace: asraphiel
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.middlewares: asraphiel-umamijs@kubernetescrd
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- host: "analytics.asraphiel.dev"
|
- host: "ikaros.asraphiel.dev"
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: umami-deployment-service
|
name: umami-deployment-service
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
|
|
|
@ -4,4 +4,5 @@ resources:
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- ingress.yaml
|
- ingress.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
- secret.yaml
|
- secret.yaml
|
||||||
|
- middleware.yaml
|
9
flux/cluster/apps/asraphiel/umami/middleware.yaml
Normal file
9
flux/cluster/apps/asraphiel/umami/middleware.yaml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
apiVersion: traefik.containo.us/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: umamijs
|
||||||
|
namespace: asraphiel
|
||||||
|
spec:
|
||||||
|
replacePathRegex:
|
||||||
|
regex: ^/script\.js
|
||||||
|
replacement: /umami.js
|
|
@ -21,7 +21,12 @@ let
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
redirect = dest: {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
http2 = true;
|
||||||
|
globalRedirect = dest;
|
||||||
|
};
|
||||||
k8sProxy = proxy "http://kubernetes.lxd:8080/";
|
k8sProxy = proxy "http://kubernetes.lxd:8080/";
|
||||||
in {
|
in {
|
||||||
imports = [ ../../common ../../common/lxc.nix ];
|
imports = [ ../../common ../../common/lxc.nix ];
|
||||||
|
@ -52,20 +57,14 @@ in {
|
||||||
|
|
||||||
virtualHosts."s3.asraphiel.dev" = bigProxy "http://minio.lxd:9000/";
|
virtualHosts."s3.asraphiel.dev" = bigProxy "http://minio.lxd:9000/";
|
||||||
virtualHosts."shell.s3.asraphiel.dev" = proxy "http://minio.lxd:9001/";
|
virtualHosts."shell.s3.asraphiel.dev" = proxy "http://minio.lxd:9001/";
|
||||||
virtualHosts."cdn.voidcorp.nl" = {
|
virtualHosts."cdn.voidcorp.nl" = redirect "s3.asraphiel.dev";
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
http2 = true;
|
|
||||||
globalRedirect = "s3.asraphiel.dev";
|
|
||||||
};
|
|
||||||
virtualHosts."cdn.asraphiel.dev" = k8sProxy;
|
virtualHosts."cdn.asraphiel.dev" = k8sProxy;
|
||||||
|
|
||||||
virtualHosts."registry.asraphiel.dev" = proxy "http://registry.lxd:5000/";
|
virtualHosts."registry.asraphiel.dev" = proxy "http://registry.lxd:5000/";
|
||||||
virtualHosts."registrydbg.asraphiel.dev" =
|
|
||||||
proxy "http://registry.lxd:5001/";
|
|
||||||
virtualHosts."vaultwarden.asraphiel.dev" =
|
virtualHosts."vaultwarden.asraphiel.dev" =
|
||||||
proxy "http://vaultwarden.lxd:8000/";
|
proxy "http://vaultwarden.lxd:8000/";
|
||||||
virtualHosts."analytics.asraphiel.dev" = k8sProxy;
|
virtualHosts."analytics.asraphiel.dev" = redirect "ikaros.asraphiel.dev";
|
||||||
|
virtualHosts."ikaros.asraphiel.dev" = k8sProxy;
|
||||||
virtualHosts."whoami.asraphiel.dev" = k8sProxy;
|
virtualHosts."whoami.asraphiel.dev" = k8sProxy;
|
||||||
|
|
||||||
virtualHosts."groenehartansichtkaarten.nl" = k8sProxy;
|
virtualHosts."groenehartansichtkaarten.nl" = k8sProxy;
|
||||||
|
|
Loading…
Reference in a new issue