Skip to content

Commit 71aba4b

Browse files
authored
docs: move build instructions from Antora into Markdown (#173)
* docs: move build instructions from Antora into Markdown * fix admonition * fix admonition * Reference build instructions in README
1 parent dea7bff commit 71aba4b

File tree

4 files changed

+29
-25
lines changed

4 files changed

+29
-25
lines changed

.readme/partials/main.md.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ A CSI provider intended to provide an abstract way to expose a single Pod to the
88

99
You can install the operator using [stackablectl or helm](https://docs.stackable.tech/home/stable/{{operator_docs_slug}}/getting_started/installation).
1010

11+
## Building
12+
13+
As a user you do not need to build the operator yourself, but for development purposes you can read the [build instructions](./BUILDING.md) to learn how to build the operator.
14+
1115
{% filter trim %}
1216
{%- include "partials/borrowed/documentation.md.j2" -%}
1317
{% endfilter %}
Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
1-
= Building the Operator
1+
# Building the operator
22

33
This operator is written in Rust.
44

55
It is developed against the latest stable Rust release, and we currently don't support any older versions.
66

7-
The Listener Operator is a https://github.com/container-storage-interface/spec/blob/master/spec.md[Container Storage Interface (CSI)] provider plugin
8-
for the local Kubelet, which means that it should only be executed inside a Kubernetes `Pod`. Currently, the following ways are supported to build the Listener Operator:
7+
The Listener operator is a [Container Storage Interface (CSI)](https://github.com/container-storage-interface/spec/blob/master/spec.md) provider plugin
8+
for the local Kubelet, which means that it should only be executed inside a Kubernetes Pod. Currently, the following ways are supported to build the Listener operator:
99

1010
* `docker build`
11-
* https://nixos.org/[Nix]
11+
* [Nix](https://nixos.org/)
1212

1313
The `docker build` command is currently the primary deployment target, and the official images are built
1414
using it. However, Nix has much faster incremental build and deployment times, making it ideal for local development.
1515

16-
== Docker
16+
## Docker
1717

1818
To build and deploy to the active Kind cluster, run:
1919

20-
[source,console]
21-
----
20+
```shell
2221
$ echo Building with Docker
2322
# Ensure that all submodules are up-to-date
2423
$ git submodule update --recursive --init
@@ -33,16 +32,15 @@ $ kind load docker-image "$REPO:$TAG"
3332
$ docker run --rm "$REPO:$TAG" crd | kubectl apply -f-
3433
# Deploy
3534
$ helm upgrade listener-operator deploy/helm/listener-operator \
36-
--install \
37-
--set-string "image.repository=$REPO,image.tag=$TAG"
38-
----
35+
--install \
36+
--set-string "image.repository=$REPO,image.tag=$TAG"
37+
```
3938

40-
== Nix
39+
## Nix
4140

4241
To build and deploy to the active Kind cluster, run the following Bash commands:
4342

44-
[source,console]
45-
----
43+
```shell
4644
$ echo Building with Nix
4745
# Ensure that all submodules are up-to-date
4846
$ git submodule update --recursive --init
@@ -67,29 +65,28 @@ $ kubectl apply -f result/crds.yaml
6765
$ helm upgrade listener-operator deploy/helm/listener-operator \
6866
--install \
6967
--set-string "image.repository=$(cat result/image-repo),image.tag=$(cat result/image-tag)"
70-
----
68+
```
7169

7270
You may need to add `extra-experimental-features = nix-command` to `/etc/nix/nix.conf`, or add `--experimental-features nix-command` to the Nix commands.
7371

74-
You can also use https://tilt.dev/[Tilt] to automatically rebuild and redeploy when files are changed:
72+
You can also use [Tilt](https://tilt.dev/) to automatically rebuild and redeploy when files are changed:
7573

76-
[source,console]
77-
----
74+
```shell
7875
$ nix run -f . tilt up
79-
----
76+
```
8077

81-
== K3d
78+
## K3d
8279

83-
The Listener Operator, as with most CSI providers, requires the Kubernetes node's root folder to be mounted as `rshared`. K3d does not do this by default,
80+
The Listener operator, as with most CSI providers, requires the Kubernetes node's root folder to be mounted as `rshared`. K3d does not do this by default,
8481
but can be prodded into doing this by running `mount --make-rshared /` in each node container.
8582

8683
To do this for each running K3d node, run the following script:
8784

88-
[source,console]
89-
----
85+
```shell
9086
for i in $(k3d node list -o json | jq -r .[].name); do
9187
docker exec -it $i mount --make-rshared /
9288
done
93-
----
89+
```
9490

95-
NOTE: This is _not_ persistent, and must be re-executed every time the cluster (or a node in it) is restarted.
91+
> [!IMPORTANT]
92+
> This is _not_ persistent, and must be re-executed every time the cluster (or a node in it) is restarted.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ It is part of the Stackable Data Platform, a curated selection of the best open
1818

1919
You can install the operator using [stackablectl or helm](https://docs.stackable.tech/home/stable/listener-operator/getting_started/installation).
2020

21+
## Building
22+
23+
As a user you do not need to build the operator yourself, but for development purposes you can read the [build instructions](./BUILDING.md) to learn how to build the operator.
24+
2125
## Documentation
2226

2327
The stable documentation for this operator can be found [here](https://docs.stackable.tech/home/stable/listener-operator).

docs/modules/listener-operator/partials/nav.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
* xref:listener-operator:building.adoc[]
21
* xref:listener-operator:installation.adoc[]
32
* xref:listener-operator:usage.adoc[]
43
* Concepts

0 commit comments

Comments
 (0)