Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Working

Thearas Thearas

🎯
Working
View GitHub Profile
@Thearas
Thearas / elasticsearch_and_kibana.yaml
Created Oct 25, 2021
Setup Elasticsearch and Kibana for devlopment
View elasticsearch_and_kibana.yaml
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elasticsearch
labels:
app: elasticsearch
spec:
version: 7.15.1
http:
tls:
@Thearas
Thearas / pulsar.sts.yaml
Created Oct 9, 2021
K8s standalone pulsar
View pulsar.sts.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: pulsar-standalone
labels:
app.kubernetes.io/managed-by: test-infra
spec:
serviceName: pulsar-svc
replicas: 1
selector:
@Thearas
Thearas / cleanup-pvc.sh
Created Apr 2, 2021
Cleanup dangling PVCs which were created by tidb-operator
View cleanup-pvc.sh
#!/bin/bash
set -xuo pipefail
IFS='
'
pvc2tcs=( $(kubectl get pvc -l app.kubernetes.io/managed-by=tidb-operator,app.kubernetes.io/name=tidb-cluster -o jsonpath="{range .items[*]}{.metadata.name}{' '}{.metadata.labels.app\.kubernetes\.io/instance}{'\n'}{end}") )
echo "Cleanup all dangling PVCs created by tidb-operator."
for pvc2tc in "${pvc2tcs[@]}"; do
pvc=$(echo "${pvc2tc}" | awk -F ' ' '{print $1}')
tc=$(echo "${pvc2tc}" | awk -F ' ' '{print $2}')
@Thearas
Thearas / build.yml
Created Feb 22, 2021
GitHub Action Rust MUSL Binary
View build.yml
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always