# apiVersion: v1
# kind: Service
# metadata:
#   name: nas-proxy
#   namespace: home-apps
# spec:
#   ports:
#   - port: 80
#     targetPort: 80
#   selector:
#     app: nas-proxy
# ---

# apiVersion: apps/v1
# kind: Deployment
# metadata:
#   name: nas-proxy
# spec:
#   revisionHistoryLimit: 2
#   selector:
#     matchLabels:
#       app: nas-proxy
#   replicas: 1
#   template:
#     metadata:
#       labels:
#         app: nas-proxy
#     spec:
#       containers:
#       - name: nas-proxy
#         image: alpine/socat
#         args:
#           - "tcp-listen:80,fork,reuseaddr"
#           - "tcp-connect:192.168.1.4:8080"
#         ports:
#         - containerPort: 80
#         resources:
#           limits:
#             cpu: "1"
#             memory: "600Mi"
#           requests:
#             cpu: "0.2"
#             memory: "300Mi"

# ---

# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
#   name: nas-ingress
#   annotations:
#     kubernetes.io/ingress.class: "nginx"
#     kubernetes.io/tls-acme: "true"
#     cert-manager.io/cluster-issuer: "letsencrypt-prod"
#     nginx.ingress.kubernetes.io/proxy-body-size: 1024000m
#     nginx.ingress.kubernetes.io/auth-url: "https://id.junv.me/oauth2/auth"
#     nginx.ingress.kubernetes.io/auth-signin: "https://id.junv.me/oauth2/start?rd=https%3A%2F%2F$host$request_uri"
# spec:
#   tls:
#   - hosts:
#     - nas.junv.me
#     secretName: nas-tls
#   rules:
#   - host: nas.junv.me
#     http:
#       paths:
#       - backend:
#           service:
#             name: nas-proxy
#             port:
#               number: 80
#         path: /
#         pathType: Prefix
