[puppeteer] update readme (#1415)

This commit is contained in:
j_r0dd 2022-02-15 14:37:36 -05:00 committed by GitHub
parent 5178d5495e
commit 11d62d84f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 3 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v13.3.2
description: Headless Chrome Node.js API
name: puppeteer
version: 1.0.0
version: 1.0.1
kubeVersion: ">=1.16.0-0"
keywords:
- puppeteer
@ -24,4 +24,4 @@ dependencies:
annotations:
artifacthub.io/changes: |
- kind: changed
description: Upgraded `common` chart dependency to version `4.3.0`.
description: Updated README.

View File

@ -1,11 +1,18 @@
{{- define "custom.custom.configuration.header" -}}
## Sample code to connect to Puppeteer
## Special Instructions
{{- end -}}
{{- define "custom.custom.configuration" -}}
{{ template "custom.custom.configuration.header" . }}
### **Important!**
```console
You may need special headers to connect from outside of the cluster. Intra cluster works fine.
```
### Sample code to connect to Puppeteer
```javascript
const puppeteer = require('puppeteer-core')
const dns = require('dns').promises;
@ -29,4 +36,15 @@ const dns = require('dns').promises;
})
})()
```
### Default chromium flags in image
```javascript
'--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'
```
{{- end -}}