-
Notifications
You must be signed in to change notification settings - Fork 4
/
poddefault_test_workloads.yaml
48 lines (48 loc) · 1.16 KB
/
poddefault_test_workloads.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
apiVersion: v1
kind: Namespace
metadata:
name: test-admission-webhook-user-namespace
labels:
app.kubernetes.io/part-of: kubeflow-profile
---
apiVersion: kubeflow.org/v1alpha1
kind: PodDefault
metadata:
name: access-ml-pipeline
namespace: test-admission-webhook-user-namespace
spec:
desc: Allow access to Kubeflow Pipelines
selector:
matchLabels:
access-ml-pipeline: "true"
volumes:
- name: volume-kf-pipeline-token
projected:
sources:
- serviceAccountToken:
path: token
expirationSeconds: 7200
audience: pipelines.kubeflow.org
volumeMounts:
- mountPath: /var/run/secrets/kubeflow/pipelines
name: volume-kf-pipeline-token
readOnly: true
env:
- name: KF_PIPELINES_SA_TOKEN_PATH
value: /var/run/secrets/kubeflow/pipelines/token
---
apiVersion: v1
kind: Pod
metadata:
labels:
access-ml-pipeline: "true"
name: testpod
namespace: test-admission-webhook-user-namespace
spec:
containers:
- args:
- "while true; do sleep 3600; done"
command: ["/bin/bash", "-c", "--"]
image: ubuntu:latest
imagePullPolicy: Always
name: ubuntu