Skip to content

Commit

Permalink
docs: Add bootstrap config docs to CAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
HomayoonAlimohammadi committed Jan 8, 2025
1 parent 66772d6 commit 4b769ea
Showing 1 changed file with 62 additions and 3 deletions.
65 changes: 62 additions & 3 deletions docs/src/capi/reference/configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ spec:
|------|------|-------------|---------|
| `path` | `string` | Where the file should be created | `""` |
| `content` | `string` | Content of the created file | `""` |
| `contentFrom` | `struct` | A reference to a secret containing the content of the file. Overwrites `content`. | `nil` |
| `permissions` | `string` | Permissions of the file to create, e.g. "0600" | `""` |
| `encoding` | `string` | Encoding of the file to create. One of `base64`, `gzip` and `gzip+base64` | `""` |
| `owner` | `string` | Owner of the file to create, e.g. "root:root" | `""` |

**Example Usage:**
- Using `content`:

Check failure on line 47 in docs/src/capi/reference/configs.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Lists should be surrounded by blank lines

docs/src/capi/reference/configs.md:47 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Using `content`:"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md032.md

Check failure on line 47 in docs/src/capi/reference/configs.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Lists should be surrounded by blank lines

docs/src/capi/reference/configs.md:47 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Using `content`:"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md032.md

Check failure on line 47 in docs/src/capi/reference/configs.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Lists should be surrounded by blank lines

docs/src/capi/reference/configs.md:47 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Using `content`:"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md032.md

Check failure on line 47 in docs/src/capi/reference/configs.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Lists should be surrounded by blank lines

docs/src/capi/reference/configs.md:47 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "- Using `content`:"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md032.md
```yaml

Check failure on line 48 in docs/src/capi/reference/configs.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Fenced code blocks should be surrounded by blank lines

docs/src/capi/reference/configs.md:48 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```yaml"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md031.md

Check failure on line 48 in docs/src/capi/reference/configs.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Fenced code blocks should be surrounded by blank lines

docs/src/capi/reference/configs.md:48 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```yaml"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md031.md
spec:
files:
Expand All @@ -52,6 +55,64 @@ spec:
permissions: "0500"
owner: root:root
```

Check failure on line 57 in docs/src/capi/reference/configs.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Fenced code blocks should be surrounded by blank lines

docs/src/capi/reference/configs.md:57 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md031.md

Check failure on line 57 in docs/src/capi/reference/configs.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Fenced code blocks should be surrounded by blank lines

docs/src/capi/reference/configs.md:57 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md031.md
- Using `contentFrom`:
```yaml
spec:
files:
path: "/path/to/my-file"
contentFrom:
secret:
# Name of the secret in the CK8sBootstrapConfig's namespace to use.
name: my-secret
# Key is the key in the secret's data map for this value.
key: my-key
permissions: "0500"
owner: root:root
```

### `bootstrapConfig`
**Type:** `struct`

**Required:** no

`bootstrapConfig` is configuration override to use upon bootstrapping nodes.
The structure of the `bootstrapConfig` is defined in the [Bootstrap configuration file reference].

**Fields:**

| Name | Type | Description | Default |
|------|------|-------------|---------|
| `content` | `string` | Content of the file. If this is set, `contentFrom` is ignored | `""` |
| `contentFrom` | `struct` | A reference to a secret containing the content of the file | `nil` |

**Example Usage:**
- Using `content`:
```yaml
spec:
bootstrapConfig:
content: |
cluster-config:
network:
enabled: true
dns:
enabled: true
cluster-domain: cluster.local
ingress:
enabled: true
load-balancer:
enabled: true
```
- Using `contentFrom`:
```yaml
spec:
bootstrapConfig:
contentFrom:
secret:
# Name of the secret in the CK8sBootstrapConfig's namespace to use.
name: my-secret
# Key is the key in the secret's data map for this value.
key: my-key
```

### `bootCommands`
**Type:** `[]string`
Expand Down Expand Up @@ -220,6 +281,4 @@ spec:
<!-- LINKS -->
[Install custom {{product}} on machines]: ../howto/custom-ck8s.md
[etcd best practices]: https://etcd.io/docs/v3.5/faq/#why-an-odd-number-of-cluster-members



[Bootstrap configuration file reference]: ../../snap/reference/bootstrap-config-reference.md

0 comments on commit 4b769ea

Please sign in to comment.