Skip to content

Conversation

@Frankkkkk
Copy link

@Frankkkkk Frankkkkk commented Sep 8, 2025

Secrets don't have a .spec.data field; the .data is at the root.

Cheers!

Summary by CodeRabbit

  • Bug Fixes
    • Updated router certificate validation messages to reference the correct secret data location, improving accuracy and clarity across scenarios: missing data, malformed PEM, missing server certificates, and invalid certificates for route hostnames. This enhances troubleshooting and reduces confusion. No functional behavior changes.

Secrets don't have a `.spec.data` field; the `.data` is at the root.

Signed-off-by: Frank Villaro-Dixon <[email protected]>
@coderabbitai
Copy link

coderabbitai bot commented Sep 8, 2025

Walkthrough

Updated error message templates in routerCertsDomainValidationController.validateRouterCertificates to reference secret/%v.data[%v] instead of secret/%v.spec.data[%v] for several error cases. No control flow or logic changes.

Changes

Cohort / File(s) Summary
Router certs controller messages
pkg/controllers/routercerts/controller.go
Adjusted error message strings for MissingRouterCertsPEM, MalformedRouterCertsPEM, NoServerCertRouterCerts, and InvalidServerCertRouterCerts to use secret/%v.data[%v] path.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 11e57aa and 393f16d.

📒 Files selected for processing (1)
  • pkg/controllers/routercerts/controller.go (2 hunks)
🔇 Additional comments (4)
pkg/controllers/routercerts/controller.go (4)

193-193: Correct Secret field path in error message.

Updated to secret/%v.data[...] which matches the actual Secret schema. Looks good.


199-199: Accurate path for malformed PEM error.

Message now references secret/.data[], fixing the previous .spec.data typo.


235-235: Consistent Secret path for no-server-cert case.

The corrected field path is accurate and consistent with Kubernetes Secret structure.


240-240: Fixed Secret path in invalid server cert message.

The message now correctly points to data[...] on the Secret.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci openshift-ci bot requested review from ibihim and liouk September 8, 2025 12:01
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 8, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 8, 2025

Hi @Frankkkkk. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 8, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Frankkkkk
Once this PR has been reviewed and has the lgtm label, please assign liouk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Frankkkkk
Copy link
Author

@liouk could I have your approval please? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant