Skip to content

Commit 31ed3bb

Browse files
committed
Don't use shortcodes for {{% ref "xxx" %}}
1 parent dca70af commit 31ed3bb

17 files changed

+136
-134
lines changed

content/en/blog/2022-05-11-introducing-kluctl-and-flux.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tags:
1212
{{% alert context="warning" %}}
1313
Please note that the information in this blog post is outdated. Kluctl does
1414
not integrate into Flux anymore and instead provides an independent
15-
[Kluctl Controller]({{< ref "docs/gitops" >}}).
15+
[Kluctl Controller]({{% ref "docs/gitops" %}}).
1616
{{% /alert %}}
1717

1818
We're very happy to announce that Kluctl can from now on be used together with [Flux](https://fluxcd.io/). This
@@ -44,17 +44,17 @@ fashion as [Kustomizations](https://fluxcd.io/docs/components/kustomize/kustomiz
4444

4545
Each KluctlDeployment specifies a source object
4646
(e.g. a [GitRepository](https://fluxcd.io/docs/components/source/gitrepositories/)),
47-
the [target]({{< ref "docs/kluctl/kluctl-project/targets" >}}) to be deployed and some information on how
47+
the [target]({{% ref "docs/kluctl/kluctl-project/targets" %}}) to be deployed and some information on how
4848
to handle kubeconfigs. The controller then regularly reconciles the deployment, meaning that it will invoke
49-
[kluctl deploy]({{< ref "docs/kluctl/commands/deploy" >}}) whenever a change is detected in the deployment.
49+
[kluctl deploy]({{% ref "docs/kluctl/commands/deploy" %}}) whenever a change is detected in the deployment.
5050

51-
Sounds great? Then take a look at [this]({{< ref "docs/gitops" >}}) very simple example
51+
Sounds great? Then take a look at [this]({{% ref "docs/gitops" %}}) very simple example
5252
<div class="center">
5353
<iframe src="https://giphy.com/embed/xjEmbSLychDd6JQFo0" width="480" height="480" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/disneychannelofficial-disney-channel-disneychannel-amphibia-xjEmbSLychDd6JQFo0">via GIPHY</a></p>
5454
</div>
5555

5656
## Kustomize/Helm vs Kluctl
57-
If you've already read through the [Kluctl documentation]({{< ref "docs" >}}), you've probably noticed
57+
If you've already read through the [Kluctl documentation]({{% ref "docs" %}}), you've probably noticed
5858
that Kluctl internally uses Kustomize and Helm extensively.
5959

6060
This might raise the question: Why not use plain Kustomize and/or Helm if Flux is already involved?
@@ -69,7 +69,7 @@ same deployment, including the necessary configuration to let them talk to each
6969
To see how different a Kluctl deployment is compared to classic Kustomize/Helm + Flux, you can compare the
7070
[flux2-kustomize-helm-example](https://github.com/fluxcd/flux2-kustomize-helm-example) and the
7171
[Kluctl Microservices Demo](https://github.com/kluctl/kluctl-examples/tree/main/microservices-demo/3-templating-and-multi-env)
72-
([here]({{< ref "docs/tutorials/microservices-demo">}}) is tutorial for the demo).
72+
([here]({{% ref "docs/tutorials/microservices-demo" %}}) is tutorial for the demo).
7373

7474
## Native multi-env support
7575
Kluctl allows you to natively create deployment projects that can be deployed multiple times to different
@@ -79,7 +79,7 @@ way you like. For example, you could change the `local` target to set all replic
7979
support applications (e.g. monitoring infrastructure).
8080

8181
This is possible in plain Kustomize as well, but requires you to solve it without the concept of
82-
[targets]({{< ref "docs/kluctl/kluctl-project/targets" >}}) and without templating. In Kustomize, multi-env
82+
[targets]({{% ref "docs/kluctl/kluctl-project/targets" %}}) and without templating. In Kustomize, multi-env
8383
deployments must be solved with [overlays](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/#bases-and-overlays),
8484
which does not necessary align with how you prefer your project structure.
8585

content/en/blog/2022-05-16-rethinking-kubernetes-configuration-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ and GitOps. This means you can deploy to a playground environment from your loca
174174
other deployments, adhering to the GitOps principles.
175175

176176
## Learning Kluctl
177-
If you want to learn about Kluctl, go to [kluctl.io]({{< ref "" >}}) and read the documentation. Best is actually
177+
If you want to learn about Kluctl, go to [kluctl.io]({{% ref "/" %}}) and read the documentation. Best is actually
178178
to start with the Microservices Demo Tutorial, as it tries to introduce you to the Kluctl concepts step by step.
179179

180180
After you’ve finished the tutorial, you should be able to understand how projects are structured, how Kustomize and

content/en/blog/2022-06-03-multi-env-flux.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ images:
1717
{{% alert context="warning" %}}
1818
Please note that the information in this blog post is outdated. Kluctl does
1919
not integrate into Flux anymore and instead provides an independent
20-
[Kluctl Controller]({{< ref "docs/gitops" >}}).
20+
[Kluctl Controller]({{% ref "docs/gitops" %}}).
2121
{{% /alert %}}
2222

2323
Most projects that have server-side components usually need to be deployed multiple times, at least if you don't want to
@@ -50,7 +50,7 @@ disable advanced monitoring on "dev" environments and enable mocking services as
5050

5151
There are multiple tools available that allow you to implement a multi-env/multi-cluster deployment that is completely
5252
automated and completely "as code". Helm and Kustomize are currently the first tools that will pop up when you try to
53-
look for such tools. As written in my [previous blog post]({{< ref "blog/2022-05-16-rethinking-kubernetes-configuration-management" >}}),
53+
look for such tools. As written in my [previous blog post]({{% ref "blog/2022-05-16-rethinking-kubernetes-configuration-management" %}}),
5454
I believe that these tools are the best option for the things that they do very good, but a sub-optimal choice when it
5555
comes to configuration management.
5656

@@ -59,15 +59,15 @@ a solution that is as easy to learn and use and so flexible at the same time.
5959

6060
## Fully working multi-env example
6161

62-
I suggest to open the [microservices demo]({{< ref "docs/tutorials/microservices-demo" >}})
62+
I suggest to open the [microservices demo]({{% ref "docs/tutorials/microservices-demo" %}})
6363
in another tab and look into it at least briefly (especially the third part). I will from now on pick stuff from this
6464
tutorial as examples in this blog post.
6565

6666
## Targets in Kluctl
6767

6868
Kluctl works with the concept of "targets". A target is a named configuration that acts as the entry point for every
6969
further configuration required for your environment. As an example, look at the targets from
70-
[.kluctl.yaml]({{< ref "docs/kluctl/kluctl-project" >}}) of the microservices demo:
70+
[.kluctl.yaml]({{% ref "docs/kluctl/kluctl-project" %}}) of the microservices demo:
7171

7272
```yaml
7373
targets:
@@ -129,7 +129,7 @@ deployments:
129129
```
130130

131131
I hope the above snippets give you a feeling about how multi-env deplyoments can be solved via Kluctl. As already
132-
mentioned, I suggest to read through the [microservices demo]({{< ref "docs/tutorials/microservices-demo" >}})
132+
mentioned, I suggest to read through the [microservices demo]({{% ref "docs/tutorials/microservices-demo" %}})
133133
tutorial to get an even better understanding. The first two parts will describe some Kluctl basics while the third
134134
part enters multi-env deployments.
135135

@@ -148,7 +148,7 @@ developer is done with the changes, GitOps can take over on the another (e.g. "t
148148
Even for "prod", which in the above scenario is GitOps managed, can benefit from the possibility to run Kluctl from
149149
your local machine. Running a "kluctl diff -t prod" before promoting to "prod" can prevent some scary surprises.
150150

151-
Kluctl implements GitOps via the [flux-kluctl-controller]({{< ref "blog/2022-05-11-introducing-kluctl-and-flux" >}}).
151+
Kluctl implements GitOps via the [flux-kluctl-controller]({{% ref "blog/2022-05-11-introducing-kluctl-and-flux" %}}).
152152
It allows to create `KluctlDeployment` objects which refer to your Kluctl
153153
project (which relies in Git) and the target to be deployed.
154154

@@ -237,7 +237,7 @@ As an alternative, you can have a central Flux (+flux-kluctl-controller) install
237237
This can be achieved with the help of the spec.kubeconfig and spec.serviceAccountName
238238
field of the `KluctlDeployment` object.
239239

240-
Also, as the examples stem from the [microservices demo]({{< ref "docs/tutorials/microservices-demo" >}}), they
240+
Also, as the examples stem from the [microservices demo]({{% ref "docs/tutorials/microservices-demo" %}}), they
241241
use the `kind-kind` context names. In a more realistic setup, you would use the real cluster/context names here. This
242242
also assumes that all developers will then use the same context names to refer to the same clusters. If this is honored,
243243
you gain 100% compatibility between the GitOps based deployments and CLI based deployments.

content/en/blog/2022-11-17-templating-and-diffs-with-kustomize.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ But...Kustomize doesn't support templating, right?
5959

6060
## Bringing templating to Kustomize
6161

62-
[Kluctl]({{< ref "" >}}) builds a large set of its features and promised advantages on top of
63-
[templating]({{< ref "docs/kluctl/templating" >}}). The
64-
[Kustomize integration]{{< ref "docs/kluctl/deployments/kustomize" >}} also allows templating in all
62+
[Kluctl]({{% ref "/" %}}) builds a large set of its features and promised advantages on top of
63+
[templating]({{% ref "docs/kluctl/templating" %}}). The
64+
[Kustomize integration]({{% ref "docs/kluctl/deployments/kustomize" %}}) also allows templating in all
6565
involved resources, including the `kustomization.yaml` itself and all referenced manifests.
6666

6767
Configuration can be provided in different ways:
68-
1. Via [CLI arguments]({{< ref "docs/kluctl/commands/common-arguments#project-arguments" >}}), e.g. `--arg` or `--args-from-file`.
69-
2. Via [Targets]({{< ref "docs/kluctl/kluctl-project/targets#args" >}}), meaning that you can define named targets with fixed args.
70-
3. Via [vars]({{< ref "docs/kluctl/deployments/deployment-yml#vars-deployment-project" >}}) in Kluctl deployments.
71-
4. Via [Environment variables]({{< ref "docs/kluctl/commands/environment-variables#environment-variables-as-arguments" >}}) (through `KLUCTL_ARG_XXX`).
68+
1. Via [CLI arguments]({{% ref "docs/kluctl/commands/common-arguments#project-arguments" %}}), e.g. `--arg` or `--args-from-file`.
69+
2. Via [Targets]({{% ref "docs/kluctl/kluctl-project/targets#args" %}}), meaning that you can define named targets with fixed args.
70+
3. Via [vars]({{% ref "docs/kluctl/deployments/deployment-yml#vars-deployment-project" %}}) in Kluctl deployments.
71+
4. Via [Environment variables]({{% ref "docs/kluctl/commands/environment-variables#environment-variables-as-arguments" %}}) (through `KLUCTL_ARG_XXX`).
7272

7373
In this blog post, we'll focus on the first option for simplicity. The second and third options are much more
74-
powerful, but require more boilerplate to set up a [Kluctl project]({{< ref "docs/kluctl/kluctl-project" >}})
75-
and [Kluctl deployments]({{< ref "docs/kluctl/deployments/deployment-yml" >}}). The first option also works with
74+
powerful, but require more boilerplate to set up a [Kluctl project]({{% ref "docs/kluctl/kluctl-project" %}})
75+
and [Kluctl deployments]({{% ref "docs/kluctl/deployments/deployment-yml" %}}). The first option also works with
7676
plain Kustomize deployments, which is what I'm going to demonstrate.
7777

7878
Whatever option is used, all "args" are then available in every place by simply using
@@ -103,7 +103,7 @@ Thanks for using kind! 😊
103103
```
104104

105105
Ensure that you are on the correct Kubernetes context by calling `kubectl config current-context` and verify that it
106-
points to `kind-kind`. Without using [Kluctl Targets]({{< ref "docs/kluctl/kluctl-project/targets" >}}) with
106+
points to `kind-kind`. Without using [Kluctl Targets]({{% ref "docs/kluctl/kluctl-project/targets" %}}) with
107107
fixed contexts, Kluctl behaves the same as any other tool in the Kubernetes space when it comes to the current context,
108108
meaning that you have to watch out to not deploy to prod by accident! :)
109109

@@ -295,7 +295,7 @@ $ kluctl deploy -a entry_replicas=3 -a hat_enabled=false
295295
```
296296

297297
If you deploy with a hat and then with `hat_enabled=false`, Kluctl will not delete/prune the previously deployed hat.
298-
If you want to have pruning support, you must create a [Kluctl deployment]({{< ref "docs/kluctl/deployments" >}})
298+
If you want to have pruning support, you must create a [Kluctl deployment]({{% ref "docs/kluctl/deployments" %}})
299299
with `commonLabels` enabled, so that Kluctl knows how to identify related objects.
300300

301301
## Using vars files instead of arguments
@@ -322,18 +322,18 @@ $ kluctl diff --args-from-file=prod-args.yaml
322322
```
323323

324324
Based on that, you can easily implement multi-environment deployments. This is however still a poor-mans solution to
325-
multi-environment deployments, with the use of [Kluctl projects]({{< ref "docs/kluctl/kluctl-project" >}})
326-
being the better solution. Said Kluctl projects allow you to define named [targets]({{< ref "docs/kluctl/kluctl-project/targets" >}})
325+
multi-environment deployments, with the use of [Kluctl projects]({{% ref "docs/kluctl/kluctl-project" %}})
326+
being the better solution. Said Kluctl projects allow you to define named [targets]({{% ref "docs/kluctl/kluctl-project/targets" %}})
327327
which are fixed in their configuration, so that you only have to invoke `kluctl deploy -t test` without needing to
328328
know what the internal details are.
329329

330330
## What's next?
331331

332332
This article has shown how Kluctl can be used on simple/plain Kustomize deployments. The next thing you should consider
333-
is using [Kluctl projects]({{< ref "docs/kluctl/kluctl-project" >}}) and
334-
[Kluctl deployments]({{< ref "docs/kluctl/deployments" >}}) around your Kustomize deployments. It will allow you
333+
is using [Kluctl projects]({{% ref "docs/kluctl/kluctl-project" %}}) and
334+
[Kluctl deployments]({{% ref "docs/kluctl/deployments" %}}) around your Kustomize deployments. It will allow you
335335
to have much more flexible and powerful ways of configuration management. It will also allow you to use the GitOps style
336336
[flux-kluctl-controller](https://github.com/kluctl/flux-kluctl-controller).
337337

338-
Upcoming blog posts will show why the [Helm Integration]({{< ref "docs/kluctl/deployments/helm" >}}) is a good
338+
Upcoming blog posts will show why the [Helm Integration]({{% ref "docs/kluctl/deployments/helm" %}}) is a good
339339
thing with many advantages and also describe why one would choose Kluctl over plain Helm.

content/en/blog/2022-12-28-template-controller.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ images:
1515
![image](/images/blog/template-controller.jpg)
1616

1717
This blog post serves two purposes. The first one is to announce and present the
18-
[Template Controller]({{< ref "docs/template-controller" >}}) ([Source](https://github.com/kluctl/template-controller)).
18+
[Template Controller]({{% ref "docs/template-controller" %}}) ([Source](https://github.com/kluctl/template-controller)).
1919
The second purpose is to demonstrate it by setting up a simple GitOps based Kubernetes deployment with dynamic preview
2020
environments.
2121

@@ -27,18 +27,18 @@ from a list of generators (e.g. Git) and an `Application` template.
2727

2828
The Template Controller uses a different approach, making it more flexible and independent of the GitOps system being
2929
used. It uses arbitrary Kubernetes objects as inputs and allows to create templated objects of any kind
30-
(e.g. a Flux Helm Release or a [KluctlDeployment]({{< ref "docs/gitops/spec/v1beta1/kluctldeployment" >}})).
30+
(e.g. a Flux Helm Release or a [KluctlDeployment]({{% ref "docs/gitops/spec/v1beta1/kluctldeployment" %}})).
3131
This makes the controller very extensible, as any type of input can be implemented with the help of additional
3232
controllers which are not necessarily part of the project.
3333

3434
When specifying the input objects, you'd also specify which part of the object to use as input. This is done by
3535
specifying a [JSON Path](https://goessner.net/articles/JsonPath/) that select the subfield of the object to use, e.g.
36-
`status.result` for a [GitProjector]({{< ref "docs/template-controller/spec/v1alpha1/gitprojector" >}}) or
36+
`status.result` for a [GitProjector]({{% ref "docs/template-controller/spec/v1alpha1/gitprojector" %}}) or
3737
`data` for a ConfigMap.
3838

39-
The Template Controller implements this functionality through the [ObjectTemplate]({{< ref "docs/template-controller/spec/v1alpha1/objecttemplate" >}})
39+
The Template Controller implements this functionality through the [ObjectTemplate]({{% ref "docs/template-controller/spec/v1alpha1/objecttemplate" %}})
4040
CRD. As the name implies, it also uses a templating engine, which is identical to the one used in
41-
[Kluctl]({{< ref "docs/kluctl/templating" >}}), with the `ObjectTemplate's` input matrix available as
41+
[Kluctl]({{% ref "docs/kluctl/templating" %}}), with the `ObjectTemplate's` input matrix available as
4242
global variables.
4343

4444
## Preparation
@@ -143,7 +143,7 @@ when a pull request introduces changes that need to be tested before these are m
143143
In a GitOps-based setup, one would need to create the relevant custom resources per preview environment, for example
144144
a [Flux Kustomization](https://fluxcd.io/flux/components/kustomize/kustomization/),
145145
[Flux HelmRelease](https://fluxcd.io/flux/components/helm/helmreleases/) or a
146-
or [KluctlDeployment]({{< ref "docs/gitops/spec/v1beta1/kluctldeployment" >}}). The underlying GitOps controller
146+
or [KluctlDeployment]({{% ref "docs/gitops/spec/v1beta1/kluctldeployment" %}}). The underlying GitOps controller
147147
would then take over and perform the actual deployment.
148148
149149
In the following examples we will concentrate on using `KluctlDeployments`. Changing it to use `Kustomizations` or
@@ -155,7 +155,7 @@ be described in the next chapters.
155155
## Linking Preview Environments to Branches
156156
You can, for example, link Git branches to preview environments, so that for each new branch a preview environment is
157157
created, with configuration being read from a yaml file inside the branch. This can be achieved by using a
158-
[GitProjector]({{< ref "docs/template-controller/spec/v1alpha1/gitprojector" >}}), which will periodically
158+
[GitProjector]({{% ref "docs/template-controller/spec/v1alpha1/gitprojector" %}}), which will periodically
159159
clone the configured Git repository, scan for matching branches and files and project the result into the `GitProjector`
160160
status. The status is then available as matrix input inside the `ObjectTemplate`.
161161

@@ -235,7 +235,7 @@ spec:
235235
Please note the use of templating variables and filters inside the actual template under `spec.templates`. Each template
236236
will be rendered once per matrix input, which in this case means once per branch. The templates can use the current
237237
matrix input in the form of a variable, accessible via `matrix.<name>`, e.g. `matrix.git` in this case. Please read
238-
the documentation of [GitProjector]({{< ref "docs/template-controller/spec/v1alpha1/gitprojector" >}}) to figure
238+
the documentation of [GitProjector]({{% ref "docs/template-controller/spec/v1alpha1/gitprojector" %}}) to figure
239239
out what is available in `matrix.git`, which is basically just a copy of the individual `status.result` list items.
240240

241241
## One Preview Environment per pull requests
@@ -244,8 +244,8 @@ be useful if you want to report the status of your preview environment to the pu
244244
commit status when the deployment turns green or red. One might also want to post complex status comments, for example
245245
the result of the deployment in the form of structured and beautiful diff.
246246

247-
To achieve this, you can use the [ListGithubPullRequests]({{< ref "docs/template-controller/spec/v1alpha1/listgithubpullrequests" >}})
248-
or the [ListGitlabMergeRequests]({{< ref "docs/template-controller/spec/v1alpha1/listgitlabmergerequests" >}})
247+
To achieve this, you can use the [ListGithubPullRequests]({{% ref "docs/template-controller/spec/v1alpha1/listgithubpullrequests" %}})
248+
or the [ListGitlabMergeRequests]({{% ref "docs/template-controller/spec/v1alpha1/listgitlabmergerequests" %}})
249249
custom resource, which are also provided by the Template Controller.
250250

251251
Consider the following example:

0 commit comments

Comments
 (0)