Skip to content

Commit eb65b66

Browse files
committed
Mirror instructions
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent bd62664 commit eb65b66

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

docs/openfaas-pro/airgap.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,52 @@ faas-cli plugin get airfaas
1515
Mirror all images for the given chart/index to a custom registry:
1616

1717
```bash
18-
airfaas download images \
18+
faas-cli airfaas download images \
1919
openfaas/openfaas \
2020
--registry-prefix ttl.sh
2121
```
2222

2323
Mirror the Kafka-connector's images:
2424

2525
```bash
26-
airfaas download images \
26+
faas-cli airfaas download images \
2727
openfaas/kafka-connector \
2828
--registry-prefix ttl.sh
2929
```
3030

3131
The `--url` flag can be used to specify a different Helm chart repository. The only requirement is that images are stored in the same format as OpenFaaS: i.e. `image:` or `componentName.image:`.
3232

33+
## Consume the mirrored images from your own registry
34+
3335
After the mirroring is complete, you'll receive output in the format of a values.yaml file, which you can add to your `helm upgrade --install` command.
3436

3537
```bash
3638
$ faas-cli airfaas mirror openfaas/openfaas --to https://aws_account_id.dkr.ecr.us-west-2.amazonaws.com/openfaas
3739
Mirrored 18 images in 3m7.242s
3840
```
3941

42+
There are two options for consuming the mirrored images:
43+
44+
1. Use the `registryPrefix` setting to add a prefixed string i.e. your registry to the image name across all images i.e. `registryPrefix: aws_account_id.dkr.ecr.us-west-2.amazonaws.com/openfaas`
45+
2. Use the generated text produced by `airfaas` as an overlay to your existing `values.yaml` file.
46+
47+
### Option 1 - Use the `registryPrefix` setting
48+
49+
```yaml
50+
registryPrefix: aws_account_id.dkr.ecr.us-west-2.amazonaws.com/openfaas
51+
```
52+
53+
If you need a custom image pull secret for the registry, create it and then add it to the `imagePullSecrets` section of the `values.yaml` file.
54+
55+
```yaml
56+
imagePullSecrets:
57+
- name: ecr-pull-secret
58+
```
59+
60+
For certain registries such as AWS ECR, it's possible to use the ambient AWS IAM credentials to authenticate the registry without overriding the default `imagePullSecrets` setting.
61+
62+
### Option 2 - Use the generated text produced by `airfaas` as an overlay to your existing `values.yaml` file.
63+
4064
Then copy the below to i.e. `values-mirror.yaml`:
4165

4266
```yaml

0 commit comments

Comments
 (0)