-
Notifications
You must be signed in to change notification settings - Fork 6
/
indexer-deployment.yaml
78 lines (78 loc) · 2.38 KB
/
indexer-deployment.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
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: indexer
spec:
replicas: 3
serviceName: indexer
volumeClaimTemplates:
- metadata:
name: data
annotations:
volume.alpha.kubernetes.io/storage-class: anything
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
template:
metadata:
labels:
app: splunk
role: indexer
spec:
volumes:
- name: boot-config
configMap:
name: indexer-boot-config
items:
- key: indexer.conf
path: indexer.conf
containers:
- name: indexer
image: andycunn/splunk-kube
# image: gcr.io/google_containers/explorer:1.0
# args: ["-port=8088"]
resources:
requests:
cpu: 100m
memory: 256Mi
ports:
- containerPort: 8088
- containerPort: 8089
- containerPort: 9997
- containerPort: 9888
volumeMounts:
- name: boot-config
mountPath: /tmp
- name: data
mountPath: /opt/splunk/var
env:
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: SPLUNK_BEFORE_START_CMD_1
value: "version $SPLUNK_START_ARGS"
- name: SPLUNK_BEFORE_START_CMD_2
value: "cmd python /opt/splunk/bin/splunk_setup.py --wait-splunk 'https://master:8089' cluster_master"
- name: SPLUNK_BEFORE_START_CMD_3
value: "cmd python /opt/splunk/bin/splunk_setup.py --configure '/tmp/indexer.conf'"
- name: SPLUNK_CMD_1
value: "status"
- name: SPLUNK_HEALTHCHECK_HEC
value: "http://127.0.0.1:8088"
- name: SPLUNK_HEALTHCHECK_SPLUNKD
value: "https://127.0.0.1:8089"
- name: SPLUNK_START_ARGS
value: "--accept-license --answer-yes --no-prompt"
- name: SPLUNK_DEPLOYMENT_SERVER
value: "master:8089"