nydus-snapshotter

by Dragonfly

Helm chartv0.0.10App 0.9.0Verified publisher

Nydus snapshotter is an external plugin of containerd for Nydus image service which implements a chunk-based content-addressable filesystem on top of a called RAFS.

About this chart

Nydus-snapshotter Helm Chart

TL;DR

helm repo add dragonfly https://dragonflyoss.github.io/helm-charts/
helm install --create-namespace --namespace nydus-snapshotter nydus-snapshotter dragonfly/nydus-snapshotter

Introduction

Nydus snapshotter is an external plugin of containerd for Nydus image service which implements a chunk-based content-addressable filesystem on top of a called RAFS (Registry Acceleration File System) format that improves the current OCI image specification, in terms of container launching speed, image space, and network bandwidth efficiency, as well as data integrity with several runtime backends: FUSE, virtiofs and in-kernel EROFS.

Nydus supports lazy pulling feature since pulling image is one of the time-consuming steps in the container lifecycle. Lazy pulling here means a container can run even the image is partially available and necessary chunks of the image are fetched on-demand. Apart from that, Nydus also supports (e)Stargz lazy pulling directly WITHOUT any explicit conversion.

For more details about how to build Nydus container image, please refer to nydusify conversion tool and acceld.

Prerequisites

  • Kubernetes cluster 1.20+
  • Helm v3.8.0+

Installation Guide

For more detail about installation is available in nydus-snapshotter repo.

Installation

Install with custom configuration

Create the values.yaml configuration file.

nydusSnapshotter:
  name: nydus-snapshotter
  image: ghcr.io/containerd/nydus-snapshotter
  tag: v0.13.4

Install nydus-snapshotter chart with release name nydus-snapshotter:

helm repo add dragonfly https://dragonflyoss.github.io/helm-charts/
helm install --create-namespace --namespace nydus-snapshotter nydus-snapshotter dragonfly/nydus-snapshotter -f values.yaml

Uninstall

Uninstall the nydus-snapshotter daemonset:

helm delete nydus-snapshotter --namespace nydus-snapshotter

Values

KeyTypeDefaultDescription
argslist[]Args to overwrite default nydus-snapshotter startup command
containerRuntimeobject{"containerd":{"configFile":"/etc/containerd/config.toml","enable":true},"initContainer":{"image":{"pullPolicy":"Always","registry":"ghcr.io","repository":"liubin/toml-cli","tag":"v0.0.7"}}}[Experimental] Container runtime support Choose special container runtime in Kubernetes. Support: Containerd, Docker, CRI-O
containerRuntime.containerdobject{"configFile":"/etc/containerd/config.toml","enable":true}[Experimental] Containerd support
containerRuntime.containerd.configFilestring"/etc/containerd/config.toml"Custom config path directory, default is /etc/containerd/config.toml
containerRuntime.containerd.enablebooltrueEnable containerd support Inject nydus-snapshotter config into ${containerRuntime.containerd.configFile},
containerRuntime.initContainer.image.pullPolicystring"Always"Image pull policy.
containerRuntime.initContainer.image.registrystring"ghcr.io"Image registry.
containerRuntime.initContainer.image.repositorystring"liubin/toml-cli"Image repository.
containerRuntime.initContainer.image.tagstring"v0.0.7"Image tag.
daemonsetAnnotationsobject{}Daemonset annotations
dragonfly.enablebooltrueEnable dragonfly
dragonfly.mirrorConfig[0].auth_throughboolfalse
dragonfly.mirrorConfig[0].headers.X-Dragonfly-Registrystring"https://index.docker.io"
dragonfly.mirrorConfig[0].hoststring"http://127.0.0.1:4001"
dragonfly.mirrorConfig[0].ping_urlstring"http://127.0.0.1:4003/healthy"
global.imagePullSecretslist[]Global Docker registry secret names as an array.
global.imageRegistrystring""Global Docker image registry.
global.nodeSelectorobject{}Global node labels for pod assignment.
hostAliaseslist[]Host Aliases
hostNetworkbooltrueLet nydus-snapshotter run in host network
hostPidbooltrueLet nydus-snapshotter use the host's pid namespace
image.pullPolicystring"Always"Image pull policy.
image.pullSecretslist[] (defaults to global.imagePullSecrets).Image pull secrets.
image.registrystring"ghcr.io"Image registry.
image.repositorystring"containerd/nydus-snapshotter"Image repository.
image.tagstring"v0.9.0"Image tag.
namestring"nydus-snapshotter"nydus-snapshotter name
nodeSelectorobject{}Node labels for pod assignment
podAnnotationsobject{}Pod annotations
podLabelsobject{}Pod labels
priorityClassNamestring""Pod priorityClassName
resourcesobject{"limits":{"cpu":"2","memory":"2Gi"},"requests":{"cpu":"0","memory":"0"}}Pod resource requests and limits
terminationGracePeriodSecondsstringnilPod terminationGracePeriodSeconds
tolerationslist[]List of node taints to tolerate

Chart dependencies

RepositoryNameVersion

Deploy nydus-snapshotter with OpenTenant

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