Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
* Add port 9200 to master statefulset to simplify curling the cluster when only master is started
* Change readiness probes see elastic/cloud-on-k8s#2248
* Disable pvc and use empty dir
* Upgrade all iamges to test 7.5.1
  • Loading branch information
fciocchetti committed Jan 15, 2020
1 parent 00a766d commit 710b11a
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 13 deletions.
21 changes: 18 additions & 3 deletions examples/elasticstack/3-master-statefulset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ spec:
app: elasticsearch
role: master
ports:
- name: http
port: 9200
protocol: TCP
- name: transport
port: 9300
protocol: TCP
Expand Down Expand Up @@ -61,8 +64,10 @@ spec:
terminationGracePeriodSeconds: 180
containers:
- name: elasticsearch
image: mintel/es-image:v7.5.1-12
imagePullPolicy: Never
#image: mintel/es-image:v7.5.1-12
#image: mintel/elasticsearch:v7.4.1-2
image: mintel/elasticsearch:test-test-v7.5.1-1
#imagePullPolicy: Never
lifecycle:
postStart:
exec:
Expand Down Expand Up @@ -119,7 +124,7 @@ spec:
name: transport
readinessProbe:
httpGet:
path: /_cluster/health?local=true
path: /
port: 9200
initialDelaySeconds: 5
livenessProbe:
Expand All @@ -133,3 +138,13 @@ spec:
volumes:
- name: storage
emptyDir: {}
#volumeClaimTemplates:
# - metadata:
# name: storage
# spec:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 1Gi
# storageClassName: local-path
21 changes: 17 additions & 4 deletions examples/elasticstack/3-node-statefulset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ spec:
terminationGracePeriodSeconds: 180
containers:
- name: elasticsearch
image: mintel/es-image:v7.5.1-12
imagePullPolicy: Never
#image: mintel/es-image:v7.5.1-12
#image: mintel/elasticsearch:v7.4.1-2
image: mintel/elasticsearch:test-test-v7.5.1-1
#imagePullPolicy: Never
lifecycle:
postStart:
exec:
Expand Down Expand Up @@ -107,7 +109,8 @@ spec:
- name: PERSISTENT_SETTINGS_FILE_PATH
value: "/tmp/persistent-settings.json"
- name: MAINTENANCE_MODE
value: "DELAYED_ALLOCATION"
value: "ALLOCATION"
#value: "DELAYED_ALLOCATION"
resources:
requests:
cpu: 0.15
Expand All @@ -122,7 +125,7 @@ spec:
name: transport
readinessProbe:
httpGet:
path: /_cluster/health?local=true
path: /
port: 9200
initialDelaySeconds: 30
livenessProbe:
Expand All @@ -142,3 +145,13 @@ spec:
- name: persistent-settings
configMap:
name: persistent-settings
#volumeClaimTemplates:
# - metadata:
# name: storage
# spec:
# accessModes:
# - ReadWriteOnce
# resources:
# requests:
# storage: 1Gi
# storageClassName: local-path
19 changes: 13 additions & 6 deletions examples/elasticstack/3-single-statefulset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ spec:
replicas: 3
updateStrategy:
type: RollingUpdate
volumeClaimTemplates:
- metadata:
name: storage
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: local-path
selector:
matchLabels:
app: elasticsearch
Expand All @@ -80,8 +90,8 @@ spec:
terminationGracePeriodSeconds: 180
containers:
- name: elasticsearch
image: mintel/es-image:v7.5.1-12
imagePullPolicy: Never
image: mintel/elasticsearch:test-test-v7.5.1-1
#image: mintel/elasticsearch:v7.4.1-2
# XXX Can't set the current data node lifecycle
# Scripts will fail at the moment if no cluster is availble ( so will never manage to start the first node )
lifecycle:
Expand Down Expand Up @@ -156,7 +166,7 @@ spec:
name: transport
readinessProbe:
httpGet:
path: /_cluster/health?local=true
path: /
port: 9200
initialDelaySeconds: 5
livenessProbe:
Expand All @@ -167,6 +177,3 @@ spec:
volumeMounts:
- name: storage
mountPath: /data
volumes:
- name: storage
emptyDir: {}

0 comments on commit 710b11a

Please sign in to comment.