Skip to content

Instantly share code, notes, and snippets.

View kvaps's full-sized avatar
🔳
This mess is mine!

Andrei Kvapil kvaps

🔳
This mess is mine!
View GitHub Profile
@kvaps
kvaps / node-bootstrup.sh
Created August 14, 2023 18:36
Add external kubeadm node to Talos cluster
VIP="192.168.100.5"
mkdir -p /etc/kubernetes/pki
talosctl -n "$VIP" cat /etc/kubernetes/kubeconfig-kubelet > /etc/kubernetes/kubelet.conf
talosctl -n "$VIP" cat /etc/kubernetes/bootstrap-kubeconfig > /etc/kubernetes/bootstrap-kubelet.conf
talosctl -n "$VIP" cat /etc/kubernetes/pki/ca.crt > /etc/kubernetes/pki/ca.crt
sed -i "/server:/ s|:.*|: https://${VIP}:6443|g" \
/etc/kubernetes/kubelet.conf \
/etc/kubernetes/bootstrap-kubelet.conf
@kvaps
kvaps / nfs-ganesha-vs-kernel-benchmark.md
Last active April 19, 2025 03:16
NFS-Ganesha vs NFS-Kernel-Server Benchmark

local read: IOPS=12308, BW=48.1MiB/s write: IOPS=4111, BW=16.0MiB/s

nfs3-ganesha read: IOPS=7039, BW=27.5MiB/s write: IOPS=2352, BW=9.2MiB/s

nfs3-kernel read: IOPS=6571, BW=25.7MiB/s

@kvaps
kvaps / talos-build.sh
Last active April 15, 2025 16:19
How to build talos with custom kernel extensions
# Builds pkg
cd ./pkgs
git checkout release-1.9
make PKGS_PREFIX=ghcr.io/kvaps/talos PUSH=1 USERNAME=kvaps/talos PLATFORM=linux/amd64
# output would be:
# => pushing manifest for ghcr.io/kvaps/talos/base:v1.9.0-15-g45c4ba4-dirty@sha256:f3d0f691752e3158c4f36b05e4b5abad2e68437f0faa0928887e69e568ca364d
# Builds talos (with clustom pkgs)
cd ./talos
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: test
namespace: test
spec:
clusterNetwork:
pods:
cidrBlocks:
@kvaps
kvaps / rspamd-lists.md
Last active February 21, 2025 03:34
Howto create local whitelists and blacklists for Rspamd

Local whitelists and blacklists for Rspamd

  • cd /etc/rspamd
  • create rspamd.conf.local
  • create lists:
touch local_bl_from.map.inc local_bl_ip.map.inc local_bl_rcpt.map.inc \
local_wl_from.map.inc local_wl_ip.map.inc local_wl_rcpt.map.inc
  • change permissions:
@kvaps
kvaps / openshift-console.yaml
Last active December 13, 2024 03:14
Openshift-console for Kubernetes with OIDC
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
qbec.io/component: console
labels:
qbec.io/application: openshift-console
qbec.io/environment: stage
name: openshift-console
@kvaps
kvaps / grub.cfg
Created January 18, 2018 15:38
Grub config for EFI and PXE boot
set timeout=3
menuentry 'Linux diskless' --class os {
insmod efi_gop
insmod efi_uga
# set server from option 66 (tftp-server-name) if not exist, use next_server
if ! net_get_dhcp_option net_default_server ${net_default_interface} 66 string; then
echo ' using next_server option instead.'
------
lxc
------
fix centos EOL repos
https://stackoverflow.com/a/70930049/2931267
fix old systemd in lxc container
https://forum.proxmox.com/threads/how-to-proxmox-7-cgroupv2-centos-7-upgrade-systemd-without-systemd-unified_cgroup_hierarchy-0.94253/
@kvaps
kvaps / solana-healthcheck.sh
Created July 9, 2024 11:40
Solana healthcheck
#!/bin/bash
catchupKey=$1
# Check catchup
if [ -n "$catchupKey" ]; then
catchupInfo=$(solana catchup --output json-compact "$catchupKey" http://127.0.0.1:8899/ 2>&1)
if ! echo "$catchupInfo" | grep -q 'has caught up'; then
echo "$catchupInfo"
exit 1
fi
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.