Skip to content

Commit ce2d361

Browse files
committed
edits
1 parent f2354b4 commit ce2d361

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

docs/vendor/helm-native-v2-using.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ You will use the following KOTS template functions to conditionally rewrite imag
3737

3838
### Task 1a: Rewrite Private Image Names {#local-proxy-example}
3939

40-
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:
4143
* `<app-slug>` is the unique application slug in the Vendor Portal
4244
* `<image>` is the path to the image in your registry
4345

4446
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`.
4547

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-
4848
#### Example
4949

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:
5151

5252
```yaml
5353
# kots.io/v1beta2 HelmChart custom resource
@@ -99,7 +99,7 @@ spec:
9999

100100
### Task 1b: Rewrite Public Image Names {#local-public-example}
101101

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).
103103

104104
#### Example
105105

@@ -127,18 +127,16 @@ The `spec.values.image.registry` and `spec.values.image.repository` fields in th
127127
# Helm chart values.yaml file
128128
129129
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
133133
```
134134

135135
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:
136136

137137
```yaml
138138
apiVersion: v1
139139
kind: Pod
140-
metadata:
141-
name: mariadb
142140
spec:
143141
containers:
144142
- name:

0 commit comments

Comments
 (0)