apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app.kubernetes.io/component: speaker
    app.kubernetes.io/instance: RELEASE-NAME
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: metallb
    app.kubernetes.io/version: v0.11.0
    helm.sh/chart: metallb-0.11.0
  name: RELEASE-NAME-metallb-speaker
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: speaker
      app.kubernetes.io/instance: RELEASE-NAME
      app.kubernetes.io/name: metallb
  template:
    metadata:
      labels:
        app.kubernetes.io/component: speaker
        app.kubernetes.io/instance: RELEASE-NAME
        app.kubernetes.io/name: metallb
    spec:
      containers:
      - args:
        - --port=7472
        - --config=RELEASE-NAME-metallb
        - --log-level=info
        env:
        - name: METALLB_NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: METALLB_HOST
          valueFrom:
            fieldRef:
              fieldPath: status.hostIP
        - name: METALLB_ML_BIND_ADDR
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: METALLB_ML_LABELS
          value: app.kubernetes.io/name=metallb,app.kubernetes.io/component=speaker
        - name: METALLB_ML_BIND_PORT
          value: "7946"
        - name: METALLB_ML_SECRET_KEY
          valueFrom:
            secretKeyRef:
              key: secretkey
              name: RELEASE-NAME-metallb-memberlist
        image: quay.io/metallb/speaker:v0.11.0
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /metrics
            port: metrics
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: speaker
        ports:
        - containerPort: 7472
          name: metrics
        - containerPort: 7946
          name: memberlist-tcp
          protocol: TCP
        - containerPort: 7946
          name: memberlist-udp
          protocol: UDP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /metrics
            port: metrics
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            add:
            - NET_RAW
            drop:
            - ALL
          readOnlyRootFilesystem: true
      hostNetwork: true
      nodeSelector:
        kubernetes.io/os: linux
      serviceAccountName: RELEASE-NAME-metallb-speaker
      terminationGracePeriodSeconds: 0
      tolerations:
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
        operator: Exists
