Skip to content

Instantly share code, notes, and snippets.

View Yitaek's full-sized avatar

Yitaek Hwang Yitaek

View GitHub Profile
@Yitaek
Yitaek / traefik-values.yaml
Created August 5, 2020 13:36
Helm Values for Traefik HA Setup
additionalArguments:
- "--accesslog=true"
- "--accesslog.format=json"
- "--log.level=DEBUG"
- "--metrics.prometheus=true"
- "--metrics.prometheus.entryPoint=metrics"
- "--entryPoints.metrics.address=:8082"
deployment:
replicas: 3
@Yitaek
Yitaek / whoami.yaml
Last active August 5, 2020 13:46
Traefik whoami files
---
kind: Deployment
apiVersion: apps/v1
metadata:
namespace: default
name: whoami
labels:
app: whoami
spec:
@Yitaek
Yitaek / issuer.yaml
Created August 5, 2020 13:48
Cert-manager issuer example
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-staging
spec:
acme:
# You must replace this email address with your own.
# Let's Encrypt will use this to contact you about expiring
# certificates, and issues related to your account.
email: user@example.com
@Yitaek
Yitaek / whoami-cert.yaml
Created August 5, 2020 13:49
whoami application example cert
---
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: whoami-cert
namespace: whoami
spec:
commonName: whoami.example.com
secretName: whoami-cert
dnsNames:
apiVersion: v1
kind: ServiceAccount
metadata:
name: eks-admin
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: eks-admin
additionalArguments:
- "--accesslog=true"
- "--accesslog.format=json"
- "--log.level=INFO"
- "--metrics.prometheus=true"
- "--metrics.prometheus.entryPoint=metrics"
- "--entryPoints.metrics.address=:8082"
deployment:
replicas: 3
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
# You must replace this email address with your own.
# Let's Encrypt will use this to contact you about expiring
# certificates, and issues related to your account.
email: user@example.com
apiVersion: cert-manager.io/v1alpha2
kind: Certificate
metadata:
name: wildcard-cert
spec:
secretName: wildcard-cert
dnsNames:
- '*.mydomain.example.com'
issuerRef:
name: letsencrypt-prod
authenticate:
idp:
provider: "google"
clientID: "<CLIENT_ID>.apps.googleusercontent.com"
clientSecret: "<CLIENT_SECRET>"
config:
sharedSecret: random-secret
cookieSecret: super-secret
rootDomain: mydomain.example.com
@Yitaek
Yitaek / questdb-influxdb-demo.js
Created May 23, 2021 19:41
Code to test out-of-order ingestion via InfluxDB line protocol to QuestDB
const axios = require ('axios')
const net = require("net")
const client = new Client({
user: "admin",
host: "localhost",
database: "qdb",
password: "quest",
port: "8812"
})