Skip to content

Commit 6a50339

Browse files
authored
build: include regclient/regsync image for registry addon (#1148)
**What problem does this PR solve?**: Include the image in the list of images ``` $ make list-images docker.io/library/registry:2.8.1 docker.io/nutanix/ntnx-csi-precheck:3.3.3 docker.io/nutanix/ntnx-csi:3.3.3 docker.io/rancher/local-path-provisioner:v0.0.30 docker.io/regclient/regsync:v0.8.3 ... ``` (noticed this after the last release) **Which issue(s) this PR fixes**: Fixes # **How Has This Been Tested?**: <!-- Please describe the tests that you ran to verify your changes. Provide output from the tests and any manual steps needed to replicate the tests. --> **Special notes for your reviewer**: <!-- Use this to provide any additional information to the reviewers. This may include: - Best way to review the PR. - Where the author wants the most review attention on. - etc. -->
1 parent 05fbd72 commit 6a50339

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

hack/tools/fetch-images/main.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,29 @@ func getValuesFileForChartIfNeeded(chartName, carenChartDirectory string) (strin
330330
"metallb",
331331
defaultHelmAddonFilename,
332332
), nil
333+
case "docker-registry":
334+
f := filepath.Join(carenChartDirectory, "addons", "registry", "cncf-distribution", defaultHelmAddonFilename)
335+
tempFile, err := os.CreateTemp("", "")
336+
if err != nil {
337+
return "", fmt.Errorf("failed to create temp file: %w", err)
338+
}
339+
340+
templateInput := struct {
341+
Replicas int
342+
ServiceIP string
343+
TLSSecretName string
344+
}{
345+
Replicas: 1,
346+
ServiceIP: "127.0.0.1",
347+
TLSSecretName: "registry-tls",
348+
}
349+
350+
err = template.Must(template.New(defaultHelmAddonFilename).ParseFiles(f)).Execute(tempFile, &templateInput)
351+
if err != nil {
352+
return "", fmt.Errorf("failed to execute helm values template %w", err)
353+
}
354+
355+
return tempFile.Name(), nil
333356
default:
334357
return "", nil
335358
}

0 commit comments

Comments
 (0)