Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove log_driver limitations #792

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 6 additions & 30 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -84,29 +84,17 @@
# @param log_driver
# Set the log driver.
# Docker default is json-file.
# Valid values: none, json-file, syslog, journald, gelf, fluentd
# Valid values description:
# none : Disables any logging for the container.
# docker logs won't be available with this driver.
# json-file: Default logging driver for Docker.
# Writes JSON messages to file.
# syslog : Syslog logging driver for Docker.
# Writes log messages to syslog.
# journald : Journald logging driver for Docker.
# Writes log messages to journald.
# gelf : Graylog Extended Log Format (GELF) logging driver for Docker.
# Writes log messages to a GELF endpoint: Graylog or Logstash.
# fluentd : Fluentd logging driver for Docker.
# Writes log messages to fluentd (forward input).
# splunk : Splunk logging driver for Docker.
# Writes log messages to Splunk (HTTP Event Collector).
# awslogs : AWS Cloudwatch Logs logging driver for Docker.
# Write log messages to Cloudwatch API
# Please verify the value by yourself, before setting it. Valid shipped log drivers can be found here:
# https://docs.docker.com/config/containers/logging/configure/#supported-logging-drivers
# Since custom log driver plugins are and must be possible, the value can not be verified through code here.
#
# @param log_opt
# Set the log driver specific options
# Valid values per log driver:
# none : undef
# local :
# max-size=[0-9+][k|m|g]
# max-file=[0-9+]
# json-file:
# max-size=[0-9+][k|m|g]
# max-file=[0-9+]
Expand Down Expand Up @@ -501,18 +489,6 @@
}
}

if $log_driver {
if $facts['os']['family'] == 'windows' {
assert_type(Pattern[/^(none|json-file|syslog|gelf|fluentd|splunk|awslogs|etwlogs)$/], $log_driver) |$a, $b| {
fail('log_driver must be one of none, json-file, syslog, gelf, fluentd, splunk, awslogs or etwlogs')
}
} else {
assert_type(Pattern[/^(none|json-file|syslog|journald|gelf|fluentd|splunk|awslogs)$/], $log_driver) |$a, $b| {
fail('log_driver must be one of none, json-file, syslog, journald, gelf, fluentd, splunk or awslogs')
}
}
}

if $storage_driver {
if $facts['os']['family'] == 'windows' {
assert_type(Pattern[/^(windowsfilter)$/], $storage_driver) |$a, $b| {
Expand Down