|
| 1 | +--- |
| 2 | +toc_max_heading_level: 2 |
| 3 | +--- |
| 4 | + |
1 | 5 | # Template Functions for Embedded Cluster (Beta) |
2 | 6 |
|
3 | 7 | 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. |
46 | 50 | #### image |
47 | 51 |
|
48 | 52 | The image reference to rewrite. |
49 | | -
|
50 | 53 | Use the [HelmValue](#helmvalue-func) function to return the value from the chart's `values.yaml` at the given dotted path. |
51 | 54 |
|
52 | 55 | #### noProxy |
@@ -90,6 +93,23 @@ Returns the registry host. |
90 | 93 |
|
91 | 94 | Use this with the ReplicatedImageRepository template function when the image reference in the Helm chart uses separate `registry` and `repository` fields. |
92 | 95 |
|
| 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 | +
|
93 | 113 | ### Examples |
94 | 114 |
|
95 | 115 | #### Rewrite image references using HelmValues |
@@ -123,31 +143,32 @@ extensions: |
123 | 143 | repository: 'repl{{ ReplicatedImageRepository "registry.k8s.io/ingress-nginx/controller" }}' |
124 | 144 | ``` |
125 | 145 |
|
| 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 | +
|
126 | 156 | ### Parameters |
127 | 157 |
|
128 | 158 | #### image |
129 | 159 |
|
| 160 | +The image reference to rewrite. |
130 | 161 | Use the [HelmValue](#helmvalue-func) function to return the value from the chart's `values.yaml` at the given dotted path. |
131 | 162 |
|
132 | 163 | #### noProxy |
133 | 164 |
|
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`: |
135 | 166 |
|
136 | 167 | | Install type | noProxy | Result | |
137 | 168 | |------|---------|--------| |
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>` | |
151 | 172 |
|
152 | 173 | ### Examples |
153 | 174 |
|
@@ -181,19 +202,3 @@ extensions: |
181 | 202 | registry: 'repl{{ ReplicatedImageRegistry "registry.k8s.io" }}' |
182 | 203 | repository: 'repl{{ ReplicatedImageRepository "registry.k8s.io/ingress-nginx/controller" }}' |
183 | 204 | ``` |
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