Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Azure HealthCheckPolicy to Helm Chart #974

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading