Skip to content

Commit b1b5560

Browse files
authored
Feat: Add externalTrafficPolicy for DC products (#1160)
1 parent f89ad32 commit b1b5560

23 files changed

Lines changed: 103 additions & 1 deletion

File tree

‎.github/workflows/e2e-tf-deployment.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
description: 'Use Gateway API (Envoy Gateway) instead of NGINX Ingress'
2121
required: false
2222
type: boolean
23-
default: false
23+
default: true
2424
terraform_branch:
2525
description: 'Terraform repo branch to use (leave empty for latest LTS tag)'
2626
required: false

‎src/main/charts/bamboo/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Kubernetes: `>=1.21.x-0`
9090
| bamboo.seraphConfig.generateByHelm | bool | `false` | Mount seraph-config.xml as a ConfigMap. Override configuration elements if necessary |
9191
| bamboo.service.annotations | object | `{}` | Additional annotations to apply to the Service |
9292
| bamboo.service.contextPath | string | `nil` | The Tomcat context path that Bamboo will use. The ATL_TOMCAT_CONTEXTPATH will be set automatically. |
93+
| bamboo.service.externalTrafficPolicy | string | `nil` | The external traffic policy for the Service. Set to "Local" to preserve the client source IP (e.g. for audit logging or when fronted by an AWS ALB/NLB with instance/NodePort targets). Only applied when service.type is "NodePort" or "LoadBalancer"; ignored for ClusterIP, where Kubernetes rejects this field. |
9394
| bamboo.service.loadBalancerIP | string | `nil` | Use specific loadBalancerIP. Only applies to service type LoadBalancer. |
9495
| bamboo.service.nodePort | string | `nil` | Only applicable if service.type is NodePort. NodePort for Bamboo service |
9596
| bamboo.service.port | int | `80` | The port on which the Bamboo K8s Service will listen for http traffic |

‎src/main/charts/bamboo/templates/service.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ metadata:
1010
{{- end }}
1111
spec:
1212
type: {{ .Values.bamboo.service.type }}
13+
{{- if and .Values.bamboo.service.externalTrafficPolicy (or (eq .Values.bamboo.service.type "NodePort") (eq .Values.bamboo.service.type "LoadBalancer")) }}
14+
externalTrafficPolicy: {{ .Values.bamboo.service.externalTrafficPolicy }}
15+
{{- end }}
1316
sessionAffinity: {{ .Values.bamboo.service.sessionAffinity }}
1417
{{- if .Values.bamboo.service.sessionAffinityConfig.clientIP.timeoutSeconds }}
1518
sessionAffinityConfig:

‎src/main/charts/bamboo/values.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,13 @@ bamboo:
725725
#
726726
loadBalancerIP:
727727

728+
# -- The external traffic policy for the Service. Set to "Local" to preserve the
729+
# client source IP (e.g. for audit logging or when fronted by an AWS ALB/NLB with
730+
# instance/NodePort targets). Only applied when service.type is "NodePort" or
731+
# "LoadBalancer"; ignored for ClusterIP, where Kubernetes rejects this field.
732+
#
733+
externalTrafficPolicy:
734+
728735
# -- The Tomcat context path that Bamboo will use. The ATL_TOMCAT_CONTEXTPATH
729736
# will be set automatically.
730737
#

‎src/main/charts/bitbucket/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ Kubernetes: `>=1.21.x-0`
129129
| bitbucket.securityContextEnabled | bool | `true` | Whether to apply security context to pod. |
130130
| bitbucket.service.annotations | object | `{}` | Additional annotations to apply to the Service |
131131
| bitbucket.service.contextPath | string | `nil` | The context path that Bitbucket will use. |
132+
| bitbucket.service.externalTrafficPolicy | string | `nil` | The external traffic policy for the Service. Set to "Local" to preserve the client source IP (e.g. for audit logging or when fronted by an AWS ALB/NLB with instance/NodePort targets). Only applied when service.type is "NodePort" or "LoadBalancer"; ignored for ClusterIP, where Kubernetes rejects this field. |
132133
| bitbucket.service.loadBalancerIP | string | `nil` | Use specific loadBalancerIP. Only applies to service type LoadBalancer. |
133134
| bitbucket.service.nodePort | string | `nil` | Only applicable if service.type is NodePort. NodePort for Bitbucket service |
134135
| bitbucket.service.port | int | `80` | The port on which the Bitbucket K8s HTTP Service will listen |

‎src/main/charts/bitbucket/templates/service.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ metadata:
1111
{{- end }}
1212
spec:
1313
type: {{ .Values.bitbucket.service.type }}
14+
{{- if and .Values.bitbucket.service.externalTrafficPolicy (or (eq .Values.bitbucket.service.type "NodePort") (eq .Values.bitbucket.service.type "LoadBalancer")) }}
15+
externalTrafficPolicy: {{ .Values.bitbucket.service.externalTrafficPolicy }}
16+
{{- end }}
1417
sessionAffinity: {{ .Values.bitbucket.service.sessionAffinity }}
1518
{{- if .Values.bitbucket.service.sessionAffinityConfig.clientIP.timeoutSeconds }}
1619
sessionAffinityConfig:

‎src/main/charts/bitbucket/values.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,13 @@ bitbucket:
705705
#
706706
loadBalancerIP:
707707

708+
# -- The external traffic policy for the Service. Set to "Local" to preserve the
709+
# client source IP (e.g. for audit logging or when fronted by an AWS ALB/NLB with
710+
# instance/NodePort targets). Only applied when service.type is "NodePort" or
711+
# "LoadBalancer"; ignored for ClusterIP, where Kubernetes rejects this field.
712+
#
713+
externalTrafficPolicy:
714+
708715
# -- The context path that Bitbucket will use.
709716
#
710717
contextPath:

‎src/main/charts/confluence/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Kubernetes: `>=1.21.x-0`
9191
| confluence.seraphConfig.generateByHelm | bool | `false` | Mount seraph-config.xml as a ConfigMap. Override configuration elements if necessary |
9292
| confluence.service.annotations | object | `{}` | Additional annotations to apply to the Service |
9393
| confluence.service.contextPath | string | `nil` | The Tomcat context path that Confluence will use. The ATL_TOMCAT_CONTEXTPATH will be set automatically. |
94+
| confluence.service.externalTrafficPolicy | string | `nil` | The external traffic policy for the Service. Set to "Local" to preserve the client source IP (e.g. for audit logging or when fronted by an AWS ALB/NLB with instance/NodePort targets). Only applied when service.type is "NodePort" or "LoadBalancer"; ignored for ClusterIP, where Kubernetes rejects this field. |
9495
| confluence.service.loadBalancerIP | string | `nil` | Use specific loadBalancerIP. Only applies to service type LoadBalancer. |
9596
| confluence.service.nodePort | string | `nil` | Only applicable if service.type is NodePort. NodePort for Confluence service |
9697
| confluence.service.port | int | `80` | The port on which the Confluence K8s Service will listen |

‎src/main/charts/confluence/templates/service.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ metadata:
1010
{{- end }}
1111
spec:
1212
type: {{ .Values.confluence.service.type }}
13+
{{- if and .Values.confluence.service.externalTrafficPolicy (or (eq .Values.confluence.service.type "NodePort") (eq .Values.confluence.service.type "LoadBalancer")) }}
14+
externalTrafficPolicy: {{ .Values.confluence.service.externalTrafficPolicy }}
15+
{{- end }}
1316
sessionAffinity: {{ .Values.confluence.service.sessionAffinity }}
1417
{{- if .Values.confluence.service.sessionAffinityConfig.clientIP.timeoutSeconds }}
1518
sessionAffinityConfig:

‎src/main/charts/confluence/values.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,13 @@ confluence:
742742
#
743743
loadBalancerIP:
744744

745+
# -- The external traffic policy for the Service. Set to "Local" to preserve the
746+
# client source IP (e.g. for audit logging or when fronted by an AWS ALB/NLB with
747+
# instance/NodePort targets). Only applied when service.type is "NodePort" or
748+
# "LoadBalancer"; ignored for ClusterIP, where Kubernetes rejects this field.
749+
#
750+
externalTrafficPolicy:
751+
745752
# -- The Tomcat context path that Confluence will use. The ATL_TOMCAT_CONTEXTPATH
746753
# will be set automatically.
747754
#

0 commit comments

Comments
 (0)