cam_machi

grafana-ss.yml

Oct 14th, 2020 (edited)
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.79 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: StatefulSet
  3. metadata:
  4.   name: grafana
  5.   labels:
  6.     component: grafana
  7.     role: grafana
  8. spec:
  9.   serviceName: grafana
  10.   replicas: 2
  11.   updateStrategy:
  12.     type: OnDelete
  13.   selector:
  14.     matchLabels:
  15.       component: grafana
  16.       role: grafana
  17.   template:
  18.     metadata:
  19.       labels:
  20.         component: grafana
  21.         role: grafana
  22.     spec:
  23.       initContainers:
  24.         - name: plugins-volume-permissions-fix
  25.           image: alpine:latest
  26.           command: ["/bin/sh", "-c"]
  27.           args:
  28.            - chown 472:472 /plugins;
  29.           volumeMounts:
  30.             - name: plugins
  31.               mountPath: /plugins
  32.               subPath: grafana-plugins
  33.       containers:
  34.       - name: grafana
  35.         image: grafana/grafana:6.5.2
  36.         securityContext:
  37.           runAsUser: 0
  38.         resources:
  39.           requests:
  40.             cpu: 4
  41.             memory: 4Gi
  42.           limits:
  43.             cpu: 4
  44.             memory: 4Gi
  45.         ports:
  46.         - containerPort: 3000
  47.           name: http
  48.         env:
  49.         - name: GRAFANA_DB_PASSWORD
  50.           valueFrom:
  51.             secretKeyRef:
  52.               name: grafana-secret
  53.               key: mysql-db-pwd
  54.         - name: OIDC_CLIENT_SECRET
  55.           valueFrom:
  56.             secretKeyRef:
  57.               name: openid-secret
  58.               key: oidc-client-secret
  59.         volumeMounts:
  60.           - name: config
  61.             mountPath: /etc/grafana/grafana.ini
  62.             subPath: grafana.ini
  63.           - name: plugins
  64.             mountPath: /var/lib/grafana/plugins
  65.             subPath: grafana-plugins
  66.       volumes:
  67.         - name: config
  68.           configMap:
  69.             name: grafana-conf
  70.         - name: plugins
  71.           persistentVolumeClaim:
  72.             claimName: plugin-libraries
Add Comment
Please, Sign In to add comment