-
Notifications
You must be signed in to change notification settings - Fork 31
feat: Add ambient mode support to profile-controller #127
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
Closed
madmecodes
wants to merge
8
commits into
kubeflow:main
from
madmecodes:feat/profile-controller-ambient-mode-support
+432
−37
Closed
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2ecf65c
feat: Add ambient mode support to profile-controller
madmecodes b333928
update: review changes
madmecodes 7c8ab38
update: variable load test fix
madmecodes a8b460b
update: Keep Variable Substitution Where It Works
madmecodes 2f50157
update: review comments changes
madmecodes c5a9989
update: function used in pipeline test
madmecodes 063d073
updated profile controller tests to use setNamespaceLabelsAndServiceMesh
madmecodes 29274e3
feat: complete ambient mode support with HTTPRoute fixes
madmecodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
components/profile-controller/config/overlays/kubeflow-ambient/authorizationpolicy.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| apiVersion: security.istio.io/v1beta1 | ||
| kind: AuthorizationPolicy | ||
| metadata: | ||
| name: profiles-kfam | ||
| spec: | ||
| action: ALLOW | ||
| rules: | ||
| - from: | ||
| - source: | ||
| principals: | ||
| - cluster.local/ns/kubeflow/sa/centraldashboard | ||
| selector: | ||
| matchLabels: | ||
| kustomize.component: profiles |
30 changes: 30 additions & 0 deletions
30
components/profile-controller/config/overlays/kubeflow-ambient/httproute.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| apiVersion: gateway.networking.k8s.io/v1beta1 | ||
| kind: HTTPRoute | ||
| metadata: | ||
| name: profiles-kfam | ||
| spec: | ||
| parentRefs: | ||
| - name: kubeflow-gateway | ||
| namespace: istio-system | ||
| hostnames: | ||
| - "kubeflow.local" | ||
| rules: | ||
| - matches: | ||
| - path: | ||
| type: PathPrefix | ||
| value: /kfam/ | ||
| filters: | ||
| - type: RequestHeaderModifier | ||
| requestHeaderModifier: | ||
| add: | ||
| - name: x-forwarded-prefix | ||
| value: /kfam | ||
| - type: URLRewrite | ||
| urlRewrite: | ||
| path: | ||
| type: ReplacePrefixMatch | ||
| replacePrefixMatch: /kfam/ | ||
| backendRefs: | ||
| - name: profiles-kfam | ||
| namespace: kubeflow | ||
| port: 8081 |
33 changes: 33 additions & 0 deletions
33
components/profile-controller/config/overlays/kubeflow-ambient/kustomization.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| namespace: kubeflow | ||
| resources: | ||
| - ../../base | ||
| - service.yaml | ||
| - httproute.yaml | ||
| - authorizationpolicy.yaml | ||
|
|
||
| commonLabels: | ||
| kustomize.component: profiles | ||
|
|
||
| patchesStrategicMerge: | ||
| - patches/kfam.yaml | ||
| - patches/manager.yaml | ||
| - patches/remove-namespace.yaml | ||
|
|
||
| configurations: | ||
| - params.yaml | ||
|
|
||
| vars: | ||
| - name: PROFILES_NAMESPACE | ||
| fieldref: | ||
| fieldpath: metadata.namespace | ||
| objref: | ||
| name: profiles-kfam | ||
| kind: Service | ||
| apiVersion: v1 | ||
|
|
||
| images: | ||
| - name: ghcr.io/kubeflow/kubeflow/kfam | ||
| newName: ghcr.io/kubeflow/kubeflow/kfam | ||
| newTag: latest |
3 changes: 3 additions & 0 deletions
3
components/profile-controller/config/overlays/kubeflow-ambient/params.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| varReference: | ||
| - path: spec/http/route/destination/host | ||
| kind: VirtualService |
47 changes: 47 additions & 0 deletions
47
components/profile-controller/config/overlays/kubeflow-ambient/patches/kfam.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: deployment | ||
| spec: | ||
| template: | ||
| metadata: | ||
| labels: | ||
| sidecar.istio.io/inject: "true" | ||
| spec: | ||
| securityContext: | ||
| seccompProfile: | ||
| type: RuntimeDefault | ||
| containers: | ||
| - command: | ||
| - /access-management | ||
| - "-cluster-admin" | ||
| - $(ADMIN) | ||
| - "-userid-header" | ||
| - $(USERID_HEADER) | ||
| - "-userid-prefix" | ||
| - $(USERID_PREFIX) | ||
kimwnasptd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - "-service-mesh-mode" | ||
| - $(SERVICE_MESH_MODE) | ||
| envFrom: | ||
| - configMapRef: | ||
| name: config | ||
| image: ghcr.io/kubeflow/kubeflow/kfam | ||
| imagePullPolicy: IfNotPresent | ||
| name: kfam | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /metrics | ||
| port: 8081 | ||
| initialDelaySeconds: 30 | ||
| periodSeconds: 30 | ||
| ports: | ||
| - containerPort: 8081 | ||
| name: kfam-http | ||
| protocol: TCP | ||
| securityContext: | ||
| allowPrivilegeEscalation: false | ||
| runAsNonRoot: true | ||
| capabilities: | ||
| drop: | ||
| - ALL | ||
| serviceAccountName: controller-service-account | ||
23 changes: 23 additions & 0 deletions
23
components/profile-controller/config/overlays/kubeflow-ambient/patches/manager.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: deployment | ||
| spec: | ||
| template: | ||
| metadata: | ||
| labels: | ||
| sidecar.istio.io/inject: "false" | ||
| spec: | ||
| containers: | ||
| - name: manager | ||
| command: | ||
| - /manager | ||
| - -userid-header | ||
| - $(USERID_HEADER) | ||
| - -userid-prefix | ||
| - $(USERID_PREFIX) | ||
| - -workload-identity | ||
| - $(WORKLOAD_IDENTITY) | ||
| env: | ||
| - name: SERVICE_MESH_MODE | ||
| value: istio-ambient |
5 changes: 5 additions & 0 deletions
5
components/profile-controller/config/overlays/kubeflow-ambient/patches/remove-namespace.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| $patch: delete | ||
| apiVersion: v1 | ||
| kind: Namespace | ||
| metadata: | ||
| name: system |
7 changes: 7 additions & 0 deletions
7
components/profile-controller/config/overlays/kubeflow-ambient/service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: profiles-kfam | ||
| spec: | ||
| ports: | ||
| - port: 8081 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I 'm not too familiar with
overlaysbut I think we should be able split thekubeflowto two flavours in order to avoid manifests duplication and only change what's needed insidecarandambient.