Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ If this is your first time, please make sure to review CONTRIBUTING.MD.

Add one of the following kinds:
/kind bug
/kind chore
/kind cleanup
/kind documentation
/kind feature
Expand Down
20 changes: 19 additions & 1 deletion docs/content/faq.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Frequently Asked Questions

TBD
## Can I add/update objects to already initialized clusters?

No. Once the initialization is completed (and the initializer removed from the
`LogicalCluster`), the init-agent has no way to access the newly created cluster
anymore, so it also cannot reconcile after that point.

Reconciling behaviour is planned for future releases, but the exact approach is
not yet decided.

## Can `InitTargets` generate random data, like passwords?

Yes! `InitTemplates` can make use of the entire [sprig][sprig] library, which
includes functions to generate passwords, UUIDs etc.

However, the init-agent has no memory, so if one initialization round fails
and then agent re-tries, it will re-render all templates and so generate new,
different random data.

[sprig]: https://masterminds.github.io/sprig/
41 changes: 41 additions & 0 deletions docs/content/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,45 @@ spec:

## Running the Agent

For regular use, the init-agent should be installed using its [Helm chart][helmchart], but for
debugging purposes it's also possible to run the agent locally.

### Helm Chart

To use the Helm chart, first add the repository to your local system:

```bash
helm repo add kcp https://kcp-dev.github.io/helm-charts
helm repo update
```

At the very least you will have to provide

* a kubeconfig to access kcp
* the name of the workspace/cluster where the `InitTargets` and other resources
reside

Put both in your `myvalues.yaml` (check the `values.yaml` for more examples).

You can now install the chart:

```bash
helm upgrade --install my-init-agent kcp/init-agent --values ./myvalues.yaml
```

### Locally

For development purposes you can run the agent directly. You can build your own from
source or download one of the [ready-made releases][releases]. To run it, you need
to provide the kcp kubeconfig and the workspace/cluster where the `InitTargets`
reside:

```bash
./init-agent \
--kubeconfig /path/to/kcp.kubeconfig \
--config-workspace root:my-org:init-agent
```

[kcp]: https://kcp.io
[helmchart]: https://github.com/kcp-dev/helm-charts/tree/main/charts/init-agent
[releases]: https://github.com/kcp-dev/init-agent/releases