---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ldap-cli
  namespace: confluent-ldapproxy
spec:
  selector:
    matchLabels:
      app.kubernetes.io/instance: confluent
      app.kubernetes.io/name: ldap-cli
  replicas: 1
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/instance: confluent
        app.kubernetes.io/name: ldap-cli
    spec:
      restartPolicy: Always
      terminationGracePeriodSeconds: 5
      containers:
      - name: ldap-cli
        image: ueisele/ldap-utils
        command: ["bash", "-c", "tail -F /dev/null"]
        imagePullPolicy: Always
        resources:
          limits:
            cpu: 100m
            memory: 128Mi
          requests:
            cpu: 100m
            memory: 128Mi
      dnsConfig:
        options:
        - name: ndots
          value: "1"
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 100
            preference:
              matchExpressions:
              - key: "kubernetes.io/arch"
                operator: "In"
                values: ["arm64"]
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: "kubernetes.io/os"
                operator: "In"
                values: ["linux"]
              - key: "kubernetes.io/arch"
                operator: "In"
                values: ["amd64", "arm64"]
