Skip to content

Instantly share code, notes, and snippets.

View fleeto's full-sized avatar
🏠
Working from home

Vincent fleeto

🏠
Working from home
  • China
View GitHub Profile
#!/usr/bin/env python3
import argparse
import urllib.request
import logging
import hashlib
import yaml
PLATFORMS = [
("arm64", "linux"),
@fleeto
fleeto / docker-compose.yml
Last active September 30, 2021 01:44
Kong+KongA
# Copied from https://gist.github.com/pantsel/73d949774bd8e917bfd3d9745d71febf
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
@fleeto
fleeto / add-k8s-user.sh
Created May 26, 2020 09:33
Create a new user(kubeconfig) for an existing kubernetes cluster.
#!/bin/sh
set -e
mkdir -p tmp
cd tmp
USER=$1
openssl genrsa -out "${USER}.key" 4096
cat > csr.cnf << EOF
[req]
default_bits=2048
apiVersion: v1
kind: Secret
metadata:
annotations:
banzaicloud.com/last-applied: '{"metadata":{"name":"empty-logging-fluentd-output","namespace":"logging"}}'
creationTimestamp: "2020-03-11T09:35:41Z"
name: empty-logging-fluentd-output
namespace: logging
resourceVersion: "3476"
selfLink: /api/v1/namespaces/logging/secrets/empty-logging-fluentd-output
apiVersion: v1
data:
devnull.conf: CjxsYWJlbCBARVJST1I+CjxtYXRjaCAqKj4KICAgIEB0eXBlIG51bGwKICAgIEBpZCBtYWluLWZsdWVudGQtZXJyb3IKPC9tYXRjaD4KPC9sYWJlbD4KCjxtYXRjaCAqKj4KICAgIEB0eXBlIG51bGwKICAgIEBpZCBtYWluLW5vLW91dHB1dAo8L21hdGNoPgo=
fluent.conf: CiMgaW5jbHVkZSBvdGhlciBjb25maWcgZmlsZXMKQGluY2x1ZGUgL2ZsdWVudGQvZXRjL2lucHV0LmNvbmYKQGluY2x1ZGUgL2ZsdWVudGQvYXBwLWNvbmZpZy8qCkBpbmNsdWRlIC9mbHVlbnRkL2V0Yy9kZXZudWxsLmNvbmYKQGluY2x1ZGUgL2ZsdWVudGQvZXRjL2ZsdWVudGxvZy5jb25mCg==
fluentlog.conf: CjxsYWJlbCBARkxVRU5UX0xPRz4KICA8bWF0Y2ggZmx1ZW50Lio+CiAgICBAdHlwZSBudWxsCiAgICBAaWQgbWFpbi1mbHVlbnRkLWxvZwogIDwvbWF0Y2g+CjwvbGFiZWw+Cg==
input.conf: CiMgRW5hYmxlIFJQQyBlbmRwb2ludCAodGhpcyBhbGxvd3MgdG8gdHJpZ2dlciBjb25maWcgcmVsb2FkIHdpdGhvdXQgcmVzdGFydCkKPHN5c3RlbT4KICBycGNfZW5kcG9pbnQgMTI3LjAuMC4xOjI0NDQ0CiAgbG9nX2xldmVsIGluZm8KPC9zeXN0ZW0+CgojIFByb21ldGhldXMgbW9uaXRvcmluZwoK
kind: Secret
metadata:
annotations:
banzaicloud.com/last-applied: '{"data":{"devnull.conf":"CjxsYWJlbCBARVJST1I+CjxtYXRjaCAqKj4KICAgIEB0eXBlIG51bG
@fleeto
fleeto / ratelimit-in-treafik-v2.0.yaml
Created September 22, 2019 15:09
ratelimit-in-treafik-v2.0
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: httpbin-traffic
spec:
rateLimit:
burst: 1
average: 2
---
apiVersion: traefik.containo.us/v1alpha1
@fleeto
fleeto / traefik-v2.0-kubernetes.yaml
Last active January 19, 2021 11:10
Traefik 2.0 for kubernetes
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: ingressroutes.traefik.containo.us
spec:
group: traefik.containo.us
version: v1alpha1
names:
kind: IngressRoute
plural: ingressroutes
@fleeto
fleeto / find-updated-source-file.md
Created November 14, 2018 23:45
How we find updated files in istio.io

Initialization

git pull https://github.com/istio/istio.io.git git.io.master
cd git.io.master
git checkout master

@fleeto
fleeto / snippets_markdown_vscode.json
Created November 11, 2018 13:54
Markdown snippetes
{
// Place your snippets for markdown here. Each snippet is defined under a snippet name and has a prefix,body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1,$2 for tab stops,$0 for the final cursor position,and ${1:label},${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@fleeto
fleeto / keycloak.yaml
Created April 8, 2018 18:37
Keycloak sidecar
---
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: httpbin-proxy
data:
proxy.json: |-
{
"target-url": "http://localhost:8000",