-
-
Save erikh/7b32d551ba375ddc82acdda9d45d0ac2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: matrix | |
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: matrix-config-pv | |
namespace: matrix | |
spec: | |
capacity: | |
storage: 10Mi | |
volumeMode: Filesystem | |
claimRef: | |
name: matrix-config-pvc | |
namespace: matrix | |
accessModes: | |
- ReadWriteMany | |
persistentVolumeReclaimPolicy: Retain | |
storageClassName: local-storage | |
local: | |
path: /data/synapse | |
nodeAffinity: | |
required: | |
nodeSelectorTerms: | |
- matchExpressions: | |
- key: kubernetes.io/hostname | |
operator: In | |
values: | |
- int | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: matrix-config-pvc | |
namespace: matrix | |
spec: | |
storageClassName: local-storage | |
accessModes: | |
- ReadWriteMany | |
resources: | |
requests: | |
storage: 10Mi | |
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: matrix-postgres-pv | |
namespace: matrix | |
spec: | |
capacity: | |
storage: 10Mi | |
volumeMode: Filesystem | |
claimRef: | |
name: matrix-postgres-pvc | |
namespace: matrix | |
accessModes: | |
- ReadWriteMany | |
persistentVolumeReclaimPolicy: Retain | |
storageClassName: local-storage | |
local: | |
path: /data/postgres | |
nodeAffinity: | |
required: | |
nodeSelectorTerms: | |
- matchExpressions: | |
- key: kubernetes.io/hostname | |
operator: In | |
values: | |
- int | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: matrix-postgres-pvc | |
namespace: matrix | |
spec: | |
storageClassName: local-storage | |
accessModes: | |
- ReadWriteMany | |
resources: | |
requests: | |
storage: 10Mi | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: synapse | |
namespace: matrix | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: synapse | |
template: | |
metadata: | |
labels: | |
app: synapse | |
spec: | |
containers: | |
- name: synapse | |
image: erikh/synapse:latest | |
imagePullPolicy: Always | |
volumeMounts: | |
- name: matrix-config | |
mountPath: /data/synapse | |
readOnly: false | |
volumes: | |
- name: matrix-config | |
persistentVolumeClaim: | |
claimName: matrix-config-pvc | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: matrix-postgres | |
namespace: matrix | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: matrix-postgres | |
template: | |
metadata: | |
labels: | |
app: matrix-postgres | |
spec: | |
containers: | |
- name: postgres | |
image: postgres:12 | |
imagePullPolicy: Always | |
env: | |
- { name: POSTGRES_USER, value: synapse } | |
- { name: POSTGRES_PASSWORD, value: synapse } | |
- { name: POSTGRES_DB, value: synapse } | |
- { | |
name: POSTGRES_INITDB_ARGS, | |
value: "-E UTF8 --lc-collate=C --lc-ctype=C", | |
} | |
volumeMounts: | |
- name: postgres | |
mountPath: "/var/lib/postgresql/data" | |
volumes: | |
- name: postgres | |
persistentVolumeClaim: | |
claimName: matrix-postgres-pvc | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: matrix-redis | |
namespace: matrix | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: matrix-redis | |
template: | |
metadata: | |
labels: | |
app: matrix-redis | |
spec: | |
containers: | |
- name: redis | |
image: redis:6 | |
imagePullPolicy: Always | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
namespace: matrix | |
name: postgres | |
spec: | |
selector: | |
app: matrix-postgres | |
ports: | |
- protocol: TCP | |
port: 5432 | |
name: postgres | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
namespace: matrix | |
name: redis | |
spec: | |
selector: | |
app: matrix-redis | |
ports: | |
- protocol: TCP | |
port: 6379 | |
name: redis | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
namespace: matrix | |
name: synapse | |
spec: | |
selector: | |
app: synapse | |
ports: | |
- protocol: TCP | |
name: https | |
port: 443 | |
targetPort: 8448 | |
type: LoadBalancer | |
status: | |
loadBalancer: | |
ingress: | |
- ip: "your ip" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment