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 / loop.sh
Created October 16, 2023 22:27
mydumper/myload
#!/bin/bash
set -e -o pipefail
user=root
password=hackme
host=127.0.0.1
port=3306
dbs=$(mysql -u$user -p$password -h$host -P$port -e 'SHOW DATABASES;' | tail -n+2)
@kvaps
kvaps / openshift-console.yaml
Last active August 26, 2023 12:29
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 / talos-build.sh
Created August 16, 2023 08:48
How to build talos with custom kernel extensions
# Builds pkg
cd ./pkgs
make USERNAME=kvaps/talos PLATFORM=linux/amd64 PUSH=1
# Builds extensions with specific PKGS
cd ./extensions
make installer USERNAME=kvaps/talos PLATFORM=linux/amd64 PUSH=1 PKGS=v1.4.1-14-ge911ac5-dirty
# Builds talos (clean)
cd ./talos
@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 / .gitignore
Created July 25, 2023 20:06 — forked from mcastelino/.gitignore
cloud-init ubuntu nocloud example with network config
*.img
*.raw
@kvaps
kvaps / proxmox-subscription-disable.sh
Last active May 6, 2023 20:51
Proxmox disable subscription window permanent patch
cat > /etc/systemd/system/pve-patcher.service <<EOT
[Unit]
Description=PVE subscription popup disabler
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/sed -i "s/data.status !== 'Active'/false/g" /usr/share/pve-manager/js/pvemanagerlib.js /usr/share/pve-manager/touch/pvemanager-mobile.js
[Install]
@kvaps
kvaps / .gitignore
Created March 10, 2023 15:08 — forked from smoser/.gitignore
cloud-init ubuntu nocloud example with network config
*.img
*.raw
@kvaps
kvaps / gitlab-docker-runner.yaml
Last active March 5, 2023 19:31
Gitlab docker runner for Kubernetes
apiVersion: v1
kind: ConfigMap
metadata:
name: gitlab-runner-docker
data:
config.toml: |
concurrent = 1
check_interval = 0
[[runners]]
name = "docker"
@kvaps
kvaps / kubernetes-as-proxmox-container.md
Last active September 29, 2022 14:33
Run Kubernetes as Proxmox container

Add to your contaier config /etc/pve/lxc/XXX.conf:

lxc.apparmor.profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop: 
lxc.mount.auto: proc:rw sys:rw

// SPDX-License-Identifier: GPL-2.0-or-later
/*
drbd_transport_rdma.c
This file is part of DRBD.
Copyright (C) 2014-2021, LINBIT HA-Solutions GmbH.
*/
#undef pr_fmt