71 lines
1.3 KiB
YAML
71 lines
1.3 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: opentrashmail
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: opentrashmail
|
|
namespace: opentrashmail
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: opentrashmail
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: opentrashmail
|
|
spec:
|
|
nodeName: kube-master
|
|
containers:
|
|
- image: hascheksolutions/opentrashmail:1
|
|
imagePullPolicy: IfNotPresent
|
|
name: opentrashmail
|
|
ports:
|
|
- containerPort: 80
|
|
name: otm-port
|
|
- containerPort: 25
|
|
name: otm-smtp-port
|
|
volumeMounts:
|
|
- name: otm-config
|
|
mountPath: /var/www/opentrashmail/data
|
|
env:
|
|
- name: URL
|
|
value: "https://localhost:80"
|
|
|
|
volumes:
|
|
- name: otm-config
|
|
hostPath:
|
|
path: /opt/kubernetes/opentrashmail_kube/config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: opentrashmail
|
|
namespace: opentrashmail
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
targetPort: otm-port
|
|
protocol: TCP
|
|
selector:
|
|
app: opentrashmail
|
|
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: otm-smtp
|
|
namespace: opentrashmail
|
|
spec:
|
|
ports:
|
|
- port: 25
|
|
targetPort: otm-smtp-port
|
|
protocol: TCP
|
|
nodePort: 30025
|
|
type: NodePort
|
|
selector:
|
|
app: opentrashmail
|