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

feat(kuma-cp) friendly response in K8s mode #712

Merged
merged 6 commits into from
May 5, 2020

Conversation

nickolaev
Copy link
Contributor

@nickolaev nickolaev commented May 1, 2020

Summary

When kuma-cp is run in Kubernetes mode, all the changes should happen through kubectl. Send an explanation in the response body, so clients (i.e. kumactl or the HTTP API) can show it to the user.

Full changelog

  • feat(kuma-cp) friendly response in K8s mode
  • feat(kumactl) do not show error code 405 on apply/delete

Issues resolved

Fix #165

@nickolaev nickolaev requested a review from a team May 1, 2020 08:44
pkg/api-server/resource_endpoints.go Outdated Show resolved Hide resolved
pkg/api-server/resource_endpoints.go Outdated Show resolved Hide resolved
Copy link
Contributor

@jakubdyszkiewicz jakubdyszkiewicz left a comment

Choose a reason for hiding this comment

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

Can you add tests (assertions to the body msg) in read_only_resource_endpoints_test.go ?

@nickolaev nickolaev force-pushed the feat/kumactl_apply_k8s branch 2 times, most recently from aac0b71 to 225a075 Compare May 4, 2020 11:26
Nikolay Nikolaev added 6 commits May 4, 2020 20:18
When kuma-cp is run in Kubernetes mode, all the changes should
happen through `kubectl`. Send an explanation in the response body,
so clients (i.e. `kumactl`) can show it to the user.

Fixes #165

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
When kuma-cp sends back 405 on resource Create/Update/Delete,
just show the message in the body. This makes the message more
user friendly.

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
@nickolaev nickolaev merged commit a7cb06f into master May 5, 2020
@subnetmarco subnetmarco deleted the feat/kumactl_apply_k8s branch May 6, 2020 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kumactl apply and Kuberentes
3 participants