Keep the configuration of Glance, Homer and Prometheus across updates

Glance and Homer write their starter configuration only when it is missing, so an update does not replace the one the user edited. Prometheus keeps /etc/prometheus in a volume of its own, which starts with the configuration of the image and can be a host directory.
This commit is contained in:
MacRimi
2026-10-26 07:28:40 +01:00
parent f2854ebece
commit fab4aee37a
6 changed files with 76 additions and 6 deletions
+34 -1
View File
@@ -33,7 +33,7 @@
"documentation": "https://prometheus.io/docs/prometheus/latest/installation/",
"repository": "https://github.com/prometheus/prometheus",
"tips": [
"The image includes a sample configuration and will scrape itself. Add targets to /etc/prometheus/prometheus.yml for monitoring other services."
"The image includes a sample configuration and will scrape itself. Add targets to prometheus.yml in the /etc/prometheus volume to monitor other services; choose a host directory for /etc/prometheus to edit it from the host."
],
"mini_changelog": [],
"display_version": null,
@@ -77,6 +77,22 @@
"backup": true,
"default_size_gb": 8
}
},
{
"id": "volume-1",
"container_path": "/etc/prometheus",
"compose_source_example": "./prometheus-config",
"read_only": false,
"required": true,
"installation_choice": [
"managed-volume",
"host-bind"
],
"default": "managed-volume",
"managed_volume": {
"backup": true,
"default_size_gb": 1
}
}
],
"ports": [
@@ -142,6 +158,17 @@
"shared_with_other_lxc": false,
"source_path": null,
"source_path_prompt": null
},
{
"id": "prometheus-volume-1",
"service": "prometheus",
"container_path": "/etc/prometheus",
"mode": "managed-volume",
"user_selectable": false,
"backup": true,
"shared_with_other_lxc": false,
"source_path": null,
"source_path_prompt": null
}
],
"orchestration": {
@@ -356,6 +383,12 @@
"remove_lost_found": true,
"owner_strategy": "mapped-application-user",
"only_when_mount_type": "managed-volume"
},
{
"container_path": "/etc/prometheus",
"remove_lost_found": true,
"owner_strategy": "mapped-application-user",
"only_when_mount_type": "managed-volume"
}
],
"startup_healthcheck": {