Skip to content

Instantly share code, notes, and snippets.

@erikh

erikh/matrix.yaml Secret

Created Aug 6, 2020
Embed
What would you like to do?
---
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
You can’t perform that action at this time.