---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: synapse
  name: synapse-service
spec:
  clusterIP: None
  ports:
  - name: http
    port: 8008
    protocol: TCP
    targetPort: 8008
  selector:
    app: synapse
#  type: ClusterIP #???
---
# Hosting
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: synapse-nginx
  annotations:
    #nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
    #nginx.ingress.kubernetes.io/proxy-ssl-verify: "off"
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
    nginx.ingress.kubernetes.io/proxy-body-size: 100M
spec:
  tls:
  - hosts:
    - matrix.monkeybox.org
    secretName: matrix-tls
  rules:
  - host: matrix.monkeybox.org
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: synapse-service
            port:
              number: 8008
