Skip to content

Commit 2ceb8e8

Browse files
committed
Canceled the modification
We don't really need a Grafana pattern so simple, as Grafana is already directly configured in the K8s configuration
1 parent b89aa34 commit 2ceb8e8

2 files changed

Lines changed: 83 additions & 0 deletions

File tree

src/grafana/Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM grafana/grafana:latest
2+
3+
USER grafana
4+
5+
ARG GF_INSTALL_PLUGINS=""
6+
7+
##Setting up the DB
8+
#We paste our own DB configuration
9+
COPY src/grafana/datasources/datasources.yaml etc/grafana/provisioning/datasources/
10+
11+
### Pre installing our dashboards
12+
#We copy our sample.yaml to tell where to search for our dashboards
13+
COPY src/grafana/dashboards/dashboards.yaml /etc/grafana/provisioning/dashboards/
14+
#We copy our dashboards in the repertory we tell to search for
15+
COPY src/grafana/dashboards/*.json /var/lib/grafana/dashboards/
16+
17+
18+
19+
RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
20+
OLDIFS=$IFS; \
21+
IFS=','; \
22+
for plugin in ${GF_INSTALL_PLUGINS}; do \
23+
IFS=$OLDIFS; \
24+
grafana-cli --pluginsDir "$GF_PATHS_PLUGINS" plugins install ${plugin}; \
25+
done; \
26+
fi
27+
28+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# config file version
2+
apiVersion: 1
3+
4+
5+
# list of datasources to insert/update depending
6+
# on what's available in the datbase
7+
datasources:
8+
# <string, required> name of the datasource. Required
9+
# Used by the panels of the dashboards
10+
- name: infrabox
11+
# <string, required> datasource type. Required
12+
type: postgres
13+
# <string, required> access mode. direct or proxy. Required
14+
access: proxy
15+
# <int> org id. will default to orgId 1 if not specified
16+
orgId: 1
17+
# <string> url
18+
url: IP:port
19+
# <string> database name, if used
20+
database:
21+
# <bool> enable/disable basic auth
22+
basicAuth: false
23+
# <bool> mark as default datasource. Max one per org
24+
isDefault: true
25+
# <map> fields that will be converted to json and stored in json_data
26+
jsonData:
27+
sslmode: disable
28+
# graphiteVersion: "1.1"
29+
# tlsAuth: true
30+
# tlsAuthWithCACert: true
31+
## <string> json object of data that will be encrypted.
32+
secureJsonData:
33+
#<string> database password, if used
34+
password:
35+
#<string> database user, if used
36+
user:
37+
# tlsCACert: "..."
38+
# tlsClientCert: "..."
39+
# tlsClientKey: "..."
40+
version: 1
41+
# <bool> allow users to edit datasources from the UI.
42+
editable: true
43+
44+
45+
- name: prometheus
46+
# <string, required> datasource type. Required
47+
type: prometheus
48+
# <string, required> access mode. direct or proxy. Required
49+
access: proxy
50+
# <int> org id. will default to orgId 1 if not specified
51+
orgId: 1
52+
# <string> url
53+
url: http://IP:port
54+
version: 1
55+
editable: true

0 commit comments

Comments
 (0)