docker-registry

by joaquinito2051

Helm chartv1.8.0App 2.7.1

A Helm chart for Docker Registry

About this chart

Docker Registry Helm Chart

This directory contains a Kubernetes chart to deploy a private Docker Registry.

Prerequisites Details

  • PV support on underlying infrastructure (if persistence is required)

Chart Details

This chart will do the following:

  • Implement a Docker registry deployment

Installing the Chart

To install the chart, use the following:

$ helm install <helm-repo>/docker-registry

$ helm install stable/docker-registry

Configuration

The following table lists the configurable parameters of the docker-registry chart and their default values.

ParameterDescriptionDefault
image.pullPolicyContainer pull policyIfNotPresent
image.repositoryContainer image to useregistry
image.tagContainer image tag to deploy2.7.1
imagePullSecretsSpecify image pull secretsnil (does not add image pull secrets to deployed pods)
persistence.accessModeAccess mode to use for PVCReadWriteOnce
persistence.enabledWhether to use a PVC for the Docker storagefalse
persistence.deleteEnabledEnable the deletion of image blobs and manifests by digestnil
persistence.sizeAmount of space to claim for PVC10Gi
persistence.storageClassStorage Class to use for PVC-
persistence.existingClaimName of an existing PVC to use for confignil
service.portTCP port on which the service is exposed5000
service.typeservice typeClusterIP
service.clusterIPif service.type is ClusterIP and this is non-empty, sets the cluster IP of the servicenil
service.nodePortif service.type is NodePort and this is non-empty, sets the node port of the servicenil
replicaCountk8s replicas1
updateStrategyupdate strategy for deployment{}
podAnnotationsAnnotations for pod{}
podLabelsLabels for pod{}
resources.limits.cpuContainer requested CPUnil
resources.limits.memoryContainer requested memorynil
priorityClassName priorityClassName""
storageStorage system to usefilesystem
tlsSecretNameName of secret for TLS certsnil
secrets.htpasswdHtpasswd authenticationnil
secrets.s3.accessKeyAccess Key for S3 configurationnil
secrets.s3.secretKeySecret Key for S3 configurationnil
secrets.swift.usernameUsername for Swift configurationnil
secrets.swift.passwordPassword for Swift configurationnil
haSharedSecretShared secret for Registrynil
configDataConfiguration hash for dockernil
s3.regionS3 regionnil
s3.regionEndpointS3 region endpointnil
s3.bucketS3 bucket namenil
s3.encryptStore images in encrypted formatnil
s3.secureUse HTTPSnil
swift.authurlSwift authurlnil
swift.containerSwift containernil
nodeSelectornode labels for pod assignment{}
tolerationspod tolerations[]
ingress.enabledIf true, Ingress will be createdfalse
ingress.annotationsIngress annotations{}
ingress.labelsIngress labels{}
ingress.pathIngress service path/
ingress.hostsIngress hostnames[]
ingress.tlsIngress TLS configuration (YAML)[]

Specify each parameter using the --set key=value[,key=value] argument to helm install.

To generate htpasswd file, run this docker command: helm install. docker run --entrypoint htpasswd registry:2 -Bbn user password > ./htpasswd.

Deploy docker-registry with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has docker-registry on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartdocker-registry is pinned at v1.8.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply