-
Notifications
You must be signed in to change notification settings - Fork 21
/
ta-k8s-meta.yaml
91 lines (87 loc) · 1.78 KB
/
ta-k8s-meta.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: ta-k8s-meta
name: ta-k8s-meta
imagePullSecrets:
- name: <yourdockerhubsecret>
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: ta-k8s-meta
rules:
- apiGroups: ["", "apps","batch","extensions"]
resources:
- cronjobs
- componentstatuses
- configmaps
- controllerrevisions
- daemonsets
- deployments
- jobs
- replicasets
- replicationcontrollers
- resourcequotas
- scheduledjobs
- statefulsets
- namespaces
- nodes
- services
- secrets
- serviceaccounts
- endpoints
- pods
verbs: ["get", "list", "watch"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
labels:
app: ta-k8s-meta
name: ta-k8s-meta
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: ta-k8s-meta
subjects:
- kind: ServiceAccount
name: ta-k8s-meta
namespace: default
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
name: ta-k8s-meta
name: ta-k8s-meta
spec:
replicas: 1
template:
metadata:
labels:
app: ta-k8s-meta
spec:
serviceAccountName: ta-k8s-meta
containers:
- name: ta-k8s-meta
image: splunk/universalforwarder:7.0.3-monitor-k8s-meta
imagePullPolicy: Always
env:
- name: SPLUNK_FORWARD_SERVER
value: <splunk_host>:9997
- name: SPLUNK_START_ARGS
value: --accept-license --answer-yes
- name: SPLUNK_USER
value: root
#resources:
# limits:
# cpu: 1
# memory: 500Mi
# requests:
# cpu: 200m
# memory: 500Mi
terminationGracePeriodSeconds: 30