deployment.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. ---
  2. # Source: loki-stack/charts/grafana/templates/deployment.yaml
  3. apiVersion: apps/v1
  4. kind: Deployment
  5. metadata:
  6. name: loki-grafana
  7. namespace: loki
  8. labels:
  9. app: grafana
  10. chart: grafana-3.8.19
  11. release: loki
  12. heritage: Tiller
  13. spec:
  14. replicas: 1
  15. selector:
  16. matchLabels:
  17. app: grafana
  18. release: loki
  19. strategy:
  20. type: RollingUpdate
  21. template:
  22. metadata:
  23. labels:
  24. app: grafana
  25. release: loki
  26. annotations:
  27. checksum/config: 5718319f8bec4f87dd50e11caca9a5093df7131b8332e70c3f02091704c9381b
  28. checksum/dashboards-json-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
  29. checksum/sc-dashboard-provider-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
  30. checksum/secret: 02a7e52c3461734cf0a0683b0d200a6d9b2a809bbfe55cff60109cacfbe28ba9
  31. spec:
  32. serviceAccountName: loki-grafana
  33. securityContext:
  34. fsGroup: 472
  35. runAsUser: 472
  36. initContainers:
  37. - name: grafana-sc-datasources
  38. image: "kiwigrid/k8s-sidecar:0.1.20"
  39. imagePullPolicy: IfNotPresent
  40. env:
  41. - name: METHOD
  42. value: LIST
  43. - name: LABEL
  44. value: "grafana_datasource"
  45. - name: FOLDER
  46. value: "/etc/grafana/provisioning/datasources"
  47. - name: RESOURCE
  48. value: "both"
  49. resources:
  50. {}
  51. volumeMounts:
  52. - name: sc-datasources-volume
  53. mountPath: "/etc/grafana/provisioning/datasources"
  54. containers:
  55. - name: grafana
  56. image: "grafana/grafana:6.4.1"
  57. imagePullPolicy: IfNotPresent
  58. volumeMounts:
  59. - name: config
  60. mountPath: "/etc/grafana/grafana.ini"
  61. subPath: grafana.ini
  62. - name: ldap
  63. mountPath: "/etc/grafana/ldap.toml"
  64. subPath: ldap.toml
  65. - name: storage
  66. mountPath: "/var/lib/grafana"
  67. - name: sc-datasources-volume
  68. mountPath: "/etc/grafana/provisioning/datasources"
  69. ports:
  70. - name: service
  71. containerPort: 80
  72. protocol: TCP
  73. - name: grafana
  74. containerPort: 3000
  75. protocol: TCP
  76. env:
  77. - name: GF_SECURITY_ADMIN_USER
  78. valueFrom:
  79. secretKeyRef:
  80. name: loki-grafana
  81. key: admin-user
  82. - name: GF_SECURITY_ADMIN_PASSWORD
  83. valueFrom:
  84. secretKeyRef:
  85. name: loki-grafana
  86. key: admin-password
  87. livenessProbe:
  88. failureThreshold: 10
  89. httpGet:
  90. path: /api/health
  91. port: 3000
  92. initialDelaySeconds: 60
  93. timeoutSeconds: 30
  94. readinessProbe:
  95. httpGet:
  96. path: /api/health
  97. port: 3000
  98. resources:
  99. {}
  100. volumes:
  101. - name: config
  102. configMap:
  103. name: loki-grafana
  104. - name: ldap
  105. secret:
  106. secretName: loki-grafana
  107. items:
  108. - key: ldap-toml
  109. path: ldap.toml
  110. - name: storage
  111. emptyDir: {}
  112. - name: sc-datasources-volume
  113. emptyDir: {}