Skip to content

Instantly share code, notes, and snippets.

@anjuls
Created March 11, 2021 10:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjuls/43c7642ddb8be46c9d6095503a296862 to your computer and use it in GitHub Desktop.
Save anjuls/43c7642ddb8be46c9d6095503a296862 to your computer and use it in GitHub Desktop.
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: add-header
namespace: anonymous
spec:
configPatches:
- applyTo: VIRTUAL_HOST
match:
context: SIDECAR_OUTBOUND
routeConfiguration:
vhost:
name: ml-pipeline.kubeflow.svc.cluster.local:8888
route:
name: default
patch:
operation: MERGE
value:
request_headers_to_add:
- append: true
header:
key: kubeflow-userid
value: anonymous@kubeflow.org
workloadSelector:
labels:
notebook-name: kf-demo
---
apiVersion: rbac.istio.io/v1alpha1
kind: ServiceRoleBinding
metadata:
name: bind-ml-pipeline-nb-anonymous
namespace: kubeflow
spec:
roleRef:
kind: ServiceRole
name: ml-pipeline-services
subjects:
- properties:
source.principal: cluster.local/ns/anonymous/sa/default-editor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment