You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
we can see that a config snippet was added, but compared to regular snippet, our annotation has full validation that we defined (and also its limiting what we can put)
115
+
we can see that a config snippet was added, but compared to regular snippet, our annotation has full validation that we defined (and also it is limiting what we can put)
116
116
117
117
what happens if we try to add value that is not accepted ?
118
118
@@ -147,6 +147,13 @@ if template is not defined, value as is will be copied
147
147
148
148
usage
149
149
150
+
```yaml
151
+
backend.example.com/maxconn: "1000"
152
+
```
153
+
154
+
⚠ `duration`, `int`, `uint`, `bool` and `float` values needs to be defined as strings in annotation value. This is limitation of k8s for annotation values. If using type `json` normal number and boolean values can be used.
155
+
156
+
**invalid**
150
157
```yaml
151
158
backend.example.com/maxconn: 1000
152
159
```
@@ -314,7 +321,7 @@ config
314
321
rule: "value > duration('42s') && value <= duration('42m')"# CEL expression
315
322
```
316
323
317
-
## How do i create frontend annotations ?
324
+
## How do I create frontend annotations ?
318
325
319
326
in same way as backend ones, except there is no `frontend` object in k8s. Therefore we will use configmap
320
327
@@ -325,24 +332,39 @@ metadata:
325
332
name: haproxy-kubernetes-ingress
326
333
namespace: haproxy-controller
327
334
annotations:
328
-
frontend.http.example.com/timeout-server: "5s"
329
-
frontend.http.example.com/timeout-client: "6s"
330
-
frontend.https.example.com/timeout-server: "7s"
331
-
frontend.stats.example.com/timeout-server: "8s"
335
+
frontend.example.com/timeout-server: "5s"
336
+
frontend.example.com/timeout-client: "6s"
332
337
data:
333
-
syslog-server: |
334
-
address: stdout, format: raw, facility:daemon
335
-
cr-global: haproxy-controller/global-full
338
+
...
336
339
```
337
340
338
-
its similar as with other configuration values, except we define it as configmap annotations
341
+
it is similar as with other configuration values, except we define it as configmap annotations.
With HAProxy Ingress controller, you have 3 different frontends: `http`, `https` and `stats`, each can be customized with custom annotations.
343
348
344
-
the only difference is extra information what frontend this settings belong to. With HAProxy Ingress controller, you have 3 different frontends: `http`, `https` and `stats`, each can be customized with custom annotations.
349
+
If you want to create a annotation for specific frontend use `resources` as shown in example:
0 commit comments