From e66ebbb56fac576974a52e2e61b2278bb53758f1 Mon Sep 17 00:00:00 2001 From: Hechmi Dammak Date: Tue, 2 Jan 2024 17:00:50 +0100 Subject: [PATCH] make acs liveliness and readiness completely overridable --- CHANGELOG.md | 1 + README.md | 84 +++++++------------ .../templates/acs/acs-deployment.yaml | 24 ++---- xenit-alfresco/values.yaml | 10 ++- 4 files changed, 43 insertions(+), 76 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 423c412..eef0a2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), chronology things are added/fixed/changed and - where possible - links to the PRs involved. ### Changes +* make acs liveliness and readiness completely overridable * make transformation services components each enable configurable * remove mq config in other deployments when mq is disabled diff --git a/README.md b/README.md index 3a2df8b..b729026 100644 --- a/README.md +++ b/README.md @@ -315,67 +315,39 @@ For more information take a look at * Default: `IfNotPresent` * Description: Specify when the pods should pull the image from the repositories -#### `acs.livenessProbe.failureThreshold` +#### `acs.livenessProbe` * Required: false -* Default: 1 -* Description: Specify the livenessProbe failure thresh hold fp how many consecutive failure before it stops probing - -#### `acs.livenessProbe.initialDelaySeconds` - -* Required: false -* Default: 130 -* Description: Specify the livenessProbe initial delay before it starts probing - -#### `acs.livenessProbe.periodSeconds` - -* Required: false -* Default: 20 -* Description: Specify the livenessProbe period between probes - -#### `acs.livenessProbe.successThreshold` - -* Required: false -* Default: 1 -* Description: Specify the livenessProbe success thresh hold for how many consecutive successes for the probe to be - considered successful after having failed - -#### `acs.livenessProbe.timeoutSeconds` - -* Required: false -* Default: 10 -* Description: Specify the livenessProbe timeout for probes to be considered as failure - -#### `acs.readinessProbe.failureThreshold` - -* Required: false -* Default: 6 -* Description: Specify the readinessProbe failure thresh hold fp how many consecutive failure before it stops probing - -#### `acs.readinessProbe.initialDelaySeconds` - -* Required: false -* Default: 60 -* Description: Specify the readinessProbe initial delay before it starts probing - -#### `acs.readinessProbe.periodSeconds` - -* Required: false -* Default: 20 -* Description: Specify the readinessProbe period between probes - -#### `acs.readinessProbe.successThreshold` - -* Required: false -* Default: 1 -* Description: Specify the readinessProbe success thresh hold for how many consecutive successes for the probe to be - considered successful after having failed +* Default: +``` + httpGet: + path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-live- + port: 8080 + scheme: HTTP + failureThreshold: 1 + initialDelaySeconds: 130 + periodSeconds: 20 + successThreshold: 1 + timeoutSeconds: 10 +``` +* Description: Specify the livenessProbe configuration for acs -#### `acs.readinessProbe.timeoutSeconds` +#### `acs.readinessProbe` * Required: false -* Default: 10 -* Description: Specify the readinessProbe timeout for probes to be considered as failure +* Default: +``` + httpGet: + path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- + port: 8080 + scheme: HTTP + failureThreshold: 6 + initialDelaySeconds: 60 + periodSeconds: 20 + successThreshold: 1 + timeoutSeconds: 10 +``` +* Description: Specify the readinessProbe configuration for acs #### `acs.strategy.type` diff --git a/xenit-alfresco/templates/acs/acs-deployment.yaml b/xenit-alfresco/templates/acs/acs-deployment.yaml index 2bc666e..d70fd7c 100644 --- a/xenit-alfresco/templates/acs/acs-deployment.yaml +++ b/xenit-alfresco/templates/acs/acs-deployment.yaml @@ -45,26 +45,14 @@ spec: - name: acs-container image: {{ .Values.acs.image.registry }}/{{ .Values.acs.image.repository }}:{{ .Values.acs.image.tag }} imagePullPolicy: {{ .Values.acs.imagePullPolicy | default "IfNotPresent" }} + {{- if .Values.acs.readinessProbe }} readinessProbe: - failureThreshold: {{ .Values.acs.readinessProbe.failureThreshold }} - httpGet: - path: {{ .Values.acs.readinessProbe.path }} - port: 8080 - scheme: HTTP - initialDelaySeconds: {{ .Values.acs.readinessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.acs.readinessProbe.periodSeconds }} - successThreshold: {{ .Values.acs.readinessProbe.successThreshold }} - timeoutSeconds: {{ .Values.acs.readinessProbe.timeoutSeconds }} + {{ toYaml .Values.acs.readinessProbe | nindent 10 }} + {{- end }} + {{- if .Values.acs.livenessProbe }} livenessProbe: - failureThreshold: {{ .Values.acs.livenessProbe.failureThreshold }} - httpGet: - path: {{ .Values.acs.livenessProbe.path }} - port: 8080 - scheme: HTTP - initialDelaySeconds: {{ .Values.acs.livenessProbe.initialDelaySeconds }} - periodSeconds: {{ .Values.acs.livenessProbe.periodSeconds }} - successThreshold: {{ .Values.acs.livenessProbe.successThreshold }} - timeoutSeconds: {{ .Values.acs.livenessProbe.timeoutSeconds }} + {{ toYaml .Values.acs.livenessProbe | nindent 10 }} + {{- end }} lifecycle: preStop: exec: diff --git a/xenit-alfresco/values.yaml b/xenit-alfresco/values.yaml index 7abbeec..409920b 100644 --- a/xenit-alfresco/values.yaml +++ b/xenit-alfresco/values.yaml @@ -53,14 +53,20 @@ acs: sharePort: '443' shareProtocol: 'https' livenessProbe: - path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-live- + httpGet: + path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-live- + port: 8080 + scheme: HTTP failureThreshold: 1 initialDelaySeconds: 130 periodSeconds: 20 successThreshold: 1 timeoutSeconds: 10 readinessProbe: - path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- + httpGet: + path: /alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- + port: 8080 + scheme: HTTP failureThreshold: 6 initialDelaySeconds: 60 periodSeconds: 20