This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: pgbouncer | |
name: pgbouncer | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: pgbouncer-service | |
spec: | |
ports: | |
- port: 5432 | |
protocol: TCP | |
targetPort: 5432 | |
selector: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: openfaas-ingress | |
namespace: openfaas | |
labels: | |
name: openfaas-ingress | |
annotations: | |
kubernetes.io/ingress.class: "nginx" | |
cert-manager.io/cluster-issuer: "letsencrypt-prod" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def handle(req): | |
"""handle a request to the function | |
Args: | |
req (str): request body | |
""" | |
return req |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 1.0 | |
provider: | |
name: openfaas | |
gateway: https://faas.example.com | |
functions: | |
pycon: | |
lang: python3 | |
handler: ./pycon | |
image: registry.example.com/pycon:latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nifi | |
namespace: default | |
spec: | |
selector: | |
matchLabels: | |
app: nifi | |
template: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 1.0 | |
provider: | |
name: openfaas | |
gateway: https://faas.example.com | |
functions: | |
of-test: | |
lang: python3-fastapi | |
handler: ./of-test | |
image: registry.example.com/of-test:latest | |
secrets: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: of-test | |
namespace: openfaas-fn | |
workdir: /home/app | |
command: ["sh"] | |
sync: | |
- .:/home/app/function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import json | |
from selenium import webdriver | |
from selenium.webdriver import ChromeOptions | |
from langdetect import detect | |
# Consts | |
AUTH_CODE = 'asecretcode' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 1.0 | |
provider: | |
name: openfaas | |
gateway: <your-openfaas-gateway-url> | |
functions: | |
of-scrap: | |
lang: python3-http-selenium | |
handler: ./of-scrap | |
image: <your-docker-registry>/of-scraper:latest | |
secrets: |