Skip to content

Instantly share code, notes, and snippets.

name: Release Charts
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch
# trigger via
# curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/rancher/fleet-helm-charts/actions/workflows/release.yaml/dispatches --data '{"event_type": "publish_chart", "client_payload": {"version": "v0.8.2-rc.1"}}'
on:
repository_dispatch:
types: [publish_chart]
@manno
manno / plugin.yml
Last active October 11, 2022 08:55
~/.config/k9s/plugin.yml
---
plugin:
helm:
shortCut: Ctrl-X
description: "show helm secret"
scopes:
- secrets
confirmation: false
background: false
# create k9s-helmsecret.sh in $PATH with:
@manno
manno / hotkey.yml
Last active October 26, 2022 15:27
~/.config/k9s/hotkey.yml
hotKey:
f1:
shortCut: F1
description: Show contexts
command: ctx
f2:
shortCut: F2
description: Show pods
command: pods
f3:
kubectl get pods -A -o go-template --template='{{range .items}}{{$n := .metadata.name}}{{range .spec.containers}}{{if eq .image "rancher/tekton-utils:v0.1.5"}}{{printf "kubectl logs -n fleet-default %s\n" $n}}{{end}}{{end}}{{end}}' | sh
@manno
manno / git-vi
Created April 28, 2022 09:10
Start nvim with file names from commit
#!/bin/sh
case "$1" in
-h|help|usage|--help)
echo "$0 [head|modified|commit ref]"
echo
echo "examples:"
echo " $0 # edit files from HEAD commit"
echo " $0 -m # edit modified files"
echo " $0 -c HEAD~2 # edit files from commit"
# brew install docker multipass
# # in case docker desktop broke the symlink
# brew link docker
# # ssh key to use
# sshpub=`ls -1tr ~/.ssh/*pub | tail -1`
# cat > cloud-init.yaml <<EOF
# ssh_authorized_keys:
# - `cat "$sshpub"`
@manno
manno / create-minio.sh
Created September 3, 2021 15:57
Minio / Linkerd / Epinio notes
# minio plugin installed, add operator:
# kubectl minio init
# enable linkerd injection
kubectl create ns epi-minio
kubectl patch namespace epi-minio --type=json -p '[{"op": "add", "path": "/metadata/annotations", "value": {"linkerd.io/inject": "enabled"}}]'
# disable https for our tenant
#kubectl minio tenant create tenant1 --servers 1 --volumes 4 --capacity 5Gi --namespace epi-minio
# no https
#!/bin/bash
dump() {
dir="$1"
read -N 1 -s -p "press any key to dump env '$dir' "
echo
#~/co/quarks-meta/quarks-operator/testing/dump_env.sh kubecf
#mv /tmp/env_dumps/kubecf "$dir"
#!/bin/bash
cat > kind-config.yaml <<EOF
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
# port forward 80 on the host to 80 on this node
# extraPortMappings:
# - containerPort: 80
[Unit]
Description=docker-proxy
After=docker.service
Requires=docker.service
PartOf=docker.service
[Service]
TimeoutStartSec=0
ExecStop=-/usr/bin/docker stop proxy | xargs -r /usr/bin/docker rm