fix(conduit): wellknown custom deployment
This commit is contained in:
parent
6c3deba125
commit
7df49a6afa
9 changed files with 120 additions and 35 deletions
|
@ -3,9 +3,9 @@ name: conduit
|
||||||
description: Conduit is a simple, fast and reliable chat server powered by Matrix.
|
description: Conduit is a simple, fast and reliable chat server powered by Matrix.
|
||||||
icon: https://conduit.rs/conduit.svg
|
icon: https://conduit.rs/conduit.svg
|
||||||
type: application
|
type: application
|
||||||
version: 0.3.7
|
version: 1.0.0
|
||||||
# renovate: image=docker.io/matrixconduit/matrix-conduit
|
# renovate: image=docker.io/matrixconduit/matrix-conduit
|
||||||
appVersion: "0.8.0"
|
appVersion: "0.9.0"
|
||||||
maintainers:
|
maintainers:
|
||||||
- name: WrenIX
|
- name: WrenIX
|
||||||
url: https://wrenix.eu
|
url: https://wrenix.eu
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
= conduit
|
= conduit
|
||||||
|
|
||||||
image::https://img.shields.io/badge/Version-0.3.7-informational?style=flat-square[Version: 0.3.7]
|
image::https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square[Version: 1.0.0]
|
||||||
image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application]
|
image::https://img.shields.io/badge/Version-application-informational?style=flat-square[Type: application]
|
||||||
image::https://img.shields.io/badge/AppVersion-0.8.0-informational?style=flat-square[AppVersion: 0.8.0]
|
image::https://img.shields.io/badge/AppVersion-0.9.0-informational?style=flat-square[AppVersion: 0.9.0]
|
||||||
== Maintainers
|
== Maintainers
|
||||||
|
|
||||||
.Maintainers
|
.Maintainers
|
||||||
|
@ -127,10 +127,15 @@ helm uninstall conduit-release
|
||||||
| `"matrix.org"`
|
| `"matrix.org"`
|
||||||
|
|
|
|
||||||
|
|
||||||
| conduit.wellKnownClient
|
| conduit.wellKnown.client
|
||||||
| string
|
| string
|
||||||
| `"your.server.name"`
|
| `""`
|
||||||
|
|
| client well-known configuration in conduit
|
||||||
|
|
||||||
|
| conduit.wellKnown.server
|
||||||
|
| string
|
||||||
|
| `"https://your.server.name"`
|
||||||
|
| server well-known configuration in conduit
|
||||||
|
|
||||||
| fullnameOverride
|
| fullnameOverride
|
||||||
| string
|
| string
|
||||||
|
@ -307,15 +312,10 @@ helm uninstall conduit-release
|
||||||
| `{}`
|
| `{}`
|
||||||
|
|
|
|
||||||
|
|
||||||
| wellknown.client."m.homeserver".base_url
|
| wellknown.client
|
||||||
| string
|
| object
|
||||||
| `"https://your.server.name/"`
|
| `{"m.homeserver":{"base_url":"https://your.server.name/"},"org.matrix.msc3575.proxy":{"url":"https://your.server.name/"}}`
|
||||||
|
|
| client entry in well-known
|
||||||
|
|
||||||
| wellknown.client."org.matrix.msc3575.proxy".url
|
|
||||||
| string
|
|
||||||
| `"https://your.server.name/"`
|
|
||||||
|
|
|
||||||
|
|
||||||
| wellknown.containerPort
|
| wellknown.containerPort
|
||||||
| int
|
| int
|
||||||
|
@ -324,7 +324,7 @@ helm uninstall conduit-release
|
||||||
|
|
||||||
| wellknown.enabled
|
| wellknown.enabled
|
||||||
| bool
|
| bool
|
||||||
| `true`
|
| `false`
|
||||||
|
|
|
|
||||||
|
|
||||||
| wellknown.env
|
| wellknown.env
|
||||||
|
@ -352,6 +352,11 @@ helm uninstall conduit-release
|
||||||
| `"1.27.2"`
|
| `"1.27.2"`
|
||||||
|
|
|
|
||||||
|
|
||||||
|
| wellknown.nginxServerConf
|
||||||
|
| string
|
||||||
|
| `"server {\n listen {{ .containerPort }};\n server_name localhost;\n\n location /.well-known/matrix/server {\n return 200 {{ toJson .server | quote }};\n types { } default_type \"application/json; charset=utf-8\";\n }\n\n location /.well-known/matrix/client {\n return 200 {{ toJson .client | quote }};\n types { } default_type \"application/json; charset=utf-8\";\n add_header \"Access-Control-Allow-Origin\" *;\n }\n\n location / {\n # return 200 'Welcome to the your.server.name conduit server!';\n # types { } default_type \"text/plain; charset=utf-8\";\n return 404;\n }\n\n location /nginx_health {\n return 200 'OK';\n types { } default_type \"text/plain; charset=utf-8\";\n }\n}"`
|
||||||
|
| nginx config
|
||||||
|
|
||||||
| wellknown.nodeSelector
|
| wellknown.nodeSelector
|
||||||
| object
|
| object
|
||||||
| `{}`
|
| `{}`
|
||||||
|
@ -382,15 +387,20 @@ helm uninstall conduit-release
|
||||||
| `{}`
|
| `{}`
|
||||||
|
|
|
|
||||||
|
|
||||||
|
| wellknown.rewriteRoot
|
||||||
|
| bool
|
||||||
|
| `false`
|
||||||
|
| if ingress is enabled: specifies whether ingress should redirect the `/`-Location to the wellknown server
|
||||||
|
|
||||||
| wellknown.securityContext
|
| wellknown.securityContext
|
||||||
| object
|
| object
|
||||||
| `{}`
|
| `{}`
|
||||||
|
|
|
|
||||||
|
|
||||||
| wellknown.server."m.server"
|
| wellknown.server
|
||||||
| string
|
| object
|
||||||
| `"your.server.name:443"`
|
| `{"m.server":"your.server.name:443"}`
|
||||||
|
|
| server entry in well-known
|
||||||
|
|
||||||
| wellknown.service.annotations
|
| wellknown.service.annotations
|
||||||
| object
|
| object
|
||||||
|
|
0
conduit/ci/empty-values.yaml
Normal file
0
conduit/ci/empty-values.yaml
Normal file
22
conduit/ci/well-known-values.yaml
Normal file
22
conduit/ci/well-known-values.yaml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
conduit:
|
||||||
|
server_name: test.wrenix.eu
|
||||||
|
wellKnown:
|
||||||
|
server: "overwritten-test:443"
|
||||||
|
client: "https://overwritten-test"
|
||||||
|
|
||||||
|
wellknown:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||||
|
hosts:
|
||||||
|
- host: test.wrenix.eu
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
tls:
|
||||||
|
- secretName: test
|
||||||
|
hosts:
|
||||||
|
- test.wrenix.eu
|
|
@ -97,10 +97,14 @@ spec:
|
||||||
- name: "CONDUIT_REGISTRATION_TOKEN"
|
- name: "CONDUIT_REGISTRATION_TOKEN"
|
||||||
value: {{ . | quote }}
|
value: {{ . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- with .Values.conduit.wellKnownClient }}
|
{{- with .Values.conduit.wellKnown.client }}
|
||||||
- name: "CONDUIT_WELL_KNOWN_CLIENT"
|
- name: "CONDUIT_WELL_KNOWN_CLIENT"
|
||||||
value: {{ . | quote }}
|
value: {{ . | quote }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- with .Values.conduit.wellKnown.server }}
|
||||||
|
- name: "CONDUIT_WELL_KNOWN_SERVER"
|
||||||
|
value: {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: "data"
|
- name: "data"
|
||||||
mountPath: "/var/lib/matrix-conduit"
|
mountPath: "/var/lib/matrix-conduit"
|
||||||
|
|
|
@ -76,5 +76,14 @@ spec:
|
||||||
name: {{ include "conduit.fullname" . }}-wellknown
|
name: {{ include "conduit.fullname" . }}-wellknown
|
||||||
port:
|
port:
|
||||||
name: http
|
name: http
|
||||||
|
{{- if .Values.wellknown.rewriteRoot }}
|
||||||
|
- path: /
|
||||||
|
pathType: Exact
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: {{ include "conduit.fullname" . }}-wellknown
|
||||||
|
port:
|
||||||
|
name: http
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -2,10 +2,11 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "conduit.fullname" . }}-wellknown
|
name: {{ include "conduit.fullname" . }}-nginx-wellknown
|
||||||
labels:
|
labels:
|
||||||
{{- include "conduit.labels" . | nindent 4 }}
|
{{- include "conduit.labels" . | nindent 4 }}
|
||||||
data:
|
data:
|
||||||
server: {{ toJson .Values.wellknown.server | quote }}
|
{{- with .Values.wellknown}}
|
||||||
client: {{ toJson .Values.wellknown.client | quote }}
|
default.conf: {{ tpl .nginxServerConf . | toYaml | nindent 4 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
|
@ -47,17 +47,19 @@ spec:
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /nginx_health
|
||||||
port: http
|
port: http
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /nginx_health
|
||||||
port: http
|
port: http
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.wellknown.resources | nindent 12 }}
|
{{- toYaml .Values.wellknown.resources | nindent 12 }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: "data"
|
- name: "wellknown-nginx-conf"
|
||||||
mountPath: "/usr/share/nginx/html/.well-known/matrix/"
|
mountPath: "/etc/nginx/conf.d/default.conf"
|
||||||
|
subPath: default.conf
|
||||||
|
readOnly: true
|
||||||
{{- with .Values.wellknown.nodeSelector }}
|
{{- with .Values.wellknown.nodeSelector }}
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
|
@ -71,7 +73,7 @@ spec:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
volumes:
|
volumes:
|
||||||
- name: "data"
|
- name: "wellknown-nginx-conf"
|
||||||
configMap:
|
configMap:
|
||||||
name: {{ include "conduit.fullname" . }}-wellknown
|
name: {{ include "conduit.fullname" . }}-nginx-wellknown
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -40,10 +40,14 @@ conduit:
|
||||||
# log: "warn,rocket=off,_=off,sled=off"
|
# log: "warn,rocket=off,_=off,sled=off"
|
||||||
log:
|
log:
|
||||||
registrationToken:
|
registrationToken:
|
||||||
wellKnownClient: "your.server.name"
|
wellKnown:
|
||||||
|
# -- client well-known configuration in conduit
|
||||||
|
client: ""
|
||||||
|
# -- server well-known configuration in conduit
|
||||||
|
server: "https://your.server.name"
|
||||||
|
|
||||||
wellknown:
|
wellknown:
|
||||||
enabled: true
|
enabled: false
|
||||||
image:
|
image:
|
||||||
registry: docker.io
|
registry: docker.io
|
||||||
repository: library/nginx
|
repository: library/nginx
|
||||||
|
@ -67,15 +71,48 @@ wellknown:
|
||||||
port: 8080
|
port: 8080
|
||||||
annotations: {}
|
annotations: {}
|
||||||
|
|
||||||
# TO EDIT:
|
# -- if ingress is enabled: specifies whether ingress should redirect the `/`-Location to the wellknown server
|
||||||
|
rewriteRoot: false
|
||||||
|
|
||||||
|
# -- server entry in well-known
|
||||||
server:
|
server:
|
||||||
"m.server": "your.server.name:443"
|
"m.server": "your.server.name:443"
|
||||||
|
# -- client entry in well-known
|
||||||
client:
|
client:
|
||||||
"m.homeserver":
|
"m.homeserver":
|
||||||
"base_url": "https://your.server.name/"
|
"base_url": "https://your.server.name/"
|
||||||
"org.matrix.msc3575.proxy":
|
"org.matrix.msc3575.proxy":
|
||||||
"url": "https://your.server.name/"
|
"url": "https://your.server.name/"
|
||||||
|
|
||||||
|
# -- nginx config
|
||||||
|
nginxServerConf: |-
|
||||||
|
server {
|
||||||
|
listen {{ .containerPort }};
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
location /.well-known/matrix/server {
|
||||||
|
return 200 {{ toJson .server | quote }};
|
||||||
|
types { } default_type "application/json; charset=utf-8";
|
||||||
|
}
|
||||||
|
|
||||||
|
location /.well-known/matrix/client {
|
||||||
|
return 200 {{ toJson .client | quote }};
|
||||||
|
types { } default_type "application/json; charset=utf-8";
|
||||||
|
add_header "Access-Control-Allow-Origin" *;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
# return 200 'Welcome to the your.server.name conduit server!';
|
||||||
|
# types { } default_type "text/plain; charset=utf-8";
|
||||||
|
return 404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /nginx_health {
|
||||||
|
return 200 'OK';
|
||||||
|
types { } default_type "text/plain; charset=utf-8";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
podLabels: {}
|
podLabels: {}
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue