145 Commits

Author SHA1 Message Date
canterberry
803018a09d Merge pull request #182 from twuni/readme-install-via-gh-pages
Update README with repo migration notice
2025-11-03 20:19:48 +00:00
canterberry
8d4e020c42 Add repo migration and deprecation notice to README
This is a follow-up to the previous commit updating the repo URL.

In this commit, I have added a notice to the README intended for those experiencing chart install/update issues which will result from the eventual decommissioning of the old repo.

The goal of the notice is to provide an easy and convenient migration path to using the GitHub Pages repo currently in use as the primary distribution channel for this chart.
2025-09-10 05:28:03 +00:00
canterberry
43ed2639ed Update repo URL in README
GitHub Pages has been the primary distribution channel for this chart since March 2024. However, the repo URL in the README has not been updated accordingly.

I would like to decommission the https://helm.twun.io/ repo, but would prefer not to do so without sufficient notice to the community to update their repo URLs.

Updating the README is one necessary step toward this.
2025-09-10 05:15:59 +00:00
Joshua Sizer
ab431e8015 Merge pull request #178 from weisjohn/main
🏁 v3.0.0 Release
2025-07-29 13:15:22 -04:00
John Weis
8662c4fefb 🏁 v3.0.0 Release 2025-07-29 12:32:38 -04:00
Joshua Sizer
0f196d6227 Merge pull request #171 from TheAceMan/main
Add the ability to skip verifying the TLS cert for s3 storage
2025-06-28 01:06:15 -04:00
Joshua Sizer
4e6b389b56 Merge pull request #174 from twuni/dependabot/github_actions/marocchino/sticky-pull-request-comment-2.9.3
Bump marocchino/sticky-pull-request-comment from 2.9.2 to 2.9.3
2025-06-28 01:04:30 -04:00
dependabot[bot]
8ff170786c Bump marocchino/sticky-pull-request-comment from 2.9.2 to 2.9.3
Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 2.9.2 to 2.9.3.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](67d0dec7b0...d2ad0de260)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-version: 2.9.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-23 02:59:41 +00:00
Kevin Boisits
55527bf77c Fix spacing 2025-06-08 22:33:50 -05:00
Kevin Boisits
d344f36b94 Change name to match the config variable 2025-06-08 22:32:26 -05:00
Joshua Sizer
60cac04569 Merge pull request #168 from Clovel/feature/config-path
[Fixes #135] Updated chart to accept configPath to fix distribution's 3.0.0 breaking change
2025-06-08 11:09:14 -04:00
Kevin Boisits
8b8e96444e Add the ability to skip verifying the TLS cert for s3 storage
Allow using self signed cert on S3 storage used
2025-06-06 21:00:14 -05:00
Joshua Sizer
458381c746 Merge pull request #169 from TheAceMan/main
Add the ability to force path style for s3 storage
2025-06-06 21:29:35 -04:00
Kevin Boisits
ec1706762e Add the ability to force path style for s3 storage 2025-06-03 18:24:15 -05:00
Clovis Durand
e3a6eb45bf Updated chart to accept configPath to fix distribution's 3.0.0 breaking change
Signed-off-by: Clovis Durand <cd.clovel19@gmail.com>
2025-06-03 12:30:19 +02:00
Joshua Sizer
791c161883 Merge pull request #165 from joshsizer/release-2.3.0
🏁 v2.3.0 Release
2025-04-17 09:56:44 -04:00
Joshua Sizer
127e415edb Merge pull request #166 from Mercbot7/update-readme-for-cronjob-updates
Update README.md for garbageCollect
2025-04-16 13:08:23 -04:00
Mercbot7
14fc7bb5a2 Update README.md for garbageCollect
Update README.md for garbageCollect Annotations and Labels keys.
2025-04-16 12:06:32 -04:00
Josh Sizer
53e594b53d 🏁 v2.3.0 Release 2025-04-15 21:50:52 -04:00
Joshua Sizer
113ddd1d4f Merge pull request #164 from Mercbot7/update-garbagecollect-cronjob
Update garbageCollect cronjob
2025-04-15 15:31:58 -04:00
Mercbot7
9bba24a3d2 reorder merge for proper preference 2025-04-15 09:09:43 -04:00
Joshua Sizer
64d7c6800c Merge pull request #155 from twuni/dependabot/github_actions/helm/chart-releaser-action-1.7.0
Bump helm/chart-releaser-action from 1.6.0 to 1.7.0
2025-04-14 16:38:55 -04:00
Mercbot7
d6224c847b refactor logic for lapels and annotations and fix resources 2025-04-14 15:02:51 -04:00
Joshua Sizer
f4811a4ab7 Merge pull request #162 from twuni/dependabot/github_actions/marocchino/sticky-pull-request-comment-2.9.2
Bump marocchino/sticky-pull-request-comment from 2.2.0 to 2.9.2
2025-04-14 13:14:09 -04:00
Mercbot7
88ccbc1313 Update values.yaml to match cronjob updates and minor spacing fixes 2025-04-14 09:23:32 -04:00
Mercbot7
e73d9e85c4 Update gargagecollect cronjob
This adds podLabels and podAnnotations to the cronjob job pod and defaults them to the root podLabels and podAnnotations.
2025-04-14 09:20:19 -04:00
dependabot[bot]
5af937bbce Bump marocchino/sticky-pull-request-comment from 2.2.0 to 2.9.2
Bumps [marocchino/sticky-pull-request-comment](https://github.com/marocchino/sticky-pull-request-comment) from 2.2.0 to 2.9.2.
- [Release notes](https://github.com/marocchino/sticky-pull-request-comment/releases)
- [Commits](39c5b5dc77...67d0dec7b0)

---
updated-dependencies:
- dependency-name: marocchino/sticky-pull-request-comment
  dependency-version: 2.9.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-10 02:47:40 +00:00
dependabot[bot]
065f6c5c44 Bump helm/chart-releaser-action from 1.6.0 to 1.7.0
Bumps [helm/chart-releaser-action](https://github.com/helm/chart-releaser-action) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/helm/chart-releaser-action/releases)
- [Commits](https://github.com/helm/chart-releaser-action/compare/v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: helm/chart-releaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-21 02:32:57 +00:00
Devin Canterberry
541f368966 Merge pull request #136 from ilmax/main
[TINY] Fix copy command in README
2024-06-27 13:50:59 -07:00
Massimiliano Donini
177a997ef0 Fix copy command 2024-06-22 10:08:59 +02:00
Vyas
99e99ec5b2 Merge pull request #131 from laverya/laverya-add-service-labels
add the ability to specify labels for the registry service
2024-06-03 13:18:13 -05:00
Andrew Lavery
680310df11 add the ability to specify labels for the registry service
Signed-off-by: Andrew Lavery <laverya@umich.edu>
2024-06-04 01:53:34 +08:00
Vyas
5dccc4e861 Merge pull request #127 from vyas-n/feat/add-dependabot-config
feat: add dependabot config
2024-05-20 15:00:03 -05:00
Vyas Nellutla
8fc13f8d0d feat: add dependabot config
Signed-off-by: Vyas Nellutla <me@vyas-n.com>
2024-05-20 14:58:54 -05:00
Devin Canterberry
7efaaa8f06 Merge pull request #130 from wkbrd/wkbrd-htpasswd
Update README.md
2024-05-15 10:20:43 -07:00
wkbrd
807a2bafc6 Update README.md
This container does not have htpasswd in it.
2024-05-14 11:19:22 -04:00
Devin Canterberry
013c0af45a Merge pull request #129 from wkbrd/wkbrd-security-patch
Wkbrd security patch
2024-05-13 09:44:29 -07:00
wkbrd
384e09cc0d Update deployment.yaml 2024-05-09 16:06:06 -04:00
wkbrd
132d51ea92 Update cronjob.yaml 2024-05-09 16:05:22 -04:00
wkbrd
14b36a8308 Update values.yaml 2024-05-09 16:03:52 -04:00
wkbrd
4efb76f313 Update cronjob.yaml 2024-05-09 16:03:22 -04:00
wkbrd
2a9672ee74 Update cronjob.yaml 2024-05-09 16:02:57 -04:00
wkbrd
1ad8a41438 Update README.md 2024-05-09 16:02:08 -04:00
wkbrd
bc7d137032 Update README.md
Add license
2024-05-09 08:18:07 -04:00
wkbrd
26bdb34cf7 Update README.md 2024-05-09 08:17:05 -04:00
wkbrd
3f325fedb9 Update values.yaml 2024-05-09 08:16:01 -04:00
wkbrd
b7a3239c0c Update README.md
Annotations copied from https://github.com/bitnami/charts/blob/main/bitnami/keycloak/README.md?plain=1

## License

Copyright &copy; 2024 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

<http://www.apache.org/licenses/LICENSE-2.0>

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
2024-05-09 08:12:43 -04:00
wkbrd
62fa09c198 Update README.md 2024-05-09 08:11:21 -04:00
wkbrd
93ea655866 Update cronjob.yaml 2024-05-09 08:08:15 -04:00
wkbrd
da580b62f1 Update deployment.yaml 2024-05-09 08:06:15 -04:00
wkbrd
d7e5281b18 Update values.yaml 2024-05-09 08:04:44 -04:00
Vyas
cb49066186 Merge pull request #124 from baznikin/main
Allow to specify resources block for garbage-collector
2024-04-27 11:36:30 -05:00
Andrey Baznikin
d1cce3992a Allow to specify resources block for garbage-collector 2024-04-26 15:25:54 +04:00
Vyas
95cab6cfd3 Merge pull request #98 from 0xDEC0DE/issue/97
docs: Document that `s3.regionEndpoint` requires a transport scheme
2024-04-25 13:08:38 -05:00
Nicolas Simonds
33d78906dd Document that s3.regionEndpoint requires a transport scheme
The `regionEndpoint` value does not work at all without one, so
provide a nice hint that it is required in the vendor-provided
materials.

Fixes Issue: #97
2024-04-25 09:43:05 -07:00
Vyas
d6bc315183 Merge pull request #125 from lenzenmi/update-names
update names
2024-04-22 16:29:54 -05:00
Mike Lenzen
1446b0545b update names 2024-04-20 08:00:32 -06:00
Joshua Sizer
4a8beacf89 Merge pull request #121 from joshsizer/add-helm-release-actions
chore: add helm release action
2024-03-29 20:37:52 -04:00
Josh Sizer
b81a30d3fd chore: use workflow_dispatch 2024-03-27 10:24:01 -04:00
Josh Sizer
5c0100d932 chore: use actions/checkout@v4 2024-03-25 22:05:06 -04:00
Josh Sizer
8694346264 chore: add chart release workflow 2024-03-24 17:25:08 -04:00
Devin Canterberry
1d81ad83c5 Merge pull request #122 from twuni/ci/setup-basic-ci
ci: setup GitHub Actions CI
2024-03-18 18:37:19 -07:00
Vyas Nellutla
ced33bf997 fix: shrink timeout 2024-03-17 21:19:58 -05:00
Vyas Nellutla
48599cd1aa refactor: remove circleci 2024-03-17 21:19:33 -05:00
Vyas Nellutla
c92609d905 fix: remove tilt install 2024-03-17 21:17:35 -05:00
Vyas Nellutla
85f7a82394 ci: setup integration test 2024-03-17 21:17:20 -05:00
Vyas Nellutla
299396cab0 ci: setup basic ci 2024-03-17 21:09:27 -05:00
Joshua Sizer
524a0a9375 Merge pull request #120 from joshsizer/release-v2.2.3
🏁 v2.2.3 Release
2024-03-17 22:06:13 -04:00
Josh Sizer
91124414a5 🏁 v2.2.3 Release 2024-03-16 19:08:18 -04:00
Joshua Sizer
808510d274 Merge pull request #106 from ChevronTango/main
Adding Deployment Annotations
2024-03-15 17:13:04 -04:00
Edward Brough
c7d3bc3b42 adding deployment annotations
Signed-off-by: Edward Brough <edward.brough@gmail.com>
2024-03-15 17:25:42 +00:00
Joshua Sizer
baae5c6986 Merge pull request #117 from laverya/patch-1
Update README.md to use correct default version
2024-03-12 21:15:51 -04:00
Andrew Lavery
a03420f765 Update README.md to use correct default version 2024-03-12 11:19:31 -04:00
Vyas
7d16b3c57b Merge pull request #114 from ddelange/patch-3
Fix backwards compatibility for k8s 1.24
2024-03-08 09:49:40 -06:00
ddelange
c112edabe5 Revert version 2024-03-08 06:45:07 +01:00
ddelange
456d4f0308 Remove .github/workflows/healm_publish.yaml 2024-03-06 07:20:19 +01:00
Vyas
419a289a0e Merge pull request #102 from erikfuego/security-context-missing-fields
Add missing fields for Security context  and secrets
2024-03-05 13:59:41 -06:00
erikfuego
ed0a778281 Add missing fields for Security context and secrets 2024-03-04 12:36:40 -05:00
ddelange
9193ce0ae8 Bump chart version
This reverts commit 345f178c44ab853fb603dab5bba6c58eae3e954b.
2024-01-04 10:49:33 +01:00
ddelange
ebc2372fb4 Merge branch 'helm-publish' of https://github.com/ddelange/docker-registry.helm into patch-3
* 'helm-publish' of https://github.com/ddelange/docker-registry.helm:
  Publish helm chart as release asset
  Fix backwards compatibility for k8s 1.24
2024-01-04 10:20:52 +01:00
ddelange
38acafc680 Fix backwards compatibility for k8s 1.24 2024-01-04 10:20:25 +01:00
ddelange
a1b77cb212 Publish helm chart as release asset 2024-01-04 10:09:33 +01:00
ddelange
05d75cad63 Fix backwards compatibility for k8s 1.24 2024-01-04 10:01:08 +01:00
Devin Canterberry
d74c33abd9 Merge pull request #88 from syseleven/deprecation-1.25
Migrate PodDisruptionBudget policy/v1beta1 to policy/v1
2023-02-24 08:05:02 -08:00
Stefan Andres
fc2ab7e7ac Migrate PodDisruptionBudget policy/v1beta1 to policy/v1
In k8s 1.25 policy/v1beta1 is no longer served, migrate to policy/v1.

https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-25
2022-12-13 15:58:54 +01:00
Devin Canterberry
405346f80e 🏁 v2.2.2 Release 2022-08-18 10:20:10 -07:00
Devin Canterberry
b152f62233 Merge pull request #79 from pieveee/fix/#73
fix extraVolumes and extraVolumeMounts (hypen typo) #78 #77
2022-08-18 10:19:07 -07:00
Michael Blickenstorfer
55647356c5 fix #73 2022-08-18 12:20:21 +02:00
Devin Canterberry
294d61f9d3 Merge pull request #75 from canterberry/remove-duplicate-check
🐞 Fix duplicate PR diff GitHub action and tweak test values
(approved by @ddelange)
2022-08-17 12:22:40 -07:00
Devin Canterberry
836f46131f 🚦 Hard-coding the "before" chart URL in the PR diff GitHub action
While this may not be strictly necessary, it's the correct resolution
enough of the time that the clarity of explicitly stating the "before"
is, I think, worth it.
2022-08-17 12:08:24 -07:00
Devin Canterberry
c7b3257baa 🚦 Add release namespace and target namespaces to PR diff action test values 2022-08-17 11:56:49 -07:00
Devin Canterberry
1315fc281e Merge pull request #65 from canterberry/namespaced-service-account
🐞 Add missing namespace to ServiceAccount
2022-08-17 11:50:50 -07:00
Devin Canterberry
635fd0fa0c Merge pull request #72 from edwargix/registr-2.8
Upgrade default image version from 2.7.1 to 2.8.1
2022-08-17 11:49:16 -07:00
Devin Canterberry
91dd5f2928 🚦 Add extraVolumes and extraVolumeMounts to PR diff GitHub action 2022-08-17 11:43:37 -07:00
Devin Canterberry
8ce5a40b47 🔥 Remove duplicate trigger for PR diff GitHub action 2022-08-17 11:40:34 -07:00
David Florness
96ad7c0eb4 Upgrade default image version from 2.7.1 to 2.8.1
Includes changes from releases 2.8.0 and 2.8.1, which mostly contain bugfixes:

- https://github.com/distribution/distribution/releases/tag/v2.8.0
- https://github.com/distribution/distribution/releases/tag/v2.8.1
2022-08-16 22:29:59 -04:00
Devin Canterberry
95ab1afa98 🏁 v2.2.1 Release 2022-08-15 14:47:24 -07:00
Devin Canterberry
471cb14632 Merge pull request #62 from ddelange/garbage-collector
♻️ Deduplicate definitions from deployment and cronjob
2022-08-15 14:40:33 -07:00
Devin Canterberry
8707c92f64 Merge pull request #70 from ddelange/patch-1
👷 Add sticky helm diff PR comment
2022-08-15 14:38:24 -07:00
Devin Canterberry
7e099191b3 🎨 Specify commit hash in sticky PR comment
Co-authored-by: ddelange <14880945+ddelange@users.noreply.github.com>
2022-08-15 14:33:33 -07:00
ddelange
23608f3fa7 Bar permissions and allow forks to run in base scope (#6)
* Test permissions

* Add back pull_request

* Use full SHA
2022-08-11 09:34:52 +02:00
ddelange
9023f38343 Revert 2022-08-10 15:09:19 +02:00
ddelange
4a6440da88 Test the smoketest 2022-08-10 15:07:35 +02:00
ddelange
4b69284642 Fix collapsible markdown 2022-08-10 15:06:52 +02:00
ddelange
4091345244 Collapse the diff 2022-08-10 15:04:58 +02:00
ddelange
9b65310c58 Make filenames show up in diff 2022-08-10 15:00:12 +02:00
ddelange
d6f9bdc4f1 Fix
https://github.com/rlespinasse/git-commit-data-action/pull/12/files
2022-08-10 13:30:17 +02:00
ddelange
c4e5c3860c Try without alias 2022-08-10 13:23:42 +02:00
ddelange
f7c99a3dd4 Fix alias expansion
https://github.com/actions/toolkit/issues/766#issuecomment-928305811
2022-08-10 13:17:23 +02:00
ddelange
94d36dc9cd Fix multiline output 2022-08-10 13:09:44 +02:00
ddelange
186e23c219 👷 Add sticky helm diff PR comment 2022-08-10 11:13:47 +02:00
ddelange
b4b319496c Fix more indentations 2022-08-10 10:08:13 +02:00
ddelange
52a5d4ba15 Fix extraEnvVars indentation, remove env whitespaces 2022-08-10 09:05:50 +02:00
ddelange
5a831ab9d3 🔥 Remove merge remnant 2022-08-09 22:00:43 +03:00
ddelange
f22f42d2b2 Merge branch 'main' into garbage-collector 2022-08-09 20:26:35 +02:00
Devin Canterberry
411fd99f68 🏁 v2.2.0 Release 2022-08-09 10:13:42 -07:00
Devin Canterberry
171632afef Merge pull request #68 from ddelange/garbage-collector-additive
Add option to enable garbage collector
2022-08-09 10:10:53 -07:00
Devin Canterberry
25bf25dda1 🔥 Remove default value for persistence.deleteEnabled
The default value is documented in the README as `nil`, and where referenced, a falsey value is adequate.

Co-authored-by: ddelange <14880945+ddelange@users.noreply.github.com>
2022-08-09 10:09:14 -07:00
ddelange
76ff283a25 PR Suggestions 2022-08-08 10:58:50 +02:00
ddelange
fb2132a0c7 PR Suggestions 2022-08-08 10:57:43 +02:00
ddelange
d78c010ca5 Revert "Make the changes additive"
This reverts commit fd7fdcaa44.
2022-08-05 14:11:37 +02:00
ddelange
fd7fdcaa44 Make the changes additive 2022-08-05 14:04:37 +02:00
ddelange
3b4ff679f8 Revert version bump in Chart.yaml 2022-08-04 08:45:05 +02:00
Devin Canterberry
a1cd36f55e 🐞 Add missing namespace to ServiceAccount
When `serviceAccount.create` is `true`, this chart creates
a service account. Currently, that service account will be
created without an explicit namespace. This can be problematic
because the Deployment resource does have an explicit namespace
set. Because the ServiceAccount and Deployment (ultimately, the
Pod) must coexist in the same namespace, we need to follow the
same logic when setting the namespace for both.

Fixes https://github.com/twuni/docker-registry.helm/issues/60.
2022-07-27 23:50:13 -07:00
Devin Canterberry
79c14893af Merge pull request #61 from joneteus/patch-1
Fix reference in README
2022-06-27 11:25:02 -07:00
Joni Ollikainen
257d223141 Fix reference in README
f158323875/templates/secret.yaml (L17)

According to `secret.yaml` `haSharedSecret` should be inside `secrets` object
2022-06-27 13:18:19 +03:00
ddelange
29a0863ee2 Merge branch 'main' of https://github.com/twuni/docker-registry.helm into garbage-collector
Includes moving additions to demployment.yaml to _helpers.tpl ref https://github.com/twuni/docker-registry.helm/compare/v1.13.0...v2.1.0

* 'main' of https://github.com/twuni/docker-registry.helm: (22 commits)
  Updated README with initContainers value
  Add initContainer support
  🏁 v2.1.0 Release
  Added support for autoscaling using hpa
  🏁 v2.0.1 Release
  🌐 make protocol selection work with istio
  fix(templates): Add checksum on secret.yaml file
  🏁 v2.0.0 Release
  Fix #19 (new kubernetes API version)
  🏁 v1.16.0 Release
  Conditionally create service account and add to deployment
  🏁 v1.15.0 Release
  Support deployment to a namespace
  Updated typo to enable(d)
  🏁 v1.14.0 Release
  Enable metrics via Prometheus Operator
  Support additional env variables
  🏁 v1.13.2 Release
  Add support for S3 bucket to prefix all data
  🏁 v1.13.1 Release
  ...
2022-06-24 09:31:37 +02:00
Devin Canterberry
f158323875 Merge pull request #40 from g-linville/initContainer
Add initContainer support
2022-04-14 17:04:43 -07:00
Grant Linville
39788072e6 Updated README with initContainers value 2022-04-14 10:28:01 -04:00
Grant Linville
0b6729f21d Add initContainer support 2022-04-14 10:27:29 -04:00
Devin Canterberry
b5ad18ea83 🏁 v2.1.0 Release 2022-02-02 19:45:14 -08:00
Devin Canterberry
297f860dd6 Merge pull request #38 from SimonRupar/hpa
Added support for pod autoscaling using Horizontal Pod Autoscaler
2022-02-02 14:20:12 -08:00
SimonRupar
c91c8139c5 Added support for autoscaling using hpa 2022-02-01 20:45:03 +01:00
Devin Canterberry
4b5531d4ef Merge pull request #49 from Eriwyr/patch-1
fix(templates): Add checksum on secret.yaml file
2022-01-30 19:22:42 -08:00
Devin Canterberry
489a5a25d9 🏁 v2.0.1 Release 2022-01-30 19:14:41 -08:00
Devin Canterberry
2884368a08 Merge pull request #51 from jsievenpiper/metrics
🌐 make protocol selection work with istio
2022-01-30 19:10:37 -08:00
Justin Sievenpiper
5d738bd9e7 🌐 make protocol selection work with istio 2022-01-27 15:20:49 -08:00
CHABRIER Valentin
98bdab8c45 fix(templates): Add checksum on secret.yaml file
Too bad it's lacking a check in addition to the config that the secret file has not changed too in the deployment :)
2022-01-07 16:53:46 +01:00
Devin Canterberry
2703d08224 🏁 v2.0.0 Release 2022-01-03 19:31:44 -08:00
Devin Canterberry
62c5b344a9 Merge pull request #48 from retupmoca/main
Fix #19 (new kubernetes API version)
2022-01-03 09:06:29 -08:00
Travis Loyd
266b0ea8d8 Fix #19 (new kubernetes API version)
This is a signed squash of unsigned commits made by both
Andrew <andrew@egeler.us> and Travis Loyd <fun.tloyd@gmail.com>. It is a
slight cleanup of Travis Loyd's PR #27

Travis Loyd <fun.tloyd@gmail.com>:
* Fix for issue number 19, current api version and previous api version need to be updated
* Added helm if statement to handle previous ingress 'http paths' style and current 'http paths' style
* adjusted helm if statement to accomidate scoping by setting as a variable up top
* moved new apiVersion variable to the top just under check for ingress enabled
* added ingressClassName and set a default value of 'nginx' in the values file

Andrew <andrew@egeler.us>:
* PR Change Cleanup
  * rename $apiVersion to $apiVersions
  * rename ingress.ingressClassName to ingress.className
  * add documentation entry for ingress.className
* fix README default value
2022-01-02 14:57:12 -05:00
Vladimir Kuznichenkov
a95a3480c6 Garbage collector job to keep registry tiny
We don't have unlimited storage, and we would like to run built-in garbage collector to keep storage usage low.
2021-09-18 12:40:25 +03:00
Vladimir Kuznichenkov
c855e53b9e Add empty objects to default envs to prevent validation errors
In case of S3 we can use IAM role to access bucket, in that case we do not need to define anything in secrets. At the same time due to missed parent level field chart will fail with an error.
2021-09-18 12:36:22 +03:00
Vladimir Kuznichenkov
944cf7eb62 Use a single style of indents
`nindent` function insert fist newline before actual content and allow you use it on any level of yaml without breaking visual structure.
2021-09-18 12:34:57 +03:00
Vladimir Kuznichenkov
2726d10083 Move common sections to defined template to prevent code duplication
Cronjob should have the same env variables and volumes to proceed correctly
2021-09-18 12:33:43 +03:00
19 changed files with 687 additions and 241 deletions

View File

@@ -1,15 +0,0 @@
version: 2.1
jobs:
lint:
docker:
- image: twuni/helm:3.4.1
steps:
- checkout
- run:
command: helm lint --strict
name: lint
workflows:
version: 2
default:
jobs:
- lint

8
.github/dependabot.yaml vendored Normal file
View File

@@ -0,0 +1,8 @@
---
# Dependabot Config Ref: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

41
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,41 @@
---
# GitHub Actions Workflows Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: CI
"on":
push:
branches:
- main
pull_request:
branches:
- "**"
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
permissions: read-all
jobs:
helm-lint:
name: Helm Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4.1.4
- run: |
helm lint --strict
integration-test:
name: Integration Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4.1.4
- uses: AbsaOSS/k3d-action@v2.4.0
name: Create K3D Cluster with Container Registry
with:
cluster-name: local-ci-k3d-cluster
args: >-
--agents 1
--registry-create local-ci-k3d-registry
- name: Test
run: |
helm install docker-registry . --wait --wait-for-jobs
kubectl get all,pvc

35
.github/workflows/helm_release.yaml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Release Charts
on:
workflow_dispatch:
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install chart-releaser
uses: helm/chart-releaser-action@v1.7.0
with:
install_only: true
- name: Run chart-releaser
env:
CR_TOKEN: "${{ secrets.CR_TOKEN }}"
run: |
owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY")
repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY")
cr package
cr upload --owner="$owner" --git-repo "$repo" --token="$CR_TOKEN" --release-name-template="v{{ .Version }}" --packages-with-index --push --skip-existing --generate-release-notes --commit main
cr index --owner="$owner" --git-repo "$repo" --token="$CR_TOKEN" --release-name-template="v{{ .Version }}" --packages-with-index --push --index-path="."

58
.github/workflows/pr_diff.yaml vendored Normal file
View File

@@ -0,0 +1,58 @@
name: PR Diff for Helm chart
on:
pull_request_target:
permissions:
pull-requests: write
jobs:
diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: azure/setup-helm@v3
- name: Run diff
id: diff
run: |
OPTIONS=(
--namespace meta-namespace
--set serviceAccount.create=true
--set priorityClassName=high
--set podAnnotations.test=annotation
--set extraEnvVars[0].name=TEST_NAME
--set extraEnvVars[0].value=TEST_VALUE
--set extraVolumes[0].name=test
--set extraVolumes[0].emptyDir.medium=Memory
--set extraVolumeMounts[0].name=test
--set extraVolumeMounts[0].mountPath=/test
--set secrets.htpasswd=abc
--set tlsSecretName=abc
--set garbageCollect.enabled=true
--set namespace=target-namespace
--set proxy.enabled=true
--set storage=s3
--set secrets.s3.secretKey=abc
--set secrets.s3.accessKey=def
--set s3.region=us-42
--set s3.bucket=abc
--set s3.encrypt=abc
)
helm template --debug ${OPTIONS[@]} --output-dir before https://github.com/twuni/docker-registry.helm/archive/refs/heads/main.tar.gz
helm template --debug ${OPTIONS[@]} --output-dir after .
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
echo 'HELM_DIFF<<EOF' >> $GITHUB_ENV
echo "$(diff -ur before after)" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- uses: marocchino/sticky-pull-request-comment@d2ad0de260ae8b0235ce059e63f2949ba9e05943
with:
message: |
Running a `helm template` smoketest on commit ${{ github.ref }} results in the following diff against `${{ github.base_ref }}`:
<details><summary>diff</summary><p>
```diff
${{ env.HELM_DIFF }}
```
</p></details>

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.cr-release-packages

View File

@@ -1,8 +1,8 @@
apiVersion: v1
description: A Helm chart for Docker Registry
name: docker-registry
version: 1.16.0
appVersion: 2.7.1
version: 3.0.0
appVersion: 3.0.0
home: https://hub.docker.com/_/registry/
icon: https://helm.twun.io/docker-registry.png
maintainers:

View File

@@ -12,18 +12,33 @@ This chart will do the following:
* Implement a Docker registry deployment
## ⚠️ Repo Migration and Deprecation Notice
The following change only affects attempts to install or update the chart via the https://helm.twun.io repo.
The https://helm.twun.io repo has been migrated to https://twuni.github.io/docker-registry.helm.
To update your configuration, remove and re-add the repo with the new URL:
```console
helm repo remove twuni
helm repo add twuni https://twuni.github.io/docker-registry.helm
```
The deprecated repo URL, https://helm.twun.io, may become unavailable as early as **October 16, 2025**.
## Installing the Chart
First, add the repo:
```console
$ helm repo add twuni https://helm.twun.io
helm repo add twuni https://twuni.github.io/docker-registry.helm
```
To install the chart, use the following:
```console
$ helm install twuni/docker-registry
helm install twuni/docker-registry
```
## Configuration
@@ -35,7 +50,7 @@ their default values.
|:----------------------------|:-------------------------------------------------------------------------------------------|:----------------|
| `image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `image.repository` | Container image to use | `registry` |
| `image.tag` | Container image tag to deploy | `2.7.1` |
| `image.tag` | Container image tag to deploy | `2.8.1` |
| `imagePullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) |
| `persistence.accessMode` | Access mode to use for PVC | `ReadWriteOnce` |
| `persistence.enabled` | Whether to use a PVC for the Docker storage | `false` |
@@ -46,6 +61,7 @@ their default values.
| `serviceAccount.create` | Create ServiceAccount | `false` |
| `serviceAccount.name` | ServiceAccount name | `nil` |
| `serviceAccount.annotations` | Annotations to add to the ServiceAccount | `{}` |
| `deployment.annotations` | Annotations to add to the Deployment | `{}` |
| `service.port` | TCP port on which the service is exposed | `5000` |
| `service.type` | service type | `ClusterIP` |
| `service.clusterIP` | if `service.type` is `ClusterIP` and this is non-empty, sets the cluster IP of the service | `nil` |
@@ -56,28 +72,37 @@ their default values.
| `service.sessionAffinityConfig` | service session affinity config | `nil` |
| `replicaCount` | k8s replicas | `1` |
| `updateStrategy` | update strategy for deployment | `{}` |
| `podAnnotations` | Annotations for pod | `{}` |
| `podLabels` | Labels for pod | `{}` |
| `podAnnotations` | Annotations for deployment pod, and `garbageCollect` pod unless set explicitly there. See `garbageCollect` | `{}` |
| `podLabels` | Labels for deployment pod, and `garbageCollect` pod unless set explicitly there. See `garbageCollect` | `{}` |
| `podDisruptionBudget` | Pod disruption budget | `{}` |
| `resources.limits.cpu` | Container requested CPU | `nil` |
| `resources.limits.memory` | Container requested memory | `nil` |
| `autoscaling.enabled` | Enable autoscaling using HorizontalPodAutoscaler | `false` |
| `autoscaling.minReplicas` | Minimal number of replicas | `1` |
| `autoscaling.maxReplicas` | Maximal number of replicas | `2` |
| `autoscaling.targetCPUUtilizationPercentage` | Target average utilization of CPU on Pods | `60` |
| `autoscaling.targetMemoryUtilizationPercentage` | (Kubernetes ≥1.23) Target average utilization of Memory on Pods | `60` |
| `autoscaling.behavior` | (Kubernetes ≥1.23) Configurable scaling behavior | `{}` |
| `priorityClassName ` | priorityClassName | `""` |
| `storage` | Storage system to use | `filesystem` |
| `tlsSecretName` | Name of secret for TLS certs | `nil` |
| `secrets.htpasswd` | Htpasswd authentication | `nil` |
| `secrets.s3.accessKey` | Access Key for S3 configuration | `nil` |
| `secrets.s3.secretKey` | Secret Key for S3 configuration | `nil` |
| `secrets.s3.secretRef` | The ref for an external secret containing the accessKey and secretKey keys | `""` |
| `secrets.s3.secretRef` | The ref for an external secret containing the s3AccessKey and s3SecretKey keys | `""` |
| `secrets.swift.username` | Username for Swift configuration | `nil` |
| `secrets.swift.password` | Password for Swift configuration | `nil` |
| `haSharedSecret` | Shared secret for Registry | `nil` |
| `secrets.haSharedSecret` | Shared secret for Registry | `nil` |
| `configData` | Configuration hash for docker | `nil` |
| `configPath` | Configuration mount point in docker, `/etc/docker/registry` for registry version 2, `/etc/distribution` for version 3 | `/etc/docker/registry` |
| `s3.region` | S3 region | `nil` |
| `s3.regionEndpoint` | S3 region endpoint | `nil` |
| `s3.bucket` | S3 bucket name | `nil` |
| `s3.rootdirectory` | S3 prefix that is applied to allow you to segment data | `nil` |
| `s3.encrypt` | Store images in encrypted format | `nil` |
| `s3.secure` | Use HTTPS | `nil` |
| `s3.forcepathstyle` | Use path-style addressing, needed for some s3 compatible storage (minio) | `nil` |
| `s3.skipverify` | Allows connection to s3 storage using TLS with untrusted/self-signed certificate | `nil` |
| `swift.authurl` | Swift authurl | `nil` |
| `swift.container` | Swift container | `nil` |
| `proxy.enabled` | If true, registry will function as a proxy/mirror | `false` |
@@ -95,6 +120,7 @@ their default values.
| `ingress.path` | Ingress service path | `/` |
| `ingress.hosts` | Ingress hostnames | `[]` |
| `ingress.tls` | Ingress TLS configuration (YAML) | `[]` |
| `ingress.className` | Ingress controller class name | `nginx` |
| `metrics.enabled` | Enable metrics on Service | `false` |
| `metrics.port` | TCP port on which the service metrics is exposed | `5001` |
| `metrics.serviceMonitor.annotations` | Prometheus Operator ServiceMonitor annotations | `{}` |
@@ -107,9 +133,16 @@ their default values.
| `extraVolumeMounts` | Additional volumeMounts to the registry container | `[]` |
| `extraVolumes` | Additional volumes to the pod | `[]` |
| `extraEnvVars` | Additional environment variables to the pod | `[]` |
| `initContainers` | Init containers to be created in the pod | `[]` |
| `garbageCollect.enabled` | If true, will deploy garbage-collector cronjob | `false` |
| `garbageCollect.deleteUntagged` | If true, garbage-collector will delete manifests that are not currently referenced via tag | `true` |
| `garbageCollect.schedule` | CronTab schedule, please use standard crontab format | `0 1 * * *` |
| `garbageCollect.podAnnotations` | CronJob pod Annotations. If left empty and chart `podAnnotations` are set, will use those. If both are set, these take precedence for the `garbageCollect` pods. | `{}` |
| `garbageCollect.podLabels` | CronJob pod Annotations. If left empty and chart `podLabels` are set, will use those. If both are set, these take precedence for the `garbageCollect` pods. | `{}` |
| `garbageCollect.resources` | garbage-collector requested resources | `{}` |
Specify each parameter using the `--set key=value[,key=value]` argument to
`helm install`.
To generate htpasswd file, run this docker command:
`docker run --entrypoint htpasswd registry:2 -Bbn user password > ./htpasswd`.
`docker run --entrypoint htpasswd httpd:2 -Bbn user password > ./htpasswd`.

View File

@@ -22,3 +22,198 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- end -}}
{{- end -}}
{{- end -}}
{{- define "docker-registry.envs" -}}
- name: REGISTRY_HTTP_SECRET
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: haSharedSecret
{{- if .Values.secrets.htpasswd }}
- name: REGISTRY_AUTH
value: "htpasswd"
- name: REGISTRY_AUTH_HTPASSWD_REALM
value: "Registry Realm"
- name: REGISTRY_AUTH_HTPASSWD_PATH
value: "/auth/htpasswd"
{{- end }}
{{- if .Values.tlsSecretName }}
- name: REGISTRY_HTTP_TLS_CERTIFICATE
value: /etc/ssl/docker/tls.crt
- name: REGISTRY_HTTP_TLS_KEY
value: /etc/ssl/docker/tls.key
{{- end -}}
{{- if eq .Values.storage "filesystem" }}
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: "/var/lib/registry"
{{- else if eq .Values.storage "azure" }}
- name: REGISTRY_STORAGE_AZURE_ACCOUNTNAME
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: azureAccountName
- name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: azureAccountKey
- name: REGISTRY_STORAGE_AZURE_CONTAINER
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: azureContainer
{{- else if eq .Values.storage "s3" }}
- name: REGISTRY_STORAGE_S3_REGION
value: {{ required ".Values.s3.region is required" .Values.s3.region }}
- name: REGISTRY_STORAGE_S3_BUCKET
value: {{ required ".Values.s3.bucket is required" .Values.s3.bucket }}
{{- if or (and .Values.secrets.s3.secretKey .Values.secrets.s3.accessKey) .Values.secrets.s3.secretRef }}
- name: REGISTRY_STORAGE_S3_ACCESSKEY
valueFrom:
secretKeyRef:
name: {{ if .Values.secrets.s3.secretRef }}{{ .Values.secrets.s3.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: s3AccessKey
- name: REGISTRY_STORAGE_S3_SECRETKEY
valueFrom:
secretKeyRef:
name: {{ if .Values.secrets.s3.secretRef }}{{ .Values.secrets.s3.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: s3SecretKey
{{- end -}}
{{- if .Values.s3.regionEndpoint }}
- name: REGISTRY_STORAGE_S3_REGIONENDPOINT
value: {{ .Values.s3.regionEndpoint }}
{{- end -}}
{{- if .Values.s3.rootdirectory }}
- name: REGISTRY_STORAGE_S3_ROOTDIRECTORY
value: {{ .Values.s3.rootdirectory | quote }}
{{- end -}}
{{- if .Values.s3.encrypt }}
- name: REGISTRY_STORAGE_S3_ENCRYPT
value: {{ .Values.s3.encrypt | quote }}
{{- end -}}
{{- if .Values.s3.secure }}
- name: REGISTRY_STORAGE_S3_SECURE
value: {{ .Values.s3.secure | quote }}
{{- end -}}
{{- if .Values.s3.forcepathstyle }}
- name: REGISTRY_STORAGE_S3_FORCEPATHSTYLE
value: {{ .Values.s3.forcepathstyle | quote }}
{{- end -}}
{{- if .Values.s3.skipverify }}
- name: REGISTRY_STORAGE_S3_SKIPVERIFY
value: {{ .Values.s3.skipverify | quote }}
{{- end -}}
{{- else if eq .Values.storage "swift" }}
- name: REGISTRY_STORAGE_SWIFT_AUTHURL
value: {{ required ".Values.swift.authurl is required" .Values.swift.authurl }}
- name: REGISTRY_STORAGE_SWIFT_USERNAME
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: swiftUsername
- name: REGISTRY_STORAGE_SWIFT_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: swiftPassword
- name: REGISTRY_STORAGE_SWIFT_CONTAINER
value: {{ required ".Values.swift.container is required" .Values.swift.container }}
{{- end -}}
{{- if .Values.proxy.enabled }}
- name: REGISTRY_PROXY_REMOTEURL
value: {{ required ".Values.proxy.remoteurl is required" .Values.proxy.remoteurl }}
- name: REGISTRY_PROXY_USERNAME
valueFrom:
secretKeyRef:
name: {{ if .Values.proxy.secretRef }}{{ .Values.proxy.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: proxyUsername
- name: REGISTRY_PROXY_PASSWORD
valueFrom:
secretKeyRef:
name: {{ if .Values.proxy.secretRef }}{{ .Values.proxy.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: proxyPassword
{{- end -}}
{{- if .Values.persistence.deleteEnabled }}
- name: REGISTRY_STORAGE_DELETE_ENABLED
value: "true"
{{- end -}}
{{- with .Values.extraEnvVars }}
{{ toYaml . }}
{{- end -}}
{{- end -}}
{{- define "docker-registry.volumeMounts" -}}
- name: "{{ template "docker-registry.fullname" . }}-config"
mountPath: {{ .Values.configPath }}
{{- if .Values.secrets.htpasswd }}
- name: auth
mountPath: /auth
readOnly: true
{{- end }}
{{- if eq .Values.storage "filesystem" }}
- name: data
mountPath: /var/lib/registry/
{{- end }}
{{- if .Values.tlsSecretName }}
- mountPath: /etc/ssl/docker
name: tls-cert
readOnly: true
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{ toYaml . }}
{{- end }}
{{- end -}}
{{- define "docker-registry.volumes" -}}
- name: {{ template "docker-registry.fullname" . }}-config
configMap:
name: {{ template "docker-registry.fullname" . }}-config
{{- if .Values.secrets.htpasswd }}
- name: auth
secret:
secretName: {{ template "docker-registry.fullname" . }}-secret
items:
- key: htpasswd
path: htpasswd
{{- end }}
{{- if eq .Values.storage "filesystem" }}
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "docker-registry.fullname" . }}{{- end }}
{{- else }}
emptyDir: {}
{{- end -}}
{{- end }}
{{- if .Values.tlsSecretName }}
- name: tls-cert
secret:
secretName: {{ .Values.tlsSecretName }}
{{- end }}
{{- with .Values.extraVolumes }}
{{ toYaml . }}
{{- end }}
{{- end -}}

82
templates/cronjob.yaml Normal file
View File

@@ -0,0 +1,82 @@
{{- if .Values.garbageCollect.enabled }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ template "docker-registry.fullname" . }}-garbage-collector
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
schedule: {{ .Values.garbageCollect.schedule | quote }}
jobTemplate:
metadata:
labels:
app: {{ template "docker-registry.name" . }}
release: {{ .Release.Name }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
spec:
template:
metadata:
labels:
release: {{ .Release.Name }}
{{- if or .Values.podLabels .Values.garbageCollect.podLabels }}
{{- toYaml (merge (.Values.garbageCollect.podLabels | default (dict)) (.Values.podLabels | default (dict))) | nindent 12 }}
{{- end }}
{{- if or .Values.podAnnotations .Values.garbageCollect.podAnnotations }}
annotations:
{{- toYaml (merge (.Values.garbageCollect.podAnnotations | default (dict)) (.Values.podAnnotations | default (dict))) | nindent 12 }}
{{- end}}
spec:
{{- if or (eq .Values.serviceAccount.create true) (ne .Values.serviceAccount.name "") }}
serviceAccountName: {{ .Values.serviceAccount.name | default (include "docker-registry.fullname" .) }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 12 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: "{{ .Values.priorityClassName }}"
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext: {{ omit .Values.securityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- /bin/registry
- garbage-collect
- --delete-untagged={{ .Values.garbageCollect.deleteUntagged }}
- {{ .Values.configPath }}/config.yml
{{- if .Values.garbageCollect.resources }}
resources:
{{- toYaml .Values.garbageCollect.resources | nindent 16 }}
{{- end }}
env: {{ include "docker-registry.envs" . | nindent 16 }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{ omit .Values.containerSecurityContext "enabled" | toYaml | nindent 16 }}
{{- end }}
volumeMounts: {{ include "docker-registry.volumeMounts" . | nindent 16 }}
restartPolicy: OnFailure
{{- if .Values.nodeSelector }}
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 12 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{ toYaml .Values.affinity | nindent 12 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{ toYaml .Values.tolerations | nindent 12 }}
{{- end }}
volumes: {{ include "docker-registry.volumes" . | nindent 12 }}
{{- end }}

View File

@@ -8,46 +8,51 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.deployment.annotations }}
annotations:
{{ toYaml .Values.deployment.annotations | indent 4 }}
{{- end }}
spec:
selector:
matchLabels:
app: {{ template "docker-registry.name" . }}
release: {{ .Release.Name }}
replicas: {{ .Values.replicaCount }}
{{- if .Values.updateStrategy }}
strategy:
{{ toYaml .Values.updateStrategy | indent 4 }}
{{- end }}
{{- if .Values.updateStrategy }}
strategy: {{ toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
minReadySeconds: 5
template:
metadata:
labels:
app: {{ template "docker-registry.name" . }}
release: {{ .Release.Name }}
{{- if .Values.podLabels }}
{{ toYaml .Values.podLabels | indent 8 }}
{{- with .Values.podLabels }}
{{ toYaml . | nindent 8 }}
{{- end }}
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if $.Values.podAnnotations }}
{{ toYaml $.Values.podAnnotations | indent 8 }}
{{- end }}
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
{{- if .Values.podAnnotations }}
{{ toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
spec:
{{- if or (eq .Values.serviceAccount.create true) (ne .Values.serviceAccount.name "") }}
{{- if or (eq .Values.serviceAccount.create true) (ne .Values.serviceAccount.name "") }}
serviceAccountName: {{ .Values.serviceAccount.name | default (include "docker-registry.fullname" .) }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: "{{ .Values.priorityClassName }}"
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
runAsUser: {{ .Values.securityContext.runAsUser }}
{{- end }}
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext: {{ omit .Values.securityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
{{- with .Values.initContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
@@ -55,197 +60,41 @@ spec:
command:
- /bin/registry
- serve
- /etc/docker/registry/config.yml
- {{ .Values.configPath }}/config.yml
ports:
- containerPort: 5000
{{- if .Values.metrics.enabled }}
{{- if .Values.metrics.enabled }}
- containerPort: {{ (split ":" .Values.configData.http.debug.addr)._1 }}
name: metrics
name: http-metrics
protocol: TCP
{{- end }}
{{- end }}
livenessProbe:
httpGet:
{{- if .Values.tlsSecretName }}
{{- if .Values.tlsSecretName }}
scheme: HTTPS
{{- end }}
{{- end }}
path: /
port: 5000
readinessProbe:
httpGet:
{{- if .Values.tlsSecretName }}
{{- if .Values.tlsSecretName }}
scheme: HTTPS
{{- end }}
{{- end }}
path: /
port: 5000
resources:
{{ toYaml .Values.resources | indent 12 }}
env:
{{- if .Values.secrets.htpasswd }}
- name: REGISTRY_AUTH
value: "htpasswd"
- name: REGISTRY_AUTH_HTPASSWD_REALM
value: "Registry Realm"
- name: REGISTRY_AUTH_HTPASSWD_PATH
value: "/auth/htpasswd"
{{- end }}
- name: REGISTRY_HTTP_SECRET
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: haSharedSecret
{{- if .Values.tlsSecretName }}
- name: REGISTRY_HTTP_TLS_CERTIFICATE
value: /etc/ssl/docker/tls.crt
- name: REGISTRY_HTTP_TLS_KEY
value: /etc/ssl/docker/tls.key
{{- end }}
{{- if eq .Values.storage "filesystem" }}
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
value: "/var/lib/registry"
{{- else if eq .Values.storage "azure" }}
- name: REGISTRY_STORAGE_AZURE_ACCOUNTNAME
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: azureAccountName
- name: REGISTRY_STORAGE_AZURE_ACCOUNTKEY
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: azureAccountKey
- name: REGISTRY_STORAGE_AZURE_CONTAINER
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: azureContainer
{{- else if eq .Values.storage "s3" }}
{{- if or (and .Values.secrets.s3.secretKey .Values.secrets.s3.accessKey) .Values.secrets.s3.secretRef }}
- name: REGISTRY_STORAGE_S3_ACCESSKEY
valueFrom:
secretKeyRef:
name: {{ if .Values.secrets.s3.secretRef }}{{ .Values.secrets.s3.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: s3AccessKey
- name: REGISTRY_STORAGE_S3_SECRETKEY
valueFrom:
secretKeyRef:
name: {{ if .Values.secrets.s3.secretRef }}{{ .Values.secrets.s3.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: s3SecretKey
{{- end }}
- name: REGISTRY_STORAGE_S3_REGION
value: {{ required ".Values.s3.region is required" .Values.s3.region }}
{{- if .Values.s3.regionEndpoint }}
- name: REGISTRY_STORAGE_S3_REGIONENDPOINT
value: {{ .Values.s3.regionEndpoint }}
resources: {{ toYaml .Values.resources | nindent 12 }}
env: {{ include "docker-registry.envs" . | nindent 12 }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{ omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
- name: REGISTRY_STORAGE_S3_BUCKET
value: {{ required ".Values.s3.bucket is required" .Values.s3.bucket }}
{{- if .Values.s3.rootdirectory }}
- name: REGISTRY_STORAGE_S3_ROOTDIRECTORY
value: {{ .Values.s3.rootdirectory | quote }}
{{- end }}
{{- if .Values.s3.encrypt }}
- name: REGISTRY_STORAGE_S3_ENCRYPT
value: {{ .Values.s3.encrypt | quote }}
{{- end }}
{{- if .Values.s3.secure }}
- name: REGISTRY_STORAGE_S3_SECURE
value: {{ .Values.s3.secure | quote }}
{{- end }}
{{- else if eq .Values.storage "swift" }}
- name: REGISTRY_STORAGE_SWIFT_AUTHURL
value: {{ required ".Values.swift.authurl is required" .Values.swift.authurl }}
- name: REGISTRY_STORAGE_SWIFT_USERNAME
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: swiftUsername
- name: REGISTRY_STORAGE_SWIFT_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "docker-registry.fullname" . }}-secret
key: swiftPassword
- name: REGISTRY_STORAGE_SWIFT_CONTAINER
value: {{ required ".Values.swift.container is required" .Values.swift.container }}
{{- end }}
{{- if .Values.proxy.enabled }}
- name: REGISTRY_PROXY_REMOTEURL
value: {{ required ".Values.proxy.remoteurl is required" .Values.proxy.remoteurl }}
- name: REGISTRY_PROXY_USERNAME
valueFrom:
secretKeyRef:
name: {{ if .Values.proxy.secretRef }}{{ .Values.proxy.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: proxyUsername
- name: REGISTRY_PROXY_PASSWORD
valueFrom:
secretKeyRef:
name: {{ if .Values.proxy.secretRef }}{{ .Values.proxy.secretRef }}{{ else }}{{ template "docker-registry.fullname" . }}-secret{{ end }}
key: proxyPassword
{{- end }}
{{- if .Values.persistence.deleteEnabled }}
- name: REGISTRY_STORAGE_DELETE_ENABLED
value: "true"
{{- end }}
{{- with .Values.extraEnvVars }}
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
{{- if .Values.secrets.htpasswd }}
- name: auth
mountPath: /auth
readOnly: true
{{- end }}
{{- if eq .Values.storage "filesystem" }}
- name: data
mountPath: /var/lib/registry/
{{- end }}
- name: "{{ template "docker-registry.fullname" . }}-config"
mountPath: "/etc/docker/registry"
{{- if .Values.tlsSecretName }}
- mountPath: /etc/ssl/docker
name: tls-cert
readOnly: true
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity:
{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations:
{{ toYaml .Values.tolerations | indent 8 }}
{{- end }}
volumes:
{{- if .Values.secrets.htpasswd }}
- name: auth
secret:
secretName: {{ template "docker-registry.fullname" . }}-secret
items:
- key: htpasswd
path: htpasswd
{{- end }}
{{- if eq .Values.storage "filesystem" }}
- name: data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "docker-registry.fullname" . }}{{- end }}
{{- else }}
emptyDir: {}
{{- end -}}
{{- end }}
- name: {{ template "docker-registry.fullname" . }}-config
configMap:
name: {{ template "docker-registry.fullname" . }}-config
{{- if .Values.tlsSecretName }}
- name: tls-cert
secret:
secretName: {{ .Values.tlsSecretName }}
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
volumeMounts: {{ include "docker-registry.volumeMounts" . | nindent 12 }}
{{- if .Values.nodeSelector }}
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{ toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
{{- end }}
volumes: {{ include "docker-registry.volumes" . | nindent 8 }}

42
templates/hpa.yaml Normal file
View File

@@ -0,0 +1,42 @@
{{- if .Values.autoscaling.enabled }}
{{- $apiVersions := .Capabilities.APIVersions -}}
{{- if $apiVersions.Has "autoscaling/v2" }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "docker-registry.fullname" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "docker-registry.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- with .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ . }}
{{- end }}
{{- with .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ . }}
{{- end }}
{{- with .Values.autoscaling.behavior }}
behavior:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

22
templates/hpaV1.yaml Normal file
View File

@@ -0,0 +1,22 @@
{{- if .Values.autoscaling.enabled }}
{{- $apiVersions := .Capabilities.APIVersions -}}
{{- if not ($apiVersions.Has "autoscaling/v2") }}
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "docker-registry.fullname" . }}
labels:
app: {{ template "docker-registry.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "docker-registry.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- end }}

View File

@@ -1,8 +1,9 @@
{{- if .Values.ingress.enabled -}}
{{- $apiVersions := .Capabilities.APIVersions -}}
{{- $serviceName := include "docker-registry.fullname" . -}}
{{- $servicePort := .Values.service.port -}}
{{- $path := .Values.ingress.path -}}
apiVersion: {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} networking.k8s.io/v1beta1 {{- else }} extensions/v1beta1 {{- end }}
apiVersion: {{- if $apiVersions.Has "networking.k8s.io/v1" }} networking.k8s.io/v1 {{- else }} networking.k8s.io/v1beta1 {{- end }}
kind: Ingress
metadata:
name: {{ template "docker-registry.fullname" . }}
@@ -20,15 +21,27 @@ metadata:
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
{{- if $apiVersions.Has "networking.k8s.io/v1" }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
rules:
{{- range $host := .Values.ingress.hosts }}
- host: {{ $host }}
http:
paths:
- path: {{ $path }}
{{- if $apiVersions.Has "networking.k8s.io/v1" }}
pathType: Prefix
backend:
service:
name: {{ $serviceName }}
port:
number: {{ $servicePort }}
{{- else }}
backend:
serviceName: {{ $serviceName }}
servicePort: {{ $servicePort }}
{{- end }}
{{- end -}}
{{- if .Values.ingress.tls }}
tls:

View File

@@ -1,5 +1,9 @@
{{- if .Values.podDisruptionBudget -}}
{{- if .Capabilities.APIVersions.Has "policy/v1" -}}
apiVersion: policy/v1
{{- else}}
apiVersion: policy/v1beta1
{{- end }}
kind: PodDisruptionBudget
metadata:
name: {{ template "docker-registry.fullname" . }}

View File

@@ -8,6 +8,9 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.service.labels }}
{{ toYaml .Values.service.labels | indent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
annotations:
{{ toYaml .Values.service.annotations | indent 4 }}
@@ -41,7 +44,7 @@ spec:
{{- if .Values.metrics.enabled }}
- port: {{ .Values.metrics.port }}
protocol: TCP
name: metrics
name: http-metrics
targetPort: {{ (split ":" .Values.configData.http.debug.addr)._1 }}
{{- end }}
selector:

View File

@@ -7,6 +7,7 @@ metadata:
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
{{- if .Values.serviceAccount.name }}
name: {{ .Values.serviceAccount.name }}
{{- else }}

View File

@@ -16,6 +16,6 @@ spec:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
endpoints:
- port: metrics
- port: http-metrics
interval: 15s
{{- end }}

View File

@@ -19,10 +19,12 @@ serviceAccount:
image:
repository: registry
tag: 2.7.1
tag: 3.0.0
pullPolicy: IfNotPresent
# imagePullSecrets:
# - name: docker
deployment: {}
# annotations:
service:
name: registry
type: ClusterIP
@@ -35,8 +37,11 @@ service:
# loadBalancerSourceRanges:
annotations: {}
# foo.io/bar: "true"
labels: {}
# foo.io/baz: "false"
ingress:
enabled: false
className: nginx
path: /
# Used to create an Ingress record.
hosts:
@@ -56,11 +61,11 @@ resources: {}
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
# cpu: 100m
# memory: 128Mi
persistence:
accessMode: 'ReadWriteOnce'
enabled: false
@@ -93,17 +98,19 @@ secrets:
# Options for s3 storage type:
# s3:
# region: us-east-1
# regionEndpoint: s3.us-east-1.amazonaws.com
# bucket: my-bucket
# rootdirectory: /object/prefix
# encrypt: false
# secure: true
# region: us-east-1
# regionEndpoint: https://s3.us-east-1.amazonaws.com
# bucket: my-bucket
# rootdirectory: /object/prefix
# encrypt: false
# secure: true
# forcepathstyle: true
# skipverify: true
# Options for swift storage type:
# swift:
# authurl: http://swift.example.com/
# container: my-container
# authurl: http://swift.example.com/
# container: my-container
# https://docs.docker.com/registry/recipes/mirror/
proxy:
@@ -128,6 +135,7 @@ metrics:
labels: {}
rules: {}
configPath: /etc/distribution
configData:
version: 0.1
log:
@@ -151,8 +159,26 @@ configData:
interval: 10s
threshold: 3
containerSecurityContext:
enabled: true
seLinuxOptions: {}
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
privileged: false
readOnlyRootFilesystem: true
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
securityContext:
enabled: true
fsGroupChangePolicy: Always
sysctls: []
supplementalGroups: []
runAsUser: 1000
fsGroup: 1000
@@ -162,6 +188,30 @@ podDisruptionBudget: {}
# maxUnavailable: 1
# minAvailable: 2
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 2
targetCPUUtilizationPercentage: 60
targetMemoryUtilizationPercentage: 60 # available only on Kubernetes ≥1.23 [required "autoscaling/v2"]
behavior: {} # available only on Kubernetes ≥1.23 [required "autoscaling/v2"]
# scaleDown:
# stabilizationWindowSeconds: 300
# policies:
# - type: Percent
# value: 100
# periodSeconds: 15
# scaleUp:
# stabilizationWindowSeconds: 0
# policies:
# - type: Percent
# value: 100
# periodSeconds: 15
# - type: Pods
# value: 4
# periodSeconds: 15
# selectPolicy: Max
nodeSelector: {}
affinity: {}
@@ -188,3 +238,27 @@ extraEnvVars: []
## Additional ENV variables to set
# - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
# value: "/var/lib/example"
initContainers: []
## Init containers to add to the Deployment
# - name: init
# image: busybox
# command: []
garbageCollect:
enabled: false
deleteUntagged: true
schedule: "0 1 * * *"
podAnnotations: {}
podLabels: {}
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi