Skip to content

Commit

Permalink
Updated forensics script. added startup-probe and amended stateful set
Browse files Browse the repository at this point in the history
1. Forensics script updated to show pod number in logs for HA purposes
2. Adding startup probe for any image tags 24+, for 23- no startup probe
3. Amending liveness probe for httpGet to health page for 24+, 23- stays same.
  • Loading branch information
ProfiseeAdmin committed Sep 28, 2024
1 parent 3434daa commit f578ee7
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 9 deletions.
4 changes: 2 additions & 2 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ entries:
name: profisee-platform
type: application
urls:
- https://profiseedev.github.io/kubernetes/profisee-platform-0.1.32.tgz
version: 0.1.32
- https://profiseedev.github.io/kubernetes/profisee-platform-0.1.33.tgz
version: 0.1.33
generated: "2023-09-22T17:16:00.0-05:00"
Binary file added profisee-platform-0.1.33.tgz
Binary file not shown.
2 changes: 1 addition & 1 deletion profisee-platform/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ appVersion: 1.16.0
description: A Helm chart for Profisee Platform on Kubernetes
name: profisee-platform
type: application
version: 0.1.32
version: 0.1.33
41 changes: 35 additions & 6 deletions profisee-platform/templates/statefullset-profisee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,34 +80,61 @@ spec:
- name: profisee
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: Always
{{- if .Values.image.tag | regexMatch "^(2[4-9]|[3-9][0-9])r[0-9]+\..*" }}
livenessProbe:
httpGet:
path: /$env:ProfiseeWebAppName/rest/health
port: 80
scheme: HTTP
initialDelaySeconds: 20
timeoutSeconds: 10
periodSeconds: 20
SuccessThreshold: 1
failureThreshold: 4
{{- else }}
livenessProbe:
exec:
command:
- powershell
- >-
if(((Get-Service profisee).Status -ne 'Stopped') -and
($(Get-IISAppPool | Where-Object { $_.State -eq "Stopped"
}).State -ne 'Stopped')){return 0}else{throw 'Profisee is
down'}
if((Get-Service profisee).Status -ne 'Stopped'){return
0}else{throw 'Profisee service is down'}
initialDelaySeconds: 600
timeoutSeconds: 5
periodSeconds: 60
SuccessThreshold: 1
failureThreshold: 3
{{- end }}
{{- if .Values.image.tag | regexMatch "^(2[4-9]|[3-9][0-9])r[0-9]+\..*" }}
startupProbe:
exec:
command:
- powershell
- .\Fileshare\startup-probe.ps1
initialDelaySeconds: 45
timeoutSeconds: 600
periodSeconds: 10
SuccessThreshold: 1
failureThreshold: 1
{{- end }}
{{- if not .Values.profiseeRunTime.isPaaS }}
{{- if eq .Values.profiseeRunTime.secondary "false" }}
lifecycle:
postStart:
exec:
command:
- powershell
- >-
curl.exe -fsSL -o .\Fileshare\startup-probe.ps1
"https://raw.githubusercontent.com/profiseedev/kubernetes/master/Azure-ARM/startup-probe.ps1";
curl.exe -fsSL -o .\Fileshare\forensics_log_pull.ps1
"https://raw.githubusercontent.com/profiseedev/kubernetes/master/Azure-ARM/forensics_log_pull.ps1"
{{- if eq .Values.profiseeRunTime.secondary "false" }}
preStop:
exec:
command:
- powershell
- .\Fileshare\forensics_log_pull.ps1
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.profiseeRunTime.isPaaS }}
lifecycle:
Expand All @@ -116,6 +143,8 @@ spec:
command:
- powershell
- >-
curl.exe -fsSL -o .\Fileshare\startup-probe.ps1
"https://raw.githubusercontent.com/profiseedev/kubernetes/master/Azure-ARM/startup-probe.ps1";
curl.exe -fsSL -o .\Fileshare\forensics_log_pull.ps1
"https://raw.githubusercontent.com/profiseedev/kubernetes/master/Azure-ARM/forensics_log_pull.ps1"
preStop:
Expand Down

0 comments on commit f578ee7

Please sign in to comment.