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

chore(*) support Service-less Pods #1460

Merged
merged 9 commits into from
Jan 29, 2021
Merged

Conversation

nickolaev
Copy link
Contributor

@nickolaev nickolaev commented Jan 22, 2021

Summary

Allow for pods without a Service to be part of the mesh (i.e. they will not expose any endpoints).

Documentation

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
@nickolaev nickolaev force-pushed the feat/support_serviceless_pods branch from f4edfbb to e48386c Compare January 25, 2021 15:16
@nickolaev nickolaev marked this pull request as ready for review January 25, 2021 15:16
@nickolaev nickolaev requested a review from a team as a code owner January 25, 2021 15:16
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
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.

Nice, two questions.

  • In inbound proxy generator, should we skip generating inbound listener when port is TCPPortReserved. It will save us and Envoy some cycles and this listener cannot be used anyways
  • Please make sure in the docs to communicate to users that this requirement of Service = Pod is no longer true and the name can be autogenerated from the Pod. In the GUI, I'd also leave some mark to the docs since users might be confused why some names are from 1 template and one from the other template.

// Notice that here we return an error immediately
// instead of leaving Dataplane validation up to a ValidatingAdmissionWebHook.
// We do it this way in order to provide the most descriptive error message.
return nil, errors.Errorf("Kuma requires every Pod in a Mesh to be a part of at least one Service. However, this Pod doesn't have any container ports that would satisfy matching Service(s).")
Copy link
Contributor

Choose a reason for hiding this comment

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

The first sentence is no longer true

Nikolay Nikolaev added 6 commits January 27, 2021 14:09
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>
@@ -357,7 +357,7 @@ var _ = Describe("PodToDataplane(..)", func() {
port: 6060
targetPort: diagnostics
`},
expectedErr: `Kuma requires every Pod in a Mesh to be a part of at least one Service. However, this Pod doesn't have any container ports that would satisfy matching Service(s).`,
expectedErr: `A service that selects pod example was bound, but it doesn't match any container ports.`,
Copy link
Contributor

Choose a reason for hiding this comment

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

bound?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

... found

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
@nickolaev nickolaev merged commit 5c18cb8 into master Jan 29, 2021
@nickolaev nickolaev deleted the feat/support_serviceless_pods branch January 29, 2021 08:32
mergify bot pushed a commit that referenced this pull request Feb 10, 2021
* chore(*) support Service-less Pods

* fix(*) test e2e

* fix(*) outbound converter handles service less

* fix(*) update error message in inbound converter

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
(cherry picked from commit 5c18cb8)
nickolaev pushed a commit that referenced this pull request Feb 10, 2021
* chore(*) support Service-less Pods

* fix(*) test e2e

* fix(*) outbound converter handles service less

* fix(*) update error message in inbound converter

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
(cherry picked from commit 5c18cb8)

Co-authored-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
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.

2 participants