Skip to content

Instantly share code, notes, and snippets.

@navidshaikh
navidshaikh / ns_default_channel_issue.bash
Last active November 11, 2020 07:45
Reproduce issue with namespace default channel (v1beta1)
# 0. setup eventing at v0.18.4 and kafka
# 1. Set clusterwide channel to IMC (v1beta1) and namespace (knativetutorial) to Kafka (v1alpha1)
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ConfigMap
metadata:
name: default-ch-webhook
namespace: knative-eventing
data:
default-ch-config: |
@navidshaikh
navidshaikh / logs
Created November 12, 2020 07:47
logs kubectl apply vs kn channel create
# with kubectl apply
{"level":"info","ts":"2020-11-12T07:44:02.483Z","logger":"eventing-webhook","caller":"webhook/admission.go:89","msg":"Webhook ServeHTTP request=&http.Request{Method:\"POST\", URL:(*url.URL)(0xc000730e80), Proto:\"HTTP/1.1\", ProtoMajor:1, ProtoMinor:1, Header:http.Header{\"Accept\":[]string{\"application/json, */*\"}, \"Accept-Encoding\":[]string{\"gzip\"}, \"Content-Length\":[]string{\"1539\"}, \"Content-Type\":[]string{\"application/json\"}, \"User-Agent\":[]string{\"kube-apiserver-admission\"}}, Body:(*http.body)(0xc000cab380), GetBody:(func() (io.ReadCloser, error))(nil), ContentLength:1539, TransferEncoding:[]string(nil), Close:false, Host:\"eventing-webhook.knative-eventing.svc:443\", Form:url.Values(nil), PostForm:url.Values(nil), MultipartForm:(*multipart.Form)(nil), Trailer:http.Header(nil), RemoteAddr:\"192.168.122.162:48808\", RequestURI:\"/defaulting?timeout=2s\", TLS:(*tls.ConnectionState)(0xc0021b5290), Cancel:(<-chan struct {})(nil), Response:(*http.Response)(nil), ctx:(*co
@navidshaikh
navidshaikh / private_github_repos.md
Last active August 8, 2021 09:19
Working with private repos at github

Put this global config:

git config --global url.ssh://[email protected]/.insteadOf https://github.com/

Or local config per repo:

git config url.ssh://[email protected]/.insteadOf https://github.com/
@navidshaikh
navidshaikh / install_golang.bash
Last active August 9, 2021 16:13
golang 1.16.7 installation
wget https://golang.org/dl/go1.16.7.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.16.7.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin">>~/.bashrc
source ~/.bashrc
@navidshaikh
navidshaikh / install_docker_ce_ubuntu.sh
Last active August 9, 2021 16:34
docker_ce_ubuntu
sudo apt-get remove -y docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \