Skip to content

Commit 81479d2

Browse files
authored
doc: add doc about the HC per port (#69)
Signed-off-by: Patrik Cyvoct <patrik@ptrk.io>
1 parent 00c7c1a commit 81479d2

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

docs/loadbalancer-annotations.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ NB: muste be set if `service.beta.kubernetes.io/scw-loadbalancer-sticky-sessions
4343

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

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

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

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

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

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

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

8187
### `service.beta.kubernetes.io/scw-loadbalancer-proxy-protocol-v1`

scaleway/loadbalancers.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ const (
5050

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)