wellknown custom deployment
This commit is contained in:
parent
ce6eea5496
commit
2b01eb74b4
5 changed files with 168 additions and 1 deletions
11
conduit/templates/wellknowncustom/configmap.yaml
Normal file
11
conduit/templates/wellknowncustom/configmap.yaml
Normal file
|
@ -0,0 +1,11 @@
|
|||
{{- if .Values.wellknowncustom.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "conduit.fullname" . }}-nginx-wellknowncustom
|
||||
labels:
|
||||
{{- include "conduit.labels" . | nindent 4 }}
|
||||
data:
|
||||
nginx.conf: |
|
||||
{{ .Values.wellknowncustom.nginx_conf | nindent 4 }}
|
||||
{{- end }}
|
79
conduit/templates/wellknowncustom/deployment.yaml
Normal file
79
conduit/templates/wellknowncustom/deployment.yaml
Normal file
|
@ -0,0 +1,79 @@
|
|||
{{- if .Values.wellknowncustom.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "conduit.fullname" . }}-wellknowncustom
|
||||
labels:
|
||||
{{- include "conduit.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: wellknowncustom
|
||||
spec:
|
||||
replicas: {{ .Values.wellknowncustom.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "conduit.selectorLabels" . | nindent 6 }}
|
||||
app.kubernetes.io/component: wellknowncustom
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.wellknowncustom.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "conduit.selectorLabels" . | nindent 8 }}
|
||||
app.kubernetes.io/component: wellknowncustom
|
||||
{{- with .Values.wellknowncustom.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
type: wellknowncustom
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "conduit.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.wellknowncustom.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: wellknowncustom
|
||||
securityContext:
|
||||
{{- toYaml .Values.wellknowncustom.securityContext | nindent 12 }}
|
||||
{{- with .Values.wellknowncustom.image }}
|
||||
image: "{{ .registry }}/{{ .repository }}:{{ .tag }}"
|
||||
{{- end }}
|
||||
imagePullPolicy: {{ .Values.wellknowncustom.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.wellknowncustom.containerPort }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /nginx_health
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /nginx_health
|
||||
port: http
|
||||
resources:
|
||||
{{- toYaml .Values.wellknowncustom.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
- name: "wellknowncustom-nginx-conf"
|
||||
mountPath: "/etc/nginx/nginx.conf"
|
||||
subPath: nginx.conf
|
||||
readOnly: true
|
||||
{{- with .Values.wellknowncustom.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.wellknowncustom.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.wellknowncustom.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: "wellknowncustom-nginx-conf"
|
||||
configMap:
|
||||
name: {{ include "conduit.fullname" . }}-nginx-wellknowncustom
|
||||
{{- end }}
|
18
conduit/templates/wellknowncustom/service.yaml
Normal file
18
conduit/templates/wellknowncustom/service.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{- if .Values.wellknowncustom.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "conduit.fullname" . }}-wellknowncustom
|
||||
labels:
|
||||
{{- include "conduit.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.wellknowncustom.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.wellknowncustom.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
{{- include "conduit.selectorLabels" . | nindent 4 }}
|
||||
type: wellknowncustom
|
||||
{{- end }}
|
|
@ -76,6 +76,65 @@ wellknown:
|
|||
"org.matrix.msc3575.proxy":
|
||||
"url": "https://your.server.name/"
|
||||
|
||||
wellknowncustom:
|
||||
enabled: false
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: library/nginx
|
||||
pullPolicy: IfNotPresent
|
||||
tag: "1.27.1"
|
||||
|
||||
replicaCount: 1
|
||||
podLabels: {}
|
||||
podAnnotations: []
|
||||
podSecurityContext: {}
|
||||
securityContext: {}
|
||||
containerPort: 8080
|
||||
env: []
|
||||
resources: {}
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
annotations: {}
|
||||
|
||||
# TO EDIT:
|
||||
nginx_conf: |
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
events {
|
||||
worker_connections 10240;
|
||||
}
|
||||
http {
|
||||
server {
|
||||
listen 8080;
|
||||
server_name localhost;
|
||||
|
||||
location /.well-known/matrix/server {
|
||||
return 200 '{"m.server": "your.server.name:443"}';
|
||||
types { } default_type "application/json; charset=utf-8";
|
||||
}
|
||||
|
||||
location /.well-known/matrix/client {
|
||||
return 200 '{"m.homeserver": {"base_url": "https://your.server.name/"}, "org.matrix.msc3575.proxy": {"url": "https://your.server.name/"}}';
|
||||
types { } default_type "application/json; charset=utf-8";
|
||||
add_header "Access-Control-Allow-Origin" *;
|
||||
}
|
||||
|
||||
location / {
|
||||
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