Skip to content

Commit

Permalink
Add Azure HealthCheckPolicy to Helm Chart (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
tnotheis authored Dec 11, 2024
1 parent 902d147 commit eae954c
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
22 changes: 22 additions & 0 deletions helm/templates/consumerapi/healthcheckpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if eq .Values.global.provider "Azure" }}
apiVersion: alb.networking.azure.io/v1
kind: HealthCheckPolicy
metadata:
name: {{ .Values.consumerapi.name }}
spec:
targetRef:
group: ""
kind: Service
name: {{ .Values.consumerapi.name }}
default:
interval: {{ .Values.consumerapi.healthCheckPolicy.interval }}
timeout: {{ .Values.consumerapi.healthCheckPolicy.timeout }}
healthyThreshold: {{ .Values.consumerapi.healthCheckPolicy.healthyThreshold }}
unhealthyThreshold: {{ .Values.consumerapi.healthCheckPolicy.unhealthyThreshold }}
http:
host: {{ default .Values.global.hostname .Values.consumerapi.healthCheckPolicy.hostOverride }}
path: /health
match:
statusCodes:
- start: 200
end: 200
22 changes: 22 additions & 0 deletions helm/templates/sseserver/healthcheckpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{- if eq .Values.global.provider "Azure" }}
apiVersion: alb.networking.azure.io/v1
kind: HealthCheckPolicy
metadata:
name: {{ .Values.sseserver.name }}
spec:
targetRef:
group: ""
kind: Service
name: {{ .Values.sseserver.name }}
default:
interval: {{ .Values.sseserver.healthCheckPolicy.interval }}
timeout: {{ .Values.sseserver.healthCheckPolicy.timeout }}
healthyThreshold: {{ .Values.sseserver.healthCheckPolicy.healthyThreshold }}
unhealthyThreshold: {{ .Values.sseserver.healthCheckPolicy.unhealthyThreshold }}
http:
host: {{ default .Values.global.hostname .Values.sseserver.healthCheckPolicy.hostOverride }}
path: /health
match:
statusCodes:
- start: 200
end: 200
26 changes: 26 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,19 @@ consumerapi:
# unhealthyThreshold - the number of consecutive failed checks required to mark a backend as unhealthy
unhealthyThreshold: 2

# healthCheckPolicy - only applicable if .Values.global.provider is set to "Azure"; see https://learn.microsoft.com/en-us/azure/application-gateway/for-containers/custom-health-probe for a description of `HealthCheckPolicy`s
healthCheckPolicy:
# hostOverride - the host name that should be used for the health check; if empty, the toplevel `hostname` property is used
hostOverride: ""
# interval - the interval in seconds between health checks
interval: 15
# timeout - the timeout in seconds for each health check
timeout: 15
# healthyThreshold - the number of consecutive successful health checks required to mark a backend as healthy
healthyThreshold: 1
# unhealthyThreshold - the number of consecutive failed health checks required to mark a backend as unhealthy
unhealthyThreshold: 2

#=========================== Database Migrator ===========================

databasemigrator:
Expand Down Expand Up @@ -527,6 +540,19 @@ sseserver:
# unhealthyThreshold - the number of consecutive failed checks required to mark a backend as unhealthy
unhealthyThreshold: 2

# healthCheckPolicy - only applicable if .Values.global.provider is set to "Azure"; see https://learn.microsoft.com/en-us/azure/application-gateway/for-containers/custom-health-probe for a description of `HealthCheckPolicy`s
healthCheckPolicy:
# hostOverride - the host name that should be used for the health check; if empty, the toplevel `hostname` property is used
hostOverride: ""
# interval - the interval in seconds between health checks
interval: 15
# timeout - the timeout in seconds for each health check
timeout: 15
# healthyThreshold - the number of consecutive successful health checks required to mark a backend as healthy
healthyThreshold: 1
# unhealthyThreshold - the number of consecutive failed health checks required to mark a backend as unhealthy
unhealthyThreshold: 2

global:
# defaultHostname - the default hostname the services should be reachable under (this can be overriden in the individual service configurations)
defaultHostname: ""
Expand Down

0 comments on commit eae954c

Please sign in to comment.