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

Migrate to kubebuilder v4 layout #1092

Merged
merged 10 commits into from
Dec 18, 2024

Conversation

rubenvp8510
Copy link
Collaborator

No description provided.

@rubenvp8510 rubenvp8510 force-pushed the migrate_kubebuilder_v4 branch 4 times, most recently from 56c0231 to 0a595ac Compare November 18, 2024 01:56
@rubenvp8510 rubenvp8510 marked this pull request as ready for review November 18, 2024 06:09
@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 20.83333% with 114 lines in your changes missing coverage. Please review.

Project coverage is 58.64%. Comparing base (a29a921) to head (f6909e8).

Files with missing lines Patch % Lines
api/config/v1alpha1/zz_generated.deepcopy.go 0.00% 65 Missing ⚠️
cmd/root/options.go 35.71% 38 Missing and 7 partials ⚠️
api/config/v1alpha1/projectconfig_types.go 0.00% 2 Missing ⚠️
cmd/main.go 0.00% 1 Missing ⚠️
cmd/start/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1092      +/-   ##
==========================================
- Coverage   67.93%   58.64%   -9.29%     
==========================================
  Files         110      113       +3     
  Lines        8731    10145    +1414     
==========================================
+ Hits         5931     5950      +19     
- Misses       2503     3892    +1389     
- Partials      297      303       +6     
Flag Coverage Δ
unittests 58.64% <20.83%> (-9.29%) ⬇️

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.

cmd/root/root.go Outdated Show resolved Hide resolved
Comment on lines +53 to 51
return err
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you keep the message here? I think it gives context and help debugging stuff

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this is fine, as we don't want to mask errors.

cmd/root/options.go Show resolved Hide resolved
cmd/root/config.go Outdated Show resolved Hide resolved
@iblancasa
Copy link
Collaborator

Some nits. Thanks!

@rubenvp8510 rubenvp8510 requested a review from iblancasa December 3, 2024 03:04
@rubenvp8510 rubenvp8510 force-pushed the migrate_kubebuilder_v4 branch from 34d2a4a to 02466ad Compare December 3, 2024 03:07
@rubenvp8510
Copy link
Collaborator Author

@iblancasa I've already address some of your comments

@iblancasa @andreasgerstmayr Could you review this ? Thanks!

Signed-off-by: Ruben Vargas <[email protected]>
@andreasgerstmayr
Copy link
Collaborator

andreasgerstmayr commented Dec 4, 2024

lgtm overall, great work! 💯
I left one comment regarding the pprof endpoints.

@rubenvp8510 rubenvp8510 force-pushed the migrate_kubebuilder_v4 branch from d9fe4e0 to ab36568 Compare December 9, 2024 05:10
Signed-off-by: Ruben Vargas <[email protected]>
@andreasgerstmayr
Copy link
Collaborator

Last thing before merging, did you run the OpenShift e2e tests and confirm that they're still working?
Because there are some changes related to the metrics (.Metrics.BindAddress) in this PR, we should make sure that the operator and operand metrics still work, and iirc they are only tested in the OpenShift e2e test suite.

Signed-off-by: Ruben Vargas <[email protected]>
@rubenvp8510
Copy link
Collaborator Author

rubenvp8510 commented Dec 12, 2024

Pass almost all OCP tests except some due must gather issues

-- FAIL: chainsaw (398.06s)
    --- PASS: chainsaw/monitoring (124.40s)
    --- PASS: chainsaw/monolithic-monitoring (76.25s)
    --- PASS: chainsaw/red-metrics (197.41s)
    --- FAIL: chainsaw/monolithic-route (60.15s)
    --- PASS: chainsaw/monolithic-single-tenant-auth (72.51s)
    --- PASS: chainsaw/tls-singletenant-monolithic (77.18s)
    --- PASS: chainsaw/monolithic-multitenancy-static (79.68s)
    --- PASS: chainsaw/monolithic-multitenancy-openshift (80.40s)
    --- PASS: chainsaw/tls-singletenant (125.31s)
    --- PASS: chainsaw/tempo-single-tenant-auth (132.51s)
    --- FAIL: chainsaw/route (139.00s)
    --- PASS: chainsaw/multitenancy (145.20s)
    --- PASS: chainsaw/tempostack-resources (178.05s)
    --- PASS: chainsaw/component-replicas (202.22s

I don't understand why this step fails

        Missing: *sha*/olm/operator-tempo-*-tempo-operator.yaml
    | 00:38:13 | monolithic-route | Run the must-gather and verify the contents | SCRIPT    | ERROR |

@IshwarKanse Could you help me testing this on your side? May be is something on my environment. Thanks

@andreasgerstmayr
Copy link
Collaborator

        Missing: *sha*/olm/operator-tempo-*-tempo-operator.yaml
    | 00:38:13 | monolithic-route | Run the must-gather and verify the contents | SCRIPT    | ERROR |

@IshwarKanse Could you help me testing this on your side? May be is something on my environment. Thanks

I think the namespace where the operator is installed must end in tempo-operator. Does it work with the instructions here: https://github.com/grafana/tempo-operator/blob/main/RELEASE.md#running-e2e-tests-on-openshift ?

@@ -488,7 +488,7 @@ docs/spec/%: bundle/community/manifests/% | gen-api-docs
$(GEN_API_DOCS) < $^ > $@

docs/operator/config.yaml: gen-api-docs
$(GEN_API_DOCS) -pkg github.com/grafana/tempo-operator/apis/config/v1alpha1 -type ProjectConfig -format multiline > $@
$(GEN_API_DOCS) -pkg github.com/grafana/tempo-operator/api/config/v1alpha1 -type ProjectConfig -format multiline > $@
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain this change? Maybe a link to documentation?

I think the apis was used for multi version projects.

Copy link
Collaborator

Choose a reason for hiding this comment

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

and our PROJECT uses multigroup

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not anymore. is part of the layout changes

New layout:

The directory apis was renamed to api to follow the standard
The controller(s) directory has been moved under a new directory called internal and renamed to singular as well controller
The main.go previously scaffolded in the root directory has been moved under a new directory called cmd

@@ -1,6 +1,6 @@
domain: grafana.com
layout:
- go.kubebuilder.io/v3
- go.kubebuilder.io/v4
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you point me to the docs for this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@IshwarKanse
Copy link
Contributor

        Missing: *sha*/olm/operator-tempo-*-tempo-operator.yaml
    | 00:38:13 | monolithic-route | Run the must-gather and verify the contents | SCRIPT    | ERROR |

@IshwarKanse Could you help me testing this on your side? May be is something on my environment. Thanks

I think the namespace where the operator is installed must end in tempo-operator. Does it work with the instructions here: https://github.com/grafana/tempo-operator/blob/main/RELEASE.md#running-e2e-tests-on-openshift ?

@andreasgerstmayr I installed the operator in openshift-tempo-operator project and ran the tests. The must-gather steps pass.

--- PASS: chainsaw (2294.18s)
    --- PASS: chainsaw/ossm-monolithic-otel (386.10s)
    --- PASS: chainsaw/ossm-tempostack (349.65s)
    --- PASS: chainsaw/ossm-tempostack-otel (374.55s)
    --- PASS: chainsaw/otel-tempo-serverless (412.65s)
    --- PASS: chainsaw/tempo-serverless (314.67s)
    --- PASS: chainsaw/monitoring (159.00s)
    --- PASS: chainsaw/monolithic-monitoring (101.48s)
    --- PASS: chainsaw/red-metrics (196.09s)
    --- PASS: chainsaw/operator-metrics (20.92s)
    --- PASS: chainsaw/reconcile (106.44s)
    --- PASS: chainsaw/monolithic-receivers-tls (114.84s)
    --- PASS: chainsaw/monolithic-pv (95.61s)
    --- PASS: chainsaw/monolithic-s3-tls (122.56s)
    --- PASS: chainsaw/tempostack-extraconfig (132.30s)
    --- PASS: chainsaw/receivers-tls (152.79s)
    --- PASS: chainsaw/receivers-mtls (153.01s)
    --- PASS: chainsaw/monolithic-extraconfig (54.30s)
    --- PASS: chainsaw/monolithic-memory (81.23s)
    --- PASS: chainsaw/monolithic-ingestion-mtls (74.47s)
    --- PASS: chainsaw/monolithic-route (76.84s)
    --- PASS: chainsaw/monolithic-single-tenant-auth (82.56s)
    --- PASS: chainsaw/generate (71.76s)
    --- PASS: chainsaw/gateway (43.53s)
    --- PASS: chainsaw/route (156.66s)
    --- PASS: chainsaw/monolithic-multitenancy-static (92.42s)
    --- PASS: chainsaw/multitenancy (162.88s)
    --- PASS: chainsaw/tempo-single-tenant-auth (143.93s)
    --- PASS: chainsaw/monolithic-multitenancy-openshift (80.69s)
    --- PASS: chainsaw/custom-ca (125.01s)
    --- PASS: chainsaw/tls-singletenant-monolithic (95.24s)
    --- PASS: chainsaw/compatibility (152.09s)
    --- PASS: chainsaw/tls-singletenant (157.65s)
    --- PASS: chainsaw/component-replicas (234.11s)
    --- PASS: chainsaw/tempostack-resources (197.49s)
    --- PASS: chainsaw/tempostack-retention-global (2862.40s)
PASS
Tests Summary...
- Passed  tests 35
- Failed  tests 0
- Skipped tests 0
Done.

@rubenvp8510 rubenvp8510 merged commit c2c2f7b into grafana:main Dec 18, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants