# Sample configuration for f5-ipam-controller with default provider. For persistent IP addresses upon restarts,
# volume mounts are used. securityContext is used to change mount permissions to controller user.
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: f5-ipam-controller
  name: f5-ipam-controller
  namespace: kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      app: f5-ipam-controller
  template:
    metadata:
      labels:
        app: f5-ipam-controller
    spec:
      containers:
        - args:
            - --orchestration
            - kubernetes
            - --ip-range
            - '{"Dev":"2001:db8:3::7-2001:db8:3::9","Test":"2001:db8:4::7-2001:db8:4::9",
                 "Production":"2001:db8:5::ffff-2001:db8:6::9","Default":"2001:0db8:85a3:0000:0000:8a2e:0370:7334-2001:0db8:85a3:0000:0000:8a2e:0370:7340" }'
            - --log-level
            - DEBUG
          command:
            - /app/bin/f5-ipam-controller
          image: f5networks/f5-ipam-controller:latest
          imagePullPolicy: IfNotPresent
          name: f5-ipam-controller
          terminationMessagePath: /dev/termination-log
          volumeMounts:
            - mountPath: /app/ipamdb
              name: samplevol
      securityContext:
        fsGroup: 1200
        runAsGroup: 1200
        runAsUser: 1200
      serviceAccount: ipam-ctlr
      serviceAccountName: ipam-ctlr
      volumes:
        - name: samplevol
          persistentVolumeClaim:
            claimName: pvc-local
