Skip to content

Instantly share code, notes, and snippets.

Avatar

Luc lucj

View GitHub Profile
@lucj
lucj / openfunction.log
Created Jan 13, 2022
openfunction controller logs
View openfunction.log
root@faas:~# k logs -n openfunction openfunction-controller-manager-9b69b8c7b-qt97s -c openfunction
I0113 08:10:16.188135 1 request.go:668] Waited for 1.026255862s due to client-side throttling, not priority and fairness, request: GET:https://10.96.0.1:443/apis/external.metrics.k8s.io/v1beta1?timeout=32s
2022-01-13T08:10:16.695Z INFO controller-runtime.metrics metrics server is starting to listen {"addr": "127.0.0.1:8080"}
2022-01-13T08:10:16.696Z INFO controller-runtime.builder Registering a mutating webhook {"GVK": "core.openfunction.io/v1alpha2, Kind=Serving", "path": "/mutate-core-openfunction-io-v1alpha2-serving"}
2022-01-13T08:10:16.696Z INFO controller-runtime.webhook registering webhook {"path": "/mutate-core-openfunction-io-v1alpha2-serving"}
2022-01-13T08:10:16.696Z INFO controller-runtime.builder skip registering a validating webhook, admission.Validator interface is not implemented {"GVK": "core.openfunction.io/v1alpha2, Kind=Serving"}
2022-01-13T08:10:16.696Z INFO controller-runtime.webhook
@lucj
lucj / config-sample.yaml
Created Jul 18, 2021
Default configuration of a KubeKey cluster
View config-sample.yaml
apiVersion: kubekey.kubesphere.io/v1alpha1
kind: Cluster
metadata:
name: sample
spec:
hosts:
- {name: node1, address: 172.16.0.2, internalAddress: 172.16.0.2, user: ubuntu, password: Qcloud@123}
- {name: node2, address: 172.16.0.3, internalAddress: 172.16.0.3, user: ubuntu, password: Qcloud@123}
roleGroups:
etcd:
@lucj
lucj / resources.yaml
Created Jun 29, 2021
"docker compose convert" for the kube backend
View resources.yaml
README.md
---------
This chart was created by converting a Compose file
Chart.yaml
----------
name: vote
description: A generated Helm Chart for vote from Skippbox Kompose
version: 0.0.1
apiVersion: v1
keywords:
@lucj
lucj / gvisor-install.sh
Created Feb 10, 2021
gVisor installation
View gvisor-install.sh
(
set -e
URL=https://storage.googleapis.com/gvisor/releases/release/latest
wget ${URL}/runsc ${URL}/runsc.sha512 \
${URL}/gvisor-containerd-shim ${URL}/gvisor-containerd-shim.sha512 \
${URL}/containerd-shim-runsc-v1 ${URL}/containerd-shim-runsc-v1.sha512
sha512sum -c runsc.sha512 \
-c gvisor-containerd-shim.sha512 \
-c containerd-shim-runsc-v1.sha512
rm -f *.sha512
@lucj
lucj / kc-deploy.yml
Created Jan 21, 2021
Keycloak - Postgres
View kc-deploy.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: keycloak
labels:
app: keycloak
spec:
selector:
matchLabels:
app: keycloak
@lucj
lucj / docker-compose.yaml
Created Jan 7, 2021
fluent-bit / loki / grafana on Docker Swarm
View docker-compose.yaml
version: '3.8'
configs:
loki-conf:
file: ./loki.conf
fluent-bit-conf:
file: ./fluent-bit.conf
networks:
monitoring:
View external.conf
gateway {
name: "EXTERNAL"
listen: "0.0.0.0:7222"
authorization {
user: gwu
password: gwp
}
gateways: [
{name: "INTERNAL", url: "nats://gwu:gwp@internal1:7222"},
@lucj
lucj / k3s-multipass.sh
Created Dec 17, 2019
Setup a k3s kubernetes cluster using Multipass VMs
View k3s-multipass.sh
for node in node1 node2 node3;do
multipass launch -n $node
done
# Init cluster on node1
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
# Get node1's IP
IP=$(multipass info node1 | grep IPv4 | awk '{print $2}')
@lucj
lucj / consumer-mTLS.py
Created Nov 11, 2019
NATS consumer - mTLS
View consumer-mTLS.py
import asyncio
import json
import ssl
import sys
from nats.aio.client import Client as NATS
async def error_cb(e):
print("Error:", e)
async def run(loop):
@lucj
lucj / consumer.py
Created Nov 11, 2019
NATS subscriber
View consumer.py
import asyncio
import json
import ssl
import sys
from nats.aio.client import Client as NATS
async def error_cb(e):
print("Error:", e)
async def run(loop):