forked from holmesb/k8s-sidecar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.yaml
75 lines (75 loc) · 1.42 KB
/
example.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
72
73
74
75
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sample-deployment
labels:
app: sample
spec:
replicas: 1
selector:
matchLabels:
app: sample
template:
metadata:
labels:
app: sample
spec:
serviceAccountName: sample-acc
containers:
- name: bash
image: bash:4.4.19
volumeMounts:
- name: shared-volume
mountPath: /tmp/
command: ["watch"]
args: ["ls", "/tmp/"]
- name: sidecar
image: kiwigrid/k8s-sidecar:latest
volumeMounts:
- name: shared-volume
mountPath: /tmp/
env:
- name: LABEL
value: "findme"
- name: FOLDER
value: /tmp/
volumes:
- name: shared-volume
emptyDir: {}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: sample-configmap
labels:
findme: "yea"
data:
hello.world: |-
Hello World!
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: sample-role
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "watch", "list"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: sample-acc
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: sample-rolebind
roleRef:
kind: ClusterRole
name: sample-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: sample-acc
namespace: default