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

service mesh egress #160

Merged
merged 2 commits into from
Feb 26, 2024
Merged

service mesh egress #160

merged 2 commits into from
Feb 26, 2024

Conversation

3u13r
Copy link
Member

@3u13r 3u13r commented Feb 13, 2024

This PR adds the optional nunki plugin in form of a service mesh sidecar.
This sidecar can be configured via a ENV variable which in turn configures Envoy.

The structure in which the user defines the config is preliminary and subject to discussions, proposals and change.

I also added a manual test / example in the form of emojivoto where the upstream "web" container is used and we use the sidecar so that the web service talks mTLS with the emoji-svc and voting-svc.

There is a difference between the RFC and the implementation since it is not possible with Envoy to proxy only on L3 (aka. only change the IP/Endpoint and keep the original port). Therefore, the user also needs to specify the port.

@3u13r 3u13r requested a review from katexochen as a code owner February 13, 2024 11:00
@3u13r 3u13r requested review from malt3 and burgerdev February 13, 2024 11:01
@3u13r 3u13r force-pushed the feat/service-mesh-egress branch from 3f1d26e to 53a6450 Compare February 13, 2024 11:04
Comment on lines 40 to 59
- name: sidecar
image: "ghcr.io/edgelesssys/nunki/service-mesh-proxy:latest"
volumeMounts:
- name: tls-certs
mountPath: /tls-config
env:
- name: EDG_PROXY_CONFIG
value: "emoji#127.137.0.1:8080#emoji-svc##voting#127.137.0.2:8080#voting-svc"
securityContext:
capabilities:
add:
- NET_ADMIN
- NET_RAW
- env:
- name: WEB_PORT
value: "8080"
- name: EMOJISVC_HOST
value: 127.137.0.1:8080
- name: VOTINGSVC_HOST
value: 127.137.0.2:8080
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we implement this as a kustomization or similar overlay, instead of copying all the resources?

Copy link
Member Author

Choose a reason for hiding this comment

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

Technically we could but I think it's out of scope for this PR. We had a discussion a few days ago, since we also need an ergonomic way to apply the deployments in the e2e tests. So Paul and Moritz S. are also aware of the problem. Since we haven't decided on a solution there is no ticket yet, I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine with me, but we should address this question before we reach deployments/emojivoto(-sm(-(in|e)gress)+)?

service-mesh/config.go Outdated Show resolved Hide resolved
service-mesh/config.go Show resolved Hide resolved
service-mesh/config.go Show resolved Hide resolved
@3u13r 3u13r force-pushed the feat/service-mesh-egress branch from 53a6450 to 94e09a6 Compare February 14, 2024 15:05
@3u13r 3u13r requested a review from burgerdev February 14, 2024 15:06
packages/default.nix Outdated Show resolved Hide resolved
packages/default.nix Outdated Show resolved Hide resolved
service-mesh/main.go Outdated Show resolved Hide resolved
service-mesh/main.go Outdated Show resolved Hide resolved
go.work Outdated Show resolved Hide resolved
go.work.sum Outdated Show resolved Hide resolved
@3u13r 3u13r force-pushed the feat/service-mesh-egress branch 2 times, most recently from 51eb82a to 9462905 Compare February 15, 2024 14:07
@3u13r 3u13r requested review from burgerdev and malt3 February 15, 2024 14:10
Copy link
Contributor

@burgerdev burgerdev left a comment

Choose a reason for hiding this comment

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

LGTM, I don't have a preference for the Go module question.

packages/default.nix Outdated Show resolved Hide resolved
go.work.sum Outdated
Copy link
Member

Choose a reason for hiding this comment

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

remove, this is gitignored.

justfile Outdated
@@ -1,5 +1,5 @@
# Undeploy, rebuild, deploy.
default target=default_deploy_target: undeploy coordinator initializer openssl port-forwarder (deploy target) set verify (wait-for-workload target)
default target=default_deploy_target: undeploy coordinator initializer openssl port-forwarder service-mesh-proxy (deploy target) set verify (wait-for-workload target)
Copy link
Member

Choose a reason for hiding this comment

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

We should think of a way to only push the container for the deployment we actually want.

@@ -67,6 +78,7 @@ rec {
runHook postCheck
'';

# TODO(@katexochen): Allow subPackages with "-" in their names
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# TODO(@katexochen): Allow subPackages with "-" in their names

I'm not gonna look into this anytime soon. Whoever needs this should look into it themselves.

packages/default.nix Outdated Show resolved Hide resolved
service-mesh/config.go Outdated Show resolved Hide resolved
service-mesh/main.go Show resolved Hide resolved
@3u13r 3u13r force-pushed the feat/service-mesh-egress branch 4 times, most recently from 05e9de3 to 936bd8d Compare February 23, 2024 11:39
@3u13r 3u13r force-pushed the feat/service-mesh-egress branch from 936bd8d to 461ab1a Compare February 23, 2024 14:50
@3u13r 3u13r requested a review from katexochen February 23, 2024 15:00
@3u13r 3u13r merged commit c8b003e into main Feb 26, 2024
6 checks passed
@3u13r 3u13r deleted the feat/service-mesh-egress branch February 26, 2024 10:12
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