Skip to content

Commit

Permalink
allow templates in docker label names, see #14
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBoot committed Mar 31, 2024
1 parent 93847b5 commit 7c7335f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Ability to replace template values in tag names (as long as the tags start with the defined prefix), see [#14](https://github.com/BigBoot/AutoKuma/issues/14)

### Fixed
- Fixed parsing of `max_retries` and `max_redirects`, see [#12](https://github.com/BigBoot/AutoKuma/issues/12)

### Changed
- Remove leading slash from container names in template values, see [#14](https://github.com/BigBoot/AutoKuma/issues/14)

## [0.3.2] - 2024-03-28
### Added
- Fall back to `DOCKER_HOST` env variable when no socket_path is specified in AutoKuma docker config
- add docker image for kuma-cli, see [#5](https://github.com/BigBoot/AutoKuma/issues/5)

### Fixed
- exclude parent_name when sending monitor data to server, see [#8](https://github.com/BigBoot/AutoKuma/issues/8)
- Make parsing of ports more lenient, see [#9](https://github.com/BigBoot/AutoKuma/issues/9)

### Added
- add docker image for kuma-cli, see [#5](https://github.com/BigBoot/AutoKuma/issues/5)


## [0.3.1] - 2024-02-27
### Fixed
Expand Down
4 changes: 2 additions & 2 deletions autokuma/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ impl Sync {
group_by_prefix(
labels.iter().map(|(key, value)| {
(
key.trim_start_matches(&format!("{}.", self.config.docker.label_prefix)),
Self::fill_templates(key.trim_start_matches(&format!("{}.", self.config.docker.label_prefix)), template_values),
value,
)
}),
Expand Down Expand Up @@ -178,7 +178,7 @@ impl Sync {
&container
.names
.as_ref()
.and_then(|names| names.first().cloned()),
.and_then(|names| names.first().map(|s| s.trim_start_matches("/").to_owned())),
),
]
.into_iter()
Expand Down

0 comments on commit 7c7335f

Please sign in to comment.