---
# Service for the web UI / API. Using host network means the pod IP is the
# node IP, so this Service is mostly useful for cluster-internal ingress to
# the management UI via Route below.
apiVersion: v1
kind: Service
metadata:
  name: pxeforge
  namespace: pxeforge
  labels:
    app.kubernetes.io/name: pxeforge
spec:
  type: ClusterIP
  selector:
    app.kubernetes.io/name: pxeforge
  ports:
    - name: http
      port: 80
      targetPort: 80
      protocol: TCP
    - name: smb
      port: 445
      targetPort: 445
      protocol: TCP
---
# Expose the web UI through an OpenShift Route. Clients on the PXE network
# still talk to the node directly on UDP 67/69/4011 — the Route only covers
# the TCP/80 management plane.
apiVersion: route.openshift.io/v1
kind: Route
metadata:
  name: pxeforge
  namespace: pxeforge
spec:
  to:
    kind: Service
    name: pxeforge
    weight: 100
  port:
    targetPort: http
  tls:
    termination: edge
    insecureEdgeTerminationPolicy: Redirect
