Skip to content

Instantly share code, notes, and snippets.

View ebuildy's full-sized avatar
🤟
South of France

Thomas Decaux ebuildy

🤟
South of France
View GitHub Profile
{{- $podValues := .Values.unsealedJob.pod -}}
{{- $jobValues := .Values.unsealedJob.job -}}
{{- $containerValues := .Values.unsealedJob.container -}}
apiVersion: batch/v1
kind: Job
metadata:
name: vault-unsealed-{{ $jobValues.version }}
spec:
template:
spec:
@ebuildy
ebuildy / k8s_node_capacity_dashboard.json
Created June 26, 2023 20:39
grafana kubernetes node capacity dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
@ebuildy
ebuildy / index-compare.sh
Created June 20, 2023 15:30
Compare elasticsearch indices mapping
#!/bin/bash
##
# Requirements: jq, jd, curl
# Variables:
# - ES_AUTH --> elasticsearch auth
##
alias es_curl="curl -H "application/json" -u $ES_AUTH"
@ebuildy
ebuildy / send.json
Created February 17, 2023 18:33
elasticsearch APM get max duration percentiles for 10 minutes
POST apm-*-span/_search
{
"size": 0,
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": "2023-02-16T13:00:00.540Z"
@ebuildy
ebuildy / impl-workflow.yaml
Last active November 12, 2022 21:21
ETL to elasticsearch with pyspark , argo-workflow , kubernetes
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: djobi-workflow-
spec:
entrypoint: djobi
serviceAccountName: workflow
ttlStrategy:
@ebuildy
ebuildy / simple-pyspark-argo-workflow.yaml
Last active November 10, 2022 00:09
Play with pyspark from argo workflow
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: pyspark-
spec:
entrypoint: pyspark
templates:
- name: pyspark
inputs:
@ebuildy
ebuildy / s3-delete-keys.ts
Last active October 4, 2022 17:56
Play with AWS S3 API on javascript
public async deleteKeys(keys: string[]): Promise<any[]> {
function spliceIntoChunks(arr: any[], chunkSize: number) {
const res = [];
while (arr.length > 0) {
const chunk = arr.splice(0, chunkSize);
res.push(chunk);
}
return res;
}
spark.executor.extraJavaOptions: -Dorg.xerial.snappy.use.systemlib=true -Dorg.xerial.snappy.lib.path=/usr/lib/libsnappyjava.so
PUT _transform/test
{
"source": {
"index": [
"apm-*-span"
],
"query": {
"bool": {
"filter": [
{
POST _aliases
{
"actions": [
{
"remove": {
"index": "consolidation-ctr-v1",
"alias": "consolidation-ctr"
}
},
{