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

Reject dynakubes that use public image and not read only oneAgents #4346

Open
wants to merge 2 commits into
base: release-1.4
Choose a base branch
from

Conversation

waodim
Copy link
Contributor

@waodim waodim commented Jan 24, 2025

Description

Ticket

Previously when a dynakube was applied that had a mode that does not use read only oneagents (so everything that is not cloudNative or hostMon with csi) and a custom image (which we interpret as public images) then the oneAgent pods would run into a CrashLoopBackOff error.

In the pods you'd find this message:

❯ k logs daemonsets/cfg-oneagent
Found 3 pods, using pod/cfg-oneagent-2ghqj
[2025-01-22 13:41:58.584 UTC] [000a1650] [info   ] [bootstrapper] Started agent deployment as a container, PID 661072
[2025-01-22 13:41:58.586 UTC] [000a1650] [error  ] [bootstrapper] Volume storage should be mounted on /mnt/volume_storage_mount with write permissions

With this PR this configuration is now rejected in the first place.

How can this be tested?

Try those modes in combination with a custom image

example:

helm install dynatrace-operator -n dynatrace oci://public.ecr.aws/dynatrace/dynatrace-operator --version 1.4.0 -n dynatrace --set csidriver.enabled=false

spec:
  oneAgent:
    hostMonitoring:
      image: public.ecr.aws/dynatrace/dynatrace-oneagent:1.305.98.20250114-172617

@waodim waodim added the bug Something isn't working label Jan 24, 2025
@waodim waodim requested a review from a team as a code owner January 24, 2025 08:12
@waodim waodim requested review from andriisoldatenko, gkrenn, 0sewa0, chrismuellner, StefanHauth and aorcholski and removed request for a team January 24, 2025 08:12
@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.19%. Comparing base (beb5e16) to head (0d4fc87).
Report is 4 commits behind head on release-1.4.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##           release-1.4    #4346   +/-   ##
============================================
  Coverage        64.18%   64.19%           
============================================
  Files              401      401           
  Lines            26972    26977    +5     
============================================
+ Hits             17312    17317    +5     
  Misses            8293     8293           
  Partials          1367     1367           
Flag Coverage Δ
unittests 64.19% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants