apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: trivy-scanner
  name: trivy-scanner
spec:
  replicas: 1
  selector:
    matchLabels:
      app: trivy-scanner
  template:
    metadata:
      labels:
        app: trivy-scanner
      annotations:
        prometheus.io/port: "9115"
        prometheus.io/scrape: "true"
    spec:
      serviceAccountName: trivy-scanner
      containers:
      - env:
        - name: GITHUB_TOKEN
          value: MY-TOKEN-FROM-GITHUB
        image: MY-IMAGE-TAG
        imagePullPolicy: IfNotPresent
        name: trivy-scanner
        volumeMounts:
        - mountPath: /etc/trivy-scanner/
          name: operator-config
      volumes:
      - configMap:
          name: trivy-scanner-config
        name: operator-config