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

Integration test for EDOT agents with operator, plus skeleton for collector #16

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

jackshirazi
Copy link
Contributor

The integration test needs further work, to be outlined in an issue, but this should work now for 3 out of 5 agents

@mlunadia
Copy link
Contributor

mlunadia commented Oct 3, 2024

@gizas @jackshirazi @rogercoll who can be a good reviewer to this PR?
Do we need to add some of you to this roles on this repo?

bash test/operator/wait_for_pod_start.sh cert-manager cert-manager- 1/1 3
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update
helm install opentelemetry-operator --namespace opentelemetry-operator-system open-telemetry/opentelemetry-operator --create-namespace --set manager.collectorImage.repository="docker.elastic.co/beats/elastic-agent:8.15.0-SNAPSHOT",manager.extraArgs={"--enable-go-instrumentation=true"}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you would need 8.16.0-SNAPSHOT image for this to work. This is because with previous versions you would need to override the container's command in order to launch the otel collector instead of the elastic-agent binary; elastic/elastic-agent#5248

In addition to that, the ELASTIC_AGENT_OTEL environment variable need to be defined too. Example https://github.com/elastic/opentelemetry/pull/11/files#diff-99b053f068c4e75b4029bd9dca1f76667178c4c2174db8313605c0a440e0fc37R22

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a skeleton implementation. I'm expecting this to use exactly the instructions we provide to users, rather than this skeleton. Let's do that in a different PR, as it needs syncing the installation with the readme instructions so not straightforward

Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts --force update
(and delete line 43

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If that's the preference, update it in https://github.com/elastic/opentelemetry/blob/main/docs/onboarding/8_16/operator/README.md because the upcoming version of this will use exactly what is in there


- name: Install Operator Skeleton
run: |
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.15.3/cert-manager.yaml
Copy link
Contributor

Choose a reason for hiding this comment

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

This is needed only for apm tests right?

Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT shall we pin the versions of certmanager and azure/setup-helm@v4 or use the latest? In order those tests to catch any possible issues for the users as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is needed for the operator install unless the helm chart does that for you

Copy link
Contributor

Choose a reason for hiding this comment

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

If we use the Onboarding steps, this won't be needed as cert-manager is disabled.

@gizas
Copy link
Contributor

gizas commented Oct 4, 2024

A small readme on how to run those locally maybe? Sth like a set of commands to be useful for everybody to kick this off might be really useful

bash test/operator/wait_for_pod_start.sh cert-manager cert-manager- 1/1 3
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update
helm install opentelemetry-operator --namespace opentelemetry-operator-system open-telemetry/opentelemetry-operator --create-namespace --set manager.collectorImage.repository="docker.elastic.co/beats/elastic-agent:8.15.0-SNAPSHOT",manager.extraArgs={"--enable-go-instrumentation=true"}
Copy link
Contributor

Choose a reason for hiding this comment

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

The opentelemetry-operator-system namespace should be created as well in prereq step is not it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as above, will use the actual installation procedure we specify in the readme. in another PR

@jackshirazi
Copy link
Contributor Author

Any open issues with this PR bearing in mind the next steps already outlined in #13 ? If not can someone approve please?

Copy link
Contributor

@rogercoll rogercoll left a comment

Choose a reason for hiding this comment

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

Template lgtm, let's use the actual Onboarding command in a follow-up PR if possible. In addition, it would be great to have some documentation in test/operator/README.md.

I am also wondering if this repository, is the best for these tests. But we can move this discussion async.

Copy link
Contributor

@gizas gizas left a comment

Choose a reason for hiding this comment

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

LGTM!

@jackshirazi jackshirazi merged commit 9b6ed46 into elastic:main Oct 10, 2024
1 check passed
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.

4 participants