---
# This defines a Kubernetes service for the Flux daemon, so you can
# access it with `fluxctl`. It defines a NodePort, meaning Kubernetes
# will assign a port to the service, on which it will be available on
# each node (host in the cluster). You can find the assigned port by
# doing something like
#
#    kubectl get service flux --template '{{ index .spec.ports 0 "nodePort" }}'
#
apiVersion: v1
kind: Service
metadata:
  name: weave-flux-agent
  labels:
    name: weave-flux-agent
    app: weave-flux
    weave-flux-component: agent
  namespace: weave
spec:
  type: LoadBalancer
  ports:
  - protocol: TCP
    port: 3030
    targetPort: 3030
  externalTrafficPolicy: Cluster
  sessionAffinity: None
  selector:
    app: weave-flux
    name: weave-flux-agent
    weave-flux-component: agent
