puppeteer

by funkypenguin

Helm chartv1.2.2App v13.3.2Verified publisher

Headless Chrome Node.js API

About this chart

puppeteer

Headless Chrome Node.js API

This chart is not maintained by the upstream project and any issues with the chart should be raised here

Source Code

Requirements

Kubernetes: >=1.16.0-0

Dependencies

RepositoryNameVersion
https://library-charts.k8s-at-home.comcommon4.5.2

TL;DR

helm repo add k8s-at-home https://k8s-at-home.com/charts/
helm repo update
helm install puppeteer k8s-at-home/puppeteer

Installing the Chart

To install the chart with the release name puppeteer

helm install puppeteer k8s-at-home/puppeteer

Uninstalling the Chart

To uninstall the puppeteer deployment

helm uninstall puppeteer

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

Configuration

Read through the values.yaml file. It has several commented out suggested values. Other values may be used from the values.yaml from the common library.

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

helm install puppeteer \
  --set env.TZ="America/New York" \
    k8s-at-home/puppeteer

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

helm install puppeteer k8s-at-home/puppeteer -f values.yaml

Special Instructions

Important!

You may need special headers to connect from outside of the cluster. Intra cluster works fine.

Sample code to connect to Puppeteer

const puppeteer = require('puppeteer-core')
const dns = require('dns').promises;

(async () => {
  // these dns options are not needed if using an load balancer or ingress
  const options = {
    family: 4,
    hints: dns.ADDRCONFIG | dns.V4MAPPED
  }
  const { address: host } = await dns.lookup('puppeteer', options, (address) => {
    return address
  })
  const browser = await puppeteer.connect({
    browserURL: `http://${host}:4000`
  })
  const page = await browser.newPage()
  await page.goto('https://example.com', { waitUntil: 'networkidle0' })
  await page.close()
    .catch((err) => {
      console.error(err)
    })
})()

Default chromium flags in image

'--disable-dev-shm-usage',
'--disable-setuid-sandbox',
'--no-sandbox',
'--remote-debugging-address=0.0.0.0',
'--remote-debugging-port=4000',
'--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS  X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ 85.0.4183.121 Safari/537.36'

Values

Important: When deploying an application Helm chart you can add more values from our common library chart here

KeyTypeDefaultDescription
chromium.argslistSee belowchromium args. You can find more chromium expiremental flags chromium switches.
envobjectSee belowenvironment variables. See more environment variables in the puppeteer documentation.
env.TZstring"UTC"Set the container timezone
image.pullPolicystring"IfNotPresent"image pull policy
image.repositorystring"ghcr.io/jr0dd/puppeteer"image repository
image.tagstring"v13.3.2"image tag
ingress.mainobjectSee values.yamlEnable and configure ingress settings for the chart under this key.
persistenceobjectSee values.yamlConfigure persistence settings for the chart under this key.
serviceobjectSee values.yamlConfigures service settings for the chart.

Changelog

Version 1.2.2

Added

N/A

Changed

  • Upgraded common chart dependency to version 4.5.2

Fixed

N/A

Older versions

A historical overview of changes can be found on ArtifactHUB

Support


Autogenerated from chart metadata using helm-docs v0.1.1

Deploy puppeteer with OpenTenant

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