From 6c5925209ca43cef45ca8adf7d032cd7a7a931af Mon Sep 17 00:00:00 2001 From: NBatDB <141807851+NBatDB@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:06:57 +0100 Subject: [PATCH] add opts for ip6tables (#1287) * add opts for ip6tables * update changelog --- CHANGELOG.md | 2 ++ documentation/docker_service.md | 1 + libraries/helpers_service.rb | 1 + resources/partial/_service_base.rb | 1 + 4 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e853a0082..6f0556928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- add opts for ip6tables + ## 11.5.2 - *2024-11-18* Standardise files with files in sous-chefs/repo-management diff --git a/documentation/docker_service.md b/documentation/docker_service.md index a2ecc336b..b9fe33904 100644 --- a/documentation/docker_service.md +++ b/documentation/docker_service.md @@ -62,6 +62,7 @@ The `docker_service` resource property list mostly corresponds to the options fo - `ip_masq` - Enable IP masquerading - `ip` - Default IP when binding container ports - `iptables` - Enable addition of iptables rules +- `ip6tables` - Enable addition of ip6tables rules - `ipv4_forward` - Enable net.ipv4.ip_forward - `ipv6_forward` - Enable net.ipv6.ip_forward - `ipv6` - Enable IPv6 networking diff --git a/libraries/helpers_service.rb b/libraries/helpers_service.rb index 2aa00e961..f929308f9 100644 --- a/libraries/helpers_service.rb +++ b/libraries/helpers_service.rb @@ -225,6 +225,7 @@ def docker_daemon_opts opts << "--ip-forward=#{ip_forward}" unless ip_forward.nil? opts << "--ip-masq=#{ip_masq}" unless ip_masq.nil? opts << "--iptables=#{iptables}" unless iptables.nil? + opts << "--ip6tables=#{ip6tables}" unless ip6tables.nil? opts << "--ipv6=#{ipv6}" unless ipv6.nil? opts << "--log-level=#{log_level}" if log_level labels.each { |l| opts << "--label=#{l}" } if labels diff --git a/resources/partial/_service_base.rb b/resources/partial/_service_base.rb index 77b29c3d8..afa708504 100644 --- a/resources/partial/_service_base.rb +++ b/resources/partial/_service_base.rb @@ -38,6 +38,7 @@ property :ipv6_forward, [true, false], default: true property :ip_masq, [true, false] property :iptables, [true, false] +property :ip6tables, [true, false] property :ipv6, [true, false] property :default_ip_address_pool, String property :log_level, %w(debug info warn error fatal)