apiVersion: apps/v1
kind: Deployment
metadata:
  name: appdynamics-operator
  namespace: appdynamics
spec:
  replicas: 1
  selector:
    matchLabels:
      name: appdynamics-operator
  template:
    metadata:
      labels:
        name: appdynamics-operator
    spec:
      serviceAccountName: appdynamics-operator
      containers:
        - name: appdynamics-operator
          image: docker.io/appdynamics/cluster-agent-operator:latest
          ports:
          - containerPort: 60000
            name: metrics
          command:
          - appdynamics-operator
          imagePullPolicy: Always
          resources:
            limits:
              cpu: 200m
              memory: 128Mi
            requests:
              cpu: 100m
              memory: 64Mi
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "appdynamics-operator"
