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 / 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 / test_disk.sh
Last active January 6, 2024 04:20
Test disk with fio and parse results
#!/bin/sh
run(){
name="$1"
shift
(
set -x
# defailt parameters
fio -name="$name" -filename=$disk -output-format=json -ioengine=libaio -direct=1 -randrepeat=0 "$@" > results/$disk_dashed-$name.json
)
@Andor
Andor / components--victoriametrics.jsonnet
Last active October 7, 2021 11:03
qbec helm victoriametrics
local p = import '../../params.libsonnet';
local params = p.components.victoriametrics;
local k = import '1.21/main.libsonnet';
local vm = importstr 'data://victoriametrics/github.com/VictoriaMetrics/helm-charts/raw/347d4558d9c25cd341718bf5a2ee167da042c080/packages/victoria-metrics-cluster-0.9.6.tgz';
{
local ns = k.core.v1.namespace,
namespace::
@cristiklein
cristiklein / test-cloud-init.sh
Last active January 11, 2024 07:07
Short script to quickly test cloud-init configuration files
#!/bin/bash
set -e
IMAGE_URL=https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img
IMAGE_FILE=$(basename $IMAGE_URL)
if [ ! -e $IMAGE_FILE ]; then
wget $IMAGE_URL
fi

Parse the kubernetes manifest in yaml or json, don't care a manifest type.

Examples:

package main

import (
	"bytes"
	"context"
@vholer
vholer / iso2ext
Created March 15, 2020 15:22
ISO 9660 to ext2 conversion without root privileges
#!/bin/bash
# Simple conversion script of ISO 9660 image into image based
# on ext2/3/4 filesytem. Completely unprivileged, without needing
# to mount both images. Free to use under Apache 2.0 License.
# 2020, Vlastimil Holer <[email protected]>
set -e -o pipefail
TYPE=${TYPE:-ext2}
@EddieIvan01
EddieIvan01 / raw_mode_posix.go
Created February 14, 2020 09:58
syscall to set raw-mode-input terminal in Go (Posix/Windows)
// +build darwin linux
package main
import (
"os"
"syscall"
"unsafe"
)

Proxmox VE Installation on Hetzner Server via Rescue System

Follow these steps to install Proxmox VE on a Hetzner server via the Rescue System. The Rescue System is a Linux-based environment that can be booted into to perform system recovery tasks. We'll be using it to install Proxmox VE.

In order to complete the process, it is indeed necessary to first boot into the Rescue System and then connect to it via SSH. This will allow you to run the commands for installing Proxmox VE. Here are the steps:

Starting the Rescue System

  1. Log into the Hetzner Robot.
  2. Under "Main Functions; Server" select the desired server and then open the tab "Rescue".
@bmaupin
bmaupin / convert-deploymentconfig-to-deployment.md
Last active October 8, 2024 19:38
Convert OpenShift DeploymentConfig to Kubernetes Deployment
  1. Change apiVersion from:

    - apiVersion: v1

    (or apiVersion: apps.openshift.io/v1)

    to:

@redbaron
redbaron / example.yaml
Last active March 24, 2020 13:06
Ansible jsonnet filter
- name: Load kube-apiserver.yaml
slurp:
src: "{{tmpconfdir.path}}/etc/kubernetes/manifests/kube-apiserver.yaml"
register: "apiserver_yaml"
# Implement https://github.com/kubernetes/kubeadm/issues/1105#issuecomment-544887733
- name: Patch apiserver healthcheck
vars:
mixin: |
{spec+: {containers: [super.containers[0] + {