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
For any private images used by your application, configure the HelmChart custom resource so that image names are rewritten to `proxy.replicated.com/proxy/<app-slug>/<image>`, where:
40
+
For any private images used by your application, configure the HelmChart custom resource so that image names are conditionally rewritten to either the location of the image in the Replicated proxy registry (for online installations) or the local registry (for air gap installations or online installations where images were pushed to a local registry).
41
+
42
+
To rewrite images to the proxy registry, use the format `proxy.replicated.com/proxy/<app-slug>/<image>`, where:
41
43
*`<app-slug>` is the unique application slug in the Vendor Portal
42
44
*`<image>` is the path to the image in your registry
43
45
44
46
For example, if the private image is `quay.io/my-org/nginx:v1.0.1`, then the image name should be rewritten to `proxy.replicated.com/proxy/my-app-slug/quay.io/my-org/nginx:v1.0.1`.
45
47
46
-
Additionally, use the KOTS [HasLocalRegistry](/reference/template-functions-config-context#haslocalregistry), [LocalRegistryHost](/reference/template-functions-config-context#localregistryhost), and [LocalRegistryNamespace](/reference/template-functions-config-context#localregistrynamespace) template functions along with a ternary operator to conditionally render the registry hostname and namespace if a local registry is used (such as in air gap installations). See the example below for more information.
47
-
48
48
#### Example
49
49
50
-
The following HelmChart custom resource uses KOTS template functions to conditionally rewrite an image registry and repository depending on if a local registry is used:
50
+
The following HelmChart custom resource uses the KOTS[HasLocalRegistry](/reference/template-functions-config-context#haslocalregistry), [LocalRegistryHost](/reference/template-functions-config-context#localregistryhost), and [LocalRegistryNamespace](/reference/template-functions-config-context#localregistrynamespace) template functions to conditionally rewrite an image registry and repository depending on if a local registry is used:
51
51
52
52
```yaml
53
53
# kots.io/v1beta2 HelmChart custom resource
@@ -99,7 +99,7 @@ spec:
99
99
100
100
### Task 1b: Rewrite Public Image Names {#local-public-example}
101
101
102
-
For any private images used by your application, configure the HelmChart custom resource so that image names
102
+
For any public images used by your application, configure the HelmChart custom resource so that image names are conditionally rewritten to either the location of the image in the public registry (for online installations) or the local registry (for air gap installations or online installations where images were pushed to a local registry).
103
103
104
104
#### Example
105
105
@@ -127,18 +127,16 @@ The `spec.values.image.registry` and `spec.values.image.repository` fields in th
127
127
# Helm chart values.yaml file
128
128
129
129
image:
130
-
registry: docker.io
131
-
repository: docker.io/bitnami/mariadb
132
-
tag: v1.0.1
130
+
registry: ghcr.io
131
+
repository: cloudnative-pg/cloudnative-pg
132
+
tag: catalog-1.24.0
133
133
```
134
134
135
135
During installation, KOTS renders the template functions and sets the `image.registry` and `image.repository` fields in your Helm chart `values.yaml` file based on the value of the corresponding fields in the HelmChart custom resource. Any templates in the Helm chart that access the `image.registry` and `image.repository` fields are updated to use the appropriate value, as shown in the example below:
0 commit comments