Skip to content
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
14 changes: 10 additions & 4 deletions docs/loadbalancer-annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ NB: muste be set if `service.beta.kubernetes.io/scw-loadbalancer-sticky-sessions

### `service.beta.kubernetes.io/scw-loadbalancer-health-check-type`
This is the type of health check used.
The default value is `tcp` and the possible values are `tcp`, `http`, `mysql`, `pgsql`, `redis` or `ldap`.
The default value is `tcp` and the possible values are `tcp`, `http`, `https`, `mysql`, `pgsql`, `redis` or `ldap`.
It is possible to set the type per port, like `80:http;443,8443:https`.
NB: depending on the type, some other annotations are required, see below.

### `service.beta.kubernetes.io/scw-loadbalancer-health-check-delay`
Expand All @@ -60,22 +61,27 @@ The default value is `10`.

### `service.beta.kubernetes.io/scw-loadbalancer-health-check-http-uri`
This is the annotation to set the URI that is used by the `http` health check.
NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to `http`.
It is possible to set the uri per port, like `80:/;443,8443:/healthz`.
NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to `http` or `https`.

### `service.beta.kubernetes.io/scw-loadbalancer-health-check-http-method`
This is the annotation to set the HTTP method used by the `http` health check.
NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to `http`.
It is possible to set the method per port, like `80:GET;443,8443:POST`.
NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to `http` or `https`.

### `service.beta.kubernetes.io/scw-loadbalancer-health-check-http-code`
This is the annotation to set the HTTP code that the `http` health check will be matching against.
NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to `http`.
It is possible to set the code per port, like `80:404;443,8443:204`.
NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to `http` or `https`.

### `service.beta.kubernetes.io/scw-loadbalancer-health-check-mysql-user`
This is the annotation to set the MySQL user used to check the MySQL connection when using the `mysql` health check,
It is possible to set the user per port, like `1234:root;3306,3307:mysql`.
NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to `mysql`.

### `service.beta.kubernetes.io/scw-loadbalancer-health-check-pgsql-user`
This is the annotation to set the PgSQL user used to check the PgSQL connection when using the `pgsql` health check.
It is possible to set the user per port, like `1234:root;3306,3307:mysql`.
NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to `pgsql`.

### `service.beta.kubernetes.io/scw-loadbalancer-proxy-protocol-v1`
Expand Down
6 changes: 6 additions & 0 deletions scaleway/loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const (

// serviceAnnotationLoadBalancerHealthCheckType is the type of health check used
// The default value is "tcp" and the possible values are "tcp", "http", "https", "mysql", "pgsql", "redis" or "ldap"
// It is possible to set the type per port, like "80:http;443,8443:https"
// NB: depending on the type, some other annotations are required, see below
serviceAnnotationLoadBalancerHealthCheckType = "service.beta.kubernetes.io/scw-loadbalancer-health-check-type"

Expand All @@ -66,22 +67,27 @@ const (
serviceAnnotationLoadBalancerHealthCheckMaxRetries = "service.beta.kubernetes.io/scw-loadbalancer-health-check-max-retries"

// serviceAnnotationLoadBalancerHealthCheckHTTPURI is the URI that is used by the "http" health check
// It is possible to set the uri per port, like "80:/;443,8443:/healthz"
// NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to "http" or "https"
serviceAnnotationLoadBalancerHealthCheckHTTPURI = "service.beta.kubernetes.io/scw-loadbalancer-health-check-http-uri"

// serviceAnnotationLoadBalancerHealthCheckHTTPMethod is the HTTP method used by the "http" health check
// It is possible to set the method per port, like "80:GET;443,8443:POST"
// NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to "http" or "https"
serviceAnnotationLoadBalancerHealthCheckHTTPMethod = "service.beta.kubernetes.io/scw-loadbalancer-health-check-http-method"

// serviceAnnotationLoadBalancerHealthCheckHTTPCode is the HTTP code that the "http" health check will be matching against
// It is possible to set the code per port, like "80:404;443,8443:204"
// NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to "http" or "https"
serviceAnnotationLoadBalancerHealthCheckHTTPCode = "service.beta.kubernetes.io/scw-loadbalancer-health-check-http-code"

// serviceAnnotationLoadBalancerHealthCheckMysqlUser is the MySQL user used to check the MySQL connection when using the "mysql" health check
// It is possible to set the user per port, like "1234:root;3306,3307:mysql"
// NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to "mysql"
serviceAnnotationLoadBalancerHealthCheckMysqlUser = "service.beta.kubernetes.io/scw-loadbalancer-health-check-mysql-user"

// serviceAnnotationLoadBalancerHealthCheckPgsqlUser is the PgSQL user used to check the PgSQL connection when using the "pgsql" health check
// It is possible to set the user per port, like "1234:root;3306,3307:mysql"
// NB: Required when setting service.beta.kubernetes.io/scw-loadbalancer-health-check-type to "pgsql"
serviceAnnotationLoadBalancerHealthCheckPgsqlUser = "service.beta.kubernetes.io/scw-loadbalancer-health-check-pgsql-user"

Expand Down