Skip to content

Commit d93c1f2

Browse files
committed
copy edits to template func reference docs
1 parent 4a5dbf2 commit d93c1f2

1 file changed

Lines changed: 36 additions & 31 deletions

File tree

embedded-cluster/template-functions.mdx

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
toc_max_heading_level: 2
3+
---
4+
15
# Template Functions for Embedded Cluster (Beta)
26

37
This topic lists the Replicated template functions for Embedded Cluster. For more imformation about how to use Replicated template functions, including a list of all available template functions, see [About Template Functions](/reference/template-functions-about).
@@ -46,7 +50,6 @@ Use this when a chart expects the entire image reference in a single field.
4650
#### image
4751
4852
The image reference to rewrite.
49-
5053
Use the [HelmValue](#helmvalue-func) function to return the value from the chart's `values.yaml` at the given dotted path.
5154

5255
#### noProxy
@@ -90,6 +93,23 @@ Returns the registry host.
9093

9194
Use this with the ReplicatedImageRepository template function when the image reference in the Helm chart uses separate `registry` and `repository` fields.
9295

96+
### Parameters
97+
98+
#### image
99+
100+
The image reference to rewrite.
101+
Use the [HelmValue](#helmvalue-func) function to return the value from the chart's `values.yaml` at the given dotted path.
102+
103+
#### noProxy
104+
105+
The following table describes the value returned by ReplicatedImageName in online or air gap installations when the `noProxy` field is omitted or set to `true`:
106+
107+
| Install type | noProxy | Result |
108+
|------|---------|--------|
109+
| Online | Omitted | Returns the proxy registry domain (either `proxy.replicated.com` or your [custom domain](/vendor/custom-domains-using)) |
110+
| Online | `true` | Returns the image registry value with no changes |
111+
| Air gap | `true` or omitted | Returns the local registry address |
112+
93113
### Examples
94114
95115
#### Rewrite image references using HelmValues
@@ -123,31 +143,32 @@ extensions:
123143
repository: 'repl{{ ReplicatedImageRepository "registry.k8s.io/ingress-nginx/controller" }}'
124144
```
125145
146+
## ReplicatedImageRepository
147+
148+
```go
149+
func ReplicatedImageRepository(repository string, noProxy ...bool) string
150+
```
151+
152+
Returns the repository path.
153+
154+
Use this with the ReplicatedImageRegistry template function when the image reference in the Helm chart uses separate `registry` and `repository` fields.
155+
126156
### Parameters
127157
128158
#### image
129159
160+
The image reference to rewrite.
130161
Use the [HelmValue](#helmvalue-func) function to return the value from the chart's `values.yaml` at the given dotted path.
131162

132163
#### noProxy
133164

134-
The following table describes the value returned by ReplicatedImageName in online or air gap installations when the `noProxy` field is omitted or set to `true`:
165+
The following table describes the value returned by ReplicatedImageName in online or air gap installations, when the `noProxy` field is omitted or set to `true`:
135166

136167
| Install type | noProxy | Result |
137168
|------|---------|--------|
138-
| Online | Omitted | Returns the proxy registry domain (either `proxy.replicated.com` or your [custom domain](/vendor/custom-domains-using)) |
139-
| Online | `true` | Returns the image registry value with no changes |
140-
| Air gap | `true` or omitted | Returns the local registry address |
141-
142-
## ReplicatedImageRepository
143-
144-
```go
145-
func ReplicatedImageRepository(repository string, noProxy ...bool) string
146-
```
147-
148-
Returns the repository path.
149-
150-
Use this with the ReplicatedImageRegistry template function when the image reference in the Helm chart uses separate `registry` and `repository` fields.
169+
| Online | Omitted | Returns the proxy registry image repository in the format: `proxy/<app-slug>/<repository>`, where `app_slug` is the unique application slug |
170+
| Online | `true` | Returns the image repository value with no changes |
171+
| Air gap | `true` or omitted | Returns the local image repository in the format: `<app-slug>/<name>` |
151172

152173
### Examples
153174

@@ -181,19 +202,3 @@ extensions:
181202
registry: 'repl{{ ReplicatedImageRegistry "registry.k8s.io" }}'
182203
repository: 'repl{{ ReplicatedImageRepository "registry.k8s.io/ingress-nginx/controller" }}'
183204
```
184-
185-
### Parameters
186-
187-
#### image
188-
189-
Use the [HelmValue](#helmvalue-func) function to return the value from the chart's `values.yaml` at the given dotted path.
190-
191-
#### noProxy
192-
193-
The following table describes the value returned by ReplicatedImageName in online or air gap installations, when the `noProxy` field is omitted or set to `true`:
194-
195-
| Install type | noProxy | Result |
196-
|------|---------|--------|
197-
| Online | Omitted | Returns the proxy registry image repository in the format: `proxy/<app-slug>/<repository>`, where `app_slug` is the unique application slug |
198-
| Online | `true` | Returns the image repository value with no changes |
199-
| Air gap | `true` or omitted | Returns the local image repository in the format: `<app-slug>/<name>` |

0 commit comments

Comments
 (0)