Skip to content

Commit dde30c9

Browse files
authored
docs: move build instructions from Antora into Markdown (#396)
1 parent e4ff0cd commit dde30c9

File tree

5 files changed

+28
-29
lines changed

5 files changed

+28
-29
lines changed

.readme/partials/main.md.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ You can install the operator using [stackablectl or helm](https://docs.stackable
1010

1111
Read on to get started with it, or see it in action in one of our [demos](https://stackable.tech/en/demos/).
1212

13+
## Building
14+
15+
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.
16+
1317
## Getting Started
1418

1519
You can follow this [tutorial](https://docs.stackable.tech/home/stable/{{operator_docs_slug}}/getting_started/first_steps) .
Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
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-
However, the Secret Operator is a https://github.com/container-storage-interface/spec/blob/master/spec.md[Container Storage Interface (CSI)] provider plugin
7+
However, the Secret Operator is a [Container Storage Interface (CSI)](https://github.com/container-storage-interface/spec/blob/master/spec.md) provider plugin
88
for the local Kubelet, which means that it should only be executed inside of a Kubernetes `Pod`. We currently support two ways of building the
9-
Secret Operator: `docker build` and https://nixos.org/[Nix]. `docker build` is currently our primary deployment target, and our official images are built
9+
Secret Operator: `docker build` and [Nix](https://nixos.org/). `docker build` is currently our primary deployment target, and our official images are built
1010
using it. However, Nix has much faster incremental build and deploy times, making it ideal for local development.
1111

12-
== Docker
12+
## Docker
1313

1414
To build and deploy to the active Kind cluster, run:
1515

16-
[source,console]
17-
----
16+
```shell
1817
$ echo Building with Docker
1918
# Ensure that all submodules are up-to-date
2019
$ git submodule update --recursive --init
@@ -31,14 +30,13 @@ $ docker run --rm "$REPO:$TAG" crd | kubectl apply -f-
3130
$ helm upgrade secret-operator deploy/helm/secret-operator \
3231
--install \
3332
--set-string "image.repository=$REPO,image.tag=$TAG"
34-
----
33+
```
3534

36-
== Nix
35+
## Nix
3736

3837
To build and deploy to the active Kind cluster, run the following Bash commands:
3938

40-
[source,console]
41-
----
39+
```shell
4240
$ echo Building with Nix
4341
# Ensure that all submodules are up-to-date
4442
$ git submodule update --recursive --init
@@ -59,39 +57,37 @@ $ kubectl apply -f result/crds.yaml
5957
$ helm upgrade secret-operator deploy/helm/secret-operator \
6058
--install \
6159
--set-string "image.repository=$(cat result/image-repo),image.tag=$(cat result/image-tag)"
62-
----
60+
```
6361

6462
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.
6563

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

68-
[source,console]
69-
----
66+
```shell
7067
$ nix run -f . tilt up
71-
----
68+
```
7269

73-
== K3d
70+
## K3d
7471

7572
Secret-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,
7673
but can be prodded into doing this by running `mount --make-rshared /` in each node container.
7774

7875
To do this for each running node K3d node, run the following script:
7976

80-
[source,console]
81-
----
77+
```shell
8278
for i in $(k3d node list -o json | jq -r .[].name); do
8379
docker exec -it $i mount --make-rshared /
8480
done
85-
----
81+
```
8682

87-
NOTE: This is _not_ persistent, and must be re-executed every time the cluster (or a node in it) is restarted.
83+
> [!IMPORTANT]
84+
> This is _not_ persistent, and must be re-executed every time the cluster (or a node in it) is restarted.
8885
89-
== Local builds
86+
## Local builds
9087

9188
Local builds (outside of the tools mentioned above) require the openssl, krb5, and Clang libraries, as well as
9289
pkg-config and protoc. On Ubuntu, this means running:
9390

94-
[source,console]
95-
----
91+
```shell
9692
$ sudo apt install libssl-dev libkrb5-dev libclang-dev pkg-config protobuf-compiler
97-
----
93+
```

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ You can install the operator using [stackablectl or helm](https://docs.stackable
2020

2121
Read on to get started with it, or see it in action in one of our [demos](https://stackable.tech/en/demos/).
2222

23+
## Building
24+
25+
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.
26+
2327
## Getting Started
2428

2529
You can follow this [tutorial](https://docs.stackable.tech/home/stable/secret-operator/getting_started/first_steps) .

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,3 @@ In some cases IBM cloud has the kubelet directory located at `/var/data/kubelet/
5656
`failed to publish volume error=status: Unavailable, message: "failed to create secret parent dir /var/data/kubelet/pods/<POD_ID>/volumes/kubernetes.io~csi/pvc-<PVC_ID>/mount: No such file or directory (os error 2)"`
5757

5858
In case you are encountering the mentioned error (or secret-operator does not work on your IBM cloud at all), you need to add the argument `--set kubeletDir=/var/data/kubelet` to the `helm install` command.
59-
60-
== Building the operator from source
61-
62-
See xref:building.adoc[] for more information.

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// the nav list should contain the module, because it will/might
22
// be included from a different module
3-
* xref:secret-operator:building.adoc[]
43
* xref:secret-operator:installation.adoc[]
54
* xref:secret-operator:usage.adoc[]
65
* Concepts

0 commit comments

Comments
 (0)