Skip to content

Instantly share code, notes, and snippets.

@identw
identw / build.pkr.hcl
Created July 8, 2026 23:30
build win vm in packer
locals {
yarn_version = "1.22.19"
cmake_version = "3.23.1"
node_version = "20.19.5"
ruby_version = "3.1.2.1"
winsdk_url = "https://go.microsoft.com/fwlink/p/?LinkID=2033908"
cocos_creators = [
{
version = "v2.4.6"
@identw
identw / node-loca-dns.log
Created July 8, 2026 21:56
node local dns log
2026/07/08 21:49:05 [INFO] Starting node-cache image: 1.26.8
2026/07/08 21:49:05 [INFO] Using Corefile /etc/Corefile
2026/07/08 21:49:05 [INFO] Using Pidfile
2026/07/08 21:49:05 [INFO] Updated Corefile with 0 custom stubdomains and upstream servers /etc/resolv.conf
2026/07/08 21:49:05 [INFO] Using config file:
cluster.local:53 {
errors
cache {
success 9984 30
denial 9984 5
@identw
identw / node-local-dns-eks-cilium-lrp.yaml
Created July 2, 2026 08:21
node local dns cilium lrp
---
apiVersion: cilium.io/v2
kind: CiliumLocalRedirectPolicy
metadata:
annotations:
labels:
name: node-local-dns-redirect-cluster-dns
namespace: kube-system
spec:
redirectBackend:
@identw
identw / eks-cilium.tf
Created July 1, 2026 08:17
cilium eks terraform
locals {
cilium_tags = merge(var.tags, {
Cilium = "Owned"
Purpose = "k8s pod network"
K8sCluster = var.cluster_name
})
eks_identity_oidc_issuer = regex("^https://(.*)$", var.eks_identity_oidc_issuer)[0]
cluster_endpoint = regex("^https://(.*)$", var.eks_endpoint)[0]
}
@identw
identw / cilium-eks-values.yaml
Created July 1, 2026 08:14
cilium values eks
kubeProxyReplacement: true
k8sServicePort: 443
bpf:
masquerade: true
extraConfig:
install-no-conntrack-iptables-rules: "true"
bandwidthManager:
enabled: true
eni:
enabled: true
@identw
identw / discovery_fields.lua
Created September 24, 2025 12:50
flient-bit configs
function cb(tag, timestamp, record)
new_record = record
-- for nginx ingress access log
if record["kubernetes"]["labels"]["app.kubernetes.io/name"] == "ingress-nginx" and record["stream"] == "stdout" then
new_record["tag"] = "kube_nginx_ingress_stdout"
return 2, timestamp, new_record
end
if record["log"] == nil then
@identw
identw / fluent-bit.conf
Created September 24, 2025 12:48
fluent-bit configs
[SERVICE]
Daemon Off
Flush 1
Log_Level info
Parsers_File /fluent-bit/etc/parsers.conf
Parsers_File /fluent-bit/etc/conf/custom_parsers.conf
HTTP_Server On
HTTP_Listen 0.0.0.0
HTTP_Port 2020
Health_Check On
@identw
identw / custom_parsers.conf
Created September 24, 2025 12:47
fluentbit configs
[PARSER]
Name docker_no_time
Format json
Time_Keep Off
Time_Key time
Time_Format %Y-%m-%dT%H:%M:%S.%L
[PARSER]
Name json_nginx
Format json
@identw
identw / netbird.yaml
Created July 29, 2024 12:52
netbird
# dex config:
# ...
# staticClients:
# - id: netbird-backend
# name: netbird-backend
# redirectURIs:
# - https://netbird.example.com
# - https://netbird.example.com/#callback
# secret: <DEX_NETBIRD_BACKEND_SECRET>
# - id: netbird-client
# An OIDC provider is required (e.g., Dex).
# OIDC must be configured for the kube-apiserver. For example:
# - --oidc-client-id=kubernetes-oidc
# - --oidc-groups-claim=groups
# - --oidc-issuer-url=https://dex.example.com
# - --oidc-username-claim=email
# For cloud setups, you can use kube-oidc-proxy (https://github.com/TremoloSecurity/kube-oidc-proxy)
#
# <secret_cookie_auth_key> - 32 bytes string (regex: a-z0-9, example: rpb7aos4rd0m32x9omcrcqacnia0xty2)
# <secret_cookie_enc_key> - 32 bytes string (regex: a-z0-9, example: gg1ejofgupoc19wyuywr2yflm75aeiwg)