Skip to content

Commit 6457805

Browse files
fhennigrazvan
andauthored
Add descriptions (#279)
* Add descriptions * Update installation instructions * Add newline to end of file * Update docs/modules/commons-operator/pages/index.adoc Co-authored-by: Razvan-Daniel Mihai <[email protected]> * Update docs/modules/commons-operator/pages/index.adoc Co-authored-by: Razvan-Daniel Mihai <[email protected]> * Update docs/modules/commons-operator/pages/index.adoc Co-authored-by: Razvan-Daniel Mihai <[email protected]> * Update docs/modules/commons-operator/pages/pod-enrichment.adoc Co-authored-by: Razvan-Daniel Mihai <[email protected]> * Update docs/modules/commons-operator/pages/restarter.adoc Co-authored-by: Razvan-Daniel Mihai <[email protected]> * Update docs/modules/commons-operator/pages/installation.adoc Co-authored-by: Razvan-Daniel Mihai <[email protected]> --------- Co-authored-by: Razvan-Daniel Mihai <[email protected]>
1 parent 2ed9903 commit 6457805

File tree

6 files changed

+78
-56
lines changed

6 files changed

+78
-56
lines changed
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
= Stackable Commons Operator
2+
:description: Learn about shared objects (AuthenticationClass, S3Bucket and S3Connection) and shared functionality (Pod enrichting, restarting) on the Stackable Data Platform.
23
:github: https://github.com/stackabletech/commons-operator/
34
:crd: {crd-docs-base-url}/commons-operator/{crd-docs-version}/
45

56
[.link-bar]
67
* {github}[GitHub {external-link-icon}^]
78
* {crd}[CRD documentation {external-link-icon}^]
89

9-
This is an operator for Kubernetes that provides and manages common objects of the Stackable Data Platform.
10-
Have a look at the CRD documentation linked above to see the the custom resources that this operator deploys.
10+
Unlike most other operators on the Stackable Data Platform, the Stackable commons operator does not manage any particular Stacklet, but rather provides shared functionality and resource definitions that are used by the other operators.
11+
12+
== Shared resources
13+
14+
The _commons_ Kubernetes operator for the Stackable Data Platform provides and manages resources that are not tied to any particular data product, but usually shared among multiple products.
15+
These are the _AuthenticationClass_ for configuring authentication mechanisms, and the _S3Bucket_ and _S3Connection_ for configuring S3 object storage.
16+
Usually all tools in a data platform that require authentication will be configured to use the same authentication mechanism, so the AuthenticationClass provides a single configuration point for authentication methods, which can then be referenced in multiple data products.
17+
Likewise, the S3 related objects provide single configuration points for S3 storage, which is then referenced in multiple products.
18+
19+
Because these objects are used throughout the whole platform, the documentation is also mostly found at the platform level.
20+
Read the xref:concepts:authentication.adoc[authentication] concepts page to learn about the AuthenticationClass and learn about S3 on the xref:concepts:s3.adoc[S3 resources] page.
21+
You can also find the full CRD refererence documentation for all objects linked above.
22+
23+
== Shared functionality
24+
25+
The commons operator implements functionality that is shared by all other Stackable operators.
26+
For example, it xref:pod-enrichment.adoc[adds additional information to Pods] which would otherwise have to be inferred and takes care of xref:restarter.adoc[restarting] Pods when necessary, for example to reload configuration settings in products that don't support hot reloading.
Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
= Installation
2-
3-
There are two ways to run the Stackable Commons Operator:
4-
5-
1. Helm managed Docker container deployment on Kubernetes
6-
7-
2. Build from source
2+
:description: Install the Stackable Commons Operator with either stackablectl or Helm.
83

94
== Prerequisites
105

@@ -19,35 +14,51 @@ Resource sizing depends on cluster type(s), usage and scope, but as a starting p
1914
* 0.2 cores (e.g. i5 or similar)
2015
* 256MB RAM
2116

22-
== Helm
23-
Helm allows you to download and deploy Stackable operators on Kubernetes and is by far the easiest installation method. First ensure that you have installed the Stackable Operators Helm repository:
17+
== Installation
2418

25-
[source,console]
26-
----
27-
$ helm repo add stackable https://repo.stackable.tech/repository/helm-stable/
28-
----
19+
There are two ways to deploy the Commons operator into your Kubernetes cluster.
2920

30-
Then install the Stackable Commons Operator
21+
. Using xref:management:stackablectl:index.adoc[].
22+
. Using Helm.
23+
24+
[tabs]
25+
====
26+
stackablectl::
27+
+
28+
--
29+
`stackablectl` is the recommended command line tool to install and manage with Stackable operators.
30+
Follow the xref:management:stackablectl:installation.adoc[installation steps] for your platform.
31+
32+
After you have installed `stackablectl`, use it to install the Commons Operator:
3133
3234
[source,console]
33-
----
34-
$ helm install commons-operator stackable/commons-operator
35-
----
35+
$ stackablectl operator install commons=24.7.0
3636
37-
Helm will deploy the operator in Kubernetes and apply the CRDs.
37+
The tool will show:
38+
39+
[source]
40+
Installed commons=24.7.0 operator
3841
39-
== Building the operator from source
42+
TIP: Consult the xref:management:stackablectl:quickstart.adoc[] to learn more about how to use `stackablectl`. For
43+
example, you can use the `--cluster kind` flag to create a Kubernetes cluster with link:https://kind.sigs.k8s.io/[kind].
44+
--
4045
41-
After cloning the commons-operator repo you can use the following command to apply the CRDs:
46+
Helm::
47+
+
48+
--
49+
Helm allows you to download and deploy Stackable operators on Kubernetes.
50+
First ensure that you have installed the Stackable Operators Helm repository:
4251
4352
[source,console]
44-
----
45-
$ cargo run -- crd | kubectl apply -f -
46-
----
53+
$ helm repo add stackable \
54+
https://repo.stackable.tech/repository/helm-stable/
4755
48-
Use the following command to run the operator:
56+
Then install the Stackable Commons Operator
4957
5058
[source,console]
51-
----
52-
$ cargo run -- run
53-
----
59+
$ helm install --wait commons-operator \
60+
stackable-stable/commons-operator --version 24.7.0
61+
62+
Helm will deploy the operator in Kubernetes and apply the CRDs.
63+
--
64+
====
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
= Pod Enricher
1+
= Pod enricher
2+
:description: Use Labels to instruct the Stackable Commons Operator to enrich Pods with Kubernetes node addresses
23

3-
The Stackable Commons Operator automatically adds commonly used information to `Pod` objects, which
4-
would otherwise have to be inferred by traversing the Kubernetes object graph.
4+
The Stackable Commons Operator automatically adds commonly used information to Pod objects, which would otherwise have to be inferred by traversing the Kubernetes object graph.
55

66
== Usage
77

8-
The pod enricher is only enabled for `Pod` objects that set the label `enrichment.stackable.tech/enabled` to `true`.
8+
To enable the pod enricher for a Pod, set the label `enrichment.stackable.tech/enabled` to `true`.
99

10-
== Node Address
10+
== Which information is added to the Pod?
1111

1212
Annotation:: `enrichment.stackable.tech/node-address`
1313

14-
The hostname or IP address of the `Node` that the `Pod` is scheduled to run on.
15-
Compared to `Pod.status.nodeIP`, this can also (but doesn't have to) be a hostname, and prefers
16-
externally routable addresses.
14+
The hostname or IP address of the Node that the Pod is scheduled to run on.
15+
Compared to `Pod.status.nodeIP`, this can also (but doesn't have to) be a hostname, and prefers externally routable addresses.
1716

18-
This is intended to be used for components that need to register an accessible address (such as Kafka brokers,
19-
or HDFS DataNodes).
17+
This is intended to be used for components that need to register an accessible address (such as Kafka brokers, or HDFS DataNodes).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
= CRD Reference
1+
= CRD reference
22

33
Find all CRD reference for the Stackable Commons Operator at: {crd-docs-base-url}/commons-operator/{crd-docs-version}.
Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
= Restarter
2+
:description: Automatically restart Pods or StatefulSets using Stackable Commons Operator based on expiration dates or stale configurations.
23

3-
The Stackable Commons Operator can automatically restart `Pod` objects based on certain criteria. This can be applied to
4-
either the `Pod` or certain controller objects (such as `StatefulSet`).
4+
The Stackable Commons Operator can automatically restart Pod objects based on certain criteria.
5+
This can be applied to either the Pod or certain controller objects (such as StatefulSet).
56

6-
== `Pod`
7+
== Pod
78

8-
Pods are evicted when any of their restart criteria (listed below) expire, with the expectation that their owning controller
9-
is then responsible for restarting them.
9+
Pods are evicted when any of their restart criteria (listed below) expire, with the expectation that their owning controller is then responsible for restarting them.
1010

11-
Because they are evicted rather than deleted, this process should respect `PodDisruptionBudget` constraints, allowing users
12-
to ensure that clusters are restarted gracefully.
11+
Because they are evicted rather than deleted, this process should respect PodDisruptionBudget constraints, allowing users to ensure that clusters are restarted gracefully.
1312

1413
=== Expiration date
1514

1615
Annotation:: `restarter.stackable.tech/expires-at.\{tag\}`
1716

18-
Pods can be configured to expire at a certain point in time. In this case, the `Pod` should have the annotation
19-
`restarter.stackable.tech/expires-at.\{tag\}` set to a datetime formatted according to RFC 3339 (such as
20-
`"2022-04-21T13:24:15.225774724+00:00"`).
17+
Pods can be configured to expire at a certain point in time.
18+
In this case, the Pod should have the annotation `restarter.stackable.tech/expires-at.\{tag\}` set to a datetime formatted according to RFC 3339 (such as `"2022-04-21T13:24:15.225774724+00:00"`).
2119
`\{tag\}` should be a deterministic but unique ID identifying the reason for the expiry.
2220

23-
Multiple `expires-at` annotations can be set on the same `Pod`, in which case the *earliest* expiration datetime
24-
takes precedence.
21+
Multiple `expires-at` annotations can be set on the same Pod, in which case the *earliest* expiration datetime takes precedence.
2522

26-
== `StatefulSet`
23+
== StatefulSet
2724

2825
StatefulSets are rolling-restarted when any of their restart criteria (listed below) expire.
2926

3027
=== Stale configuration
3128

3229
Label:: `restarter.stackable.tech/enabled`
3330

34-
StatefulSets can be configured to restart when any referenced configuration object (`ConfigMap` or `Secret`) changes.
35-
To enable this, set the `restarter.stackable.tech/enabled` label on the `StatefulSet` to `true`.
31+
The operator can restart StatefulSets when any referenced configuration object (ConfigMap or Secret) changes.
32+
To enable this, set the `restarter.stackable.tech/enabled` label on the StatefulSet to `true`.

docs/modules/commons-operator/pages/usage.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ The commons-operator is used for multiple purposes:
77
|Concept|Purpose
88

99
|xref:restarter.adoc[]
10-
|A controller that watches `Pod` objects and their controllers and restarts them when required
10+
|A controller that watches Pod objects and their controllers and restarts them when required.
1111

1212
|xref:pod-enrichment.adoc[]
13-
|A controller that adds commonly used information to `Pod` objects
13+
|A controller that adds commonly used information to Pod objects.
1414
|===

0 commit comments

Comments
 (0)