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

imp: add talos.dev compatibility #1572

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

imp: add talos.dev compatibility #1572

wants to merge 4 commits into from

Conversation

faelis
Copy link

@faelis faelis commented Oct 22, 2024

What this PR does / why we need it:

Which issue this PR fixes

Fix processAgent crash when Running on talos.dev cluster. It's because it try to mount files which don't exist on the OS.

Special notes for your reviewer:

I didn't managed to run make update-test-baselines

Checklist

  • Chart Version bumped
  • Documentation has been updated with helm-docs (run: .github/helm-docs.sh)
  • CHANGELOG.md has been updated
  • Variables are documented in the README.md
  • For Datadog Operator chart or value changes update the test baselines (run: make update-test-baselines)

@faelis faelis requested review from a team as code owners October 22, 2024 08:29
@clamoriniere clamoriniere requested a review from a team October 22, 2024 09:10
@faelis faelis requested a review from a team as a code owner October 22, 2024 13:32
@@ -65,7 +65,7 @@
mountPropagation: {{ .Values.datadog.hostVolumeMountPropagation }}
readOnly: true
{{- include "linux-container-host-release-volumemounts" . | nindent 4 }}
{{- if .Values.datadog.systemProbe.enableDefaultOsReleasePaths }}
{{- if or .Values.datadog.systemProbe.enableDefaultOsReleasePaths (not .Values.datadog.disableDefaultOsReleasePaths) }}
Copy link
Member

Choose a reason for hiding this comment

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

I think this might need to be and, otherwise the default value of true for the deprecated datadog.systemProbe.enableDefaultOsReleasePaths will always ignore the new config option.

- hostPath:
path: {{ .Values.datadog.systemProbe.osReleasePath | default .Values.datadog.osReleasePath }}
name: os-release-file
{{- end }}
{{- if or (and (eq (include "should-enable-system-probe" .) "true") .Values.datadog.systemProbe.enableDefaultOsReleasePaths) .Values.datadog.sbom.host.enabled }}
{{- if or (and (eq (include "should-enable-system-probe" .) "true") (or .Values.datadog.systemProbe.enableDefaultOsReleasePaths (not .Values.datadog.disableDefaultOsReleasePaths))) .Values.datadog.sbom.host.enabled }}
Copy link
Member

Choose a reason for hiding this comment

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

as above, I think this should be and

@faelis
Copy link
Author

faelis commented Nov 4, 2024

@brycekahle @clamoriniere I think I made a mistake as I didn't want to close the PR.

@brycekahle I applied your fix :)

@faelis faelis reopened this Nov 4, 2024
@faelis
Copy link
Author

faelis commented Nov 21, 2024

Hello @clamoriniere, Could you please approve this PR?

thanks a lot !

@clamoriniere
Copy link
Collaborator

Hi @faelis

will work on in ASAP

@@ -1,4 +1,5 @@
{{- define "linux-container-host-release-volumemounts" -}}
{{- if (not .Values.datadog.disableDefaultOsReleasePaths) }}
Copy link
Collaborator

@clamoriniere clamoriniere Nov 21, 2024

Choose a reason for hiding this comment

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

Hi @faelis

Instead of removing the os-release-file, does Talos.dev provide a similar file? by default we are trying to mount /etc/os-release. If this file doesn't exist on talos.dev, could you check if an equivalent file exist?

I'm thinking that maybe instead of adding another option to disable the defaultOsReleasePaths, we could modify the current logic to check if .Values.datadog.osReleasePath is not empty.
And in the values.yaml file set datadog.osReleasePath: "" WDYT?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok so I was able to test it locally, And I can find the /etc/os-release file on a talos node

root@talos-default-worker-1 / [talos-default-worker-1]
docker > cat /etc/os-release
NAME="Talos"
ID=talos
VERSION_ID=v1.8.3
PRETTY_NAME="Talos (v1.8.3)"
HOME_URL="https://www.talos.dev/"
BUG_REPORT_URL="https://github.com/siderolabs/talos/issues"
VENDOR_NAME="Sidero Labs"
VENDOR_URL="https://www.siderolabs.com/"

@clamoriniere
Copy link
Collaborator

Hi @faelis
based on your PR, I made this one #1611

I have introduced a new setting providers.talos.enabled that should set the different parameter requires for installing the chart on a Talos OS cluster.

Please let me know what do you think?

@clamoriniere clamoriniere added the chart/datadog This issue or pull request is related to the datadog chart label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart/datadog This issue or pull request is related to the datadog chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants