Skip to content

Instantly share code, notes, and snippets.

View amioranza's full-sized avatar

A. Mioranza amioranza

View GitHub Profile
shellcheck scripa.sh  ✔  5s   09:40:33 
In scripa.sh line 35:
for (( i=1; i<${envsleng}+1; i++ ));
^---------^ SC2004: $/${} is unnecessary on arithmetic variables.
In scripa.sh line 43:
for SERVICE in $(ssh $SRV_DEPLOYER_PARAM docker service ls | grep $ENV | awk '{print $1}')
^-----------------^ SC2086: Double quote to prevent globbing and word splitting.
@amioranza
amioranza / gist:cacc1e0688d625ca159585230619546a
Created November 24, 2020 00:05
kubectl jsonpath vs jq
resultados nas últimas 3 versões do kubernetes
Kubernetes 1.17:
kubectl get pods -n kube-system etcd-minikube -o jsonpath='{.metadata.annotations}'
map[kubernetes.io/config.hash:83b24cc2c92d792d0dc5eaca3ce31e3d kubernetes.io/config.mirror:83b24cc2c92d792d0dc5eaca3ce31e3d kubernetes.io/config.seen:2020-11-23T23:49:56.363391478Z kubernetes.io/config.source:file]
kubectl get pods -n kube-system etcd-minikube -o json | jq '.metadata.annotations'
{
"kubernetes.io/config.hash": "83b24cc2c92d792d0dc5eaca3ce31e3d",
"kubernetes.io/config.mirror": "83b24cc2c92d792d0dc5eaca3ce31e3d",

Keybase proof

I hereby claim:

  • I am amioranza on github.
  • I am amioranza (https://keybase.io/amioranza) on keybase.
  • I have a public key ASBhwg2jK4CVRpozpM2H-Hkq-JJYCZRY6HFg86iIPoWdIgo

To claim this, I am signing this object:

rule_files:
- /etc/config/rules
- /etc/config/alerts
scrape_configs:
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
- bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
job_name: kubernetes-apiservers
@amioranza
amioranza / pvc_sample
Created June 12, 2018 02:59
PVC on K8S
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minio-pv-claim
namespace: infra
labels:
app: minio-storage-claim
spec:
accessModes:
- ReadWriteOnce
@amioranza
amioranza / pv_sample
Created June 12, 2018 02:55
PV on K8S
apiVersion: v1
kind: PersistentVolume
metadata:
name: minio-pv-volume
labels:
type: local
app: minio-storage-claim
spec:
storageClassName: manual
capacity: