Skip to content

Commit a781c6e

Browse files
committed
feat(influxdb): modify influxdb naming rules
1 parent 44517d4 commit a781c6e

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

charts/monitor/templates/monitor-grafana-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ spec:
3838
{{- end}}
3939
env:
4040
{{- if eq .Values.global.influxdb_location "off-cluster" }}
41-
- name: "INFLUXDB_SERVICE_URL"
41+
- name: "INFLUXDB_URL"
4242
valueFrom:
4343
secretKeyRef:
4444
name: influxdb-creds

charts/monitor/templates/monitor-telegraf-daemon.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ spec:
5050
secretKeyRef:
5151
name: influxdb-creds
5252
key: database
53-
- name: "INFLUXDB_USERNAME"
53+
- name: "INFLUXDB_USER"
5454
valueFrom:
5555
secretKeyRef:
5656
name: influxdb-creds
@@ -100,4 +100,4 @@ spec:
100100
path: /proc
101101
- name: varrunutmpro
102102
hostPath:
103-
path: /var/run/utmp
103+
path: /var/run/utmp

charts/monitor/templates/monitor-telegraf-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ spec:
5353
secretKeyRef:
5454
name: influxdb-creds
5555
key: database
56-
- name: "INFLUXDB_USERNAME"
56+
- name: "INFLUXDB_USER"
5757
valueFrom:
5858
secretKeyRef:
5959
name: influxdb-creds

grafana/rootfs/usr/share/grafana/start-grafana

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ export GF_AUTH_ANONYMOUS_ENABLED=true
7878
export GF_SERVER_HTTP_PORT=${GRAFANA_PORT}
7979

8080
BACKEND_ACCESS_MODE=${BACKEND_ACCESS_MODE:-proxy}
81-
INFLUXDB_SERVICE_URL=${INFLUXDB_SERVICE_URL}
82-
if [ -n "$INFLUXDB_SERVICE_URL" ]; then
81+
INFLUXDB_URL=${INFLUXDB_URL}
82+
if [ -n "$INFLUXDB_URL" ]; then
8383
echo "Influxdb service URL is provided."
8484
else
85-
INFLUXDB_SERVICE_URL="http://${INFLUXDB_HOST}:${INFLUXDB_PORT}"
85+
INFLUXDB_URL="http://${INFLUXDB_HOST}:${INFLUXDB_PORT}"
8686
fi
8787

88-
echo "Using the following URL for InfluxDB: ${INFLUXDB_SERVICE_URL}"
88+
echo "Using the following URL for InfluxDB: ${INFLUXDB_URL}"
8989
echo "Using the following backend access mode for InfluxDB: ${BACKEND_ACCESS_MODE}"
9090

9191
echo "Creating default influxdb datasource..."
@@ -95,7 +95,7 @@ curl -i -XPOST -H "${HEADER_ACCEPT}" -H "${HEADER_CONTENT_TYPE}" "http://${GRAFA
9595
"type": "influxdb",
9696
"access": "'"${BACKEND_ACCESS_MODE}"'",
9797
"isDefault": true,
98-
"url": "'"${INFLUXDB_SERVICE_URL}"'",
98+
"url": "'"${INFLUXDB_URL}"'",
9999
"password": "'"${INFLUXDB_PASSWORD}"'",
100100
"user": "'"${INFLUXDB_USER}"'",
101101
"database": "'"${INFLUXDB_DATABASE}"'"

telegraf/rootfs/config.toml.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
database = {{default "kubernetes" .INFLUXDB_DATABASE | quote }}
6161
precision = {{ default "ns" .INFLUXDB_PRECISION | quote }}
6262
timeout = {{ default "5s" .INFLUXDB_TIMEOUT | quote }}
63-
{{ if .INFLUXDB_USERNAME}} username = {{ .INFLUXDB_USERNAME | quote }} {{ end }}
63+
{{ if .INFLUXDB_USER}} username = {{ .INFLUXDB_USER | quote }} {{ end }}
6464
{{ if .INFLUXDB_PASSWORD}} password = {{ .INFLUXDB_PASSWORD | quote }} {{ end }}
6565
{{ if .INFLUXDB_USER_AGENT}} user_agent = {{ .INFLUXDB_USER_AGENT | quote }} {{ end }}
6666
{{ if .INFLUXDB_UDP_PAYLOAD}} udp_payload = {{ .INFLUXDB_UDP_PAYLOAD | quote }} {{ end }}

0 commit comments

Comments
 (0)