Skip to content

Commit

Permalink
Liveness Readyness probes #65
Browse files Browse the repository at this point in the history
  • Loading branch information
vbradnitski committed Mar 27, 2023
1 parent 370b6a3 commit 3c7094e
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,32 @@ spec:
value: {{ $env.value }}
{{- end }}


{{- if semverCompare ">= 7.13.0" $.Values.deployment.spec.xpVersion }}
startupProbe:
httpGet:
path: "/healthz"
port: 2609
scheme: HTTP
failureThreshold: 20
initialDelaySeconds: 30
periodSeconds: 5
timeoutSeconds: 2
livenessProbe:
httpGet:
path: "/healthz"
port: 2609
scheme: HTTP
failureThreshold: 10
timeoutSeconds: 2
readinessProbe:
httpGet:
path: "/ready"
port: 2609
scheme: HTTP
failureThreshold: 2
timeoutSeconds: 2
{{ else }}
readinessProbe:
failureThreshold: 2
httpGet:
Expand All @@ -189,6 +215,8 @@ spec:
periodSeconds: 8
successThreshold: 3
timeoutSeconds: 2
{{- end }}


{{- if $.Values.deployment.clustered }}
lifecycle:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
service: myservice
spec:
enabled: true
xpVersion: 7.7.0
xpVersion: 7.13.0

nodesPreinstalledApps:
- name: snapshotter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,15 @@ spec:
- name: "XP_OPTS"
value: "-Xms154m -Xmx154m -XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/enonic-xp/home/data/oom.hprof\
\ -Dhazelcast.shutdownhook.policy=GRACEFUL -Dhazelcast.graceful.shutdown.max.wait=600"
image: "enonic/xp:7.7.0-ubuntu"
image: "enonic/xp:7.13.0-ubuntu"
imagePullPolicy: "IfNotPresent"
livenessProbe:
failureThreshold: 10
httpGet:
path: "/healthz"
port: 2609
scheme: "HTTP"
timeoutSeconds: 2
name: "exp"
ports:
- containerPort: 2609
Expand All @@ -642,12 +649,9 @@ spec:
readinessProbe:
failureThreshold: 2
httpGet:
path: "/_cluster/health?timeout=1s&wait_for_status=green"
port: 9200
path: "/ready"
port: 2609
scheme: "HTTP"
initialDelaySeconds: 30
periodSeconds: 8
successThreshold: 3
timeoutSeconds: 2
resources:
limits:
Expand All @@ -662,6 +666,15 @@ spec:
- "ALL"
runAsNonRoot: true
runAsUser: 1337
startupProbe:
failureThreshold: 20
httpGet:
path: "/healthz"
port: 2609
scheme: "HTTP"
initialDelaySeconds: 30
periodSeconds: 5
timeoutSeconds: 2
terminationMessagePath: "/dev/termination-log"
terminationMessagePolicy: "File"
volumeMounts:
Expand Down Expand Up @@ -709,7 +722,7 @@ spec:
secretKeyRef:
key: "token"
name: "xp-events-sa-secret"
image: "enonic/xp:7.7.0-ubuntu"
image: "enonic/xp:7.13.0-ubuntu"
imagePullPolicy: "IfNotPresent"
name: "events"
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ deployment:
preInstalledCloudUtils: false
spec:
enabled: true
xpVersion: "7.7.0"
xpVersion: "7.13.0"
nodesPreinstalledApps:
- name: "snapshotter"
url: "https://repo.enonic.com/public/com/enonic/app/snapshotter/3.0.2/snapshotter-3.0.2.jar"
Expand Down
15 changes: 9 additions & 6 deletions kubernetes/example-simple.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ spec:
- name: snapshotter
url: https://repo.enonic.com/public/com/enonic/app/snapshotter/3.0.2/snapshotter-3.0.2.jar

# List of disks shared by all nodes (see description of disks below)
nodesSharedDisks:
- name: blobstore
size: 1Gi
- name: snapshots
size: 1Gi
- name: export
size: 1Gi

# Create one node
nodeGroups:
- name: main
Expand All @@ -36,12 +45,6 @@ spec:

# Volumes private to the node
disks:
- name: blobstore
size: 1Gi
- name: snapshots
size: 1Gi
- name: export # Dumps and other data
size: 1Gi
- name: deploy # Apps installed in the deploy folder
size: 1Gi
- name: index # Node ES index
Expand Down

0 comments on commit 3c7094e

Please sign in to comment.