close
Skip to content

feat: add ambient mode support - #267

Open
dariofaccin wants to merge 2 commits into
kubeflow:mainfrom
dariofaccin:feat/ambient-mode
Open

feat: add ambient mode support#267
dariofaccin wants to merge 2 commits into
kubeflow:mainfrom
dariofaccin:feat/ambient-mode

Conversation

@dariofaccin

Copy link
Copy Markdown

This PR is the clone of #185.

The PR by Kimonas was rebased (and conflicts fixed) on top of v2.0-branch.

cc @deusebio

@google-oss-prow google-oss-prow Bot added the area/ci area - related to ci label Apr 13, 2026
@google-oss-prow google-oss-prow Bot added area/dashboard area - related to central dashboard area/dashboard-angular area - related to central dashboard angular area/kfam area - releated to kubeflow access management api (kfam) area/poddefaults area - related to poddefaults webhook area/profiles area - related to profile-controller area/release area - related to releasing size/XXL labels Apr 13, 2026
@juliusvonkohout

Copy link
Copy Markdown
Member

Please do a proper rebase to master, I see old merged commits from other people.

madmecodes and others added 2 commits May 4, 2026 09:34
Signed-off-by: madmecodes <ayushguptadev1@gmail.com>
Signed-off-by: Kimonas Sotirchos <kimonas.sotirchos@canonical.com>
Signed-off-by: Kimonas Sotirchos <kimwnasptd@gmail.com>
@dariofaccin
dariofaccin force-pushed the feat/ambient-mode branch from 9580ff9 to 5a878ec Compare May 4, 2026 07:35
@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign thesuperzapper for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow Bot added size/XL and removed size/XXL labels May 4, 2026
@dariofaccin

Copy link
Copy Markdown
Author

Hi @juliusvonkohout, the PR is rebased on current main.

@juliusvonkohout

Copy link
Copy Markdown
Member

Comment on lines +5 to +9
<<<<<<<< HEAD:components/profile-controller/manifests/kustomize/overlays/kubeflow/patches/remove-namespace.yaml
name: profiles-system
========
name: system
>>>>>>>> 9024371 (feat: Add ambient mode support to profile-controller):components/profile-controller/config/components/remove-system-namespace/patches/remove-namespace.yaml

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

???

Comment on lines +882 to +884
// Create waypoint using Gateway API with waypoint gateway class
// This creates an Istio waypoint proxy that handles L7 policies in ambient mode
gatewayClassName := "istio-waypoint"

@aojea aojea Jun 25, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is this not some sort of a loop? what component implements the gateway api? is also istio?

@aojea

aojea commented Jun 25, 2026

Copy link
Copy Markdown

Looking at the implementation, I have several architectural concerns because this couples the profile controller with the underlying infrastructure. It's not portable to assume Istio will always exist, or is that a good assumption?

On another point, reusing existing infrastructure is one thing, but actively configuring its internals from the profile controller is a different story, since it breaks the separation of concerns. You are making the person responsible for deploying notebooks also accountable for configuring and modifying how the underlying mesh components work.

I would avoid depending on beta APIs (gatewayv1beta1), that is going to cause upgrade problems and version skew support issues later on.

IMHO the mesh configuration should be part of the infrastructure layer

@juliusvonkohout

Copy link
Copy Markdown
Member

Please rebase to master

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds Istio ambient-mode support to Profile Controller while retaining sidecar mode.

Changes:

  • Adds waypoint, Gateway API routing, authorization, and namespace labeling.
  • Splits shared, sidecar, and ambient Istio manifests.
  • Updates Go dependencies, build tooling, and tests.

Reviewed changes

Copilot reviewed 14 out of 19 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
overlays/kubeflow/kustomization.yaml Uses split Istio components.
kubeflow-ambient/patches/remove-namespace.yaml Removes the base namespace.
kubeflow-ambient/patches/deployment.yaml Adds ambient controller flags.
kubeflow-ambient/params.env Defines ambient configuration.
kubeflow-ambient/namespace-labels.yaml Defines Profile namespace labels.
kubeflow-ambient/kustomization.yaml Assembles the ambient overlay.
istio-sidecar/virtual-service.yaml Defines sidecar-mode routing.
istio-sidecar/network-policy.yaml Restricts KFAM ingress.
istio-sidecar/kustomization.yaml Assembles sidecar resources.
istio-common/kustomization.yaml Assembles shared Istio resources.
istio-common/authorizationpolicy.yaml Authorizes dashboard access.
istio-ambient/kustomization.yaml Assembles ambient routing.
istio-ambient/httproute.yaml Defines Gateway API routing.
main.go Adds ambient configuration flags.
go.sum Updates dependency checksums.
go.mod Updates Go and mesh dependencies.
Dockerfile Updates the builder configuration.
profile_controller.go Implements ambient reconciliation.
profile_controller_test.go Adds ambient-related tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +931 to +935
// Waypoint already exists, check if update is needed
if !reflect.DeepEqual(waypoint.Spec, foundWaypoint.Spec) {
logger.Info("Updating waypoint", "waypoint", waypoint.Name, "namespace", waypoint.Namespace)
foundWaypoint.Spec = waypoint.Spec
err = r.Update(context.TODO(), foundWaypoint)
Comment on lines +215 to +216
// Create waypoint and L4 AuthorizationPolicy in ambient mode
if r.ServiceMeshMode == "istio-ambient" {
Comment on lines +290 to +293
// Verify waypoint namespace defaults to profile namespace when empty
// This is just testing the field value, not the actual creation logic
// which would require mocking the Kubernetes client
_ = profile // Use profile to avoid unused variable error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci area - related to ci area/dashboard area - related to central dashboard area/dashboard-angular area - related to central dashboard angular area/kfam area - releated to kubeflow access management api (kfam) area/poddefaults area - related to poddefaults webhook area/profiles area - related to profile-controller area/release area - related to releasing size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants