Skip to content

Instantly share code, notes, and snippets.

View yadkov's full-sized avatar

Georgi Yadkov yadkov

  • Bozhurishte
View GitHub Profile
Task: Generate comprehensive technical documentation for implementing and using PROXY Protocol version 2.
Audience: Senior DevOps engineers, backend developers, software and system architects, security managers.
Format Requirements: Use Markdown with clear headings, code blocks for configuration snippets, and bulleted lists for specifications.
Content Requirements:
Business Context & Specific Requirements:
The "Why": Detail the exact infrastructure problem driving the adoption of PROXY protocol v2 instead of v1 or standard X-Forwarded-For headers (e.g., requirement for binary parsing efficiency at 10k+ requests per second, strict TCP streaming requirements where HTTP header injection is impossible).
import asyncio
import sys
import time
from kr8s.asyncio import Resource
from prometheus_client import Gauge, start_http_server
# Prometheus metric
argocd_application_override = Gauge(
'argocd_application_override',
import kopf
import kr8s
from prometheus_client import start_http_server, Gauge
# Initialize Kubernetes client
kr8s.load_config()
# Define Prometheus metric
argocd_application_override = Gauge('argocd_application_override', 'Tracks changes in Application helm parameters', ['application'])
import kr8s
import time
import random
import os
import json
from kr8s.objects import Node
# the label selector
egress_selector = {'egress': 'ready'}
#egress_nodes = ["kind-worker", "kind-worker2"]
@yadkov
yadkov / mysql-drop-all-tables.sh
Created January 31, 2019 07:48 — forked from cweinberger/mysql-drop-all-tables.sh
drops all tables of a specific db
#!/bin/bash
#usage: mysql-drop-all-tables -d database -u dbuser -p dbpass
TEMP_FILE_PATH='./drop_all_tables.sql'
while getopts d:u:p: option
do
case "${option}"
in
# VIM - order and ident HTML
:s/<[^>]*>/\r&\r/g
:g/^$/d