opentelemetry-operator icon indicating copy to clipboard operation
opentelemetry-operator copied to clipboard

[HPA] Add targetCPUUtilization field to collector config

Open moh-osman3 opened this issue 2 years ago • 8 comments

Implementation for https://github.com/open-telemetry/opentelemetry-operator/issues/1065

Adding targetCPUUtilization (percentage) to the collector config instead of hard coding the value.

moh-osman3 avatar Aug 30 '22 09:08 moh-osman3

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: moh-osman3 / name: Moh Osman (012fd4a3d2e4a02ed9104870d812f54ccf9735aa, 08733b9404f722f5ba41ecaf30fcc83dfff21a96)

@moh-osman3 please sign the CLA

pavolloffay avatar Aug 30 '22 13:08 pavolloffay

linting failed

pavolloffay avatar Aug 31 '22 08:08 pavolloffay

linting failed

I think that was because I had some spaces instead of tabs in the webhook file. golangci-lint run is not throwing errors for me locally anymore. Can you run again please?

moh-osman3 avatar Aug 31 '22 22:08 moh-osman3

@kevinearls could you please review as well?

pavolloffay avatar Sep 01 '22 10:09 pavolloffay

@moh-osman3 CI failed

pavolloffay avatar Sep 02 '22 13:09 pavolloffay

@moh-osman3 CI failed

@pavolloffay Sorry for delay I was on PTO last week! Yeah I noticed CI was failing due to unit test error

--- FAIL: TestHPA (0.00s)
    --- FAIL: TestHPA/v2 (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1cf2364]

This was resolved by adding back the nil check in pkg/collector/horizontalpodautoscaler.go

I also noticed that after I applied https://github.com/open-telemetry/opentelemetry-operator/pull/1066/commits/e54ef2ac7a6e2d76627ff8ce298d0f64f75d3d3d my e2e tests are failing but unable to figure out the exact issue. I think I'm a little confused why the default set in the webhook isn't being picked up in horizontalpodautoscaler.go. So I reverted that change - currently I think the only test failing is Security for CI. Wondering if you have any guidance to get the tests passing?

moh-osman3 avatar Sep 13 '22 01:09 moh-osman3

the PR needs to be rebased

pavolloffay avatar Sep 16 '22 08:09 pavolloffay