feat(*): Initial commit
This commit is contained in:
commit
3cf73589e1
22
manifests/configmap.yaml
Normal file
22
manifests/configmap.yaml
Normal file
@ -0,0 +1,22 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: synapse-config
|
||||
namespace: synapse
|
||||
data:
|
||||
matrix.beta.halia.dev.log.config: |
|
||||
version: 1
|
||||
formatters:
|
||||
precise:
|
||||
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
|
||||
handlers:
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: precise
|
||||
loggers:
|
||||
synapse.storage.SQL:
|
||||
level: INFO
|
||||
root:
|
||||
level: INFO
|
||||
handlersr: [console]
|
||||
disable_existing_loggers: false
|
31
manifests/database.yaml
Normal file
31
manifests/database.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: synapse-db
|
||||
namespace: synapse
|
||||
|
||||
spec:
|
||||
instances: 1
|
||||
|
||||
storage:
|
||||
size: 5Gi
|
||||
storageClass: flat-storage-class
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: synapse
|
||||
owner: synapse
|
||||
secret:
|
||||
name: synapse-db
|
||||
|
||||
postgresql:
|
||||
pg_hba:
|
||||
- host all all all md5
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 500Mi
|
42
manifests/deployment.yaml
Normal file
42
manifests/deployment.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: synapse
|
||||
namespace: synapse
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: synapse
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: synapse
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 991
|
||||
containers:
|
||||
- name: synapse
|
||||
image: matrixdotorg/synapse:latest
|
||||
ports:
|
||||
- containerPort: 8008
|
||||
- containerPort: 9009
|
||||
volumeMounts:
|
||||
- mountPath: "/data"
|
||||
name: synapse-data
|
||||
- mountPath: "/data/homeserver.yaml"
|
||||
name: synapse-config-file
|
||||
subPath: homeserver.yaml
|
||||
- mountPath: "/data/matrix.beta.halia.dev.log.config"
|
||||
name: synapse-log-config-file
|
||||
subPath: matrix.beta.halia.dev.log.config
|
||||
volumes:
|
||||
- name: synapse-data
|
||||
persistentVolumeClaim:
|
||||
claimName: synapse-pvc
|
||||
- name: synapse-config-file
|
||||
secret:
|
||||
secretName: synapse-secret-config
|
||||
- name: synapse-log-config-file
|
||||
configMap:
|
||||
name: synapse-config
|
23
manifests/ingress.yaml
Normal file
23
manifests/ingress.yaml
Normal file
@ -0,0 +1,23 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: synapse-ingress
|
||||
namespace: synapse
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "traefik"
|
||||
spec:
|
||||
tls:
|
||||
- secretName: synapse-beta-tls
|
||||
hosts:
|
||||
- matrix.beta.halia.dev
|
||||
rules:
|
||||
- host: matrix.beta.halia.dev
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: synapse-svc
|
||||
port:
|
||||
number: 80
|
13
manifests/kustomization.yaml
Normal file
13
manifests/kustomization.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- pvc.yaml
|
||||
- database.yaml
|
||||
- service.yaml
|
||||
- servicemonitor.yaml
|
||||
- ingress.yaml
|
||||
- configmap.yaml
|
||||
- deployment.yaml
|
||||
|
4
manifests/namespace.yaml
Normal file
4
manifests/namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: synapse
|
12
manifests/pvc.yaml
Normal file
12
manifests/pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: synapse-pvc
|
||||
namespace: synapse
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: flat-storage-class
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
19
manifests/service.yaml
Normal file
19
manifests/service.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: synapse-svc
|
||||
namespace: synapse
|
||||
labels:
|
||||
app.kubernetes.io/name: synapse
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8008
|
||||
- name: metrics
|
||||
port: 9000
|
||||
protocol: TCP
|
||||
targetPort: 9009
|
||||
selector:
|
||||
app: synapse
|
14
manifests/servicemonitor.yaml
Normal file
14
manifests/servicemonitor.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: synapse
|
||||
namespace: synapse
|
||||
labels:
|
||||
team: core
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: synapse
|
||||
endpoints:
|
||||
- port: metrics
|
||||
path: /
|
Loading…
Reference in New Issue
Block a user