apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  namespace: demo
  name: demo-airlift
  annotations:
    kubernetes.io/tls-acme: "true"
spec:
  tls:
  - hosts:
    - share.example
    secretName: demo-airlift-secret
  rules:
  - host: share.example
    http:
      paths:
      - path: /
        backend:
          serviceName: demo-airlift
          servicePort: 80

---

apiVersion: v1
kind: Service
metadata:
  namespace: demo
  name: demo-airlift
  labels:
    app: demo-airlift
spec:
  ports:
  - port: 80
    targetPort: 60606
    protocol: TCP
    name: http
  selector:
    app: demo-airlift

---

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  labels:
    app: demo-airlift
  name: demo-airlift
  namespace: demo
spec:
  replicas: 1
  selector:
    matchLabels:
      app: demo-airlift
  template:
    metadata:
      labels:
        app: demo-airlift
    spec:
      containers:
      - image: lightcode/airlift
        imagePullPolicy: Always
        name: airlift
        ports:
        - containerPort: 60606
          protocol: TCP
        volumeMounts:
        - mountPath: "/home/airlift/.airliftd"
          name: data
      volumes:
        - name: data
          persistentVolumeClaim:
            claimName: demo-airlift

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  namespace: demo
  name: demo-airlift
  annotations:
    volume.beta.kubernetes.io/storage-class: default
spec:
  accessModes:
  - ReadWriteOnce
  resources:
     requests:
       storage: 1G
