aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/namespaces/web
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/namespaces/web')
-rw-r--r--kubernetes/namespaces/web/public-stats/README.md7
-rw-r--r--kubernetes/namespaces/web/public-stats/ingress.yaml25
-rw-r--r--kubernetes/namespaces/web/public-stats/service.yaml10
3 files changed, 42 insertions, 0 deletions
diff --git a/kubernetes/namespaces/web/public-stats/README.md b/kubernetes/namespaces/web/public-stats/README.md
new file mode 100644
index 0000000..2654eaa
--- /dev/null
+++ b/kubernetes/namespaces/web/public-stats/README.md
@@ -0,0 +1,7 @@
+# Public Stats
+
+Python Discord Public Stats is the public stats portal for viewing server statistics at https://stats.pythondiscord.com/
+
+The deployment manifest is located in the [python-discord/public-stats](https://github.com/python-discord/public-stats/blob/master/deployment.yaml) repo.
+
+To apply the service and ingress run `kubectl apply -f .` in this folder.
diff --git a/kubernetes/namespaces/web/public-stats/ingress.yaml b/kubernetes/namespaces/web/public-stats/ingress.yaml
new file mode 100644
index 0000000..83ba9e6
--- /dev/null
+++ b/kubernetes/namespaces/web/public-stats/ingress.yaml
@@ -0,0 +1,25 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ annotations:
+ nginx.ingress.kubernetes.io/auth-tls-verify-client: "on"
+ nginx.ingress.kubernetes.io/auth-tls-secret: "kube-system/mtls-client-crt-bundle"
+ nginx.ingress.kubernetes.io/auth-tls-error-page: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
+ name: public-stats
+ namespace: web
+spec:
+ tls:
+ - hosts:
+ - "*.pythondiscord.com"
+ secretName: pythondiscord.com-tls
+ rules:
+ - host: stats.pythondiscord.com
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: public-stats
+ port:
+ number: 8000
diff --git a/kubernetes/namespaces/web/public-stats/service.yaml b/kubernetes/namespaces/web/public-stats/service.yaml
new file mode 100644
index 0000000..d46f2c4
--- /dev/null
+++ b/kubernetes/namespaces/web/public-stats/service.yaml
@@ -0,0 +1,10 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: public-stats
+ namespace: web
+spec:
+ ports:
+ - port: 8000
+ selector:
+ app: public-stats