apiVersion: apps/v1
kind: Deployment
metadata:
  name: policer
spec:
  replicas: 1
  selector:
    matchLabels:
      name: policer
  template:
    metadata:
      labels:
        name: policer
    spec:
      serviceAccountName: policer
      containers:
        - name: policer
          # Fill in the image repository
          image: silveryfu/policer:latest
          command:
          - policy
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "policer"
