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

Fixed Otel Controller - Auxiliares resources deletion #2575

Merged
merged 31 commits into from
Feb 28, 2024

Conversation

yuriolisa
Copy link
Contributor

@yuriolisa yuriolisa commented Jan 29, 2024

Description:

Fixed HPA deletion
Link to tracking Issue:
Resolves #2568
Resolves #2651
Resolves #2587

Testing:
Added new e2e test to check this step.
Documentation:

  • Created a new bundle due to the new RBAC for PersistentVolumes and PersistentVolumesClaims.
  • Fixed the labels used by Ingress resources and their unit tests.
  • Created new function findOtelOwnedObjects which will find all the owned objects and serve as an auxiliary resource to the reconcileDesiredObjects function to keep or delete the expected objects.
  • Changed the parameters of the function HorizontalPodAutoscaler from client.Object to *autoscalingv2.HorizontalPodAutoscaler to keep the same pattern we have been using for another resources.
  • Added the networkv1 package to the scheme. (networkingv1.AddToScheme(scheme)).
  • Update Chainsaw from 0.1.4 to 0.1.7 in order to get the patch operation enabled.
  • Created new e2e tests for Ingress and HorizontalPodAutoscalers to test the deletion process.
  • Added the testdata.ServiceMonitorCRD, testdata.PodMonitorCRD to the controllers/suite_test.go

Signed-off-by: Yuri Sa <[email protected]>
@yuriolisa yuriolisa requested a review from a team January 29, 2024 15:28
Signed-off-by: Yuri Sa <[email protected]>
Copy link
Contributor

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

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

Looking great! Thank you for implementing this.

tests/e2e-autoscale/autoscale/04-error.yaml Show resolved Hide resolved
controllers/common.go Outdated Show resolved Hide resolved
controllers/common.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

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

one comment. Otherwise, were you able to confirm locally that this does as we intend?

controllers/common.go Outdated Show resolved Hide resolved
@jaronoff97 jaronoff97 requested a review from frzifus February 15, 2024 18:44
controllers/common.go Outdated Show resolved Hide resolved
controllers/common.go Outdated Show resolved Hide resolved
Signed-off-by: Yuri Sa <[email protected]>
Signed-off-by: Yuri Sa <[email protected]>
Signed-off-by: Yuri Sa <[email protected]>
@yuriolisa yuriolisa changed the title Fixed HPA deletion Fixed Otel Controller - Auxiliares resources deletion Feb 20, 2024
@swiatekm swiatekm self-requested a review February 20, 2024 16:48
Copy link
Contributor

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

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

just two small things, otherwise this LGTM!! Thank you so much Yuri.

controllers/common.go Outdated Show resolved Hide resolved
controllers/common.go Outdated Show resolved Hide resolved
@pavolloffay
Copy link
Member

The CI is still failing :/

Copy link
Contributor

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

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

looks like it's failing on: error listing ServiceMonitors: no kind is registered for the type v1.ServiceMonitorList in scheme "pkg/runtime/scheme.go:100"

Overall though i think this looks good to me!

@pavolloffay
Copy link
Member

Still one e2e test is failing

Signed-off-by: Yuri Sa <[email protected]>
Makefile Outdated Show resolved Hide resolved
Signed-off-by: Yuri Sa <[email protected]>
Signed-off-by: Yuri Sa <[email protected]>
Signed-off-by: Yuri Sa <[email protected]>
@jaronoff97
Copy link
Contributor

@yuriolisa thank you so much for your heroics here. I really appreciate the work and all the fixes that come from this.

@jaronoff97 jaronoff97 merged commit 874c72a into open-telemetry:main Feb 28, 2024
29 checks passed
ItielOlenick pushed a commit to ItielOlenick/opentelemetry-operator that referenced this pull request May 1, 2024
…#2575)

* Fixed HPA deletion

Signed-off-by: Yuri Sa <[email protected]>

* Fix e2e tests

Signed-off-by: Yuri Sa <[email protected]>

* Added reconciliation test

Signed-off-by: Yuri Sa <[email protected]>

* Added owned objects function

Signed-off-by: Yuri Sa <[email protected]>

* Fixed controller test

Signed-off-by: Yuri Sa <[email protected]>

* Fixed controller test

Signed-off-by: Yuri Sa <[email protected]>

* Fixed controller test

Signed-off-by: Yuri Sa <[email protected]>

* Add PodDisruptionBudget

Signed-off-by: Yuri Sa <[email protected]>

* Change vars setting

Signed-off-by: Yuri Sa <[email protected]>

* Change vars setting

Signed-off-by: Yuri Sa <[email protected]>

* Update e2e tests to chainsaw

Signed-off-by: Yuri Sa <[email protected]>

* Added ingress e2e tests

Signed-off-by: Yuri Sa <[email protected]>

* Added Volumes, changed function's place

Signed-off-by: Yuri Sa <[email protected]>

* Added Volumes, changed function's place

Signed-off-by: Yuri Sa <[email protected]>

* Added Volumes, changed function's place

Signed-off-by: Yuri Sa <[email protected]>

* Fixed Suite Test

Signed-off-by: Yuri Sa <[email protected]>

* Added RBAC for Volumes

Signed-off-by: Yuri Sa <[email protected]>

* Added RBAC for Volumes

Signed-off-by: Yuri Sa <[email protected]>

* Fixed Suite Test

Signed-off-by: Yuri Sa <[email protected]>

* Fixed Suite Test

Signed-off-by: Yuri Sa <[email protected]>

* Fixed Suite Test

Signed-off-by: Yuri Sa <[email protected]>

* Add a sleep

* Fixed Chainsaw test

Signed-off-by: Yuri Sa <[email protected]>

* Fixed Chainsaw test

Signed-off-by: Yuri Sa <[email protected]>

* Fixed Chainsaw test

Signed-off-by: Yuri Sa <[email protected]>

* Fixed Chainsaw test

Signed-off-by: Yuri Sa <[email protected]>

---------

Signed-off-by: Yuri Sa <[email protected]>
Co-authored-by: Jacob Aronoff <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants