apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      name: grafana
  template:
    metadata:
      labels:
        name: grafana
    spec:
      volumes:
      - name: config
        configMap:
          name: grafana
      - name: cert
        secret:
          secretName: grafana-cert
      - name: secret-config
        secret:
          secretName: config
      containers:
      - name: grafana
        image: grafana/grafana
        imagePullPolicy: IfNotPresent
        volumeMounts:
        - name: config
          mountPath: "/config"
          readOnly: true
        - name: cert
          mountPath: "/etc/service-cert"
          readOnly: true
        - name: secret-config
          mountPath: "/etc/secrets/grafana"
          readOnly: true
        ports:
        - name: http
          containerPort: 3000
        args: ["--config", "/config/config.ini"]
