Skip to content

Commit b486ede

Browse files
fhennigrazvan
andauthored
Add descriptions (#223)
* Add descriptions * Update docs/modules/listener-operator/pages/security.adoc Co-authored-by: Razvan-Daniel Mihai <[email protected]> * Update docs/modules/listener-operator/pages/security.adoc Co-authored-by: Razvan-Daniel Mihai <[email protected]> --------- Co-authored-by: Razvan-Daniel Mihai <[email protected]>
1 parent e1e77a9 commit b486ede

File tree

6 files changed

+83
-55
lines changed

6 files changed

+83
-55
lines changed

docs/modules/listener-operator/pages/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= Stackable Listener Operator
2+
:description: The Stackable Listener Operator for Kubernetes provisions network listeners according to the cluster policy, and injects connection parameters into Pods.
23
:github: https://github.com/stackabletech/listener-operator/
34
:crd: {crd-docs-base-url}/listener-operator/{crd-docs-version}/
45

docs/modules/listener-operator/pages/installation.adoc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
There are two ways to run the Stackable Listener Operator:
44

5-
1. Helm managed Docker container deployment on Kubernetes
6-
7-
2. Build from source
5+
. Helm managed Docker container deployment on Kubernetes
6+
. Build from source
87

98
== Prerequisites
109

@@ -34,9 +33,11 @@ Then install the Stackable Listener Operator
3433
$ helm install listener-operator stackable/listener-operator
3534
----
3635

37-
Helm will deploy the operator in Kubernetes containers and apply the CRDs. You're now ready to expose services!
36+
Helm will deploy the operator in Kubernetes containers and apply the CRDs.
37+
You're now ready to expose services!
3838

3939
=== Microk8s
4040

41-
Microk8s uses a non-standard Kubelet state directory. Installing listener-operator on Microk8s requires the argument
41+
Microk8s uses a non-standard Kubelet state directory.
42+
Installing listener-operator on Microk8s requires the argument
4243
`--set kubeletDir=/var/snap/microk8s/common/var/lib/kubelet` to be added to the `helm install` command.
Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
1-
= `Listener`
1+
= Listener
2+
:description: The Listener exposes Pods based on ListenerClass rules, provides address info via Ingress_addresses, supports PVC mounting, and enables sticky scheduling.
23

3-
A `Listener` object exposes a set of ``Pod``s according to the rules of a xref:listenerclass.adoc[], but it also adds a couple of other
4-
features that are useful for the Stackable platform at large.
4+
A Listener object exposes a set of Pods according to the rules of a xref:listenerclass.adoc[], but it also adds a couple of other features that are useful for the Stackable data platform at large.
55

6-
== `ListenerClass`
6+
== ListenerClass
77

8-
The exact rules of pod exposure are dictated by the specified xref:listenerclass.adoc[], which allow a single `Listener` definition to be reused in different clusters, regardless of the Kubernetes distribution or cloud provider.
8+
The exact rules of pod exposure are dictated by the specified xref:listenerclass.adoc[], which allow a single Listener definition to be reused in different clusters, regardless of the Kubernetes distribution or cloud provider.
99

1010
== Address API
1111

12-
A `Listener` writes back all addresses that it can be reached on to `Listener.status.ingress_addresses`, which can then be used to generate discovery information. Contrary to Kubernetes' `Service`, this is done regardless of the type of service, and transparently also contains information about remapped ports.
12+
A Listener writes back all addresses that it can be reached on to `Listener.status.ingress_addresses`, which can then be used to generate discovery information.
13+
Contrary to Kubernetes' Service, this is done regardless of the type of service, and transparently also contains information about remapped ports.
1314

1415
== Address volume projection
1516

16-
`Listener` objects can be mounted into a `Pod` as a `PersistentVolumeClaim`, which contains information about how the `Pod` should request that external clients refer to it.
17+
Listener objects can be mounted into a Pod as a PersistentVolumeClaim (PVC), which contains information about how the Pod should request that external clients refer to it.
1718

1819
For example, if the volume is mounted to `/stackable/listener`, the primary address can be read from `/stackable/listener/default-address/address`, and the public `http` port number can be read from `/stackable/listener/default-address/ports/http`.
1920

2021
== Per-replica listeners
2122

22-
A `Listener` PVC can also specify a xref:listenerclass.adoc[] rather than a `Listener`, in which case a `Listener` object is created
23-
automatically. These PVCs can automatically be created for each replica using either ``StatefulSet``'s `volumeClaimTemplates` (for long-lived listeners that will
24-
be kept across replica restarts and upgrades) or ``Pod``'s `volumes[].ephemeral` (for temporary listeners that are deleted when their corresponding `Pod` is deleted).
23+
A Listener PVC can also specify a xref:listenerclass.adoc[] rather than a Listener, in which case a Listener object is created automatically.
24+
These PVCs can automatically be created for each replica using either StatefulSet's `volumeClaimTemplates` (for long-lived listeners that will be kept across replica restarts and upgrades) or Pod's `volumes[].ephemeral` (for temporary listeners that are deleted when their corresponding Pod is deleted).
2525

2626
== Sticky scheduling
2727

28-
When mounting a `Listener` PVC, it will be made "sticky" to that node if the xref:listenerclass.adoc[] uses a strategy that depends on the node
29-
that the workload is running on.
28+
When mounting a Listener PVC, it will be made "sticky" to that node if the xref:listenerclass.adoc[] uses a strategy that depends on the node that the workload is running on.
3029

31-
Keep in mind that this will only work correctly when using long-lived PVCs (such as via ``StatefulSet``'s `volumeClaimTemplates`). Ephemeral PVCs
32-
will be "reset" for every pod that is created, even if they refer to a long-lived `Listener` object.
30+
Keep in mind that this will only work correctly when using long-lived PVCs (such as via StatefulSet's `volumeClaimTemplates`).
31+
Ephemeral PVCs will be "reset" for every pod that is created, even if they refer to a long-lived Listener object.

docs/modules/listener-operator/pages/listenerclass.adoc

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
= ListenerClass
2+
:description: The ListenerClass defines listener types and exposure rules for Kubernetes Pods, supporting various service types like ClusterIP, NodePort, and LoadBalancer.
23

3-
A ListenerClass defines a category of listeners. For example, this could be "VPC-internal service", "internet-accessible service", or "K8s-internal service".
4+
A ListenerClass defines a category of listeners.
5+
For example, this could be "VPC-internal service", "internet-accessible service", or "K8s-internal service".
46
The ListenerClass then defines how this intent is realized in a given cluster.
57

68
For example, a Google Kubernetes Engine (GKE) cluster might want to expose all internet-facing services using a managed load balancer, since GKE nodes are
@@ -11,14 +13,17 @@ relatively short-lived and don't have stable addresses:
1113
include::example$listenerclass-public-gke.yaml[]
1214
----
1315

14-
On the other hand, an on-premise cluster might not have dedicated load balancer infrastructure at all, but instead use "pet" Nodes which may be expected to live for years. This might lead administrators of such systems to prefer exposing node ports directly instead:
16+
On the other hand, an on-premise cluster might not have dedicated load balancer infrastructure at all, but instead use "pet" Nodes which may be expected to live for years.
17+
This might lead administrators of such systems to prefer exposing node ports directly instead:
1518

1619
[source,yaml]
1720
----
1821
include::example$listenerclass-public-onprem.yaml[]
1922
----
2023

21-
Finally, it can be desirable to add additional annotations to a Service. For example, a user might want to only expose some services inside a given cloud vendor VPC. How exactly this is accomplished depends on the cloud provider in question, but for GKE this requires the annotation `networking.gke.io/load-balancer-type`:
24+
Finally, it can be desirable to add additional annotations to a Service.
25+
For example, a user might want to only expose some services inside a given cloud vendor VPC.
26+
How exactly this is accomplished depends on the cloud provider in question, but for GKE this requires the annotation `networking.gke.io/load-balancer-type`:
2227

2328
[source,yaml]
2429
----
@@ -27,26 +32,35 @@ include::example$listenerclass-internal-gke.yaml[]
2732

2833
== Service types
2934

30-
The service type is defined by `ListenerClass.spec.serviceType`. The following service types are currently supported by the Stackable Listener Operator:
35+
The service type is defined by `ListenerClass.spec.serviceType`.
36+
The following service types are currently supported by the Stackable Listener Operator:
3137

3238
[#servicetype-clusterip]
3339
=== `ClusterIP`
3440

35-
The Listener can be accessed from inside the Kubernetes cluster. The Listener addresses will direct clients to the cluster-internal address.
41+
The Listener can be accessed from inside the Kubernetes cluster.
42+
The Listener addresses will direct clients to the cluster-internal address.
3643

3744
[#servicetype-nodeport]
3845
=== `NodePort`
3946

40-
The Listener can be accessed from outside the Kubernetes cluster. This may include the internet, if the Nodes have public IP addresses. The Listener address will direct clients to connect to a randomly assigned port on the Nodes running the Pods.
47+
The Listener can be accessed from outside the Kubernetes cluster.
48+
This may include the internet, if the Nodes have public IP addresses.
49+
The Listener address will direct clients to connect to a randomly assigned port on the Nodes running the Pods.
4150

42-
Additionally, Pods bound to `NodePort` listeners will be xref:volume.adoc#pinning[pinned] to a specific Node. If this is undesirable, consider using xref:#servicetype-loadbalancer[] instead.
51+
Additionally, Pods bound to `NodePort` listeners will be xref:volume.adoc#pinning[pinned] to a specific Node.
52+
If this is undesirable, consider using xref:#servicetype-loadbalancer[] instead.
4353

4454
[#servicetype-loadbalancer]
4555
=== `LoadBalancer`
4656

47-
The Listener can be accessed from outside the Kubernetes cluster. This may include the internet, depending on the configuration of the Kubernetes cloud controller manager. A dedicated address will be allocated for the Listener.
57+
The Listener can be accessed from outside the Kubernetes cluster.
58+
This may include the internet, depending on the configuration of the Kubernetes cloud controller manager.
59+
A dedicated address will be allocated for the Listener.
4860

49-
Compared to xref:#servicetype-nodeport[], this service type allows Pods to be moved freely between Nodes. However, it requires https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer[a cloud controller manager that supports load balancers]. Additionally, many cloud providers charge for load-balanced traffic.
61+
Compared to xref:#servicetype-nodeport[], this service type allows Pods to be moved freely between Nodes.
62+
However, it requires https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer[a cloud controller manager that supports load balancers].
63+
Additionally, many cloud providers charge for load-balanced traffic.
5064

5165
== Default ListenerClasses
5266

@@ -58,13 +72,16 @@ The Stackable Data Platform assumes the existence of a few predefined ListenerCl
5872

5973
=== Presets
6074

61-
To help users get started, the Stackable Listener Operator ships different ListenerClass _presets_ for different environments. These are configured using the `preset` Helm value.
75+
To help users get started, the Stackable Listener Operator ships different ListenerClass _presets_ for different environments.
76+
These are configured using the `preset` Helm value.
6277

6378
[#preset-stable-nodes]
6479
==== `stable-nodes`
6580

66-
The `stable-nodes` preset installs ListenerClasses appropriate for Kubernetes clusters that use long-lived "pet nodes". This does _not_ require any particular networking setup, but makes pods that require
67-
stable addresses "sticky" to the Kubernetes Node that they were scheduled to. In addition, downstream operators may generate configurations that refer to particular nodes by name.
81+
The `stable-nodes` preset installs ListenerClasses appropriate for Kubernetes clusters that use long-lived "pet nodes".
82+
This does _not_ require any particular networking setup, but makes pods that require
83+
stable addresses "sticky" to the Kubernetes Node that they were scheduled to.
84+
In addition, downstream operators may generate configurations that refer to particular nodes by name.
6885

6986
The following ListenerClasses are installed:
7087

@@ -75,12 +92,15 @@ The following ListenerClasses are installed:
7592
[#preset-ephemeral-nodes]
7693
==== `ephemeral-nodes`
7794

78-
The `ephemeral-nodes` preset installs ListenerClasses appropriate for Kubernetes clusters that use short-lived "cattle nodes". This makes them appropriate for managed cloud environments, but requires that
95+
The `ephemeral-nodes` preset installs ListenerClasses appropriate for Kubernetes clusters that use short-lived "cattle nodes".
96+
This makes them appropriate for managed cloud environments, but requires that
7997
a LoadBalancer controller is present in the cluster.
8098

81-
Managed cloud environments should generally already provide an integrated LoadBalancer controller. For on-premise environments, an external implementation such as https://docs.tigera.io/calico/latest/networking/configuring/advertise-service-ips[Calico] or https://metallb.org/[MetalLB] can be used.
99+
Managed cloud environments should generally already provide an integrated LoadBalancer controller.
100+
For on-premise environments, an external implementation such as https://docs.tigera.io/calico/latest/networking/configuring/advertise-service-ips[Calico] or https://metallb.org/[MetalLB] can be used.
82101

83-
NOTE: K3s' built-in https://docs.k3s.io/networking#service-load-balancer[ServiceLB] (Klipper) is _not_ recommended, because it doesn't allow multiple Services to bind the same Port. If you use ServiceLB, use the xref:#preset-stable-nodes[] preset instead.
102+
NOTE: K3s' built-in https://docs.k3s.io/networking#service-load-balancer[ServiceLB] (Klipper) is _not_ recommended, because it doesn't allow multiple Services to bind the same Port.
103+
If you use ServiceLB, use the xref:#preset-stable-nodes[] preset instead.
84104

85105
The following ListenerClasses are installed:
86106

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
= Security
2+
:description: The Listener Operator requires root container privileges to create a Unix domain socket and write exposed address information to pod volumes.
23

34
== Container privileges
45

5-
The Listener Operator runs as a set of root containers. This is needed for two reasons:
6+
The Listener Operator runs as a set of root containers.
7+
This is needed for two reasons:
68

7-
1. We need to run as root to have permission to create the Unix domain socket hosting the Container Storage interface (CSI)
8-
driver. The Kubelet communicates with the CSI driver over this socket.
9-
2. We need to run as root to have permission to write information about externally exposed addresses into the pods' volume paths, as directed
10-
by the CSI.
9+
1. The root user is needed for the permission to create the Unix domain socket hosting the Container Storage interface (CSI) driver.
10+
The Kubelet communicates with the CSI driver over this socket.
11+
2. The root user is needed for the permission to write information about externally exposed addresses into the pods' volume paths, as directed by the CSI.
1112

1213
Running as root is currently a hard requirement.
Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
= Volume
2+
:description: The Listener Operator uses CSI PersistentVolumes to stabilize network addresses, inject pod metadata, and expose individual Pods with pinning.
23

3-
4-
The Listener Operator acts as a CSI `PersistentVolume`, which helps it to stabilize network addresses, inject pod metadata and expose individual pods.
4+
The Listener Operator acts as a CSI PersistentVolume, which helps it to stabilize network addresses, inject pod metadata and expose individual Pods.
55

66
[#pinning]
77
== Stable addresses
88

9-
Some xref:listenerclass.adoc[] strategies, such as `NodePort`, tie the public address to the Kubernetes node that the `Pod` is running on. When this address must be configured statically in clients
10-
(such as for HDFS NameNodes), then Kubernetes' default "floating" scheduling either requires all clients to be reconfigured every time something moves, or for all clients to proxy their traffic through
11-
a single static node, which then becomes a single point of failure (along with the node that the workload is running on).
9+
Some xref:listenerclass.adoc[] strategies, such as `NodePort`, tie the public address to the Kubernetes node that the Pod is running on.
10+
When this address must be configured statically in clients (such as for HDFS NameNodes), then Kubernetes' default "floating" scheduling either requires all clients to be reconfigured every time something moves, or for all clients to proxy their traffic through a single static node, which then becomes a single point of failure (along with the node that the workload is running on).
1211

13-
Mounting listeners into Pods as `PersistentVolume` allows the Listener Operator to pin these workloads to one node. Note that this only happens for xref:listenerclass.adoc[]es that actually benefit
14-
from pinning.
12+
Mounting listeners into Pods as PersistentVolume allows the Listener Operator to pin these workloads to one node.
13+
Note that this only happens for xref:listenerclass.adoc[]es that actually benefit from pinning.
1514

1615
== Pod metadata injection
1716

18-
Some services (such as Kafka) need to know their external address, so that they can advertise it to their own replica discovery mechanism. xref:listener.adoc[] volumes contain a file tree that exposes
19-
this information:
17+
Some services (such as Kafka) need to know their external address, so that they can advertize it to their own replica discovery mechanism.
18+
xref:listener.adoc[] volumes contain a file tree that exposes this information:
2019

2120
[square]
2221
* `default-address/`- A symlink to `addresses/{primary address}`
@@ -31,19 +30,25 @@ this information:
3130

3231
== Individual pod exposure
3332

34-
Sometimes each replica must be exposed individually, for example because clients need to access data on a specific shard. `PersistentVolumeClaim` templates can be used to provision this automatically.
33+
Sometimes each replica must be exposed individually, for example because clients need to access data on a specific shard.
34+
PersistentVolumeClaim templates can be used to provision this automatically.
3535

36-
=== `StatefulSet` `volumeClaimTemplates`
36+
=== StatefulSet `volumeClaimTemplates`
3737

38-
The `volumeClaimTemplates` allow volumes to be provisioned for each `StatefulSet` replica. These volumes are _persistent_, and will not be deleted when the `Pod` or `StatefulSet` is. This makes them useful for provisioning addresses that must be hard-coded into client configuration.
38+
The `volumeClaimTemplates` allow volumes to be provisioned for each StatefulSet replica.
39+
These volumes are _persistent_, and will not be deleted when the Pod or StatefulSet is.
40+
This makes them useful for provisioning addresses that must be hard-coded into client configuration.
3941

4042
=== Pod-scoped ephemeral volumes
4143

42-
`Pod.spec.volumes[].ephemeral` allows volumes to be provisioned for each `Pod`. These volumes are tied to the lifetime of the `Pod` and will be deleted along with it. This makes them useful for provisioning temporary addresses that will be discovered out of band (such as for HDFS DataNodes).
44+
`Pod.spec.volumes[].ephemeral` allows volumes to be provisioned for each Pod.
45+
These volumes are tied to the lifetime of the Pod and will be deleted along with it.
46+
This makes them useful for provisioning temporary addresses that will be discovered out of band (such as for HDFS DataNodes).
4347

4448
== Reference
4549

46-
All configuration must be specified as `annotations` on the `PersistentVolumeClaim`. The following attributes are currently supported:
50+
All configuration must be specified as `annotations` on the PersistentVolumeClaim.
51+
The following attributes are currently supported:
4752

4853
=== `listeners.stackable.tech/listener-name`
4954

@@ -55,5 +60,6 @@ Provisions metadata about an existing xref:listener.adoc[] that was created manu
5560

5661
*Required*: If `listeners.stackable.tech/listener-name` is not specified
5762

58-
Provisions a new xref:listener.adoc[] using the specified xref:listenerclass.adoc[]. The created xref:listener.adoc[] will expose
59-
all of the ``Pod``'s ports.
63+
Provisions a new xref:listener.adoc[] using the specified xref:listenerclass.adoc[].
64+
The created xref:listener.adoc[] will expose
65+
all of the Pod's ports.

0 commit comments

Comments
 (0)