Skip to content

Instantly share code, notes, and snippets.

View CRThaze's full-sized avatar

Diego Fernando Carrión CRThaze

View GitHub Profile
@CRThaze
CRThaze / helm-provider-data-source.tf
Created November 9, 2025 18:59
How to split and flatten the output of a helm_template data source so that you can then use these with kubernetes_manifest resources from the terraform provider, so as to not mix statemanagement.
resource "kubernetes_namespace" "metallb-system" {
metadata {
name = "metallb-system"
}
}
data "helm_template" "metallb" {
name = "metallb"
namespace = "metallb-system"
@CRThaze
CRThaze / 00-benchmark-job.k8s.yaml
Last active March 18, 2025 10:33
IO Benchmark Job for K8s Storage Class
---
apiVersion: v1
kind: ConfigMap
metadata:
name: io-benchmark
labels:
app.kubernetes.io/name: io-benchmark
data:
rand-rw.fio: |
[global]
@CRThaze
CRThaze / benchmark-job.k8s.yaml
Last active February 21, 2025 10:09
Benchmark Storage Class
---
apiVersion: v1
kind: ConfigMap
metadata:
name: io-benchmark
labels:
app.kubernetes.io/name: io-benchmark
data:
rand-rw.fio: |
[global]
@CRThaze
CRThaze / whence.sh
Last active August 9, 2024 14:43
`which` is frankly insufficient. Whence fully resolves symlinks, and tells you if a command is something else like a function or built-in.
function whence() {
local print_links=false
local command=""
local batch=false
# Manual option parsing
for arg in "$@"; do
case "$arg" in
-p)
print_links=true