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: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: reviews | |
namespace: istio-test | |
spec: | |
hosts: | |
- reviews | |
http: | |
- route: |
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: networking.istio.io/v1alpha3 | |
kind: DestinationRule | |
metadata: | |
name: productpage | |
namespace: istio-test | |
spec: | |
host: productpage | |
subsets: | |
- name: v1 | |
labels: |
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: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: istio-ingress | |
namespace: istio-test | |
annotations: | |
cert-manager.io/cluster-issuer: "letsencrypt-prod" | |
nginx.ingress.kubernetes.io/service-upstream: "true" | |
nginx.ingress.kubernetes.io/upstream-vhost: productpage.istio-test.svc.cluster.local |
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
#!/bin/bash | |
pvcreate /dev/sdb | |
vgcreate pg_data /dev/sdb | |
lvcreate --size 10g --name pg_active_data pg_data | |
mkfs.xfs /dev/pg_data/pg_active_data | |
mkdir -p /var/lib/postgresql/12/ | |
sudo chown postgres:postgres /var/lib/postgresql/12/main | |
mount /dev/pg_data/pg_active_data /var/lib/postgresql/12/main |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "generic/ubuntu2004" | |
config.vm.define "lab_clone" do |node| | |
node.vm.disk :disk, name: "pg_data", size: "20GB" | |
end | |
end |
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: vosk | |
spec: | |
selector: | |
matchLabels: | |
app: vosk | |
template: | |
metadata: |
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: Secret | |
metadata: | |
name: libretrans-auth | |
type: Opaque | |
data: | |
auth: <base64-user-password-pair> | |
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: ConfigMap | |
metadata: | |
name: libretranslate-config | |
data: | |
langs: "es,de,it,en,fr" | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: |
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: |
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' |