File tree Expand file tree Collapse file tree
charts/controller/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,25 +155,25 @@ spec:
155155 secretKeyRef :
156156 name : influxdb-creds
157157 key : url
158- - name : " INFLUXDB_DATABASE"
158+ {{- else }}
159+ - name : " INFLUXDB_URL"
160+ value : http://$(DRYCC_INFLUXDB_SERVICE_HOST):$(DRYCC_INFLUXDB_SERVICE_PORT_TRANSPORT)
161+ {{- end }}
162+ - name : " INFLUXDB_BUCKET"
159163 valueFrom :
160164 secretKeyRef :
161165 name : influxdb-creds
162- key : database
163- - name : " INFLUXDB_USER "
166+ key : bucket
167+ - name : " INFLUXDB_ORG "
164168 valueFrom :
165169 secretKeyRef :
166170 name : influxdb-creds
167- key : user
168- - name : " INFLUXDB_PASSWORD "
171+ key : org
172+ - name : " INFLUXDB_TOKEN "
169173 valueFrom :
170174 secretKeyRef :
171175 name : influxdb-creds
172- key : password
173- {{- else }}
174- - name : " INFLUXDB_URL"
175- value : http://$(DRYCC_INFLUXDB_SERVICE_HOST):$(DRYCC_INFLUXDB_SERVICE_PORT_TRANSPORT)
176- {{- end }}
176+ key : token
177177 {{- range $key, $value := .Values.environment }}
178178 - name : {{ $key }}
179179 value : {{ $value | quote }}
Original file line number Diff line number Diff line change 1- FROM python:3.7 -alpine
1+ FROM python:3.8 -alpine
22
33COPY requirements.txt /app/requirements.txt
44
Original file line number Diff line number Diff line change 1- FROM python:3.7 -alpine
1+ FROM python:3.8 -alpine
22
33COPY requirements.txt /app/requirements.txt
44COPY dev_requirements.txt /app/dev_requirements.txt
Original file line number Diff line number Diff line change 530530
531531# Influxdb Configuration Options
532532INFLUXDB_URL = os .environ .get ('DRYCC_INFLUXDB_URL' , 'http://localhost:8086' )
533- INFLUXDB_DATABASE = os .environ .get ('DRYCC_INFLUXDB_DATABASE ' , 'drycc' )
534- INFLUXDB_USER = os .environ .get ('DRYCC_INFLUXDB_USER ' , 'root' )
535- INFLUXDB_PASSWORD = os .environ .get ('DRYCC_INFLUXDB_PASSWORD ' , 'root' )
533+ INFLUXDB_BUCKET = os .environ .get ('DRYCC_INFLUXDB_BUCKET ' , 'drycc' )
534+ INFLUXDB_ORG = os .environ .get ('DRYCC_INFLUXDB_ORG ' , 'root' )
535+ INFLUXDB_TOKEN = os .environ .get ('DRYCC_INFLUXDB_TOKEN ' , 'root' )
Original file line number Diff line number Diff line change 88import random
99import threading
1010from copy import deepcopy
11- from urllib .parse import urlparse
1211from django .conf import settings
13- from influxdb import InfluxDBClient
14-
12+ from influxdb_client import InfluxDBClient
1513
1614local = threading .local ()
1715logger = logging .getLogger (__name__ )
@@ -168,17 +166,10 @@ def apply_tasks(tasks):
168166
169167def get_influxdb_client ():
170168 if not hasattr (local , "influxdb_client" ):
171- addr = urlparse (settings .INFLUXDB_URL ).netloc
172- if ":" in addr :
173- host , port = addr .rsplit (":" )
174- else :
175- host , port = addr , 8086
176169 local .influxdb_client = InfluxDBClient (
177- host ,
178- port ,
179- settings .INFLUXDB_USER ,
180- settings .INFLUXDB_PASSWORD ,
181- settings .INFLUXDB_DATABASE
170+ url = settings .INFLUXDB_URL ,
171+ token = settings .INFLUXDB_TOKEN ,
172+ org = settings .INFLUXDB_ORG
182173 )
183174 return local .influxdb_client
184175
Original file line number Diff line number Diff line change @@ -22,4 +22,4 @@ requests==2.24.0
2222requests-toolbelt == 0.9.1
2323celery == 5.0.2
2424django_redis == 4.12.1
25- influxdb == 5.3.1
25+ influxdb-client == 1.13.0
You can’t perform that action at this time.
0 commit comments