Skip to content

Commit 9d53b23

Browse files
authored
docs: update docs + docs CI (#505)
1 parent 15e6925 commit 9d53b23

15 files changed

+98
-54
lines changed

.github/workflows/docs.yaml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,15 @@ on:
33
push:
44
branches:
55
- main
6+
pull_request:
7+
branches:
8+
- main
9+
paths:
10+
- "docs/**"
11+
612
permissions:
713
contents: write
14+
815
jobs:
916
deploy:
1017
runs-on: ubuntu-latest
@@ -15,9 +22,22 @@ jobs:
1522
python-version: 3.x
1623
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
1724
with:
18-
key: mkdocs-material-${{ github.sha }}
25+
key: mkdocs-material-${{ github.ref }}
1926
path: .cache
2027
restore-keys: |
2128
mkdocs-material-
29+
2230
- run: pip install mkdocs-material
23-
- run: mkdocs gh-deploy --force
31+
32+
- name: Lint Markdown files
33+
uses: DavidAnson/markdownlint-cli2-action@v19
34+
with:
35+
config: 'docs/.markdownlint.jsonc'
36+
globs: 'docs/**/*.md'
37+
38+
- name: Build pages
39+
run: mkdocs build --strict
40+
41+
- name: Deploy pages
42+
run: mkdocs gh-deploy --strict --force
43+
if: github.ref == 'refs/heads/main'

docs/.markdownlint.jsonc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"line-length": false,
3+
"no-inline-html": false,
4+
"no-alt-text": false,
5+
"no-duplicate-heading": false,
6+
"ul-indent": false
7+
}

docs/contributing.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,25 @@ Follow these steps to install a minimal working configuration of Burrito on a Ki
5656
- A datastore running with mock storage (in-memory)
5757
- A `TerraformRepository` and an associated `TerraformLayer` resource in the `burrito-project` namespace, pointing to the [padok-team/burrito-examples](https://github.com/padok-team/burrito-examples) repository
5858

59-
*Before starting, check that your local Kind cluster is running and that your context is set to target this cluster*
59+
*Before starting, check that your local Kind cluster is running and that your context is set to target this cluster.*
6060

6161
1. **Install cert-manager on your cluster:**
62-
```bash
63-
helm repo add bitnami https://charts.bitnami.com/bitnami
64-
helm upgrade --install -n cert-manager --create-namespace cert-manager bitnami/cert-manager --set installCRDs=true
65-
```
62+
63+
```bash
64+
helm repo add bitnami https://charts.bitnami.com/bitnami
65+
helm upgrade --install -n cert-manager --create-namespace cert-manager bitnami/cert-manager --set installCRDs=true
66+
```
67+
6668
2. **Fork and clone this repository.**
6769

6870
3. **Run the following command to build a local image of Burrito, load it into your Kind cluster, and install Burrito with development Helm values:**
69-
71+
7072
```bash
7173
make upgrade-dev-kind
7274
```
7375

7476
4. **Check that Burrito is running in the `burrito-system` namespace:**
77+
7578
```bash
7679
kubectl get pods -n burrito-system
7780
```
@@ -134,7 +137,7 @@ helm upgrade --install -n cert-manager --create-namespace cert-manager bitnami/c
134137

135138
The output should be similar to:
136139

137-
```
140+
```text
138141
NAME READY STATUS RESTARTS AGE
139142
my-layer-apply-gxjhd 0/1 Completed 0 2m36s
140143
```
@@ -157,7 +160,7 @@ Check the [Makefile](https://github.com/padok-team/burrito/blob/main/Makefile) f
157160

158161
### Advanced Settings
159162

160-
**Configure a GitHub Token for TENV**
163+
**Configure a GitHub Token for TENV:**
161164

162165
It is strongly recommended to create a GitHub token with no specific rights to bypass the GitHub API rate limiting. Append the following configuration to your development `TerraformRepository` resources:
163166

docs/getting-started.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Copy and modify the [default values](https://github.com/padok-team/burrito/blob/
1818
Make sure to configure a tenant by updating the `tenant` field in the `values.yaml` file. The associated namespace will be created automatically and used to deploy Burrito resources in step 3.
1919

2020
For example, here is a default `values.yaml` file:
21+
2122
```yaml
2223
config:
2324
datastore:
@@ -47,14 +48,18 @@ This will create a new namespace, `burrito-system`, where Burrito services will
4748

4849
Create a Kubernetes `Secret` to reference the necessary credentials to clone your IaC repository (GitHub or GitLab)
4950

51+
<!-- markdownlint-disable MD046 -->
5052
!!! info
5153
Supported authentication methods are:
54+
5255
- Username and password
5356
- SSH private key
5457
- GitHub App
5558
- GitHub API token
5659
- GitLab API token
57-
More information on how to create a secret can be found in the [Secrets](./secrets/index.md) section.
60+
61+
More information on how to create a secret can be found in the [Git Authentication](./operator-manual/git-authentication.md) section.
62+
<!-- markdownlint-enable MD046 -->
5863

5964
```yaml
6065
kind: Secret
@@ -116,4 +121,3 @@ The controller will create a runner pod in your tenant namespace to synchronize
116121

117122
- For detailed guides on how to use Burrito, see the [Guides](./guides/index.md) section.
118123
- To learn more about advanced configuration and features, see the [Operator Manual](./operator-manual/index.md) section.
119-

docs/guides/iac-drift-detection.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ kubectl get pods -n burrito-system
4848
```
4949

5050
Output:
51-
```
51+
52+
```text
5253
NAME READY STATUS RESTARTS AGE
5354
burrito-controllers-6945797c5d-kjfl2 1/1 Running 0 2m00s
5455
burrito-datastore-94d999f54-kbg9z 1/1 Running 0 2m00s
@@ -82,7 +83,7 @@ spec:
8283
enabled: true
8384
```
8485

85-
Create a `TerraformLayer` resource in the `burrito-system` namespace, referencing the `TerraformRepository` you just created. For now, the `autoApply` is set to false, so the layer will only plan the Terraform code and not apply it.
86+
Create a `TerraformLayer` resource in the `burrito-system` namespace, referencing the `TerraformRepository` you just created. For now, the `autoApply` is set to false, so the layer will only plan the Terraform code and not apply it.
8687

8788
```bash
8889
kubectl apply -f https://raw.githubusercontent.com/padok-team/burrito/main/docs/examples/terraform-layer.yaml
@@ -173,4 +174,4 @@ You have successfully set up Burrito on a local cluster and planned your Terrafo
173174

174175
## Next steps
175176

176-
- Learn how to [configure a PR/MR workflow](../pr-mr-workflow.md)
177+
- Learn how to [configure a PR/MR workflow](../operator-manual/pr-mr-workflow.md)

docs/guides/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Getting started
22

3-
Follow the 3 guides below to understand how to use Burrito:
3+
Follow the 3 guides below to understand how to use Burrito:
44

55
- [IaC Drift detection](./iac-drift-detection.md): Quickly set up Burrito and start monitoring Terraform state drift.
66
- [PR/MR plan/apply Workflow](./pr-mr-workflow.md): Configure Burrito to automatically plan and apply Terraform code on PR/MR.
7-
- [UI Overview](./ui-overview.md): Learn how to navigate the Burrito UI.
7+
- [UI Overview](./ui.md): Learn how to navigate the Burrito UI.

docs/guides/pr-mr-workflow.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Now let's configure the GitHub webhook. Expose the `burrito-server` kubernetes s
3737
Configure a webhook in your GitHub repository to point to the exposed `burrito-server` service. **Make sure to specify the `/api/webhook` path in the target url.** The webhook should be triggered on `push` and `pull_request` events. Reference your webhook secret in the secret associated to your repository, in the `webhookSecret` key.
3838

3939
Your `TerraformRepository` resource and secret should look like this:
40+
4041
```yaml
4142
apiVersion: config.terraform.padok.cloud/v1alpha1
4243
kind: TerraformRepository
@@ -62,7 +63,7 @@ stringData:
6263
-----BEGIN RSA PRIVATE KEY-----
6364
my-private-key
6465
-----END RSA PRIVATE KEY-----
65-
webhookSecret: "my-webhook-secret"
66+
webhookSecret: "my-webhook-secret"
6667
```
6768

6869
### Experiment with the PR/MR workflow

docs/index.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ This is the home of the Burrito documentation. Here you will find all the inform
55
- [Overview](./overview.md) helps you understand what Burrito is all about.
66
- [Getting Started](./getting-started.md) is a step-by-step guide to help you get started with Burrito.
77
- [Guides](./guides/index.md) provides detailed tutorials to help you understand how to use Burrito.
8-
- [Operator Manual](./operator-manual/) is a detailed guide to help you understand how to install and configure Burrito.
9-
- [User Guide](./user-guide/) is a detailed guide to help you understand how to setup and use Burrito resources.
8+
- [Operator Manual](./operator-manual/index.md) is a detailed guide to help you understand how to install and configure Burrito.
9+
- [User Guide](./user-guide/index.md) is a detailed guide to help you understand how to setup and use Burrito resources.
1010
- [Contributing](./contributing.md) provides information on how to contribute to the Burrito project.
1111
<!-- - [Reference](./reference/) provides detailed information about the Burrito CRDs and their specifications.
1212
- [FAQ](./faq.md) answers some of the most frequently asked questions about Burrito. -->
13-

docs/installation/with-helm.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ helm show values oci://ghcr.io/padok-team/charts/burrito
3131

3232
The [source code](https://github.com/padok-team/burrito/tree/main/deploy/charts/burrito) and [values file](https://github.com/padok-team/burrito/blob/main/deploy/charts/burrito/values.yaml) of the chart is available on [burrito GitHub repository](https://github.com/padok-team/burrito).
3333

34-
3534
Here is an example of a simple burrito Helm values file that you can use to bootstrap your installation:
3635

3736
```yaml

docs/installation/with-static-manifests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
## Install burrito
99

1010
!!! info
11-
This will install a mono-tenant version of burrito. See the [Helm installation method](./with-helm.md) for a [multi-tenant-architecture](../multi-tenant-architecture.md).
11+
This will install a mono-tenant version of burrito. See the [Helm installation method](./with-helm.md) for a [multi-tenant-architecture](..//operator-manual/multi-tenant-architecture.md).
1212

1313
```bash
1414
kubectl create namespace burrito

0 commit comments

Comments
 (0)