shantanoo-desai / komponist

A Composer for your favorite IoT/ IIoT container stacks with Ansible + Jinja2 + Docker Compose v2
GNU Affero General Public License v3.0
25 stars 2 forks source link

[influxdbv2] Admin Token set via Docker Secrets in Container does not get set causing authorization errors #96

Closed shantanoo-desai closed 1 year ago

shantanoo-desai commented 1 year ago

Description

Whilst working #95 other output plugins work except for InfluxDBv2 plugin. Incidentally, upon initializing the InfluxDBv2 container directly with the Admin Token via env var, the telegraf output plugin does not throw any authorization errors, which may lead to an inference that DOCKER_INFLUXDB_INIT_ADMIN_TOKEN_FILE environment variable does not set the Admin Token and may endup setting up a random token causing authorization errors. The fix at the moment to refactor the environment variable to use INIT_ADMIN_TOKEN as opposed to INIT_ADMIN_TOKEN_FILE for the InfluxDBv2 Template.

Reported Bug: https://github.com/influxdata/influxdata-docker/issues/698

shantanoo-desai commented 1 year ago

Upon changing the DOCKER_INFLUXDB_INIT_ADMIN_TOKEN_FILE to DOCKER_INFLUXDB_INIT_ADMIN_TOKEN the data insertion via Telegraf Output plugin works, confirming that the the TOKEN_FILE doesn't work for InfluxDBv2