-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsumologic-k8s-api-cronjob-rbac.yaml
62 lines (62 loc) · 1.43 KB
/
sumologic-k8s-api-cronjob-rbac.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
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: sumologic-k8s-api
labels:
app: sumologic-k8s-api
spec:
schedule: "*/5 * * * *"
successfulJobsHistoryLimit: 10
failedJobsHistoryLimit: 10
concurrencyPolicy: Replace
jobTemplate:
spec:
template:
spec:
serviceAccount: sumologic-k8s-api
restartPolicy: OnFailure
containers:
- name: sumologic-k8s-api
image: frankreno/sumologic-k8s-api:latest
env:
- name: SUMO_HTTP_URL
value: <INSERT_URL_HERE>
- name: K8S_API_URL
value: http://127.0.0.1:8001
- name: kubectl
image: gcr.io/google_containers/kubectl:v1.0.7
command: ["/kubectl"]
args: ["proxy", "-p", "8001"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: sumologic-k8s-api
labels:
app: sumologic-k8s-api
rules:
- apiGroups: [""]
resources: ["nodes", "pods"]
verbs: ["get", "list"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: sumologic-k8s-api
labels:
app: sumologic-k8s-api
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: sumologic-k8s-api
labels:
app: sumologic-k8s-api
subjects:
- kind: ServiceAccount
name: sumologic-k8s-api
namespace: default
roleRef:
kind: ClusterRole
name: sumologic-k8s-api
apiGroup: rbac.authorization.k8s.io