---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: logsect-svc
  labels:
    k8s-app: logsect-svc
spec:
  selector:
    matchLabels:
      k8s-app: logsect-svc
  replicas: 2
  template:
    metadata:
      labels:
        k8s-app: logsect-svc
    spec:
      containers:
        - name: logsect-svc
          image: docker-registry.zooxlabs.com/logsect-svc:2
          resources:
            requests:
              cpu: 2
              memory: 500Mi
          env:
            - name: LOGSECT_PORT
              value: '80'
          ports:
            - containerPort: 80

---

apiVersion: v1
kind: Service
metadata:
  name: logsect-svc
  labels:
    k8s-app: logsect-svc
spec:
  ports:
    - port: 80
  selector:
    k8s-app: logsect-svc

---

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: logsect-svc
  annotations:
    external-dns.alpha.kubernetes.io/target: sun-z8s-vip-1.zooxlabs.com
spec:
  tls:
    - hosts:
        - logsect-svc.z8s.zooxlabs.com
        - logsect-svc.zooxlabs.com
  rules:
    - host: logsect-svc.z8s.zooxlabs.com
      http:
        paths:
          - backend:
              serviceName: logsect-svc
              servicePort: 80
    - host: logsect-svc.zooxlabs.com
      http:
        paths:
          - backend:
              serviceName: logsect-svc
              servicePort: 80
