Skip to content

Instantly share code, notes, and snippets.

View KozhevnikovM's full-sized avatar

Mikhail Kozhevnikov KozhevnikovM

View GitHub Profile
@mousavian
mousavian / k8s-cronjob-suspend.sh
Last active September 15, 2023 08:40
Suspending all cronjobs in all namespaces in kubernetes
#!/bin/bash
for ns in $(kubectl get ns -o jsonpath="{.items[*].metadata.name}"); do
for cj in $(kubectl get cronjobs -n "$ns" -o name); do
kubectl patch "$cj" -n "$ns" -p '{"spec" : {"suspend" : true }}';
done
done
@souzaxx
souzaxx / ENIConfig.yaml
Last active July 19, 2024 15:10
An example using terraform templatefile with Helm
{{- range .Values.zones }}
---
apiVersion: crd.k8s.amazonaws.com/v1alpha1
kind: ENIConfig
metadata:
name: {{ .name }}
spec:
subnet: {{ .subnetID }}
securityGroups:
{{- range $.Values.securityGroupIDs }}