vngcloud-snapshot-controller

by VNG Cloud

Helm chartv1.2.0App 8.7.0Verified publisher

Snapshot controller for vKS clusters

About this chart

VngCloud Snapshot Controller

1. Installation

1.1. Prerequisites

  • Helm 3.0+
  • KUBECONFIG environment variable pointing to the .kubeconfig file with access to your vKS cluster.

1.2. Install vngcloud-snapshot-controller on Kubernetes

  • Following the below steps to install vks-helm-charts on your vKS cluster:
    • Step 1: Add the vks-helm-charts Helm repository:

      helm repo add vks-helm-charts https://vngcloud.github.io/vks-helm-charts
      helm repo update
      
    • Step 2: Install vngcloud-snapshot-controller:

      helm install vngcloud-snapshot-controller vks-helm-charts/vngcloud-snapshot-controller \
        --replace --namespace kube-system
      

2. Configuration

Every value is top-level. Defaults render the same Deployment as chart 1.0.0 (no scheduling constraints, no PodDisruptionBudget), except the image: snapshot-controller v8.7.0 with the v8.7.0 upstream CRDs and RBAC.

KeyDefaultDescription
replicaCount2Replicas of the Deployment. Leader election is always on: one replica is active, the others are standbys.
image.repositoryvcr.vngcloud.vn/81-vks-public/snapshot-controllerImage repository.
image.tag""Image tag; empty = v<appVersion>.
image.pullPolicyIfNotPresentImage pull policy.
logLevel2klog verbosity (--v).
resourcesrequests cpu: 10m, memory: 40Mi; limits memory: 256MiContainer resources.
nodeSelector{}Node selector of the pods.
tolerations[]Tolerations of the pods, rendered as given.
affinity{}Affinity of the pods, rendered as given. Pods carry app.kubernetes.io/name: snapshot-controller.
topologySpreadConstraints[]Topology spread constraints, rendered as given (set your own labelSelector).
priorityClassName""Priority class of the pods; empty = not set.
podAnnotations{}Extra pod annotations.
podLabels{}Extra pod labels. app.kubernetes.io/name (the selector) cannot be overridden.
podDisruptionBudget.enabledfalseCreate a PodDisruptionBudget for the pods.
podDisruptionBudget.maxUnavailableunset (1 when enabled and minAvailable is unset)Integer or percent string.
podDisruptionBudget.minAvailableunsetInteger or percent string. Never together with maxUnavailable (the chart fails).
keepSnapshotsOnUninstalltrueKeep the snapshot CRDs and every VolumeSnapshot, VolumeSnapshotContent and VolumeSnapshotClass when the release is uninstalled (helm.sh/resource-policy: keep). Set false and upgrade before uninstalling to delete them. A later install with the same release name adopts the kept CRDs.

2.1. Upgrading from 1.1.0

1.2.0 ships snapshot-controller v8.7.0 (was v7.0.1) from vcr.vngcloud.vn/81-vks-public/snapshot-controller (a mirror of registry.k8s.io/sig-storage/snapshot-controller), with the v8.7.0 upstream CRDs and RBAC (volumesnapshotcontents/status: patch only; volumesnapshots: adds create). The values keys are unchanged apart from the new keepSnapshotsOnUninstall, which keeps the CRDs on uninstall by default: chart 1.1.0 deleted them, and every snapshot object with them. Only the v1 snapshot API is served, as in 1.1.0.

2.2. Upgrading from 1.0.0

1.1.0 removed the snapshotController object; the chart fails if it is still set. Move the keys:

1.0.01.1.0
snapshotController.replicasreplicaCount
snapshotController.image.*image.*
snapshotController.logLevellogLevel
snapshotController.resourcesresources

With helm upgrade --reuse-values the old object is carried over: use --reset-then-reuse-values or pass the new values explicitly.

Deploy vngcloud-snapshot-controller with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has vngcloud-snapshot-controller 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 chartvngcloud-snapshot-controller is pinned at v1.2.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