influxdata / influxdata/helm-charts
Init Script not working with helm
- Dominant language
- Mustache
- Stars
- 257
- Forks
- 347
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
I'm trying to work with influxdb helm and trying to create db's using the initSripts which does not seem to work when i log into the container, is there any issues regarding the execution of the initscripts or are there other things that needs to be configured for initscripts to work?.
Configuration in the helm charts
```
initScripts:
enabled: true
scripts:
init.sh: |
CREATE DATABASE "telegraf" WITH DURATION 30d REPLICATION 1 NAME "rp_30d"
CREATE DATABASE "test"
```
i can see the scripts inside the container but no db's are being created
```
ls -l docker-entrypoint-initdb.d/
total 0
lrwxrwxrwx 1 root root 15 Jun 14 09:16 init.iql -> ..data/init.iql
lrwxrwxrwx 1 root root 14 Jun 14 09:16 init.sh -> ..data/init.sh
```
```
influxdb-0:/docker-entrypoint-initdb.d# cat init.iql
CREATE DATABASE "telegraf" WITH DURATION 30d REPLICATION 1 NAME "rp_30d"
influxdb-0:/docker-entrypoint-initdb.d# cat init.sh
CREATE DATABASE "telegraf" WITH DURATION 30d REPLICATION 1 NAME "rp_30d"
CREATE DATABASE "test"
```
I've tried with both formats .iql and .sh but i see no changes and there are no db's getting created.
I see no errors in the logs of the container.
This is what i see when i try to execute the script manually.
Can someone please help me here with this.
Helm version : `4.12.1`
Contributor guide
Research direction
Start by examining how the Helm chart renders initScripts into /docker-entrypoint-initdb.d/, then inspect the container entrypoint behavior for init.iql and init.sh. Reproduce the reported setup and check the container logs and manual execution result; done when the documented configuration reliably creates both databases or the failure is clearly explained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100