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

cli: inject service mesh with contrast generate #529

Merged
merged 2 commits into from
Jun 10, 2024

Conversation

davidweisse
Copy link
Contributor

@davidweisse davidweisse commented Jun 5, 2024

The service mesh sidecar will be injected to every workload with the contrast-cc runtime class and a specified Service Mesh configuration. Configuration can be done via object annotations:

  • contrast.edgeless.systems/servicemesh-ingress: Envoy proxy ingress config
  • contrast.edgeless.systems/servicemesh-egress: Envoy proxy egress config
  • contrast.edgeless.systems/servicemesh-admin-interface-port: Port for the Envoy admin interface

The annotations will be copied to the corresponding environment variables during generate.

@davidweisse davidweisse added the feature Shiny new feature for our users label Jun 5, 2024
@davidweisse davidweisse requested a review from burgerdev June 5, 2024 14:57
Copy link

github-actions bot commented Jun 5, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-06-10 12:31 UTC

@davidweisse davidweisse marked this pull request as ready for review June 5, 2024 15:12
@davidweisse davidweisse requested a review from katexochen as a code owner June 5, 2024 15:12
rfc/005-generate-injection.md Outdated Show resolved Hide resolved
rfc/005-generate-injection.md Outdated Show resolved Hide resolved
internal/kuberesource/sets.go Show resolved Hide resolved
@davidweisse davidweisse force-pushed the feat/inject-servicemesh branch 3 times, most recently from 1dc6ff1 to a0b857c Compare June 6, 2024 13:53
return MapPodSpec(resource, func(spec *applycorev1.PodSpecApplyConfiguration) *applycorev1.PodSpecApplyConfiguration {
) (res any, retErr error) {
res = MapPodSpecWithMeta(resource, func(meta *applymetav1.ObjectMetaApplyConfiguration, spec *applycorev1.PodSpecApplyConfiguration) *applycorev1.PodSpecApplyConfiguration {
if spec.RuntimeClassName == nil || !strings.HasPrefix(*spec.RuntimeClassName, "contrast-cc") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for you to fix here, but a general observation: we should make contrast-cc a constant and replace all the string literals.

internal/kuberesource/mutators.go Outdated Show resolved Hide resolved
internal/kuberesource/mutators.go Outdated Show resolved Hide resolved
internal/kuberesource/mutators.go Outdated Show resolved Hide resolved
internal/kuberesource/mutators.go Show resolved Hide resolved
internal/kuberesource/sets.go Show resolved Hide resolved
@davidweisse davidweisse force-pushed the feat/inject-servicemesh branch from a0b857c to d6937bb Compare June 7, 2024 10:03
@davidweisse davidweisse requested a review from burgerdev June 7, 2024 10:16
@davidweisse davidweisse merged commit 6a5574f into main Jun 10, 2024
9 checks passed
@davidweisse davidweisse deleted the feat/inject-servicemesh branch June 10, 2024 12:31
@katexochen katexochen changed the title cli: inject service mesh cli: inject service mesh with contrast generate Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Shiny new feature for our users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants