apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: controller
    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-controller
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: controller
      app.kubernetes.io/instance: RELEASE-NAME
      app.kubernetes.io/name: metallb
  template:
    metadata:
      labels:
        app.kubernetes.io/component: controller
        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_ML_SECRET_NAME
          value: RELEASE-NAME-metallb-memberlist
        - name: METALLB_DEPLOYMENT
          value: RELEASE-NAME-metallb-controller
        image: quay.io/metallb/controller:v0.11.0
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /metrics
            port: metrics
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: controller
        ports:
        - containerPort: 7472
          name: metrics
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /metrics
            port: metrics
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
          readOnlyRootFilesystem: true
      nodeSelector:
        kubernetes.io/os: linux
      securityContext:
        fsGroup: 65534
        runAsNonRoot: true
        runAsUser: 65534
      serviceAccountName: RELEASE-NAME-metallb-controller
      terminationGracePeriodSeconds: 0
