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

Remove arch param where necessary #4065

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

Remove arch param where necessary #4065

wants to merge 6 commits into from

Conversation

0sewa0
Copy link
Contributor

@0sewa0 0sewa0 commented Nov 15, 2024

Description

DAQ-2193

Adds logic that it tries to define the most correct affinity for the deployed components.

  • only "tries" because we can't be sure of what architectures does a "custom image" support, but we will assume that the a "custom image" is a replicated public registry image.

So from now on if the ActiveGate or the OneAgent images are from the tenant-registry then only the amd64 nodes are supported according to the affinity.

  • This includes the "default scenario" (nothing is configured), and the "custom version" scenario (only a custom version is provided)

In all other cases ("custom image") we use the broader affinity, based on the public-registry images (amd64, arm64, ppc64le, s390x)

How can this be tested?

  • Deploy OnaAgent and ActiveGate with default/custom-version ==> only amd64 in the affinity
  • Deploy OnaAgent and ActiveGate with custom image ==> broader affinity used
    • images: public.ecr.aws/dynatrace/dynatrace-oneagent:1.303.55.20241122-143001, public.ecr.aws/dynatrace/dynatrace-activegate:1.303.25.20241118-125000
  • Downloaded codemodules respect the architecture of the Operator image.

@0sewa0 0sewa0 added the core Changes to core functionality of the Operator label Nov 15, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2024

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

Codecov Report

Attention: Patch coverage is 71.21212% with 19 lines in your changes missing coverage. Please review.

Project coverage is 64.46%. Comparing base (2a00caf) to head (f9a8011).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
test/mocks/pkg/clients/dynatrace/client.go 15.38% 8 Missing and 3 partials ⚠️
pkg/clients/dynatrace/agent_version.go 71.42% 3 Missing and 1 partial ⚠️
pkg/clients/dynatrace/endpoints.go 73.33% 4 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4065      +/-   ##
==========================================
- Coverage   64.57%   64.46%   -0.12%     
==========================================
  Files         400      400              
  Lines       26768    26724      -44     
==========================================
- Hits        17286    17228      -58     
- Misses       8126     8138      +12     
- Partials     1356     1358       +2     
Flag Coverage Δ
unittests 64.46% <71.21%> (-0.12%) ⬇️

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.

@0sewa0 0sewa0 marked this pull request as ready for review November 26, 2024 09:23
@0sewa0 0sewa0 requested a review from a team as a code owner November 26, 2024 09:23
@@ -28,7 +28,7 @@ func (dtc *dynatraceClient) GetEntityIDForIP(ctx context.Context, ip string) (st
}

// GetLatestAgent gets the latest agent package for the given OS and installer type.
func (dtc *dynatraceClient) GetLatestAgent(ctx context.Context, os, installerType, flavor, arch string, technologies []string, skipMetadata bool, writer io.Writer) error {
func (dtc *dynatraceClient) GetLatestAgent(ctx context.Context, os, installerType, flavor, arch string, technologies []string, skipMetadata bool, writer io.Writer) error { // TODO: does flavor/arch needed?
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems it is needed! For downloading the actual package it makes sense as well

flavor = arch.Flavor
}
flavor := determineFlavor(installerType)
_arch := determineArch(installerType)
Copy link
Collaborator

Choose a reason for hiding this comment

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

isn't _var usually for package/file wide vars?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Changes to core functionality of the Operator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants