Skip to content

Commit 6945691

Browse files
committed
feat: add healthProbeBindAddr
1 parent d0df42b commit 6945691

File tree

4 files changed

+46
-32
lines changed

4 files changed

+46
-32
lines changed

helm/aws-load-balancer-controller/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ The default values set by the application itself can be confirmed [here](https:/
244244
| `tolerateNonExistentBackendAction` | whether to allow rules that reference a backend action that does not exist. (When enabled, it will return 503 error if backend action not exist) | `true` |
245245
| `defaultSSLPolicy` | Specifies the default SSL policy to use for HTTPS or TLS listeners | None |
246246
| `externalManagedTags` | Specifies the list of tag keys on AWS resources that are managed externally | `[]` |
247-
| `livenessProbe` | Liveness probe settings for the controller | (see `values.yaml`) |
247+
| `livenessProbe` | Liveness probe settings for the controller | `{}` (see `values.yaml`) |
248+
| `readinessProbe` | Readiness probe settings for the controller | `{}` (see `values.yaml`) |
248249
| `env` | Environment variables to set for aws-load-balancer-controller pod | None |
249250
| `envFrom` | Environment variables to set for aws-load-balancer-controller pod from configMap or Secret | None |
250251
| `envSecretName` | AWS credentials as environment variables from Secret (Secret keys `key_id` and `access_key`). | None |
@@ -285,3 +286,4 @@ The default values set by the application itself can be confirmed [here](https:/
285286
| `loadBalancerClass` | Sets the AWS load balancer type to be used when the Kubernetes service requests an external load balancer | `service.k8s.aws/nlb` |
286287
| `creator` | if set to a `value!=helm`, it will disable the addition of default helm labels | `helm` |
287288
| `runtimeClassName` | Runtime class name for the controller pods , such as `gvisor` or `kata`. An unspecified `nil` or empty `""` RuntimeClassName is equivalent to the backwards-compatible default behavior as if the RuntimeClass feature is disabled. | "" |
289+
| `healthProbeBindAddr` | The address the health probe endpoint binds to | `""` |

helm/aws-load-balancer-controller/templates/deployment.yaml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ spec:
178178
{{- if .Values.vpcTags }}
179179
- --aws-vpc-tags={{ include "aws-load-balancer-controller.convertMapToCsv" .Values.vpcTags | trimSuffix "," }}
180180
{{- end }}
181+
{{- if .Values.healthProbeBindAddr }}
182+
- --health-probe-bind-addr={{ .Values.healthProbeBindAddr }}
183+
{{- end }}
181184
{{- if or .Values.env .Values.envSecretName }}
182185
env:
183186
{{- if .Values.env}}
@@ -225,14 +228,26 @@ spec:
225228
protocol: TCP
226229
resources:
227230
{{- toYaml .Values.resources | nindent 10 }}
228-
{{- with .Values.livenessProbe }}
229231
livenessProbe:
230-
{{- toYaml . | nindent 10 }}
231-
{{- end }}
232-
{{- with .Values.readinessProbe }}
232+
httpGet:
233+
path: /healthz
234+
port: {{ (split ":" .Values.healthProbeBindAddr)._1 | default 61779 }}
235+
scheme: HTTP
236+
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds | default 30 }}
237+
periodSeconds: {{ .Values.livenessProbe.periodSeconds | default 10 }}
238+
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds | default 10 }}
239+
successThreshold: {{ .Values.livenessProbe.successThreshold | default 1 }}
240+
failureThreshold: {{ .Values.livenessProbe.failureThreshold | default 2 }}
233241
readinessProbe:
234-
{{- toYaml . | nindent 10 }}
235-
{{- end }}
242+
httpGet:
243+
path: /readyz
244+
port: {{ (split ":" .Values.healthProbeBindAddr)._1 | default 61779 }}
245+
scheme: HTTP
246+
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds | default 10 }}
247+
periodSeconds: {{ .Values.readinessProbe.periodSeconds | default 10 }}
248+
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds | default 10 }}
249+
successThreshold: {{ .Values.readinessProbe.successThreshold | default 1 }}
250+
failureThreshold: {{ .Values.readinessProbe.failureThreshold | default 2 }}
236251
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
237252
{{- with .Values.nodeSelector }}
238253
nodeSelector:

helm/aws-load-balancer-controller/test.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ enableWaf:
161161
# Enable WAF V2 addon for ALB (default true)
162162
enableWafv2:
163163

164+
# The address the health probe endpoint binds to. (default ":61779")
165+
healthProbeBindAddr: ""
166+
164167
# Maximum number of concurrently running reconcile loops for ingress (default 3)
165168
ingressMaxConcurrentReconciles:
166169

@@ -220,14 +223,10 @@ tolerateNonExistentBackendAction:
220223
defaultSSLPolicy:
221224

222225
# Liveness probe configuration for the controller
223-
livenessProbe:
224-
failureThreshold: 2
225-
httpGet:
226-
path: /healthz
227-
port: 61779
228-
scheme: HTTP
229-
initialDelaySeconds: 30
230-
timeoutSeconds: 10
226+
livenessProbe: {}
227+
228+
# readiness probe configuration for the controller
229+
readinessProbe: {}
231230

232231
# Environment variables to set for aws-load-balancer-controller pod.
233232
# We strongly discourage programming access credentials in the controller environment. You should setup IRSA or

helm/aws-load-balancer-controller/values.yaml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ enableWaf:
201201
# Enable WAF V2 addon for ALB (default true)
202202
enableWafv2:
203203

204+
# The address the health probe endpoint binds to. (default ":61779")
205+
healthProbeBindAddr: ""
206+
204207
# Maximum number of concurrently running reconcile loops for ingress (default 3)
205208
ingressMaxConcurrentReconciles:
206209

@@ -267,25 +270,20 @@ tolerateNonExistentBackendAction:
267270
defaultSSLPolicy:
268271

269272
# Liveness probe configuration for the controller
270-
livenessProbe:
271-
failureThreshold: 2
272-
httpGet:
273-
path: /healthz
274-
port: 61779
275-
scheme: HTTP
276-
initialDelaySeconds: 30
277-
timeoutSeconds: 10
273+
livenessProbe: {}
274+
# failureThreshold: 3
275+
# initialDelaySeconds: 30
276+
# periodSeconds: 10
277+
# successThreshold: 1
278+
# timeoutSeconds: 1
278279

279280
# readiness probe configuration for the controller
280-
readinessProbe:
281-
failureThreshold: 2
282-
httpGet:
283-
path: /readyz
284-
port: 61779
285-
scheme: HTTP
286-
successThreshold: 1
287-
initialDelaySeconds: 10
288-
timeoutSeconds: 10
281+
readinessProbe: {}
282+
# failureThreshold: 3
283+
# initialDelaySeconds: 10
284+
# periodSeconds: 10
285+
# successThreshold: 1
286+
# timeoutSeconds: 1
289287

290288
# Environment variables to set for aws-load-balancer-controller pod.
291289
# We strongly discourage programming access credentials in the controller environment. You should setup IRSA or

0 commit comments

Comments
 (0)