Verdaccio is a lightweight private Node.js proxy registry.
$ helm repo add verdaccio https://charts.verdaccio.org
$ helm repo update
$ helm install verdaccio verdaccio/verdaccio
⚠️ If you are using stable/verdaccio chart, be aware is deprecated, forward all new PR and or issues to this repository.
If you need support for Helm v2, please use
<=v0.19.0, be aware we do not support Helm v2 anymore.
This chart bootstraps a Verdaccio deployment on a Kubernetes cluster using the Helm package manager.
Every chart release is listed in the changelog.
- Kubernetes 1.7+ with Beta APIs enabled
- PV provisioner support in the underlying infrastructure
helm repo add verdaccio https://charts.verdaccio.org
In this example we use npm as release name:
# Helm v3+
helm install npm verdaccio/verdaccioNote: Avoid release name
verdaccio, otherwise, Kubernetes-generated environment variables may get into conflict with Verdaccio's own environment variables in the Pod itself. In case you insist naming the releaseverdaccio, to mitigate the problem, you can use eithernameOverrideorfullnameOverrideto have a different name for the service.
# Helm v3+
helm install npm --set image.tag=7.0.0 verdaccio/verdaccioChart 7.0.0 and later deploy Verdaccio 7. To stay on the Verdaccio 6.x
line, pin the image or the chart:
# Verdaccio 6.x image with the current chart
helm install npm --set image.tag=6.11.1 verdaccio/verdaccio
# or the last chart of the 4.x series
helm install npm --version 4.36.0 verdaccio/verdacciohelm upgrade npm verdaccio/verdaccioThe 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
To uninstall/delete the npm deployment:
# Helm v3+
helm uninstall npmThe command removes all the Kubernetes components associated with the chart and deletes the release.
The following table lists the configurable parameters of the Verdaccio chart and their default values.
| Parameter | Description | Default |
|---|---|---|
type |
The type of resource to create. Either deployment or statefulset. Note: Statefulset is primarly useful when Verdaccio is being used as an edge cache |
deployment |
annotations |
Annotations to set on the deployment | {} |
affinity |
Affinity for pod assignment | {} |
existingConfigMap |
Name of custom ConfigMap to use | false |
image.pullPolicy |
Image pull policy | IfNotPresent |
image.pullSecrets |
Image pull secrets | [] |
image.repository |
Verdaccio container image repository | verdaccio/verdaccio |
image.tag |
Verdaccio container image tag. Also used as app.kubernetes.io/version label when set |
defaults to appVersion in Chart.yaml |
image.digest |
Immutable image digest (for example sha256:…); takes precedence over the tag for the image, without changing the version label |
"" |
nodeSelector |
Node labels for pod assignment | {} |
tolerations |
List of node taints to tolerate | [] |
persistence.accessMode |
PVC Access Mode for Verdaccio volume | ReadWriteOnce |
persistence.annotations |
Annotations to add to the PVC | {} |
persistence.enabled |
Enable persistence using PVC | true |
persistence.existingClaim |
Use existing PVC. Ignored when type is statefuleset |
nil |
persistence.mounts |
Additional mounts | nil |
persistence.resourcePolicy |
Set "keep" to avoid removing PVC during a helm delete operation | "" |
persistence.selector |
Selector to match an existing Persistent Volume | {} (evaluated as a template) |
persistence.size |
PVC Storage Request for Verdaccio volume | 8Gi |
persistence.storageClass |
PVC Storage Class for Verdaccio volume | nil |
persistence.volumes |
Additional volumes | nil |
topologySpreadConstraints |
Topology Spread Constraints for pod assignment | [] |
podLabels |
Additional pod labels | {} (evaluated as a template) |
podAnnotations |
Annotations to add to each pod | {} |
priorityClass.enabled |
Enable specifying pod priorityClassName | false |
priorityClass.name |
PriorityClassName to be specified in pod spec | "" |
replicaCount |
Desired number of pods | 1 |
replicaCountEnabled |
Enable the replicaCount field | true |
autoscaling.enabled |
Enable the HorizontalPodAutoscaler (omits replicas so the HPA owns it) |
false |
autoscaling.minReplicas |
Minimum number of replicas | 2 |
autoscaling.maxReplicas |
Maximum number of replicas | 5 |
autoscaling.targetCPUUtilizationPercentage |
Target CPU utilization percentage | 80 |
autoscaling.targetMemoryUtilizationPercentage |
Target memory utilization percentage | none |
autoscaling.behavior |
Scaling behavior policies for the HPA | {} |
podDisruptionBudget.enabled |
Enable a PodDisruptionBudget | false |
podDisruptionBudget.maxUnavailable |
Maximum number/percentage of pods that can be unavailable | 1 |
podDisruptionBudget.minAvailable |
Minimum number/percentage of pods that must remain available (mutually exclusive with maxUnavailable) |
none |
strategy |
The deployment strategy field | If persistence is enabled, the strategy type is set to Recreate, otherwise RollingUpdate |
startupProbe |
Optional startup check (Kubernetes 1.18+); see Health probes | disabled; when enabled, 5s timeout, 30 failures every 10s |
livenessProbe |
Restart check; see Health probes | enabled, 5s timeout, 6 failures every 10s |
readinessProbe |
Traffic readiness check; see Health probes | enabled, 5s timeout, 3 failures every 10s |
resources |
CPU/Memory resource requests/limits | {} |
service.annotations |
Annotations to add to service | none |
service.clusterIP |
IP address to assign to service | "" |
service.externalIPs |
Service external IP addresses | [] |
service.loadBalancerIP |
IP address to assign to load balancer (if supported) | "" |
service.loadBalancerSourceRanges |
List of IP CIDRs allowed access to load balancer (if supported) | [] |
service.port |
Service port to expose | 4873 |
service.targetPort |
Destination port number or name; empty selects http, or caching-nginx when enabled |
"" |
service.nodePort |
Service port to expose | none |
service.type |
Type of service to create | ClusterIP |
serviceAccount.create |
Create service account | false |
serviceAccount.name |
Service account Name | none |
extraEnvVars |
Define environment variables to be passed to the container | [] |
secretEnvVars |
Define sensitive environment variables to be passed to the container | {} |
existingSecret |
Existing secret containing environment variables to be passed to the container | "" |
extraInitContainers |
Define additional initContainers to be added to the deployment | [] |
securityContext |
Define Container Security Context | {runAsUser=10001} |
podSecurityContext |
Define Pod Security Context | {fsGroup=101} |
nameOverride |
Set resource name override | "" |
fullnameOverride |
Set resource fullname override | "" |
useSecretHtpasswd |
Use htpasswd from .Values.secrets.htpasswd. This require helm v3.2.0 or above. |
false |
secrets.htpasswd |
user and password list to generate htpasswd. | [] |
secrets.existingSecretHtpasswd |
Existing secret containing htpasswd file (alternative to secrets.htpasswd) |
"" |
secrets.existingSecretHtpasswdKey |
Key in the existing secret that contains the htpasswd file content | "htpasswd" |
gatewayApi.enabled |
Enable/Disable Gateway API HTTPRoute (alternative to Ingress) | false |
gatewayApi.parentRefs |
List of parent Gateway references | [] |
gatewayApi.hostnames |
List of hostnames for the HTTPRoute | [] |
gatewayApi.annotations |
HTTPRoute Annotations | {} |
gatewayApi.labels |
HTTPRoute Labels | {} |
gatewayApi.rules |
Custom HTTPRoute routing rules. Defaults to PathPrefix / if not set |
nil |
ingress.enabled |
Enable/Disable Ingress | false |
ingress.className |
Ingress Class Name (k8s >=1.18 required) |
"" |
ingress.labels |
Ingress Labels | {} |
ingress.annotations |
Ingress Annotations | {} |
ingress.hosts |
List of Ingress Hosts | [] |
ingress.paths |
List of Ingress Paths | ["/"] |
ingress.pathType |
Default path type for paths and extraPaths (k8s >=1.18) |
Prefix |
ingress.extraPaths |
List of extra Ingress Paths | [] |
extraPorts |
List of extra ports to expose from the pods | [] |
extraManifests |
List of extra manifests to deploy within the chart | [] |
cachingNginx.enabled |
Enable the nginx proxy sidecar | false |
cachingNginx.ipv6Enabled |
Listen on IPv6 as well as IPv4 when the nginx sidecar is enabled | true |
Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,
# Helm v3+
$ helm install my-release \
--set service.type=LoadBalancer \
verdaccio/verdaccioThe 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 v3+
$ helm install npm -f values.yaml verdaccio/verdaccioTip: You can use the default values.yaml
Set ingress.pathType to Prefix, Exact, or ImplementationSpecific for
ingress.paths. The default is Prefix. The field is rendered only on Kubernetes
1.18 or newer, with or without hosts. For an ingress controller that requires
controller-specific wildcard paths, use:
ingress:
enabled: true
pathType: ImplementationSpecific
paths:
- /*When ingress.hosts is configured, each entry in ingress.extraPaths can set its
own pathType. An omitted, null, or empty value inherits ingress.pathType,
falling back to Prefix if that setting is also unset or empty. An explicit
per-entry value takes precedence. The same Kubernetes 1.18 requirement applies.
Set image.digest to the image's sha256:... digest to deploy an immutable image.
The chart renders repository@digest; image.tag (or appVersion when omitted)
continues to supply the version label. Do not put the digest in image.tag.
With cachingNginx.enabled: true, nginx listens on port 80 for both IPv4 and
IPv6. Both listeners use the same server and location configuration, upstream,
request size limit, and Verdaccio authentication and package permissions. This
fixes access through the sidecar when Pods have IPv6 addresses, as reported in
#195.
If the kernel cannot create IPv6 sockets (for example, when booted with
ipv6.disable=1), set cachingNginx.ipv6Enabled: false. Disabling IPv6 addresses
via net.ipv6.conf.*.disable_ipv6 sysctls does not remove IPv6 socket support
and does not require this setting. An IPv4-only cluster does not necessarily
require it either.
On IPv6-only clusters, Verdaccio itself must also listen on IPv6: the health
probes target port 4873 on the Pod IP, not the sidecar. The default image
(verdaccio/verdaccio at the chart appVersion) starts with
VERDACCIO_ADDRESS=0.0.0.0 and accepts IPv4 connections only, so the Pod never
becomes Ready until the listen address is changed. Set it through
extraEnvVars; the list replaces the chart default, so keep VERDACCIO_PORT:
extraEnvVars:
- name: VERDACCIO_PORT
value: "4873"
- name: VERDACCIO_ADDRESS
value: "[::]"The additional listener does not create a separate Service or change
service.loadBalancerSourceRanges. To restrict access, configure the intended
IPv4 and IPv6 source CIDRs in that list when supported by your load balancer,
and enforce equivalent access through your firewall and Kubernetes network
policies. IPv4 CIDRs do not cover IPv6 clients. This chart does not create a
NetworkPolicy. The change also does not add IPv6 sources to nginx's trusted
X-Real-IP senders; do not trust ::/0 just to enable IPv6 connectivity.
See CONTRIBUTING.md for deployment validation checks.
Deployment and StatefulSet use the same HTTP checks on /-/ping:
readinessProbestops routing new Service traffic to a pod after three consecutive failures. It does not restart the container.livenessProberestarts the container after six consecutive failures, allowing more time to recover from temporary delays than the readiness check.startupProbeis disabled by default. When enabled, it allows about five minutes for Verdaccio to start and Kubernetes begins the liveness and readiness checks only after it succeeds; a healthy instance does not wait five minutes. It requires Kubernetes 1.18 or newer.
Liveness and readiness checks allow five seconds for each response, run every ten seconds and start five seconds after the container starts; when the startup check is enabled they also wait for it to succeed. These defaults replace the previous one-second timeout and identical failure thresholds, which restarted Verdaccio under load (#90, #97). Upgrading changes the pod template, so pods are recreated once, and installs that override only some probe keys inherit the new values for the rest.
Each probe supports enabled, initialDelaySeconds, periodSeconds, timeoutSeconds,
successThreshold, and failureThreshold. Existing timing overrides remain supported,
and initialDelaySeconds: 0 is preserved. successThreshold must be 1 for startup
and liveness probes, as required by Kubernetes.
For example, to enable the startup check with a longer allowance and tolerate more liveness failures:
startupProbe:
enabled: true
failureThreshold: 60
livenessProbe:
failureThreshold: 9Set a probe's enabled value to false to omit it from the pod specification.
Configure CPU and memory requests and limits under resources for the expected
workload. More tolerant probes allow time for recovery but do not remove CPU or
memory bottlenecks. See the Kubernetes probe documentation.
This requires helm v3.2.0 or above. You can list all username and password in
.Values.secrets.htpasswd. Helm will generate secret with htpaswd format. This
file is mounted on pod in this path /verdaccio/auth/htpasswd. The Default
config uses this. The conditional statement {{- if .Values.secrets.htpasswd }}
is evaluated as false if the list is an empty collection.
(Source helm flow control)
Tip: These values are in plaintext. So don't forget to put additional encryption.
secrets:
# list of users and password for htpasswd plugin
# This this is mounted as /verdaccio/auth/htpasswd on pods
htpasswd:
- username: "verdaccio"
password: "verdaccio"This config will create a htpasswd file with user "verdaccio", If in config 'htpasswd' auth is used. You can login using this credentials.
Instead of providing plain text credentials in values.yaml, you can reference an
existing Kubernetes secret containing the htpasswd file. This is more secure as it
avoids storing passwords in plain text in your values files.
When secrets.existingSecretHtpasswd is set, the chart will use the specified
secret instead of generating one from secrets.htpasswd. The secret must contain
a key with the htpasswd file content (default key: htpasswd, configurable via
secrets.existingSecretHtpasswdKey).
secrets:
# Reference an existing secret instead of providing plain text credentials
existingSecretHtpasswd: "my-htpasswd-secret"
existingSecretHtpasswdKey: "htpasswd" # Optional, defaults to "htpasswd"The existing secret should contain the htpasswd file content in the specified key. You can create such a secret using:
kubectl create secret generic my-htpasswd-secret \
--from-file=htpasswd=/path/to/htpasswdNote: If both
secrets.htpasswdandsecrets.existingSecretHtpasswdare set,secrets.existingSecretHtpasswdtakes precedence and no secret will be generated fromsecrets.htpasswd.
Important: When using an existing secret, pods will not automatically restart when the secret content is updated. This is a limitation of Kubernetes - it doesn't track changes to external secrets. You need to manually trigger a pod restart after updating the secret:
kubectl rollout restart deployment/<release-name>-verdaccio
As an alternative to traditional Ingress, this chart supports creating an HTTPRoute resource for use with the Gateway API. This requires a Gateway API implementation (e.g., Envoy Gateway, Istio, Cilium, nginx-gateway-fabric) and a Gateway resource already deployed in your cluster.
gatewayApi:
enabled: true
parentRefs:
- name: my-gateway
namespace: default
hostnames:
- npm.example.comNote: The chart only creates an
HTTPRoute— theGatewayresource itself should be managed separately as cluster infrastructure. BothingressandgatewayApican coexist if needed during migration.
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.
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.
- Create the PersistentVolume
- Create the PersistentVolumeClaim
- Install the chart
# Helm v3+
$ helm install npm \
--set persistence.existingClaim=PVC_NAME \
verdaccio/verdaccioDue to some breaking changes in Selector Labels and Security Contexts in Chart 3.0.0 you will need to migrate when upgrading.
First off, the securityContext.enabled field has been removed.
In addition to this, fsGroup is not a valid Container Security Context field and has been migrated to the podSecurityContext instead.
# values.yaml
podSecurityContext:
+ fsGroup: 101
securityContext:
- enabled: true
- fsGroup: 101
runAsUser: 10001Secondly, the apps.v1.Deployment.spec.selector field is immutable and changes were made to Selector Labels which tries to update this.
To get around this, you will need to kubectl delete deployment $deploymentName before doing a helm upgrade
So long as your PVC is not destroyed, the new deployment will be rolled out with the same PVC as before and your data will remain intact.
Due the major release Verdaccio 5 has some breaking changes to be aware of, please read the migration guide here.
Chart 7.0.0 moves the default image to Verdaccio 7 (appVersion: 7.0.0);
the chart major now follows the Verdaccio major. The chart templates and values
are unchanged, but Verdaccio 7 has breaking changes for the registry itself:
read the Verdaccio 6 to 7 migration guide
and the release post
before upgrading. To stay on 6.x, pin image.tag to a 6.x version or install
chart 4.36.0.
The changelog lists every chart
release with its changes. It is generated from the commit history by
git-cliff (cliff.toml) and published to
charts.verdaccio.org by the release workflow after each release, so
conventional commit messages (feat:, fix:, chore: bump verdaccio ...) are
what end up in it. The same text is used as the notes of each
GitHub release.