Skip to content

Instantly share code, notes, and snippets.

View InAnimaTe's full-sized avatar
🕹️
Decomposing the Monolith

Mario InAnimaTe

🕹️
Decomposing the Monolith
View GitHub Profile
@InAnimaTe
InAnimaTe / applied yaml
Created May 6, 2020 01:23
API Version weirdness...
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: engage-ingress
annotations:
kubernetes.io/ingress.class: nginx-external
spec:
rules:
- host: engage.staging.example.com
http:
@InAnimaTe
InAnimaTe / arryn-eksctl
Created April 27, 2020 12:08
Cluster Upgrade to 1.15
└[~]> eksctl update cluster -n arryn -w -v 4 --approve
Flag --wait has been deprecated, --wait is no longer respected; the cluster update always waits to complete
2020-04-27T06:48:00-04:00 [ℹ] eksctl version 0.17.0
2020-04-27T06:48:00-04:00 [ℹ] using region us-east-1
2020-04-27T06:48:01-04:00 [▶] role ARN for the current session is "arn:aws:iam::118835980000:user/god"
2020-04-27T06:48:01-04:00 [▶] cluster = {
Arn: "arn:aws:eks:us-east-1:118835980000:cluster/arryn",
CertificateAuthority: {
Data: "K096LS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRFNU1EY3lPVEUyTXpBeU1sb1hEVEk1TURjeU5qRTJNekF5TWxvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTTVTCk1JNDNuSmVDclZ5Ui9BQXBSTGhvTGhmd3RJZEw5aXZhSTRWMWZXeUQ3cFpxcDkveHZmMXd5MzBES3N0RDg3UzMKSSsvdSs4K3NGbkxydENNS2ZwZEVEWmFIOXM4dzdBTXVXWnkvUG92anlkT0dxc284aGx3QVUxMUxCSTArdFZ4bApQdm92TlpQMUpWbzducUhZeFdUOHpqY2tLZS9hTTR
@InAnimaTe
InAnimaTe / cxe-personalize-1579644000-z9zb2
Created January 22, 2020 19:53
The latest cxe-personalize job logs
Jan 22 00:16:39 arryn-staging-default-cxe-personalize-1579644000-z9zb2 cxe-personalize INFO: {personalize, us-east-1} was not found in region metadata, trying to construct an endpoint using the standard pattern for this region: 'personalize.us-east-1.amazonaws.com'.
Jan 22 00:16:39 arryn-staging-default-cxe-personalize-1579644000-z9zb2 cxe-personalize 05:16:38.740 [scala-execution-context-global-14] INFO CampaignManager - Deleting a campaign: cxe-collectibles-maize
Jan 22 00:16:39 arryn-staging-default-cxe-personalize-1579644000-z9zb2 cxe-personalize 05:16:38.792 [scala-execution-context-global-14] INFO CampaignManager - Campaign deletion status: PENDING
Jan 22 00:16:46 arryn-staging-default-cxe-personalize-1579644000-z9zb2 cxe-personalize 05:16:45.475 [scala-execution-context-global-15] INFO DatasetManager - Dataset deletion status: PENDING
Jan 22 00:16:46 arryn-staging-default-cxe-personalize-1579644000-z9zb2 cxe-personalize 05:16:45.541 [scala-execution-context-global-16] INFO DatasetManager - Dataset
@InAnimaTe
InAnimaTe / ipt_function
Created October 1, 2019 14:50
Iptables Safeclear Function
# setup for easy management of iptables
# This function makes it safer to do iptables clear and set operations.
function ipt {
if [[ "$1" == "clear" ]]; then
print -P "\e[95mFlushing firewall and allowing everyone...\n"
sudo iptables -F
sudo iptables -X
sudo iptables -t nat -F
sudo iptables -t nat -X
sudo iptables -t mangle -F
@InAnimaTe
InAnimaTe / .tmux.conf
Created February 15, 2018 18:56
Tmux Configuration
# unbind some default keybindings
unbind C-b
# set prefix key to ctrl-a
set -g prefix C-a
# lower command delay
set -sg escape-time 1
# start first window and pane at 1, not zero
@InAnimaTe
InAnimaTe / kcc
Last active December 5, 2018 10:53
kubectl context/namespace switcher!
function kcc () {
usage () {
echo -en "Usage: $0 <context> <namespace>\n"
}
result () {
echo -en "-> Context: \e[96m$context\e[0m\n-> Namespace: \e[92m$namespace\n\e[0m"
}
if [ $# -eq 0 ] ; then
## If no options, print the current context/cluster and namespace
context="$(kubectl config current-context 2>/dev/null)"
@InAnimaTe
InAnimaTe / test-zfs
Created March 16, 2017 02:32
zpool with single z3 vdev
root@test-zfs:~# fallocate -l 1G 1
root@test-zfs:~# fallocate -l 1G 2
root@test-zfs:~# fallocate -l 1G 3
root@test-zfs:~# fallocate -l 1G 4
root@test-zfs:~# l
1 2 3 4
root@test-zfs:~# ls -lah
total 4.1G
drwx------ 4 root root 4.0K Mar 16 02:16 .
drwxr-xr-x 23 root root 4.0K Mar 16 02:05 ..
The following is some httpstat investigation relating to api calls.
└[~]> httpstat https://api.auth0.com
Connected to 52.9.60.147:443 from 192.168.1.149:56408
HTTP/1.1 302 Found
Date: Tue, 14 Mar 2017 14:28:43 GMT
Content-Type: text/plain; charset=UTF-8
Content-Length: 39
Connection: keep-alive
@InAnimaTe
InAnimaTe / serviceaccount-role-rolebinding-helm-template
Created March 6, 2017 19:42
example rbac (non-cluster roles)
kind: Role
apiVersion: rbac.authorization.k8s.io/v1alpha1
metadata:
name: {{ template "fullname" . }}
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["get", "watch", "list"]
nonResourceURLs: []
---
@InAnimaTe
InAnimaTe / kcsh
Last active March 7, 2017 18:30
kubectl exec helper
function kcsh () {
if [ $# -eq 4 ]; then
kubectl exec -ti "${2}" -c "${3}" --namespace="${1}" -- "${4}"
else
echo "Usage: $0 <namespace> <pod> <container> <command>"
fi
}