# ─── Service ──────────────────────────────────────────────────────
apiVersion: v1
kind: Service
metadata:
  name: gitlab
  namespace: gitlab
spec:
  selector:
    app: gitlab
  ports:
    - name: http
      port: 80
      targetPort: 80
      nodePort: 31080
    - name: https
      port: 443
      targetPort: 443
      nodePort: 31443
    - name: ssh
      port: 22
      targetPort: 22
      nodePort: 31022
    - name: registry
      port: 5050
      targetPort: 5050
      nodePort: 31050
  type: NodePort

# ---
# ─── Ingress ──────────────────────────────────────────────────────
# apiVersion: networking.k8s.io/v1
# kind: Ingress
# metadata:
#   name: gitlab
#   namespace: gitlab
#   annotations:
#     nginx.ingress.kubernetes.io/proxy-body-size: "512m"
#     nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
#     nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
# spec:
#   ingressClassName: nginx
#   tls:
#     - hosts:
#         - gitlab.example.com
#       secretName: gitlab-tls
#   rules:
#     - host: gitlab.example.com
#       http:
#         paths:
#           - path: /
#             pathType: Prefix
#             backend:
#               service:
#                 name: gitlab
#                 port:
#                   number: 80
