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

[chef] fips-proxy package support #853

Merged
merged 9 commits into from
Nov 6, 2023
Merged

[chef] fips-proxy package support #853

merged 9 commits into from
Nov 6, 2023

Conversation

truthbk
Copy link
Member

@truthbk truthbk commented Jul 2, 2022

This is barebones package support for a potential datadog-fips-proxy package.

Copy link
Contributor

@bkabrda bkabrda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 thanks for sending the PR! It mostly looks good, but I left some inline comments to discuss/get addressed.

@@ -42,18 +42,27 @@
default['datadog']['agent_version'] = nil # nil to install latest
# 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'] = '0.1.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why this line is commented out? I think we should do the same thing as we do for agent_version by default, which would be setting it to nil.

recipes/dd-fips-proxy.rb Show resolved Hide resolved
group 'root'
mode 0766
content lazy { ::File.open('/etc/datadog-fips-proxy/datadog-fips-proxy.cfg.example').read }
not_if { ::File.exist?('/etc/datadog-fips-proxy/datadog-fips-proxy.cfg') }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intention here to not overwrite the config file if it already exists? Most config management tools intentionally ensure that a file has specified contents. I'd prefer if we introduced config variables for what is supposed to go in this file (with the option to using "default" which would use the example file contents).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the intention.

The complexity of this file is high, and should not really ever be touched by customers, hence the original decision. The number of potential HAproxy config changes a customer could implement in that file is really quite insane.

recipes/dd-fips-proxy.rb Show resolved Hide resolved
@truthbk truthbk marked this pull request as ready for review October 30, 2023 14:55
@truthbk truthbk requested a review from a team as a code owner October 30, 2023 14:55
Copy link
Contributor

@bkabrda bkabrda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi 👋 thanks for addressing the feedback. I think the PR looks pretty solid, but I still left couple comments inline to get addressed.

@@ -42,18 +42,27 @@
default['datadog']['agent_version'] = nil # nil to install latest
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already exists above on line 42, I think this line was added by mistake?


# Agent package options
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably suggest using agent_package_retries and agent_package_retry_delay for both the Agent and the FIPS proxy. I know that the naming suggests that this would only apply to Agent, but I find it hard to believe that people would make these values different for Agent and FIPS proxy - most of the time, people will have to set both to exactly the same value and I don't think that's a great user experience. WDYT?

metadata.rb Outdated
@@ -3,7 +3,7 @@
maintainer_email '[email protected]'
license 'Apache-2.0'
description 'Installs/Configures datadog components'
version '4.18.0'
version '4.20.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version shouldn't be updated as part of a feature PR.


is_windows = platform_family?('windows')

# Install the agent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Install the agent
# Install the fips-proxy

recipes/_install-fips-proxy-linux.rb Show resolved Hide resolved
@truthbk truthbk merged commit fa4a4ba into main Nov 6, 2023
2 checks passed
@truthbk truthbk deleted the jaime/fips-proxy branch November 6, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants