-
Notifications
You must be signed in to change notification settings - Fork 13.1k
datasources: apiserver: do not enable extra methods by default #113395
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
base: main
Are you sure you want to change the base?
Conversation
| }`, string(jj)) | ||
| }) | ||
|
|
||
| t.Run("Call subresources", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment with context for these commented out tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, added info 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, pending a nit and linting fixes 👍
6aec7c5 to
f61babc
Compare
|
|
||
| func (r *subHealthREST) Connect(ctx context.Context, name string, opts runtime.Object, responder rest.Responder) (http.Handler, error) { | ||
| if !healthEnabled { | ||
| return nil, errors.New("health: endpoint disabled") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a nit: I prefer the term 'not implemented' as its feels more standardised, like in the 501 HTTP code. As a bonus, could we return 501 here instead of 500?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need the health: prefix on the error message either
| } | ||
| `, string(body)) | ||
| _, err = client.Get(ctx, "test", metav1.GetOptions{}, "health") | ||
| // endpoint is disabled currently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need more context in this comment about why this is disabled
f61babc to
a4e3eae
Compare
the extra non-crud apiserver methods (check-health, call-resource, datasource proxy) have not been tested yet, so we will not enable them by default.