Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ configMapGenerator:
- ISTIO_INGRESS_GATEWAY_PRINCIPAL="cluster.local/ns/istio-system/sa/istio-ingressgateway-service-account"
- NOTEBOOK_CONTROLLER_PRINCIPAL="cluster.local/ns/kubeflow/sa/notebook-controller-service-account"
- KFP_UI_PRINCIPAL="cluster.local/ns/kubeflow/sa/ml-pipeline-ui"
- SERVICE_MESH_MODE="istio-sidecar"
- WAYPOINT_NAME="waypoint"
- WAYPOINT_NAMESPACE=""
- CREATE_WAYPOINT="false"
name: config
8 changes: 8 additions & 0 deletions components/profile-controller/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ spec:
- $(USERID_PREFIX)
- "-workload-identity"
- $(WORKLOAD_IDENTITY)
- "-service-mesh-mode"
- $(SERVICE_MESH_MODE)
- "-waypoint-name"
- $(WAYPOINT_NAME)
- "-waypoint-namespace"
- $(WAYPOINT_NAMESPACE)
- "-create-waypoint"
- $(CREATE_WAYPOINT)
envFrom:
- configMapRef:
name: config
Expand Down
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
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
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
varReference:
- path: spec/http/route/destination/host
kind: VirtualService
Copy link
Contributor

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 overlays but I think we should be able split the kubeflow to two flavours in order to avoid manifests duplication and only change what's needed in sidecar and ambient.

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)
- "-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
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$patch: delete
apiVersion: v1
kind: Namespace
metadata:
name: system
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
Loading
Loading