apiVersion: apps/v1
kind: Deployment
metadata:
  name: k8s-bigip-ctlr-global-nginx
  namespace: bigip-ctlr
  labels:
    app: k8s-bigip-ctlr-global-nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: k8s-bigip-ctlr-global-nginx
  template:
    metadata:
      name: k8s-bigip-ctlr-global-nginx
      labels:
        app: k8s-bigip-ctlr-global-nginx
    spec:
      serviceAccountName: bigip-ctlr
      containers:
        - name: k8s-bigip-ctlr
          image: "f5networks/k8s-bigip-ctlr:2.0.0"
          env:
            - name: BIGIP_USERNAME
              valueFrom:
                secretKeyRef:
                  name: bigip-login
                  key: username
            - name: BIGIP_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: bigip-login
                  key: password
          command: ["/app/bin/k8s-bigip-ctlr"]
          args: [
            "--bigip-username=$(BIGIP_USERNAME)",
            "--bigip-password=$(BIGIP_PASSWORD)",
            "--bigip-url=https://10.1.10.240:443",
            "--insecure=true",
            "--bigip-partition=k8s",
            "--manage-configmaps=true",
            "--manage-ingress=false",
            "--log-as3-response=true",
            "--log-level=INFO",
            "--namespace=nginx-ingress",
            "--pool-member-type=cluster"
            ]
