Skip to content

Instantly share code, notes, and snippets.

View msslava's full-sized avatar
🏠
Working from home

Viacheslav Matiushin msslava

🏠
Working from home
View GitHub Profile
@jossef
jossef / force-delete-k8s-namespace.py
Created August 13, 2020 12:50
force delete k8s namespace
#!/usr/bin/env python3
import atexit
import json
import requests
import subprocess
import sys
namespace = sys.argv[1]
proxy_process = subprocess.Popen(['kubectl', 'proxy'])
atexit.register(proxy_process.kill)
@abdennour
abdennour / vault-auth-k8s-method.sh
Last active April 7, 2025 17:29
Vault - Enable Kubernetes Auth Method
# $1: vault namespace
# $2: Vault Token Reviewer Service Account
vault_namespace=${1:-"vault"}
token_reviewer_sa=${2:-"vault"}
if [ -z "${VAULT_TOKEN}" ] || [ -z "${VAULT_ADDR}" ]; then
echo "ERROR: VAULT_TOKEN and VAULT_ADDR env vars are required"
exit 404
fi
cat <<EOF | kubectl apply -f -
@shlomi-noach
shlomi-noach / orchestrator-demo-playbook.sh
Created May 26, 2020 17:48
Playbook to show some of orchestrator's capabilities, used in DB AMA presentation.
#!/bin/bash
# This playbook assumes you have cloned https://github.com/openark/orchestrator
# and ran: ./script/dock system
# which landed you in orchestrator's playground environment.
# Further information available on the welcome screen once you've ran the docker image.
# FYI, orchestrator's config file is at /etc/orchestrator.conf.json
orchestrator-client -c topology-tabulated -alias ci
orchestrator-client -c topology-tabulated -alias ci | tr '|' '\t'
@nezed
nezed / ingress.yaml
Created April 23, 2020 17:58
Helm basic auth with Kubernetes Ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: my-basic-auth
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required - ok"
name: my-ingress
spec:
rules:
@ilap
ilap / grafana_telegram_bot.md
Last active May 9, 2025 23:43
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@xtavras
xtavras / kubernetes_add_service_account_kubeconfig.sh
Created November 25, 2019 10:54
create kubernetes service account and corresponding kubeconfig
#!/usr/bin/env bash
# script was taken from https://gist.github.com/innovia/fbba8259042f71db98ea8d4ad19bd708 and adjusted with "apply_rbac" function and colorized output
set -e
set -o pipefail
# Colors
RED="\e[01;31m"
@afriza
afriza / INSTALLING-vlc-with-decklink-support.md
Last active January 28, 2021 03:56
Compiling and installing `vlc` with Decklink SDK on Ubuntu 18.04 Server
@fl64
fl64 / docker-mod.yml
Created April 4, 2019 16:05
Ansible playbook for modifying /etc/docker/daemon.json config (based on https://stackoverflow.com/questions/50796341/add-a-new-key-value-to-a-json-file-using-ansible)
- hosts: all
become: yes
gather_facts: false
vars:
tasks:
- name: Check that the /etc/docker/daemon.json exists
stat:
path: /etc/docker/daemon.json
register: stat_result
@afriza
afriza / install-ffmpeg-with-decklink-support-ubuntu-18.04-server.md
Last active August 28, 2025 19:41
Compiling and installing `ffmpeg` with Decklink SDK on Ubuntu 18.04 Server. Check out forks of this gist for more up-to-date info.
@zealot128
zealot128 / README.md
Last active April 5, 2025 19:35
Gitlab runner with docker by cloud init on Hetzner Cloud

Quick Terraform script to deploy Gitlab runner with docker onto Hetzner Cloud (Hcloud)

  1. Create other terraform stuff
  • tf-backend,
  • creds.auto.tfvars with hcloud_token
  • ssh key: mkdir keys; ssh-keygen -f id_rsa
  1. modify cloudinit.yml:
  • change gitlab url
  • ADD_YOUR_REGISTRY_TOKEN -> Set to the Gitlab Runner Registration Token
  • Add more allowed images/services, if using gitlab registry, like that: registry.myinstance.com/administrators/docker-images/*, change base image etc.