Skip to content

Commit 5bfbb98

Browse files
authored
Merge pull request kubernetes#95284 from coffeepac/pc/es-addon-1.18
v1.18 support changes
2 parents 9640219 + 47b0095 commit 5bfbb98

File tree

2 files changed

+71
-60
lines changed

2 files changed

+71
-60
lines changed

cluster/addons/fluentd-elasticsearch/es-service.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,18 @@ metadata:
99
addonmanager.kubernetes.io/mode: Reconcile
1010
kubernetes.io/name: "Elasticsearch"
1111
spec:
12+
clusterIP: None
1213
ports:
13-
- port: 9200
14-
protocol: TCP
15-
targetPort: db
14+
- name: db
15+
port: 9200
16+
protocol: TCP
17+
targetPort: 9200
18+
- name: transport
19+
port: 9300
20+
protocol: TCP
21+
targetPort: 9300
22+
publishNotReadyAddresses: true
1623
selector:
1724
k8s-app: elasticsearch-logging
25+
sessionAffinity: None
26+
type: ClusterIP

cluster/addons/fluentd-elasticsearch/es-statefulset.yaml

Lines changed: 59 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ metadata:
1616
k8s-app: elasticsearch-logging
1717
addonmanager.kubernetes.io/mode: Reconcile
1818
rules:
19-
- apiGroups:
20-
- ""
21-
resources:
22-
- "services"
23-
- "namespaces"
24-
- "endpoints"
25-
verbs:
26-
- "get"
19+
- apiGroups:
20+
- ""
21+
- resources:
22+
- "services"
23+
- "namespaces"
24+
- "endpoints"
25+
- verbs:
26+
- "get"
2727
---
2828
kind: ClusterRoleBinding
2929
apiVersion: rbac.authorization.k8s.io/v1
@@ -34,10 +34,10 @@ metadata:
3434
k8s-app: elasticsearch-logging
3535
addonmanager.kubernetes.io/mode: Reconcile
3636
subjects:
37-
- kind: ServiceAccount
38-
name: elasticsearch-logging
39-
namespace: kube-system
40-
apiGroup: ""
37+
- kind: ServiceAccount
38+
name: elasticsearch-logging
39+
namespace: kube-system
40+
apiGroup: ""
4141
roleRef:
4242
kind: ClusterRole
4343
name: elasticsearch-logging
@@ -59,60 +59,62 @@ spec:
5959
selector:
6060
matchLabels:
6161
k8s-app: elasticsearch-logging
62-
version: v7.4.2
62+
version: v7.4.2-1
6363
template:
6464
metadata:
6565
labels:
6666
k8s-app: elasticsearch-logging
67-
version: v7.4.2
67+
version: v7.4.2-1
6868
spec:
6969
serviceAccountName: elasticsearch-logging
7070
containers:
71-
- image: quay.io/fluentd_elasticsearch/elasticsearch:v7.4.2
72-
name: elasticsearch-logging
73-
imagePullPolicy: Always
74-
resources:
75-
# need more cpu upon initialization, therefore burstable class
76-
limits:
77-
cpu: 1000m
78-
memory: 3Gi
79-
requests:
80-
cpu: 100m
81-
memory: 3Gi
82-
ports:
83-
- containerPort: 9200
84-
name: db
85-
protocol: TCP
86-
- containerPort: 9300
87-
name: transport
88-
protocol: TCP
89-
livenessProbe:
90-
tcpSocket:
91-
port: transport
92-
initialDelaySeconds: 5
93-
timeoutSeconds: 10
94-
readinessProbe:
95-
tcpSocket:
96-
port: transport
97-
initialDelaySeconds: 5
98-
timeoutSeconds: 10
99-
volumeMounts:
100-
- name: elasticsearch-logging
101-
mountPath: /data
102-
env:
103-
- name: "NAMESPACE"
104-
valueFrom:
105-
fieldRef:
106-
fieldPath: metadata.namespace
71+
- image: quay.io/fluentd_elasticsearch/elasticsearch:v7.4.2
72+
name: elasticsearch-logging
73+
imagePullPolicy: Always
74+
resources:
75+
# need more cpu upon initialization, therefore burstable class
76+
limits:
77+
cpu: 1000m
78+
memory: 3Gi
79+
requests:
80+
cpu: 100m
81+
memory: 3Gi
82+
ports:
83+
- containerPort: 9200
84+
name: db
85+
protocol: TCP
86+
- containerPort: 9300
87+
name: transport
88+
protocol: TCP
89+
livenessProbe:
90+
tcpSocket:
91+
port: transport
92+
initialDelaySeconds: 5
93+
timeoutSeconds: 10
94+
readinessProbe:
95+
tcpSocket:
96+
port: transport
97+
initialDelaySeconds: 5
98+
timeoutSeconds: 10
99+
volumeMounts:
100+
- name: elasticsearch-logging
101+
mountPath: /data
102+
env:
103+
- name: "NAMESPACE"
104+
valueFrom:
105+
fieldRef:
106+
fieldPath: metadata.namespace
107+
- name: "MINIMUM_MASTER_NODES"
108+
value: "1"
107109
volumes:
108-
- name: elasticsearch-logging
109-
emptyDir: {}
110+
- name: elasticsearch-logging
111+
emptyDir: {}
110112
# Elasticsearch requires vm.max_map_count to be at least 262144.
111113
# If your OS already sets up this number to a higher value, feel free
112114
# to remove this init container.
113115
initContainers:
114-
- image: alpine:3.6
115-
command: ["/sbin/sysctl", "-w", "vm.max_map_count=262144"]
116-
name: elasticsearch-logging-init
117-
securityContext:
118-
privileged: true
116+
- image: alpine:3.6
117+
command: ["/sbin/sysctl", "-w", "vm.max_map_count=262144"]
118+
name: elasticsearch-logging-init
119+
securityContext:
120+
privileged: true

0 commit comments

Comments
 (0)