Skip to content

Commit

Permalink
updated lifecycle block based on variable value
Browse files Browse the repository at this point in the history
  • Loading branch information
Naveen Angali authored and Naveen Angali committed Jun 26, 2024
1 parent b9ac9c9 commit a27b4dd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions profisee-platform/templates/sqlmaintenance.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if not .Values.profiseeRunTime.isPaaS }}
{{- if eq .Values.profiseeRunTime.secondary "false" }}
apiVersion: batch/v1
kind: CronJob
metadata:
Expand Down Expand Up @@ -55,3 +56,4 @@ spec:
- name: profisee-containerregistry
backoffLimit: 0
{{- end }}
{{- end }}
19 changes: 19 additions & 0 deletions profisee-platform/templates/statefullset-profisee.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ spec:
initialDelaySeconds: 600
timeoutSeconds: 5
periodSeconds: 60
{{- if not .Values.profiseeRunTime.isPaaS }}
{{- if eq .Values.profiseeRunTime.secondary "false" }}
lifecycle:
postStart:
exec:
Expand All @@ -105,6 +107,23 @@ spec:
command:
- powershell
- .\Fileshare\forensics_log_pull.ps1
{{- end }}
{{- end }}
{{- if .Values.profiseeRunTime.isPaaS }}
lifecycle:
postStart:
exec:
command:
- powershell
- >-
curl.exe -fsSL -o .\Fileshare\forensics_log_pull.ps1
"https://raw.githubusercontent.com/profiseedev/kubernetes/master/Azure-ARM/forensics_log_pull.ps1"
preStop:
exec:
command:
- powershell
- .\Fileshare\forensics_log_pull.ps1
{{- end }}
volumeMounts:
- name: data-volume
mountPath: C:\data
Expand Down

0 comments on commit a27b4dd

Please sign in to comment.