verdaccio

by joaquinito2051

Helm chartv0.7.0App 3.11.6

A lightweight private npm proxy registry (sinopia fork)

About this chart

Verdaccio

Verdaccio is a lightweight private NPM proxy registry.

TL;DR;

$ helm install <helm-repo>/verdaccio

$ helm install stable/verdaccio

Introduction

This chart bootstraps a Verdaccio deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.7+ with Beta APIs enabled
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release <helm-repo>/verdaccio

$ helm install --name my-release stable/verdaccio The command deploys Verdaccio on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Verdaccio chart and their default values.

ParameterDescriptionDefault
customConfigMapUse a custom ConfigMapfalse
image.pullPolicyImage pull policyIfNotPresent
image.repositoryVerdaccio container image repositoryverdaccio/verdaccio
image.tagVerdaccio container image tag3.11.6
nodeSelectorNode labels for pod assignment{}
persistence.accessModePVC Access Mode for Verdaccio volumeReadWriteOnce
persistence.enabledEnable persistence using PVCtrue
persistence.mountsAdditional mountsnil
persistence.sizePVC Storage Request for Verdaccio volume8Gi
persistence.storageClassPVC Storage Class for Verdaccio volumenil
persistence.volumesAdditional volumesnil
podAnnotationsAnnotations to add to each pod{}
replicaCountDesired number of pods1
resourcesCPU/Memory resource requests/limits{}
resourcespod resource requests & limits{}
service.annotationsAnnotations to add to servicenone
service.clusterIPIP address to assign to service""
service.externalIPsService external IP addresses[]
service.loadBalancerIPIP address to assign to load balancer (if supported)""
service.loadBalancerSourceRangesList of IP CIDRs allowed access to load balancer (if supported)[]
service.portService port to expose4873
service.nodePortService port to exposenone
service.typeType of service to createClusterIP

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

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
$ helm install --name my-release \
  --set service.type=LoadBalancer \
    <helm-repo>/verdaccio
$ helm install --name my-release \

The above command sets the service type LoadBalancer.

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

$ helm install --name my-release -f values.yaml <helm-repo>/verdaccio

$ helm install --name my-release -f values.yaml stable/verdaccio

Tip: You can use the default values.yaml

Custom ConfigMap

When creating a new chart with this chart as a dependency, CustomConfigMap can be used to override the default config.yaml provided. It also allows for providing additional configuration files that will be copied into /verdaccio/conf. In the parent chart's values.yaml, set the value to true and provide the file templates/config.yaml for your use case.

Persistence

The Verdaccio image stores persistence under /verdaccio/storage path of the container. A dynamically managed Persistent Volume Claim is used to keep the data across deployments, by default. This is known to work in GCE, AWS, and minikube. Alternatively, a previously configured Persistent Volume Claim can be used.

It is possible to mount several volumes using Persistence.volumes and Persistence.mounts parameters.

Existing PersistentVolumeClaim

  1. Create the PersistentVolume
  2. Create the PersistentVolumeClaim
  3. Install the chart
$ helm install --name my-release \
    --set persistence.existingClaim=PVC_NAME \
    <helm-repo>/verdaccio
$ helm install --name my-release \

Deploy verdaccio with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has verdaccio 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 chartverdaccio is pinned at v0.7.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