Skip to content

Commit

Permalink
[strongswan] Add health probes for service
Browse files Browse the repository at this point in the history
Related-Prod: PRODX-47901
Change-Id: I09d5a6840efeedd8500ce2abe1a8806c97321ac3
  • Loading branch information
okononenko75 committed Nov 13, 2024
1 parent b3133a3 commit 644f4b0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
8 changes: 8 additions & 0 deletions charts/infra/strongswan/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/}}

{{- define "healthProbe" }}
exec:
command:
- "true"
{{- end }}

{{- define "strongswan.daemonset" }}
{{- $daemonset := index . 0 }}
{{- $configMapName := index . 1 }}
Expand Down Expand Up @@ -53,6 +59,8 @@ spec:
- name: strongswan
{{ tuple $envAll "strongswan" | include "helm-toolkit.snippets.image" | indent 10 }}
{{ tuple $envAll $envAll.Values.pod.resources.server | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }}
{{ dict "envAll" . "component" "strongswan" "container" "strongswan" "type" "readiness" "probeTemplate" (include "healthProbe" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
{{ dict "envAll" . "component" "strongswan" "container" "strongswan" "type" "liveness" "probeTemplate" (include "healthProbe" $envAll | fromYaml) | include "helm-toolkit.snippets.kubernetes_probe" | indent 10 }}
securityContext:
capabilities:
add:
Expand Down
17 changes: 16 additions & 1 deletion charts/infra/strongswan/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,22 @@ pod:
limits:
memory: "1024Mi"
cpu: "2000m"

probes:
strongswan:
strongswan:
readiness:
enabled: true
params:
initialDelaySeconds: 5
periodSeconds: 30
timeoutSeconds: 5
liveness:
enabled: true
params:
initialDelaySeconds: 5
periodSeconds: 3600
timeoutSeconds: 5
failureThreshold: 3
conf:
ipsec:
config setup:
Expand Down

0 comments on commit 644f4b0

Please sign in to comment.