---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: taylorvories-com
  namespace: web
  labels:
    k8s-app: taylorvories-com
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: taylorvories-com
  template:
    metadata:
      labels:
        k8s-app: taylorvories-com
    spec:
      containers:
      - name: taylorvories-com
        image: tvories/taylorvories-com:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 80
          protocol: TCP

# ---
# kind: Service
# apiVersion: v1
# metadata:
#   labels:
#     k8s-app: taylorvories-com
#   name: taylorvories-com
#   namespace: web
# spec:
#   ports:
#     - port: 80
#       targetPort: 80
#   selector:
#     k8s-app: taylorvories-com

# ---
# state: present
# definition:
#   apiVersion: extensions/v1beta1
#   kind: Ingress
#   metadata:
#     name: taylorvories-com-ingress
#     namespace: web
#     annotations:
#       ingress.kubernetes.io/ssl-redirect: "true"
#       kubernetes.io/tls-acme: "true"
#       kubernetes.io/ingress.class: nginx-external
#       cert-manager.io/cluster-issuer: "letsencrypt-production"
#       nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
#       nginx.ingress.kubernetes.io/cors-allow-headers: "X-Forwarded-For, X-Real-IP, X-Frame-Options, X-Content-Type-Options, X-Forwarded-Proto"
#       nginx.ingress.kubernetes.io/server-snippet: |
#         error_page 404 "https://taylorvories.com/404.html";
#         proxy_intercept_errors on;
#   spec:
#     tls:
#     - hosts:
#       - taylorvories.com
#       - www.taylorvories.com
#       secretName: taylorvories-com
#     rules:
#     - host: taylorvories.com
#       http:
#         paths:
#         - backend:
#             serviceName: taylorvories-com
#             servicePort: 80
#   status:
#     loadBalancer: {}
