Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e
repo="rancher/fleet"
# refer this issue
issue=${1}
# copy title from this pr, body should contain "backport of, refers to #"
main_pr=${2}
#!/bin/bash
set -e
repo="rancher/fleet"
# copy title, body from this issue
main_issue=${1}
release_milestone=${2-2.9.2}
ginkgo run -r -vv --skip ".*" --json-report e2e.json ./e2e
ruby -rjson -e 'j=JSON.parse(File.read("e2e.json")); j.each { |s| [main][upstream]
puts "# " + s["SuiteDescription"];
puts s["SpecReports"].collect { |r|
l = r["ContainerHierarchyLabels"].flatten.join(", "); l = " <sup>(#{l})</sup>" unless l.empty?;
"* __" + r["ContainerHierarchyTexts"][0] + "__: " + r["ContainerHierarchyTexts"][1..-1].join(" ") + l
};
puts "\n---" };' > tests.md; open tests.md
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