apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: fip-controller
  namespace: fip-controller
spec:
  selector:
    matchLabels:
      app: fip-controller
  template:
    metadata:
      labels:
        app: fip-controller
    spec:
      containers:
        - name: fip-controller
          image: cbeneke/hcloud-fip-controller:v0.3.3
          imagePullPolicy: IfNotPresent
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
          envFrom:
            - secretRef:
                name:  fip-controller-secrets
          volumeMounts:
            - name: config
              mountPath: /app/config
      serviceAccountName: fip-controller
      volumes:
        - name: config
          configMap:
            name: fip-controller-config
