Tanguy Herbron
c7b03a2a1f
Add Kustomize support, and all connectors necessary for different supportes apps
129 lines
4.1 KiB
YAML
129 lines
4.1 KiB
YAML
---
|
|
# Source: loki-stack/charts/grafana/templates/deployment.yaml
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: loki-grafana
|
|
namespace: monitoring
|
|
labels:
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: loki
|
|
app.kubernetes.io/version: "8.3.5"
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: loki
|
|
strategy:
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: loki
|
|
annotations:
|
|
checksum/config: ab83ab2703f4417b0cae9771e0b48e1607056d6adac4d9d92f9b1960779034f5
|
|
checksum/dashboards-json-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
|
|
checksum/sc-dashboard-provider-config: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
|
|
checksum/secret: a8dec7c19ea590ef9d5a0075b8ed84bdf3a82ce47d9c86f5caada045396ab392
|
|
spec:
|
|
serviceAccountName: loki-grafana
|
|
automountServiceAccountToken: true
|
|
securityContext:
|
|
fsGroup: 472
|
|
runAsGroup: 472
|
|
runAsUser: 472
|
|
enableServiceLinks: true
|
|
containers:
|
|
- name: grafana-sc-datasources
|
|
image: "quay.io/kiwigrid/k8s-sidecar:1.15.6"
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: METHOD
|
|
value: WATCH
|
|
- name: LABEL
|
|
value: "grafana_datasource"
|
|
- name: FOLDER
|
|
value: "/etc/grafana/provisioning/datasources"
|
|
- name: RESOURCE
|
|
value: "both"
|
|
- name: REQ_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: loki-grafana
|
|
key: admin-user
|
|
- name: REQ_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: loki-grafana
|
|
key: admin-password
|
|
- name: REQ_URL
|
|
value: http://localhost:3000/api/admin/provisioning/datasources/reload
|
|
- name: REQ_METHOD
|
|
value: POST
|
|
resources:
|
|
{}
|
|
volumeMounts:
|
|
- name: sc-datasources-volume
|
|
mountPath: "/etc/grafana/provisioning/datasources"
|
|
- name: grafana
|
|
image: "grafana/grafana:8.3.5"
|
|
imagePullPolicy: IfNotPresent
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: "/etc/grafana/grafana.ini"
|
|
subPath: grafana.ini
|
|
- name: storage
|
|
mountPath: "/var/lib/grafana"
|
|
- name: sc-datasources-volume
|
|
mountPath: "/etc/grafana/provisioning/datasources"
|
|
ports:
|
|
- name: service
|
|
containerPort: 80
|
|
protocol: TCP
|
|
- name: grafana
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
env:
|
|
- name: GF_SECURITY_ADMIN_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: loki-grafana
|
|
key: admin-user
|
|
- name: GF_SECURITY_ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: loki-grafana
|
|
key: admin-password
|
|
- name: GF_PATHS_DATA
|
|
value: /var/lib/grafana/
|
|
- name: GF_PATHS_LOGS
|
|
value: /var/log/grafana
|
|
- name: GF_PATHS_PLUGINS
|
|
value: /var/lib/grafana/plugins
|
|
- name: GF_PATHS_PROVISIONING
|
|
value: /etc/grafana/provisioning
|
|
livenessProbe:
|
|
failureThreshold: 10
|
|
httpGet:
|
|
path: /api/health
|
|
port: 3000
|
|
initialDelaySeconds: 60
|
|
timeoutSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: 3000
|
|
resources:
|
|
{}
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: loki-grafana
|
|
- name: storage
|
|
emptyDir: {}
|
|
- name: sc-datasources-volume
|
|
emptyDir: {}
|