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.
|
||||
icon: https://conduit.rs/conduit.svg
|
||||
type: application
|
||||
version: 0.3.7
|
||||
version: 1.0.0
|
||||
# renovate: image=docker.io/matrixconduit/matrix-conduit
|
||||
appVersion: "0.8.0"
|
||||
appVersion: "0.9.0"
|
||||
maintainers:
|
||||
- name: WrenIX
|
||||
url: https://wrenix.eu
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
= 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/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
|
||||
|
@ -127,10 +127,15 @@ helm uninstall conduit-release
|
|||
| `"matrix.org"`
|
||||
|
|
||||
|
||||
| conduit.wellKnownClient
|
||||
| conduit.wellKnown.client
|
||||
| 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
|
||||
| string
|
||||
|
@ -307,15 +312,10 @@ helm uninstall conduit-release
|
|||
| `{}`
|
||||
|
|
||||
|
||||
| wellknown.client."m.homeserver".base_url
|
||||
| string
|
||||
| `"https://your.server.name/"`
|
||||
|
|
||||
|
||||
| wellknown.client."org.matrix.msc3575.proxy".url
|
||||
| string
|
||||
| `"https://your.server.name/"`
|
||||
|
|
||||
| wellknown.client
|
||||
| object
|
||||
| `{"m.homeserver":{"base_url":"https://your.server.name/"},"org.matrix.msc3575.proxy":{"url":"https://your.server.name/"}}`
|
||||
| client entry in well-known
|
||||
|
||||
| wellknown.containerPort
|
||||
| int
|
||||
|
@ -324,7 +324,7 @@ helm uninstall conduit-release
|
|||
|
||||
| wellknown.enabled
|
||||
| bool
|
||||
| `true`
|
||||
| `false`
|
||||
|
|
||||
|
||||
| wellknown.env
|
||||
|
@ -352,6 +352,11 @@ helm uninstall conduit-release
|
|||
| `"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
|
||||
| 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
|
||||
| object
|
||||
| `{}`
|
||||
|
|
||||
|
||||
| wellknown.server."m.server"
|
||||
| string
|
||||
| `"your.server.name:443"`
|
||||
|
|
||||
| wellknown.server
|
||||
| object
|
||||
| `{"m.server":"your.server.name:443"}`
|
||||
| server entry in well-known
|
||||
|
||||
| wellknown.service.annotations
|
||||
| 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"
|
||||
value: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.conduit.wellKnownClient }}
|
||||
{{- with .Values.conduit.wellKnown.client }}
|
||||
- name: "CONDUIT_WELL_KNOWN_CLIENT"
|
||||
value: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- with .Values.conduit.wellKnown.server }}
|
||||
- name: "CONDUIT_WELL_KNOWN_SERVER"
|
||||
value: {{ . | quote }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: "data"
|
||||
mountPath: "/var/lib/matrix-conduit"
|
||||
|
|
|
@ -76,5 +76,14 @@ spec:
|
|||
name: {{ include "conduit.fullname" . }}-wellknown
|
||||
port:
|
||||
name: http
|
||||
{{- if .Values.wellknown.rewriteRoot }}
|
||||
- path: /
|
||||
pathType: Exact
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "conduit.fullname" . }}-wellknown
|
||||
port:
|
||||
name: http
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "conduit.fullname" . }}-wellknown
|
||||
name: {{ include "conduit.fullname" . }}-nginx-wellknown
|
||||
labels:
|
||||
{{- include "conduit.labels" . | nindent 4 }}
|
||||
data:
|
||||
server: {{ toJson .Values.wellknown.server | quote }}
|
||||
client: {{ toJson .Values.wellknown.client | quote }}
|
||||
{{- with .Values.wellknown}}
|
||||
default.conf: {{ tpl .nginxServerConf . | toYaml | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -47,17 +47,19 @@ spec:
|
|||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
path: /nginx_health
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
path: /nginx_health
|
||||
port: http
|
||||
resources:
|
||||
{{- toYaml .Values.wellknown.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: "data"
|
||||
mountPath: "/usr/share/nginx/html/.well-known/matrix/"
|
||||
- name: "wellknown-nginx-conf"
|
||||
mountPath: "/etc/nginx/conf.d/default.conf"
|
||||
subPath: default.conf
|
||||
readOnly: true
|
||||
{{- with .Values.wellknown.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
|
@ -71,7 +73,7 @@ spec:
|
|||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: "data"
|
||||
- name: "wellknown-nginx-conf"
|
||||
configMap:
|
||||
name: {{ include "conduit.fullname" . }}-wellknown
|
||||
name: {{ include "conduit.fullname" . }}-nginx-wellknown
|
||||
{{- end }}
|
||||
|
|
|
@ -40,10 +40,14 @@ conduit:
|
|||
# log: "warn,rocket=off,_=off,sled=off"
|
||||
log:
|
||||
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:
|
||||
enabled: true
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: library/nginx
|
||||
|
@ -67,15 +71,48 @@ wellknown:
|
|||
port: 8080
|
||||
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:
|
||||
"m.server": "your.server.name:443"
|
||||
# -- client entry in well-known
|
||||
client:
|
||||
"m.homeserver":
|
||||
"base_url": "https://your.server.name/"
|
||||
"org.matrix.msc3575.proxy":
|
||||
"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: {}
|
||||
podAnnotations: {}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue