Skip to content

Commit a55727b

Browse files
committed
feat: Add templating guide and update usage documentation; fix variable casing in kustomization files
1 parent 64d0371 commit a55727b

File tree

4 files changed

+54
-18
lines changed

4 files changed

+54
-18
lines changed

docs/Templating.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Templating
2+
3+
Currently the templates are helm charts. They can be rendered using `helm template` and also `pkg.go.dev/text/template`.
4+
5+
To render a template you can use helm, but you can also use our bootstrapper cli.
6+
7+
To use helm first create a values.yaml:
8+
9+
```yaml
10+
# values.yaml
11+
openmcpOperator:
12+
image: ghcr.io/openmcp-project/images/openmcp-operator
13+
tag: v0.9.1
14+
15+
platformClusterKubeconfigSecretName: "platform-kubeconfig"
16+
```
17+
18+
```bash
19+
> helm template --output-dir output --values values.yaml github.com/openmcp-project/gitops-templates/v0.0.1/openmcp
20+
```
21+
22+
## Parameters
23+
24+
### FluxCD
25+
26+
resources files:
27+
28+
```yaml
29+
git:
30+
repoUrl: "" # The url to the github gitops repository
31+
mainBranch: "" # The main branch of the gitops repository (most of the time, set it to 'main')
32+
```
33+
34+
When rendering the `overlays` files, the following values are used:
35+
36+
```yaml
37+
targetPath: "" # The path were the fluxcd resources are lying relative to the overlays
38+
gitRepoEnvBranch: "" # The branch for this environment to look at
39+
envPathFluxSystem: "" # The path were the env overlays are located at from the root of the git repo
40+
```
41+
42+
### OpenMCP
43+
44+
```yaml
45+
openMCPOperator:
46+
image: "" # the image of the openmcp operator to use
47+
tag: "" # the tag of the image of the openmcp operator you want to use for deployment
48+
49+
onboardingClusterKubeconfigSecretName: "" # the secret name for the onboarding cluster; must be located in the openmcp-system namespace
50+
platformClusterKubeconfigSecretName: "" # the secret name for the platform cluster; must be located in the openmcp-system namespace
51+
```

docs/Usage.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,4 @@ github.com/
4040

4141
## Rendering a template
4242

43-
To render a template you can use helm, but you can also use our bootstrapper cli.
44-
45-
To use helm first create a values.yaml:
46-
47-
```yaml
48-
# values.yaml
49-
openmcpOperator:
50-
image: ghcr.io/openmcp-project/images/openmcp-operator
51-
tag: v0.9.1
52-
53-
platformClusterKubeconfigSecretName: "platform-kubeconfig"
54-
```
55-
56-
```bash
57-
> helm template --output-dir output --values values.yaml github.com/openmcp-project/gitops-templates/v0.0.1/openmcp
58-
```
43+
For detailed instructions on rendering templates, see the [Templating guide](./Templating.md).

templates/fluxcd/overlays/gotk-sync-kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ metadata:
55
name: flux-system
66
namespace: flux-system
77
spec:
8-
path: {{ .Values.EnvPathFluxSystem }}
8+
path: {{ .Values.envPathFluxSystem }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- {{ .Values.TargetPath }}
4+
- {{ .Values.targetPath }}
55
patches:
66
- path: gotk-sync-gitrepo.yaml
77
- path: gotk-sync-kustomization.yaml

0 commit comments

Comments
 (0)