Skip to content

Instantly share code, notes, and snippets.

@kainlite
kainlite / migrations_in_console_cheatsheet.exs
Created March 4, 2024 18:17 — forked from pmarreck/migrations_in_console_cheatsheet.exs
How to run Ecto migrations in Elixir/Phoenix from an `iex -S mix` or production console
# How to run Ecto migrations from IEx console... Examples
# preliminaries assumed in the following code, change to fit your environment:
alias YourAppName.Repo
your_app_name_as_atom = :mpnetwork
downto_version = 20170724182558
# Down:
Ecto.Migrator.run(Repo, "priv/repo/migrations/", :down, [to: downto_version])
@kainlite
kainlite / tekton-cleanup.yaml
Created March 4, 2024 16:03 — forked from ctron/tekton-cleanup.yaml
Cleaning up Tekton pipeline runs
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cleaner
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cleaner
@kainlite
kainlite / k3s-etcd-commands.md
Created February 25, 2024 22:44 — forked from superseb/k3s-etcd-commands.md
k3s etcd commands

k3s etcd commands

etcd

Setup etcdctl using the instructions at https://github.com/etcd-io/etcd/releases/tag/v3.4.13 (changed path to /usr/local/bin):

Note: if you want to match th etcdctl binaries with the embedded k3s etcd version, please run the curl command for getting the version first and adjust ETCD_VER below accordingly:

curl -L --cacert /var/lib/rancher/k3s/server/tls/etcd/server-ca.crt --cert /var/lib/rancher/k3s/server/tls/etcd/server-client.crt --key /var/lib/rancher/k3s/server/tls/etcd/server-client.key https://127.0.0.1:2379/version
@kainlite
kainlite / dnsovertls.md
Created January 27, 2023 21:15 — forked from uraimo/dnsovertls.md
Configure your Mac to use DNS over TLS
tekton-pipelines clone-build-push-vt6jz-fetch-source-pod 0/1 Completed 0 1d
tekton-pipelines clone-build-push-wzlkb-build-push-pod 0/2 Completed 0 1d
❯ tkn -n tekton-pipelines triggertemplate list
NAME AGE
clone-build-push-template 5 seconds ago
❯ tkn -n tekton-pipelines triggertemplate describe clone-build-push-template
Name: clone-build-push-template
Namespace: tekton-pipelines
⚓ Params
❯ tkn -n tekton-pipelines pipelinerun list
NAME STARTED DURATION STATUS
clone-build-push-5qkv6 5 seconds ago 4m26s Failed
clone-build-push-blkrm 5 seconds ago 3m58s Failed
❯ tkn -n tekton-pipelines pipeline list
NAME AGE LAST RUN STARTED DURATION STATUS
clone-build-push 5 seconds ago clone-build-push-5qkv6 5 weeks ago 4m26s Failed
❯ tkn -n tekton-pipelines eventlistener list
NAME AGE URL AVAILABLE
clone-build-push 5 seconds ago http://el-clone-build-push.tekton-pipelines.svc.cluster.local:8080 True
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: tr-ingress
namespace: tekton-pipelines
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/rewrite-target: "/"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/ssl-redirect: "true"