Closed sto closed 1 year ago
I don't know if the changes are interesting for the official chart, but as I'm using them on my own deployment I created this PR just in case you find any of them useful, feel free to ignore the PR or use only a part of it.
@sto Thanks for posting this PR. Apologies that we have not looked at this until now. We were not expecting any contributions here.
@Andreea-Lupu, can you pls review this? Also this: https://github.com/project-zot/zot/discussions/1386
@Andreea-Lupu Can we add a ci pipeline test using for this repo, so contributions/PRs are validated? We can use kind
for that.
@sto, can you pls squash your commits?
@sto, can you pls squash your commits?
@rchincha, rebased and squashed, if you need any additional changes please let me now.
@sto we are adding some ci/cd tests so we can safely accept PRs like yours after vetting.
https://github.com/project-zot/helm-charts/pull/5 @sto fyi. We plan to merge this first.
Pls add a test to validate that "ingress" is working correctly.
@sto pls. rebase and re-push this PR - would at least like to get the DCO checks passed. If you are unable to add a test, we can do that also.
@sto pls. rebase and re-push this PR - would at least like to get the DCO checks passed. If you are unable to add a test, we can do that also.
I rebased and repushed, haven't looked at the testing part and I'll be unable to look at it until the weekend.
I'm unsure about what has to be done, but if there are no news on Saturday I'll look into it.
@sto
For the DCO check failure: https://github.com/project-zot/helm-charts/actions/runs/4919517472/jobs/8796492154?pr=2
Missing sign-off(s):
32c5ecaded092374cdcee13fc40a736eacbed9db
no sign-off found
Also pls sign (GPG etc) your commits.
There is also a helm lint failure https://github.com/project-zot/helm-charts/actions/runs/4919517474/jobs/8796492330?pr=2
Error: 1 chart(s) linted, 1 chart(s) failed ==> Linting ./charts/zot [INFO] Chart.yaml: icon is recommended Error: values.yaml: unable to parse YAML: error converting YAML to JSON: yaml: line 74: did not find expected key Error: templates/: cannot load values.yaml: error converting YAML to JSON: yaml: line 74: did not find expected key Error: : unable to load chart cannot load values.yaml: error converting YAML to JSON: yaml: line 74: did not find expected key
@sto thanks for working patiently with us on this. Hope you understand this is mostly to protect the investment you are making with this PR.
git commit --amend --no-edit -s -S
to fix the DCO failure.
The other failure is on us, will take care of that.
@sto thanks for working patiently with us on this. Hope you understand this is mostly to protect the investment you are making with this PR.
git commit --amend --no-edit -s -S
to fix the DCO failure. The other failure is on us, will take care of that.
Done.
Hi, @sto. Can you please increment the chart version("version" field from Chart.yaml file) and add a space before 'authHeader' at this line https://github.com/project-zot/helm-charts/pull/2/files#diff-3e090fa767e19b6bf71a738b87e9d9e2af22493b398c58c8d4c35de76e1bb2f9R98? These changes will fix the test which fails.
Also, I tried to test your code with mountConfig: true
, but when I tried to install the chart I got this error:
` Error: INSTALLATION FAILED: 1 error occurred:
In order to fix it I changed this https://github.com/project-zot/helm-charts/pull/2/files#diff-3e090fa767e19b6bf71a738b87e9d9e2af22493b398c58c8d4c35de76e1bb2f9R54-R58 to this:
"{\n
\"storage\": { \"rootDirectory\": \"/var/lib/registry\" },\n
\"http\": { \"address\": \"0.0.0.0\", \"port\": \"5000\" },\n
\"log\": { \"level\": \"debug\" }\n
}"
`
In case you can confirm this behavior, could you also add this change, please? Done, the issue with the configmap
was that I was missing a quote
on the templates.
The changes made are as follows (the diff is from my latest changes before squashing them):
diff --git a/charts/zot/Chart.yaml b/charts/zot/Chart.yaml
index 7cebb6e..be53a98 100644
--- a/charts/zot/Chart.yaml
+++ b/charts/zot/Chart.yaml
@@ -3,4 +3,4 @@ appVersion: v2.0.0-rc4
description: A Helm chart for Kubernetes
name: zot
type: application
-version: 0.1.21
+version: 0.1.22
diff --git a/charts/zot/templates/configmap.yaml b/charts/zot/templates/configmap.yaml
index ba2ac2f..a6a29c3 100644
--- a/charts/zot/templates/configmap.yaml
+++ b/charts/zot/templates/configmap.yaml
@@ -5,6 +5,6 @@ metadata:
name: {{ .Release.Name }}-config
data:
{{- range $key, $val := .Values.configFiles }}
- {{ $key }}: {{ $val }}
+ {{ $key }}: {{ $val | quote }}
{{- end }}
{{- end }}
diff --git a/charts/zot/values.yaml b/charts/zot/values.yaml
index 778395e..f95f1de 100644
--- a/charts/zot/values.yaml
+++ b/charts/zot/values.yaml
@@ -95,7 +95,7 @@ secretFiles:
# in base64. It is needed when `htpasswd` authentication is enabled and the
# default access does not provide read permission
# The example value is from running `echo -n "foo:var" | base64`
-#authHeader: "Zm9vOmJhcg=="
+# authHeader: "Zm9vOmJhcg=="
# If persistence is 'true' the service uses a persistentVolumeClaim to mount a
# volume for zot on '/var/lib/registry'; by default the pvc used is named
@sto @liangyuanpeng this PR is merged, also shows up at https://artifacthub.io/packages/helm/zot/zot Pls try and let us know. Thanks @sto
Add support to the chart to use persistence, configuration managed as secrets and to deploy an ingress definition for zot.