apiVersion: v1
kind: Pod
metadata:
  labels:
    app: learn-metrics
  name: learn-metrics
spec:
  containers:
  - image: docker.io/grafana/grafana
    name: grafana
    env:
    - name: GF_SECURITY_ADMIN_PASSWORD
      value: foobar
    - name: GF_PATHS_CONFIG
      value: /grafana-config/grafana.ini
    ports:
    - containerPort: 3000
      hostPort: 3000
      protocol: TCP
    volumeMounts:
    - name: grafana-config
      mountPath: /grafana-config
      readOnly: true
    - name: grafana-provisioning
      mountPath: /etc/grafana/provisioning
      readOnly: true

  - image: quay.io/prometheus/prometheus:latest
    name: prometheus
    ports:
    - containerPort: 9090
      hostPort: 3001
      protocol: TCP
    volumeMounts:
      - name: prometheus-config
        mountPath: /etc/prometheus
        readOnly: true

  - image: quay.io/jitesoft/nginx
    name: httpd
    ports:
    - containerPort: 80
      hostPort: 3002
      protocol: TCP
    volumeMounts:
    - name: http
      mountPath: /usr/local/nginx/html
      readOnly: true

  volumes:
  - hostPath:
      path: ./grafana-provisioning
    name: grafana-provisioning
  - hostPath:
      path: ./grafana-config
    name: grafana-config
  - hostPath:
      path: ./prometheus-config
    name: prometheus-config
  - hostPath:
      path: ./http
    name: http
