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

Add support for Linkerd enforcement through ClientIntents #504

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

evyatarmeged
Copy link
Contributor

Consolidated latest intents operator code with Linkerd support.

References

Code is based off of @aerosouund's PR: #324

Testing

Still need to refactor tests to match new code.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR and in github.com/otterize/docs

aerosouund and others added 19 commits August 19, 2024 15:31
This package contains an engine that creates, updates, deletes linkerd resources
from ClientIntents.
With a test suite for that feature based on mock.
The package will create a Server, AuthPolicy and MTLSAuth for a non HTTP Intent,
or a Server ,HTTPRoute , AuthPolicy and MTLSAuth for a HTTP Intent.
As well as a NetAuth for probe routes to not cause probes to break from the creation of servers on them.

Signed-off-by: aerosouund <[email protected]>
Create Linkerd mock to be used in testing

Signed-off-by: aerosouund <[email protected]>
Leverage the linkerd engine in a reconciler that watches ClientIntents

Signed-off-by: aerosouund <[email protected]>
Register the linkerd reconciler with the intents reconciler

Signed-off-by: aerosouund <[email protected]>
Define constants used by the linkerd manager

Signed-off-by: aerosouund <[email protected]>
Signed-off-by: aerosouund <[email protected]>
This is needed as pod ports are required for Linkerd Server creation and they might change
if the pod definition changes.

Signed-off-by: aerosouund <[email protected]>
for _, ep := range eps {
result, err := r.applyLinkerdServiceEffectivePolicy(ctx, ep)
if err != nil {
r.handleApplyErrors(err, errorList)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
r.handleApplyErrors(err, errorList)
errorList = r.handleApplyErrors(err, errorList)

src/operator/controllers/linkerd/linkerd_manager.go Outdated Show resolved Hide resolved
src/operator/controllers/linkerd/linkerd_manager.go Outdated Show resolved Hide resolved
@aquam8
Copy link

aquam8 commented Nov 18, 2024

Cool, thank you for working on this 👍

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.

4 participants