mirror of
https://github.com/twuni/docker-registry.helm.git
synced 2026-02-19 22:59:50 +00:00
Compare commits
54 Commits
airbytehq/
...
v2.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
791c161883 | ||
|
|
127e415edb | ||
|
|
14fc7bb5a2 | ||
|
|
53e594b53d | ||
|
|
113ddd1d4f | ||
|
|
9bba24a3d2 | ||
|
|
64d7c6800c | ||
|
|
d6224c847b | ||
|
|
f4811a4ab7 | ||
|
|
88ccbc1313 | ||
|
|
e73d9e85c4 | ||
|
|
5af937bbce | ||
|
|
065f6c5c44 | ||
|
|
541f368966 | ||
|
|
177a997ef0 | ||
|
|
99e99ec5b2 | ||
|
|
680310df11 | ||
|
|
5dccc4e861 | ||
|
|
8fc13f8d0d | ||
|
|
7efaaa8f06 | ||
|
|
807a2bafc6 | ||
|
|
013c0af45a | ||
|
|
384e09cc0d | ||
|
|
132d51ea92 | ||
|
|
14b36a8308 | ||
|
|
4efb76f313 | ||
|
|
2a9672ee74 | ||
|
|
1ad8a41438 | ||
|
|
bc7d137032 | ||
|
|
26bdb34cf7 | ||
|
|
3f325fedb9 | ||
|
|
b7a3239c0c | ||
|
|
62fa09c198 | ||
|
|
93ea655866 | ||
|
|
da580b62f1 | ||
|
|
d7e5281b18 | ||
|
|
cb49066186 | ||
|
|
d1cce3992a | ||
|
|
95cab6cfd3 | ||
|
|
33d78906dd | ||
|
|
d6bc315183 | ||
|
|
1446b0545b | ||
|
|
4a8beacf89 | ||
|
|
b81a30d3fd | ||
|
|
5c0100d932 | ||
|
|
8694346264 | ||
|
|
1d81ad83c5 | ||
|
|
ced33bf997 | ||
|
|
48599cd1aa | ||
|
|
c92609d905 | ||
|
|
85f7a82394 | ||
|
|
299396cab0 | ||
|
|
524a0a9375 | ||
|
|
91124414a5 |
@@ -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
8
.github/dependabot.yaml
vendored
Normal 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
41
.github/workflows/ci.yaml
vendored
Normal 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
35
.github/workflows/helm_release.yaml
vendored
Normal 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="."
|
||||
2
.github/workflows/pr_diff.yaml
vendored
2
.github/workflows/pr_diff.yaml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
echo 'HELM_DIFF<<EOF' >> $GITHUB_ENV
|
||||
echo "$(diff -ur before after)" >> $GITHUB_ENV
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
- uses: marocchino/sticky-pull-request-comment@39c5b5dc7717447d0cba270cd115037d32d28443
|
||||
- uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db
|
||||
with:
|
||||
message: |
|
||||
Running a `helm template` smoketest on commit ${{ github.ref }} results in the following diff against `${{ github.base_ref }}`:
|
||||
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.cr-release-packages
|
||||
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
description: A Helm chart for Docker Registry
|
||||
name: docker-registry
|
||||
version: 2.2.2
|
||||
version: 2.3.0
|
||||
appVersion: 2.8.1
|
||||
home: https://hub.docker.com/_/registry/
|
||||
icon: https://helm.twun.io/docker-registry.png
|
||||
|
||||
19
README.md
19
README.md
@@ -17,13 +17,13 @@ This chart will do the following:
|
||||
First, add the repo:
|
||||
|
||||
```console
|
||||
$ helm repo add twuni https://helm.twun.io
|
||||
helm repo add twuni https://helm.twun.io
|
||||
```
|
||||
|
||||
To install the chart, use the following:
|
||||
|
||||
```console
|
||||
$ helm install twuni/docker-registry
|
||||
helm install twuni/docker-registry
|
||||
```
|
||||
|
||||
## Configuration
|
||||
@@ -57,8 +57,8 @@ 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` |
|
||||
@@ -74,7 +74,7 @@ their default values.
|
||||
| `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` |
|
||||
| `secrets.haSharedSecret` | Shared secret for Registry | `nil` |
|
||||
@@ -117,11 +117,14 @@ their default values.
|
||||
| `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.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`.
|
||||
|
||||
@@ -17,16 +17,26 @@ spec:
|
||||
app: {{ template "docker-registry.name" . }}
|
||||
release: {{ .Release.Name }}
|
||||
{{- with .Values.podLabels }}
|
||||
{{ toYaml . | nindent 8 }}
|
||||
{{- 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 }}
|
||||
{{- 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" .) }}
|
||||
@@ -49,6 +59,10 @@ spec:
|
||||
- garbage-collect
|
||||
- --delete-untagged={{ .Values.garbageCollect.deleteUntagged }}
|
||||
- /etc/docker/registry/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 }}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{- if .Values.ingress.enabled -}}
|
||||
{{- $apiVersions := .Capabilities.APIVersions -}}
|
||||
{{- $serviceName := .Values.service.name | default (include "docker-registry.fullname" .) -}}
|
||||
{{- $serviceName := include "docker-registry.fullname" . -}}
|
||||
{{- $servicePort := .Values.service.port -}}
|
||||
{{- $path := .Values.ingress.path -}}
|
||||
apiVersion: {{- if $apiVersions.Has "networking.k8s.io/v1" }} networking.k8s.io/v1 {{- else }} networking.k8s.io/v1beta1 {{- end }}
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Values.service.name | default (include "docker-registry.fullname" .) }}
|
||||
name: {{ template "docker-registry.fullname" . }}
|
||||
namespace: {{ .Values.namespace | default .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "docker-registry.name" . }}
|
||||
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 }}
|
||||
|
||||
59
values.yaml
59
values.yaml
@@ -26,7 +26,7 @@ image:
|
||||
deployment: {}
|
||||
# annotations:
|
||||
service:
|
||||
name: ""
|
||||
name: registry
|
||||
type: ClusterIP
|
||||
# sessionAffinity: None
|
||||
# sessionAffinityConfig: {}
|
||||
@@ -37,6 +37,8 @@ service:
|
||||
# loadBalancerSourceRanges:
|
||||
annotations: {}
|
||||
# foo.io/bar: "true"
|
||||
labels: {}
|
||||
# foo.io/baz: "false"
|
||||
ingress:
|
||||
enabled: false
|
||||
className: nginx
|
||||
@@ -59,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
|
||||
@@ -96,17 +98,17 @@ 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
|
||||
|
||||
# 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:
|
||||
@@ -155,11 +157,25 @@ configData:
|
||||
threshold: 3
|
||||
|
||||
containerSecurityContext:
|
||||
enabled: false
|
||||
enabled: true
|
||||
seLinuxOptions: {}
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
privileged: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsUser: 1000
|
||||
runAsGroup: 1000
|
||||
runAsNonRoot: true
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
|
||||
securityContext:
|
||||
enabled: true
|
||||
runAsUser: 1000
|
||||
fsGroupChangePolicy: Always
|
||||
sysctls: []
|
||||
supplementalGroups: []
|
||||
fsGroup: 1000
|
||||
|
||||
priorityClassName: ""
|
||||
@@ -229,3 +245,16 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user