Skip to content

Commit

Permalink
Feature/us 622676 - Refactoring setting tcp keep alive time changes (#…
Browse files Browse the repository at this point in the history
…840)

* US-622676 - refactoring tcp changes


Co-authored-by: kumas39 <[email protected]>
  • Loading branch information
Saurabh-16 and kumas39 authored Oct 29, 2024
1 parent 60ea231 commit 66e84aa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion charts/pega/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v1
name: pega
version: "3.24.9"
version: "3.24.10"
description: Pega installation on kubernetes
keywords:
- pega
Expand Down
8 changes: 8 additions & 0 deletions charts/pega/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,14 @@ key: privateKey
{{- end }}
{{- end }}

{{- define "tcpKeepAliveProbe" }}
{{- if .node.tcpKeepAliveProbe }}
sysctls:
- name: net.ipv4.tcp_keepalive_time
value: "{{ .node.tcpKeepAliveProbe }}"
{{- end }}
{{- end }}

{{- define "ingressApiVersion" }}
{{- if (semverCompare ">= 1.19.0-0" (trimPrefix "v" .root.Capabilities.KubeVersion.GitVersion)) }}
apiVersion: networking.k8s.io/v1
Expand Down
6 changes: 1 addition & 5 deletions charts/pega/templates/_pega-deployment.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ spec:
runAsUser: 9001
fsGroup: 0
{{- end }}
{{- if (.node.tcpKeepAliveProbe) }}
sysctls:
- name: "net.ipv4.tcp_keepalive_time"
value: "{{ .node.tcpKeepAliveProbe }}"
{{- end }}
{{- include "tcpKeepAliveProbe" . | indent 8 }}
{{- if .node.securityContext }}
{{ toYaml .node.securityContext | indent 8 }}
{{- end }}
Expand Down
25 changes: 9 additions & 16 deletions charts/pega/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ global:
# Inactivity time after which requestor is passivated
passivationTimeSec: 900

# To configure net.ipv4.tcp_keepalive_time OS Kernel setting, set the value in seconds.
# This setting only works for Kubernetes version 1.29 onwards. For more information, see below,
# https://github.com/pegasystems/pega-helm-charts/blob/master/charts/pega/README.md#security-context
# tcpKeepAliveProbe: 300

service:
# For help configuring the service block, see the Helm chart documentation
Expand Down Expand Up @@ -257,14 +261,6 @@ global:
# runAsUser: 9001
# fsGroup: 0

# To configure net.ipv4.tcp_keepalive_time OS Kernel setting, set the value in seconds.
# This setting only works for Kubernetes version 1.29 onwards. For more information, see below,
# https://github.com/pegasystems/pega-helm-charts/blob/master/charts/pega/README.md#security-context
# securityContext:
# sysctls:
# - name: net.ipv4.tcp_keepalive_time
# value: "300"

# To specify security settings for a Container, include the securityContext field in the Container manifest
# Security settings that you specify for a Container apply only to the pega container,
# and they override settings made at the Pod level when there is overlap. Container settings
Expand Down Expand Up @@ -320,6 +316,11 @@ global:
replicas: 1
javaOpts: ""

# To configure net.ipv4.tcp_keepalive_time OS Kernel setting, set the value in seconds.
# This setting only works for Kubernetes version 1.29 onwards. For more information, see below,
# https://github.com/pegasystems/pega-helm-charts/blob/master/charts/pega/README.md#security-context
# tcpKeepAliveProbe: 300

deploymentStrategy:
rollingUpdate:
maxSurge: 1
Expand All @@ -336,14 +337,6 @@ global:
# runAsUser: 9001
# fsGroup: 0

# To configure net.ipv4.tcp_keepalive_time OS Kernel setting, set the value in seconds.
# This setting only works for Kubernetes version 1.29 onwards. For more information, see below,
# https://github.com/pegasystems/pega-helm-charts/blob/master/charts/pega/README.md#security-context
# securityContext:
# sysctls:
# - name: net.ipv4.tcp_keepalive_time
# value: "300"

# To specify security settings for a Container, include the securityContext field in the Container manifest
# Security settings that you specify for a Container apply only to the pega container,
# and they override settings made at the Pod level when there is overlap. Container settings
Expand Down

0 comments on commit 66e84aa

Please sign in to comment.