Some checks failed
CI Pipeline / Build and Test (push) Successful in 4s
Security Scanning / Trivy — Filesystem & Dependency Scan (push) Failing after 7s
Security Scanning / Gitleaks — Secret Scan (push) Failing after 7s
Security Scanning / Security Summary (push) Failing after 3s
Build and Publish TechDocs / build-and-publish (push) Successful in 1m2s
Change-Id: I8e318861a258686ddc53dda08858f74c573a6520
272 lines
8.6 KiB
YAML
272 lines
8.6 KiB
YAML
---
|
|
# Source: opentelemetry-demo/charts/grafana/templates/deployment.yaml
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: grafana
|
|
namespace: default
|
|
labels:
|
|
helm.sh/chart: grafana-10.5.8
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: example
|
|
app.kubernetes.io/version: "12.3.1"
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: example
|
|
strategy:
|
|
type: RollingUpdate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
helm.sh/chart: grafana-10.5.8
|
|
app.kubernetes.io/name: grafana
|
|
app.kubernetes.io/instance: example
|
|
app.kubernetes.io/version: "12.3.1"
|
|
annotations:
|
|
checksum/config: 4bc37edad15da2620fa7b48cb4d0af4ca30f6d344ac238d6aa702abb2d92c6ba
|
|
checksum/sc-dashboard-provider-config: e70bf6a851099d385178a76de9757bb0bef8299da6d8443602590e44f05fdf24
|
|
checksum/secret: bed677784356b2af7fb0d87455db21f077853059b594101a4f6532bfbd962a7f
|
|
kubectl.kubernetes.io/default-container: grafana
|
|
spec:
|
|
|
|
serviceAccountName: grafana
|
|
automountServiceAccountToken: true
|
|
shareProcessNamespace: false
|
|
securityContext:
|
|
fsGroup: 472
|
|
runAsGroup: 472
|
|
runAsNonRoot: true
|
|
runAsUser: 472
|
|
enableServiceLinks: true
|
|
containers:
|
|
- name: grafana-sc-alerts
|
|
image: "quay.io/kiwigrid/k8s-sidecar:2.2.1"
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: METHOD
|
|
value: WATCH
|
|
- name: LABEL
|
|
value: "grafana_alert"
|
|
- name: FOLDER
|
|
value: "/etc/grafana/provisioning/alerting"
|
|
- name: RESOURCE
|
|
value: "both"
|
|
- name: REQ_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: grafana
|
|
key: admin-user
|
|
- name: REQ_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: grafana
|
|
key: admin-password
|
|
- name: REQ_URL
|
|
value: http://localhost:3000/api/admin/provisioning/alerting/reload
|
|
- name: REQ_METHOD
|
|
value: POST
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
volumeMounts:
|
|
- name: sc-alerts-volume
|
|
mountPath: "/etc/grafana/provisioning/alerting"
|
|
- name: grafana-sc-dashboard
|
|
image: "quay.io/kiwigrid/k8s-sidecar:2.2.1"
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: METHOD
|
|
value: WATCH
|
|
- name: LABEL
|
|
value: "grafana_dashboard"
|
|
- name: FOLDER
|
|
value: "/tmp/dashboards"
|
|
- name: RESOURCE
|
|
value: "both"
|
|
- name: REQ_USERNAME
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: grafana
|
|
key: admin-user
|
|
- name: REQ_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: grafana
|
|
key: admin-password
|
|
- name: REQ_URL
|
|
value: http://localhost:3000/api/admin/provisioning/dashboards/reload
|
|
- name: REQ_METHOD
|
|
value: POST
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
volumeMounts:
|
|
- name: sc-dashboard-volume
|
|
mountPath: "/tmp/dashboards"
|
|
- name: grafana-sc-datasources
|
|
image: "quay.io/kiwigrid/k8s-sidecar:2.2.1"
|
|
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: grafana
|
|
key: admin-user
|
|
- name: REQ_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: grafana
|
|
key: admin-password
|
|
- name: REQ_URL
|
|
value: http://localhost:3000/api/admin/provisioning/datasources/reload
|
|
- name: REQ_METHOD
|
|
value: POST
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 100Mi
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
volumeMounts:
|
|
- name: sc-datasources-volume
|
|
mountPath: "/etc/grafana/provisioning/datasources"
|
|
- name: grafana
|
|
image: "docker.io/grafana/grafana:12.3.1"
|
|
imagePullPolicy: IfNotPresent
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
capabilities:
|
|
drop:
|
|
- ALL
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: "/etc/grafana/grafana.ini"
|
|
subPath: grafana.ini
|
|
- name: storage
|
|
mountPath: "/var/lib/grafana"
|
|
- name: search
|
|
mountPath: "/var/lib/grafana-search"
|
|
- name: sc-alerts-volume
|
|
mountPath: "/etc/grafana/provisioning/alerting"
|
|
- name: sc-dashboard-volume
|
|
mountPath: "/tmp/dashboards"
|
|
- name: sc-dashboard-provider
|
|
mountPath: "/etc/grafana/provisioning/dashboards/sc-dashboardproviders.yaml"
|
|
subPath: provider.yaml
|
|
- name: sc-datasources-volume
|
|
mountPath: "/etc/grafana/provisioning/datasources"
|
|
ports:
|
|
- name: grafana
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
- name: gossip-tcp
|
|
containerPort: 9094
|
|
protocol: TCP
|
|
- name: gossip-udp
|
|
containerPort: 9094
|
|
protocol: UDP
|
|
- name: profiling
|
|
containerPort: 6060
|
|
protocol: TCP
|
|
env:
|
|
- name: POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
- name: GF_SECURITY_ADMIN_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: grafana
|
|
key: admin-user
|
|
- name: GF_SECURITY_ADMIN_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: grafana
|
|
key: admin-password
|
|
- name: GF_INSTALL_PLUGINS
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: grafana
|
|
key: plugins
|
|
- 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
|
|
- name: GF_UNIFIED_STORAGE_INDEX_PATH
|
|
value: /var/lib/grafana-search/bleve
|
|
- name: GOMEMLIMIT
|
|
valueFrom:
|
|
resourceFieldRef:
|
|
divisor: "1"
|
|
resource: limits.memory
|
|
livenessProbe:
|
|
failureThreshold: 10
|
|
httpGet:
|
|
path: /api/health
|
|
port: grafana
|
|
initialDelaySeconds: 60
|
|
timeoutSeconds: 30
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/health
|
|
port: grafana
|
|
resources:
|
|
limits:
|
|
memory: 175Mi
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: grafana
|
|
- name: storage
|
|
emptyDir: {}
|
|
- name: search
|
|
emptyDir: {}
|
|
- name: sc-alerts-volume
|
|
emptyDir: {}
|
|
- name: sc-dashboard-volume
|
|
emptyDir: {}
|
|
- name: sc-dashboard-provider
|
|
configMap:
|
|
name: grafana-config-dashboards
|
|
- name: sc-datasources-volume
|
|
emptyDir: {}
|