Skip to content

Commit 1cba14d

Browse files
authored
Merge pull request #1 from kcp-dev/docs
Finish documentation
2 parents 9489c01 + 02e7b38 commit 1cba14d

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ If this is your first time, please make sure to review CONTRIBUTING.MD.
1313
1414
Add one of the following kinds:
1515
/kind bug
16+
/kind chore
1617
/kind cleanup
1718
/kind documentation
1819
/kind feature

docs/content/faq.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
# Frequently Asked Questions
22

3-
TBD
3+
## Can I add/update objects to already initialized clusters?
4+
5+
No. Once the initialization is completed (and the initializer removed from the
6+
`LogicalCluster`), the init-agent has no way to access the newly created cluster
7+
anymore, so it also cannot reconcile after that point.
8+
9+
Reconciling behaviour is planned for future releases, but the exact approach is
10+
not yet decided.
11+
12+
## Can `InitTargets` generate random data, like passwords?
13+
14+
Yes! `InitTemplates` can make use of the entire [sprig][sprig] library, which
15+
includes functions to generate passwords, UUIDs etc.
16+
17+
However, the init-agent has no memory, so if one initialization round fails
18+
and then agent re-tries, it will re-render all templates and so generate new,
19+
different random data.
20+
21+
[sprig]: https://masterminds.github.io/sprig/

docs/content/setup.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,45 @@ spec:
152152

153153
## Running the Agent
154154

155+
For regular use, the init-agent should be installed using its [Helm chart][helmchart], but for
156+
debugging purposes it's also possible to run the agent locally.
157+
158+
### Helm Chart
159+
160+
To use the Helm chart, first add the repository to your local system:
161+
162+
```bash
163+
helm repo add kcp https://kcp-dev.github.io/helm-charts
164+
helm repo update
165+
```
166+
167+
At the very least you will have to provide
168+
169+
* a kubeconfig to access kcp
170+
* the name of the workspace/cluster where the `InitTargets` and other resources
171+
reside
172+
173+
Put both in your `myvalues.yaml` (check the `values.yaml` for more examples).
174+
175+
You can now install the chart:
176+
177+
```bash
178+
helm upgrade --install my-init-agent kcp/init-agent --values ./myvalues.yaml
179+
```
180+
181+
### Locally
182+
183+
For development purposes you can run the agent directly. You can build your own from
184+
source or download one of the [ready-made releases][releases]. To run it, you need
185+
to provide the kcp kubeconfig and the workspace/cluster where the `InitTargets`
186+
reside:
187+
188+
```bash
189+
./init-agent \
190+
--kubeconfig /path/to/kcp.kubeconfig \
191+
--config-workspace root:my-org:init-agent
192+
```
193+
155194
[kcp]: https://kcp.io
195+
[helmchart]: https://github.com/kcp-dev/helm-charts/tree/main/charts/init-agent
196+
[releases]: https://github.com/kcp-dev/init-agent/releases

0 commit comments

Comments
 (0)