-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpod.yaml
69 lines (69 loc) · 1.32 KB
/
pod.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
apiVersion: v1
kind: Pod
metadata:
name: static-web
labels:
role: myrole
namespace: default
annotations:
google.secret.security.imrenagi.com/agent-inject: "true"
google.secret.security.imrenagi.com/agent-google-secret-crd: "googlesecretentry-sample"
spec:
serviceAccountName: static-web
containers:
- name: web
image: nginx
ports:
- name: web
containerPort: 80
protocol: TCP
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: static-web
namespace: default
labels:
app.kubernetes.io/name: static-web
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: static-web-role
labels:
app.kubernetes.io/name: static-web
rules:
- apiGroups: [""]
resources: ["secrets"]
verbs:
- "get"
- apiGroups:
- secret.security.imrenagi.com
resources:
- googlesecretentries
verbs:
- get
- list
- watch
- apiGroups:
- secret.security.imrenagi.com
resources:
- googlesecretentries/status
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: static-web-binding
namespace: default
labels:
app.kubernetes.io/name: static-web
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: static-web-role
subjects:
- kind: ServiceAccount
name: static-web
namespace: default