# ============================================================
# Velocity-OS — K3s Services
# ClusterIP for internal, none for headless StatefulSet
# ============================================================
---
apiVersion: v1
kind: Service
metadata:
  name: postgres
  namespace: velocity-os
  labels:
    app: postgres
spec:
  clusterIP: None  # Headless for StatefulSet stable DNS
  selector:
    app: postgres
  ports:
    - port: 5432
      targetPort: 5432
---
apiVersion: v1
kind: Service
metadata:
  name: redis
  namespace: velocity-os
  labels:
    app: redis
spec:
  type: ClusterIP
  selector:
    app: redis
  ports:
    - port: 6379
      targetPort: 6379
---
apiVersion: v1
kind: Service
metadata:
  name: core-api
  namespace: velocity-os
  labels:
    app: core-api
spec:
  type: ClusterIP
  selector:
    app: core-api
  ports:
    - name: http
      port: 8443
      targetPort: 8443
---
apiVersion: v1
kind: Service
metadata:
  name: webos
  namespace: velocity-os
  labels:
    app: webos
spec:
  type: ClusterIP
  selector:
    app: webos
  ports:
    - name: http
      port: 80
      targetPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: media-engine
  namespace: velocity-os
  labels:
    app: media-engine
spec:
  type: ClusterIP
  selector:
    app: media-engine
  ports:
    - name: http
      port: 8290
      targetPort: 8290
