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
docs(filters): illustrate and describe the filterRef array in the VKC resource (kroxylicious#3219)
* docs(filters): illustrate and describe the filterRef array in the VKC resource.
Signed-off-by: Keith Wall <kwall@apache.org>
* Apply suggestions from code review
Co-authored-by: PaulRMellor <47596553+PaulRMellor@users.noreply.github.com>
Signed-off-by: Keith Wall <kwall@apache.org>
* word smithing
Signed-off-by: Keith Wall <kwall@apache.org>
---------
Signed-off-by: Keith Wall <kwall@apache.org>
Co-authored-by: PaulRMellor <47596553+PaulRMellor@users.noreply.github.com>
Copy file name to clipboardExpand all lines: kroxylicious-docs/docs/_modules/configuring/con-virtualkafkacluster-overview.adoc
+22-10Lines changed: 22 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,12 +15,16 @@ The virtual cluster references the following resources, which must be in the sam
15
15
* A `KafkaProxy` resource that the proxy is part of.
16
16
* One or more `KafkaProxyIngress` resources that expose the virtual cluster to Kafka clients and provide virtual-cluster-specific configuration to the ingress (such as TLS certificates and other parameters).
17
17
* A `KafkaService` resource that defines the backend Kafka cluster.
18
-
* Zero or more `KafkaProtocolFilter` resources that apply filters to the Kafka protocol traffic passing between clients and the backend Kafka cluster.
18
+
* One or more `KafkaProtocolFilter` resources that filter the Kafka protocol traffic between clients and the backend Kafka cluster.
19
+
The order of the filters in the `filterRefs` array defines the order that the filters are applied.
20
+
Client requests pass through the filters starting at index `0`, then `1`, and continuing to index `n`.
21
+
Broker responses pass through the same filters in the reverse order.
22
+
If the `filterRefs` array is empty (or null), the traffic will pass through the cluster unchanged.
19
23
20
-
This example shows a `VirtualKafkaCluster`, exposing it to Kafka clients running on the same Kubernetes cluster.
21
-
It uses plain TCP (as opposed to TLS) as the transport protocol.
24
+
The following example shows configuration for a `VirtualKafkaCluster` that is exposed it to Kafka clients running on the same Kubernetes cluster.
25
+
Protocol traffic is filtered by the `my-filter` filter.
22
26
23
-
.Example `VirtualKafkaCluster` configuration with single `clusterIP` ingress
27
+
.Example `VirtualKafkaCluster` configuration with a single ingress and filter.
24
28
[source,yaml]
25
29
----
26
30
kind: VirtualKafkaCluster
@@ -36,16 +40,21 @@ spec:
36
40
ingresses:
37
41
- ingressRef: # <3>
38
42
name: cluster-ip
43
+
filterRefs: # <4>
44
+
- name: my-filter
45
+
39
46
----
40
47
<1> Identifies the `KafkaProxy` resource that this virtual cluster is part of.
41
-
<2> The `KafkaService` that defines the Kafka cluster proxied by the virtual cluster.
42
-
<3> Ingresses that expose the virtual cluster.
48
+
<2> Specifies the `KafkaService` that defines the Kafka cluster proxied by the virtual cluster.
49
+
<3> Defines the ingresses that expose the virtual cluster.
43
50
Each ingress references a `KafkaProxyIngress` by name.
51
+
<4> Specifies the list of filters applied to Kafka protocol traffic.
44
52
45
-
This example shows a `VirtualKafkaCluster`, exposing it to Kafka clients running both on and off-cluster, both using TLS.
53
+
The following example shows configuration for a `VirtualKafkaCluster` that is exposed to Kafka clients running both on and off the cluster, using TLS.
46
54
Because TLS is used, the ingress configuration must reference a TLS server certificate.
55
+
This example has two filters.
47
56
48
-
.Example `VirtualKafkaCluster` configuration with two ingresses using TLS
57
+
.Example `VirtualKafkaCluster` configuration with two TLS-enabled ingresses
49
58
[source,yaml]
50
59
----
51
60
kind: VirtualKafkaCluster
@@ -69,9 +78,12 @@ spec:
69
78
certificateRef:
70
79
name: 'external-server-cert' # <2>
71
80
kind: Secret
81
+
filterRefs:
82
+
- name: my-filter-1
83
+
- name: my-filter-2
72
84
----
73
-
<1> Reference to a secret containing the server certificate for the `clusterIP` ingress.
74
-
<2> Reference to a secret containing the server certificate for the `loadBalancer` ingress.
85
+
<1> References a secret containing the server certificate for the `clusterIP` ingress.
86
+
<2> References a secret containing the server certificate for the `loadBalancer` ingress.
0 commit comments