imfreedom/k8s-cluster

Some tweaks to prosody

2020-01-12, Gary Kramlich
432803c955ec
Parents 872c8e29e434
Children 1a40218583ce
Some tweaks to prosody
--- a/50-xmpp.imfreedom.org.yaml Tue Jan 07 06:01:41 2020 -0600
+++ b/50-xmpp.imfreedom.org.yaml Sun Jan 12 16:38:11 2020 -0600
@@ -12,7 +12,7 @@
more_set_headers "X-Frame-Options: SAMEORIGIN";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
- proxy_buffering off;
+ # proxy_buffering off;
tcp_nodelay on;
labels:
app: prosody
@@ -51,6 +51,9 @@
- name: http
port: 5280
protocol: TCP
+ - name: https
+ port: 5281
+ protocol: TCP
selector:
app: prosody
role: app
@@ -84,6 +87,17 @@
protocol: TCP
- port: 5280
protocol: TCP
+ - from:
+ - namespaceSelector:
+ matchLabels:
+ name: monitoring
+ podSelector:
+ matchLabels:
+ app: prometheus
+ prometheus: k8s
+ ports:
+ - port: 5281
+ protocol: TCP
---
apiVersion: v1
kind: ConfigMap
@@ -96,16 +110,23 @@
certificate = "imfreedom/tls.crt"
jetbrains_hub_groups = { "IMF Board Member", "IMF Officer" }
http_host = "xmpp.imfreedom.org"
+ http_interfaces = {"*"}
http_external_url = "https://xmpp.imfreedom.org/"
ssl = {
certificate = "certs/imfreedom/tls.crt";
key = "certs/imfreedom/tls.key";
}
+ disco_items = {
+ { "conference.imfreedom.org", "Instant Messaging Freedom MUC" };
+ }
Component "conference.imfreedom.org" "muc"
ssl = {
certificate = "certs/imfreedom/tls.crt";
key = "certs/imfreedom/tls.key";
}
+ restrict_room_creation = "local"
+ Component "xmpp.imfreedom.org" "http"
+ modules_enabled = {"bosh", "prometheus"}
---
apiVersion: apps/v1
kind: Deployment
@@ -132,10 +153,18 @@
containers:
- name: prosody
image: docker.io/rwgrim/prosody:latest
+ imagePullPolicy: Always
ports:
- containerPort: 5222
+ name: c2s
- containerPort: 5269
+ name: s2s
- containerPort: 5280
+ name: http
+ - containerPort: 5281
+ name: https
+ - containerPort: 5582
+ name: telnet
resources:
limits:
cpu: 100m
@@ -189,3 +218,18 @@
requests:
storage: 2Gi
---
+apiVersion: monitoring.coreos.com/v1
+kind: ServiceMonitor
+metadata:
+ namespace: imfreedom
+ name: prosody
+ labels:
+ app: prosody
+spec:
+ selector:
+ matchLabels:
+ app: prosody
+ endpoints:
+ - port: https
+ interval: 15s
+---