Skip to content

Instantly share code, notes, and snippets.

View leoluz's full-sized avatar

Leonardo Luz Almeida leoluz

View GitHub Profile
Argo CD UI is known to be very powerful. However, allowing users to have full time control in applications running in production environments can introduce several risks. Other than the risks involved mutating resources straight from the UI aren’t in sync with gitops practices and can introduce state drift that are hard to debug. Join us to learn more details about the challenges that we are facing running Argo CD UI capabilities and how we are solving the problem with having dangerous features available to teams on a large scale. In this talk we are going to introduce a brand new Argo CD extension that aims to provide UI ephemeral access and can be used to hook different compliance requirements such as change request creation.
@leoluz
leoluz / map_check.vim
Last active November 3, 2020 03:10
vim: check maps with more details
:verbose nmap <KEY>
@leoluz
leoluz / rbac-docker4desktop.sh
Last active July 12, 2023 10:26
enable/disable RBAC in docker-for-desktop
-- enable RBAC in docker-for-desktop
k delete clusterrolebinding docker-for-desktop-binding
-- disable RBAC in docker-for-desktop
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: docker-for-desktop-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
@leoluz
leoluz / kube admin army-knife
Last active September 25, 2020 19:55
create a pod that starts a shell and stops when exiting
# Run a pod and exec into it to run curl commands. Pod will self delete on exit.
kubectl run curlpod-debug -i --tty --image=appropriate/curl --restart=Never --rm -- sh
# To run in a specific node:
apiVersion: v1
kind: Pod
metadata:
name: curlpod-debug
labels:
app: curl-debug
@leoluz
leoluz / dood.sh
Created July 2, 2019 20:05
docker-out-of-docker (DooD)
# Starts a docker container with the hosts docker daemon for doing docker tests
# https://asciinema.org/a/137139
docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -it docker /bin/sh
1215 Signing of Magna Carta in England
1497 European exploration began with the expedition of John Cabot, who was the first to draw a map of Canada’s East Coast
1534 to 1542 Jacques Cartier made three voyages across the Atlantic, claiming the land for King Francis I of France
1550s The name of Canada began appearing on maps
1604 The first European settlement north of Florida was established by French explorers Pierre de Monts and Samuel de Champlain
1608 Samuel de Champlain built a fortress at what is now Quebec City
1610 English settlement began
1670 King Charles II of England granted the Hudson’s Bay Company exclusive trading rights over the watershed draining into Hudson Bay
1700s The maple leaf was adopted as a symbol in Canada
1701 The French and the Iroquois made peace
@leoluz
leoluz / execute_cronjob.sh
Created October 19, 2018 14:47
Kubernetes: create a job from a cronjob (requires kubectl v1.10.1+)
kubectl create job --from=cronjob/<cronjob-name> <job-name>
@leoluz
leoluz / find_big_files.sh
Created October 9, 2018 03:29
Find the 25 biggest files in dir
find . -type f -exec ls -al {} \; | sort -nr -k5 | head -n 25
@leoluz
leoluz / kubeseal.sh
Created May 14, 2018 19:35
kubeseal
kubeseal --format=yaml < secret.yaml > ssecrets.yaml
### Keybase proof
I hereby claim:
* I am leoluz on github.
* I am leoluz (https://keybase.io/leoluz) on keybase.
* I have a public key ASDmkK0Xl1TeI2bnPySn-VdKjFCP418Xz24XySf9UWwnwAo
To claim this, I am signing this object: