-
Notifications
You must be signed in to change notification settings - Fork 3
/
example-app.yaml
71 lines (71 loc) · 1.55 KB
/
example-app.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
apiVersion: v1
kind: Namespace
metadata:
name: sandbox
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: example-app
namespace: sandbox
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: example-app
namespace: sandbox
rules:
- apiGroups: ["cert-manager.io"]
resources: ["certificaterequests"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: example-app
namespace: sandbox
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: example-app
subjects:
- kind: ServiceAccount
name: example-app
namespace: sandbox
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-csi-app
namespace: sandbox
labels:
app: my-csi-app
spec:
replicas: 1
selector:
matchLabels:
app: my-csi-app
template:
metadata:
labels:
app: my-csi-app
spec:
serviceAccountName: example-app
containers:
- name: example-app
image: ghcr.io/joshvanl/spiffe-sample-app:aws
imagePullPolicy: IfNotPresent
command: [ "sleep", "1000000" ]
volumeMounts:
- mountPath: "/root/.aws"
name: spiffe
volumes:
- name: spiffe
csi:
driver: spiffe.csi.cert-manager.io
readOnly: true
volumeAttributes:
aws.spiffe.csi.cert-manager.io/trust-profile: ""
aws.spiffe.csi.cert-manager.io/trust-anchor: ""
aws.spiffe.csi.cert-manager.io/role: ""
aws.spiffe.csi.cert-manager.io/enable: "true"