apiVersion: apps/v1
kind: Deployment
metadata:
  name: go-controller--deployment
  labels:
    app: avi-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: avi-controller
  template:
    metadata:
      labels:
        app: avi-controller
    spec:
      containers:
      - name: avi-controller
        image: servicemesh:latest
        imagePullPolicy: IfNotPresent
        env:
        - name: CTRL_USERNAME
          valueFrom:
            secretKeyRef:
              name: avi-secret
              key: username
        - name: CTRL_PASSWORD
          valueFrom:
            secretKeyRef:
              name: avi-secret
              key: password
        - name: CTRL_IPADDRESS
          valueFrom:
            secretKeyRef:
              name: avi-secret
              key: controller_ip
        - name: CTRL_VERSION
          valueFrom:
            secretKeyRef:
              name: avi-secret
              key: controller_version
