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
Prior to running the installation please see the official documentation at: https://codefresh.io/docs/docs/installation/gitops/hybrid-gitops-helm-installation/
4
6
5
-
A Helm chart for Codefresh gitops runtime
7
+
## Using with private registries - Helper utility
8
+
The GitOps Runtime comprises multiple subcharts and container images. Subcharts also vary in values structure, making it difficult to override image specific values to use private registries.
9
+
We have created a helper utility to resolve this issue:
10
+
- The utility create values files in the correct structure, overriding the registry for each image. When installing the chart, you can then provide those values files to override all images.
11
+
- The utility also creates other files with data to help you identify and correctly mirror all the images.
1.`image-list.txt` - is the list of all images used in this version of the chart. Those are the images that you need to mirror.
25
+
2.`image-mirror.csv` - is a csv file with 2 fields - source_image and target_image. source_image is the image with the original registry and target_image is the image with the private registry. Can be used as an input file for a mirroring script.
26
+
3.`values-images-no-tags.yaml` - a values file with all image values with the private registry **excluding tags**. If provided through --values to helm install/upgrade command - it will override all images to use the private registry.
27
+
4.`values-images-with-tags.yaml` - The same as 3 but with tags **included**.
25
28
26
29
## Values
27
30
@@ -184,6 +187,3 @@ A Helm chart for Codefresh gitops runtime
184
187
| tunnel-client | object |`{"enabled":true,"libraryMode":true,"tunnelServer":{"host":"register-tunnels.cf-cd.com","subdomainHost":"tunnels.cf-cd.com"}}`| Tunnel based runtime. Not supported for on-prem platform. In on-prem use ingress based runtimes. |
185
188
| tunnel-client.enabled | bool |`true`| Will only be used if global.runtime.ingress.enabled = false |
186
189
| tunnel-client.libraryMode | bool |`true`| Do not change this value! Breaks chart logic |
187
-
188
-
----------------------------------------------
189
-
Autogenerated from chart metadata using [helm-docs v1.9.1](https://github.com/norwoodj/helm-docs/releases/v1.9.1)
Prior to running the installation please see the official documentation at: https://codefresh.io/docs/docs/installation/gitops/hybrid-gitops-helm-installation/
6
+
7
+
## Using with private registries - Helper utility
8
+
The GitOps Runtime comprises multiple subcharts and container images. Subcharts also vary in values structure, making it difficult to override image specific values to use private registries.
9
+
We have created a helper utility to resolve this issue:
10
+
- The utility create values files in the correct structure, overriding the registry for each image. When installing the chart, you can then provide those values files to override all images.
11
+
- The utility also creates other files with data to help you identify and correctly mirror all the images.
12
+
13
+
#### Usage
14
+
15
+
The utility is packaged in a container image. Below are instructions on executing the utility using Docker:
16
+
17
+
```
18
+
docker run -v <output_dir>:/output quay.io/codefresh/gitops-runtime-private-registry-utils:0.2.7-alpha <local_registry>
19
+
```
20
+
`output_dir` - is a local directory where the utility will output files. <br>
21
+
`local_registry` - is your local registry where you want to mirror the images to
22
+
23
+
The utility will output 4 files into the folder:
24
+
1. `image-list.txt` - is the list of all images used in this version of the chart. Those are the images that you need to mirror.
25
+
2. `image-mirror.csv` - is a csv file with 2 fields - source_image and target_image. source_image is the image with the original registry and target_image is the image with the private registry. Can be used as an input file for a mirroring script.
26
+
3. `values-images-no-tags.yaml` - a values file with all image values with the private registry **excluding tags**. If provided through --values to helm install/upgrade command - it will override all images to use the private registry.
27
+
4. `values-images-with-tags.yaml` - The same as 3 but with tags **included**.
Utilities to assist with image mirroring to private registries
2
+
3
+
## How it works?
4
+
5
+
1. All calculated values are outputed using output-calculated-values.sh. The script contains a special template that handles image values. Specifically it derives tags for images that don't have explicit tags sepcified from the subchart appVersion.
6
+
2. Those values are then filtered using the helper script yaml-filter.py to filter only the values that contain images.
7
+
3. image-values-utils.py then uses the output of the previous steps and can generate:
8
+
1. A list of all images
9
+
2. Values files with and without tags including a custom registry for each image.
10
+
3. A csv file with source and target image names (can help with image mirroring).
11
+
12
+
## Usage
13
+
1. Build the image with buildcontext being the root of the repo `docker build -f scripts/private-registry-utils/Dockerfile -t <image-tag> .` For example: `docker build -f scripts/private-registry-utils/Dockerfile -t gitops-runtime-priv-reg .`
14
+
2. Execute with: `docker run -v <local output directory>:/output -it <image-tag> <private registry>` for example: `docker run -v /tmp/output:/output -it gitops-runtime-priv-reg myregisry.example.com`
# This template prints all values and also sets tags for all images with non-empty repository value, where the tag is empty and should be derived from the appVersion of the subchart.
0 commit comments