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) add ServiceAddress to dataplane Inbound #892

Merged
merged 9 commits into from
Jul 16, 2020

Conversation

nickolaev
Copy link
Contributor

@nickolaev nickolaev commented Jul 9, 2020

Summary

As described in #891, we would like to extend the DataplaneResource to include a ServiceAddress field in the Inbound. This way the dataplane and the service can live in different IP netns, containers, VMs etc.

Remove the remains of the Interface remove in #832. In the dataplaen helpers deleted ParseInboundInterface, ParseOutboundInterface, ParsePort, ParseIP.

Full changelog

  • Extend the
  • [Fix ...]

Issues resolved

Fix #891

Documentation

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
@nickolaev nickolaev requested a review from a team July 9, 2020 12:29
Nikolay Nikolaev added 2 commits July 9, 2020 19:05
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
…t, ParseIP

Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
@lobkovilya
Copy link
Contributor

Will it work in Kubernetes with transparent proxy mode? If not, we need somehow show that this property should be used only on Universal, maybe we can add validation.
Also, I'm pretty sure it won't work if serviceAddress equals to dataplane.networking.address - we will get a loop, so maybe this should be implemented as validation as well.

Nikolay Nikolaev added 2 commits July 10, 2020 11:53
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
}
return text, nil
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, thank's for cleaning it up.

api/mesh/v1alpha1/dataplane.proto Show resolved Hide resolved
pkg/core/resources/apis/mesh/dataplane_validator.go Outdated Show resolved Hide resolved
pkg/core/resources/apis/mesh/dataplane_validator.go Outdated Show resolved Hide resolved
if inbound.ServicePort == 0 || inbound.ServicePort == inbound.Port {
result.AddViolationAt(validators.RootedAt("serviceAddress"), `serviceAddress and servicePort has to differ from inboundIP and Port`)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add tests for those new cases?

Nikolay Nikolaev added 2 commits July 14, 2020 09:33
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
@nickolaev nickolaev requested a review from a team as a code owner July 14, 2020 09:07
address: 1.1.1.1
tags:
service: backend`,
}),
Copy link
Contributor

Choose a reason for hiding this comment

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

We've got should pass validation section above

Nikolay Nikolaev added 2 commits July 16, 2020 12:44
Signed-off-by: Nikolay Nikolaev <nikolay.nikolaev@konghq.com>
@nickolaev nickolaev merged commit d2fc060 into master Jul 16, 2020
@nickolaev nickolaev deleted the feat/extend_dataplane_serviceip branch July 17, 2020 16:41
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.

Extend the dataplane model to allow for arbitrary service IP
3 participants