Skip to content

[bitnami/influxdb] add config file format support / issue 79984#79986

Merged
juan131 merged 5 commits intobitnami:mainfrom
kizuna-lek:support/issue-79984
Apr 14, 2025
Merged

[bitnami/influxdb] add config file format support / issue 79984#79986
juan131 merged 5 commits intobitnami:mainfrom
kizuna-lek:support/issue-79984

Conversation

@kizuna-lek
Copy link
Contributor

Description of the change

This PR introduces dynamic configuration file format support for InfluxDB containers by:

  1. Adding INFLUXDB_CONF_FILE_FORMAT environment variable (default: yaml)
  2. Generating INFLUXDB_CONF_FILE path with the specified extension (e.g. config.toml)
  3. Maintaining backward compatibility with existing config.yaml setups

The change affects:

  • libinfluxdb-env.sh (new variable declaration)
  • Configuration initialization logic
  • Documentation (usage examples)

Benefits

Flexible deployments: Users can now choose between YAML/YML/TOML/JSON formats
Smooth migration: Existing config.yaml installations remain unaffected
Explicit control: Clear environment variable override (INFLUXDB_CONF_FILE_FORMAT)
K8s/Helm friendly: Easy integration with Helm charts via values.yaml

Possible drawbacks

Applicable issues

@github-actions github-actions bot added the triage Triage is needed label Apr 9, 2025
@github-actions github-actions bot requested a review from javsalgar April 9, 2025 08:43
@kizuna-lek kizuna-lek force-pushed the support/issue-79984 branch from 46ac087 to 4d69e61 Compare April 9, 2025 09:05
@javsalgar javsalgar added verify Execute verification workflow for these changes in-progress labels Apr 10, 2025
@github-actions github-actions bot removed the triage Triage is needed label Apr 10, 2025
@github-actions github-actions bot removed the request for review from javsalgar April 10, 2025 08:21
@github-actions github-actions bot requested a review from juan131 April 10, 2025 08:21
Copy link
Contributor

@juan131 juan131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kizuna-lek

Thanks so much for this great initiative! Please check my comments

Comment on lines 88 to 96
case "${INFLUXDB_CONF_FILE_FORMAT}" in
yaml|yml|toml|json)
# Legal format
;;
*)
error "Unsupported config file format: ${INFLUXDB_CONF_FILE_FORMAT}"
exit 1
;;
esac
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also: please double-check whether exiting references at libinfluxdb.sh to INFLUXDB_CONF_FILE need to be adapted.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thk for pointing that, I will revise the validation as suggested.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INFLUXDB_CONF_FILE is referenced in only 4 places in libinfluxdb.sh: twice in logs, once for assigning a value to config_file, and once as a parameter passed to v2-config-path. None of these instances require modification.

Signed-off-by: kizuna-lek <asd98041@qq.com>
Signed-off-by: kizuna-lek <asd98041@qq.com>
Signed-off-by: kizuna-lek <asd98041@qq.com>
Signed-off-by: kizuna-lek <asd98041@qq.com>
@kizuna-lek kizuna-lek force-pushed the support/issue-79984 branch from 2e74828 to 29b6200 Compare April 14, 2025 08:29
@kizuna-lek kizuna-lek requested a review from juan131 April 14, 2025 08:36
Signed-off-by: kizuna-lek <asd98041@qq.com>
Copy link
Contributor

@juan131 juan131 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks so much for addressing the suggestions.

@juan131 juan131 merged commit 0d4f229 into bitnami:main Apr 14, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

influxdb solved verify Execute verification workflow for these changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants