prerender

by utkuozdemir

Helm chartv1.1.2App 6.4.0MITVerified publisher

Helm chart for prerender wrapping tvanro/prerender-alpine

About this chart

prerender

Prerender is a node server that uses Headless Chrome to render HTML, screenshots, PDFs, and HAR files out of any web page.

TL;DR

$ helm repo add utkuozdemir https://utkuozdemir.org/helm-charts
$ helm install my-release utkuozdemir/prerender

Introduction

This Helm chart simply wraps the Docker image tvanro/prerender-alpine.

Prerequisites

  • Kubernetes 1.15+
  • Helm 3.0+

Installing the Chart

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

$ helm repo add utkuozdemir https://utkuozdemir.org/helm-charts
$ helm install my-release utkuozdemir/prerender

These commands deploy prerender in the default configuration. The Parameters 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 release:

$ helm delete my-release

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

Parameters

KeyDescriptionDefault
image.repositoryImage repository"docker.io/tvanro/prerender-alpine"
image.pullPolicyImage pull policy"IfNotPresent"
image.tagImage tag (if not specified, defaults to the chart's appVersion)""
imagePullSecretsImage pull secrets[]
nameOverrideString to partially override prerender.fullname template with a string (will prepend the release name)""
fullnameOverrideString to fully override prerender.fullname template with a string""
serviceAccount.createCreate a service accounttrue
serviceAccount.annotationsAnnotations for the service account{}
serviceAccount.nameThe name of the service account to create""
service.typeType of the service"ClusterIP"
service.annotationsAnnotations for the service{}
ingress.enabledEnable the use of the ingress controllerfalse
ingress.classNameClass name for the Ingress{}
ingress.annotationsAnnotations for the Ingress{}
ingress.hostsHosts configuration of the ingresssee values.yaml
ingress.tlsThe TLS configuration for the ingress[]
replicaCountPod replica count (if autoscaling is not enabled)1
autoscaling.enabledEnable autoscalingfalse
autoscaling.minReplicasMinimum number of replicas when autoscaling is enabled1
autoscaling.maxReplicasMaximum number of replicas when autoscaling is enabled10
autoscaling.targetCPUUtilizationPercentageTarget CPU utilization percentage when autoscaling is enabled80
autoscaling.targetMemoryUtilizationPercentageTarget memory utilization percentage when autoscaling is enablednil
resourcesThe resource requests and limits of the container{}
podAnnotationsAnnotations for the pod{}
podSecurityContextSecurity context for the pod{}
securityContextSecurity context for the container{}
nodeSelectorThe node selector for the deployment{}
tolerationsTolerations for the pod assignment[]
affinityAffinity for the pod assignment{}
envThe env variable key-value pairs to be passed to the pod{"NODE_ENV":"production"}

The above config parameters map to the various configuration env variables of a typical prerender server.

For more information please refer to the project repository and the Docker image project repository.

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

helm install my-release \
    --set env.CACHE_MAXSIZE=2000 \
    utkuozdemir/prerender

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

helm install my-release -f values.yaml utkuozdemir/prerender

Tip: You can use the default values.yaml

Deploy prerender with OpenTenant

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