apiVersion: apps/v1
kind: Deployment
metadata:
  name: hugo-build-and-serve-env
  labels:
    app: hugo-build-and-serve-env
spec:
  replicas: 1
  selector:
    matchLabels:
      app: hugo-build-and-serve-env
  template:
    metadata:
      labels:
        app: hugo-build-and-serve-env
    spec:
      containers:
        - name: hugo-build-and-serve-env
          image: %IMAGE%
          ports:
            - containerPort: 8080
              protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
  name: hugo-build-and-serve-env
spec:
  type: ClusterIP
  selector:
    app: hugo-build-and-serve-env
  ports:
    - name: http
      targetPort: 8080
      port: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: hugo-build-and-serve-env
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-production-http
spec:
  tls:
    - hosts:
        - minimal-setups.hottis.de
      secretName: hugo-build-and-serve-env-cert
  rules:
    - host: minimal-setups.hottis.de
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: hugo-build-and-serve-env
                port:
                  number: 80

