apiVersion: apps/v1
kind: Deployment
metadata:
  name: oldmonk
  namespace : kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      name: oldmonk
  template:
    metadata:
      labels:
        name: oldmonk
    spec:
      serviceAccountName: oldmonk
      containers:
        - name: oldmonk
          image: evalsocket/oldmonk:latest
          command:
          - oldmonk
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: INTERVAL
              value: "120"
            - name: OPERATOR_NAME
              value: "oldmonk"

