apiVersion: v1
kind: Pod
metadata:
  name: nginx-example
  annotations:
    prometheus.io/scrape: 'true'
    prometheus.io/port: '4040'
spec:
  containers:
    - name: web
      image: nginx
      volumeMounts:
        - name: nginx-config
          mountPath: /etc/nginx/nginx.conf
          subPath: nginx.conf
          readOnly: true
    - name: exporter
      image: labbsr0x/nginx-exporter
      args: ['-config-file', '/etc/prometheus-nginxlog-exporter/config.hcl']
      volumeMounts:
        - name: exporter-config
          mountPath: /etc/prometheus-nginxlog-exporter
  volumes:
    - name: exporter-config
      configMap:
        name: exporter-config
    - name: nginx-config
      configMap:
        name: nginx-config
