You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/template-functions-about.mdx
+18-11Lines changed: 18 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ This topic describes Replicated template functions, including information about
12
12
13
13
## Overview
14
14
15
-
For Kubernetes manifest files for applications deployed by a Replicated installer (Embedded Cluster, KOTS, kURL), Replicated provides a set of custom template functions based on the Go text/template library.
15
+
Replicated provides a set of custom template functions based on the Go text/template library. You can use the Replicated template functions in Kubernetes manifest files for applications deployed by a Replicated installer (Embedded Cluster, KOTS, kURL).
16
16
17
17
<UseCases/>
18
18
@@ -26,16 +26,6 @@ You can use Replicated template functions in Kubernetes manifest files for appli
26
26
* Kubernetes objects like Deployments, Services, Secrets, or ConfigMaps
27
27
* Kubernetes Operators
28
28
29
-
### Limitations
30
-
31
-
* Not all fields in the Config and Application custom resources support templating. For more information, see [Application](/reference/custom-resource-application) and [Item Properties](/reference/custom-resource-config#item-properties) in _Config_.
32
-
33
-
* Templating is not supported in the [Embedded Cluster Config](/embedded-cluster/v3/embedded-config) resource.
34
-
35
-
* Replicated template functions are not directly supported in Helm charts. For more information, see [Helm Charts](#helm-charts) below.
36
-
37
-
### Helm charts
38
-
39
29
Replicated template functions are _not_ directly supported in Helm charts. However, the HelmChart custom resource provides a way to map values rendered by Replicated template functions to Helm chart values. This allows you to use Replicated template functions with Helm charts without making changes to those Helm charts.
40
30
41
31
For information about how to map values from the HelmChart custom resource to Helm chart `values.yaml` files, see [Setting Helm Chart Values with KOTS](/vendor/helm-optional-value-keys).
@@ -46,6 +36,23 @@ During application installation and upgrade, KOTS templates all Kubernetes manif
46
36
47
37
For the [Config](/reference/custom-resource-config) custom resource, KOTS templates each item separately so that config items can be used in templates for other items. For examples of this, see [Using Conditional Statements in Configuration Fields](/vendor/config-screen-conditional) and [Template Function Examples](/reference/template-functions-examples).
48
38
39
+
### Limitations
40
+
41
+
* Not all fields in the Config and Application custom resources support templating. For more information, see [Application](/reference/custom-resource-application) and [Item Properties](/reference/custom-resource-config#item-properties) in _Config_.
42
+
43
+
* Templating is not supported in the [Embedded Cluster Config](/embedded-cluster/v3/embedded-config) resource.
44
+
45
+
* Replicated template functions are not directly supported in Helm charts. For more information, see [Helm Charts](#helm-charts) on this page.
46
+
47
+
* Embedded Cluster v3 does not support the following template functions:
48
+
* HasLocalRegistry
49
+
* LocalRegistryAddress
50
+
* LocalRegistryHost
51
+
* LocalRegistryNamespace
52
+
* LocalImageName
53
+
54
+
These template functions are typically used to conditionally rewrite image references in air gap installations to reference the local image registry. For Embedded Cluster v3 installations, use the ReplicatedImageName, ReplicatedImageName, and ReplicatedImageName template functions instead. For more information, see [Template Functions for Embedded Cluster (Beta)](/embedded-cluster/v3/template-functions).
55
+
49
56
## Syntax {#syntax}
50
57
51
58
The Replicated template function syntax supports the following functionally equivalent delimiters:
Copy file name to clipboardExpand all lines: docs/reference/template-functions-config-context.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,6 +194,10 @@ Returns true if the configuration option value is not equal to the supplied valu
194
194
195
195
## LocalRegistryAddress
196
196
197
+
:::note
198
+
The LocalRegistryAddress template function is not supported for installations with Embedded Cluster v3. See [Template Functions for Embedded Cluster (Beta)](/embedded-cluster/v3/template-functions).
199
+
:::
200
+
197
201
```go
198
202
func LocalRegistryAddress() string
199
203
```
@@ -203,6 +207,10 @@ This will always return everything before the image name and tag.
203
207
204
208
## LocalRegistryHost
205
209
210
+
:::note
211
+
The LocalRegistryHost template function is not supported for installations with EmbeddedCluster v3. See [Template FunctionsforEmbeddedCluster (Beta)](/embedded-cluster/v3/template-functions).
212
+
:::
213
+
206
214
```go
207
215
func LocalRegistryHost() string
208
216
```
@@ -236,6 +244,10 @@ For more information, see [Set Helm Values with KOTS](/vendor/helm-optional-valu
236
244
237
245
## LocalRegistryNamespace
238
246
247
+
:::note
248
+
The LocalRegistryNamespace template function is not supported for installations with EmbeddedCluster v3. See [Template FunctionsforEmbeddedCluster (Beta)](/embedded-cluster/v3/template-functions).
249
+
:::
250
+
239
251
```go
240
252
func LocalRegistryNamespace() string
241
253
```
@@ -267,6 +279,10 @@ For more information, see [Set Helm Values with KOTS](/vendor/helm-optional-valu
267
279
268
280
## LocalImageName
269
281
282
+
:::note
283
+
The LocalImageName template function is not supported for installations with EmbeddedCluster v3. See [Template FunctionsforEmbeddedCluster (Beta)](/embedded-cluster/v3/template-functions).
The HasLocalRegistry template function is not supported for installations with Embedded Cluster v3. See [Template Functions for Embedded Cluster (Beta)](/embedded-cluster/v3/template-functions).
0 commit comments