feat: add GET endpoint by primitive kind and name#2906
feat: add GET endpoint by primitive kind and name#2906Yuan325 wants to merge 1 commit intoadmin-deletefrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new GET endpoint to the admin router, enabling the retrieval of specific resource configurations by kind and name. While the implementation correctly handles various resource types, the new handler is missing instrumentation for tracing and metrics, which is inconsistent with other admin endpoints. Furthermore, the unit tests for this feature contain logic errors in their comparison blocks and expected values that must be addressed to ensure the tests pass correctly.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new administrative GET endpoint for retrieving primitive configurations by name and implements a Secret type to mask sensitive fields during JSON and YAML serialization. The feedback identifies a critical bug in the Secret.MarshalJSON implementation that would result in malformed JSON, suggests adding instrumentation to the new request handler for consistency with existing admin handlers, and recommends enhancing test coverage to verify the masking behavior with actual resource configurations.
New GET endpoint for
/admin/{kind}/{name}.Created a new
type Secret stringtype for all the secret value. Sensitive information with this type will not be shown with the GET endpoint. It will be replaced with***.