From ac751d0dbd4d7c403decc3452bd9ce66b91f2fb1 Mon Sep 17 00:00:00 2001 From: Jaime Fullaondo Date: Mon, 6 Nov 2023 13:24:26 +0100 Subject: [PATCH] [fips-proxy] addressing feedback --- attributes/default.rb | 3 --- metadata.rb | 2 +- recipes/_install-fips-proxy-linux.rb | 23 +++++++++++++---------- recipes/dd-fips-proxy.rb | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index d3611b03..06e31a47 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -43,7 +43,6 @@ # Agent flavor to install, acceptable values are "datadog-agent", "datadog-iot-agent" default['datadog']['agent_flavor'] = 'datadog-agent' # "datadog-agent" to install the datadog-agent package default['datadog']['fips_proxy_version'] = nil -default['datadog']['agent_version'] = nil # nil to install latest # Datadog FIPS proxy package name: default['datadog']['fips_proxy_package_name'] = 'datadog-fips-proxy' # "datadog-fips-proxy" to install the datadog-fips-proxy package @@ -56,8 +55,6 @@ # retries and retry_delay for package download/install default['datadog']['agent_package_retries'] = nil default['datadog']['agent_package_retry_delay'] = nil -default['datadog']['fips_proxy_package_retries'] = nil -default['datadog']['fips_proxy_package_retry_delay'] = nil # Allow downgrades of the agent (Linux only) # Note: on apt-based platforms, this will use the `--force-yes` option on the apt-get command. Use with caution. diff --git a/metadata.rb b/metadata.rb index 486fd7ee..43433d22 100644 --- a/metadata.rb +++ b/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'package@datadoghq.com' license 'Apache-2.0' description 'Installs/Configures datadog components' -version '4.20.0' +version '4.18.0' chef_version '>= 12.7' source_url 'https://github.com/DataDog/chef-datadog' issues_url 'https://github.com/DataDog/chef-datadog/issues' diff --git a/recipes/_install-fips-proxy-linux.rb b/recipes/_install-fips-proxy-linux.rb index 52cc6a08..7cca6f5e 100644 --- a/recipes/_install-fips-proxy-linux.rb +++ b/recipes/_install-fips-proxy-linux.rb @@ -25,8 +25,8 @@ package_action = node['datadog']['fips_proxy_package_action'] -package_retries = node['datadog']['fips_proxy_package_retries'] -package_retry_delay = node['datadog']['fips_proxy_package_retry_delay'] +package_retries = node['datadog']['agent_package_retries'] +package_retry_delay = node['datadog']['agent_package_retry_delay'] # Install the regular package case node['platform_family'] @@ -65,12 +65,15 @@ end end when 'suse' - zypper_package dd_fips_proxy_package_name do # ~FC009 - version dd_fips_proxy_version - retries package_retries unless package_retries.nil? - retry_delay package_retry_delay unless package_retry_delay.nil? - action package_action # default is :install - # allow_downgrade is only suported for zypper_package since Chef Client 13.6 - allow_downgrade node['datadog']['fips_proxy_allow_downgrade'] if respond_to?(:allow_downgrade) - end + raise 'SuSE currently unsupported for the datadog FIPS proxy.' + + ## Uncomment code below once SuSE support is added for FIPS proxy + # zypper_package dd_fips_proxy_package_name do # ~FC009 + # version dd_fips_proxy_version + # retries package_retries unless package_retries.nil? + # retry_delay package_retry_delay unless package_retry_delay.nil? + # action package_action # default is :install + # # allow_downgrade is only suported for zypper_package since Chef Client 13.6 + # allow_downgrade node['datadog']['fips_proxy_allow_downgrade'] if respond_to?(:allow_downgrade) + # end end diff --git a/recipes/dd-fips-proxy.rb b/recipes/dd-fips-proxy.rb index 686669ba..5b70200a 100644 --- a/recipes/dd-fips-proxy.rb +++ b/recipes/dd-fips-proxy.rb @@ -21,7 +21,7 @@ is_windows = platform_family?('windows') -# Install the agent +# Install the fips-proxy if is_windows raise 'Windows currently unsupported for the datadog FIPS proxy.' else