Skip to content

Instantly share code, notes, and snippets.

View DelusionalOptimist's full-sized avatar
Edit Status

Rudraksh Pareek DelusionalOptimist

Edit Status
View GitHub Profile
@DelusionalOptimist
DelusionalOptimist / snapdrop.sh
Created July 17, 2023 11:18
Deallocate your DigitalOcean droplets by creating snapshots
#!/bin/env bash
# MOTIVATION:
# I setup a dev env in a DigitalOcean droplet once.
# However I was annoyed by the fact that there
# is no way to deallocate (like in Azure) the VM
# and save credits when not in use.
# Thus, I implemented this script to create snapshots, which
# are cheaper then droplets.
@DelusionalOptimist
DelusionalOptimist / crio.md
Created July 14, 2022 07:05
KubeArmor release v0.5 blog

KubeArmor directly interfaces with container runtimes to get metadata like container’s namespaces, image and so on. This metadata is then used for generating rich telemetry data and policy enforcement.

In the past, KubeArmor has supported Containerd and Docker and now with v0.5, KubeArmor will also support the CRI-O runtime. This has been made possible by leveraging the CRI-API. Also, if you have multiple container runtimes, you can now use the CRI_SOCKET environment var or the -criSocket flag with kubearmor for specifying one to use.

Page 1(3)

For complete implementation, see KubeArmor/697.

#!/usr/env bash
# change these vars according to needs
# do run `helm repo add hashicorp https://helm.releases.hashicorp.com` before using this
if [[ -z "${CHART_VERSION:-}" ]]; then
CHART_VERSION=$(helm show chart hashicorp/consul | grep 'version' | cut -d ' ' -f2)
fi
NEW_CONSUL_VERSION=$(helm show chart hashicorp/consul --version $CHART_VERSION | grep 'appVersion' | cut -d ' ' -f2)
echo $CHART_VERSION $NEW_CONSUL_VERSION
@DelusionalOptimist
DelusionalOptimist / deploy-meshery.sh
Created September 17, 2021 14:54
Meshery dev env in containers
#!/bin/env bash
main() {
local DEPLOY="true"
parse_command_line "$@"
if [[ $DEPLOY = "true" ]]
then
eval $(minikube -p minikube docker-env)
@DelusionalOptimist
DelusionalOptimist / generator.sh
Last active October 10, 2021 17:43
Shell script for extracting JSON schema and generating OAM workloads from service mesh manifests
#!/usr/env bash
# change these vars according to needs
NEW_ISTIO_VERSION=1.10.3
UTILPATH=~/dev/kubeopenapi-jsonschema
meshName=Istio
smpMeshName=ISTIO
resourceType=CustomResourceDefinition
dirName=./templates/oam/workloads/$NEW_ISTIO_VERSION
@DelusionalOptimist
DelusionalOptimist / keybase.md
Created August 2, 2021 18:46
Keybase verification

Keybase proof

I hereby claim:

  • I am delusionaloptimist on github.
  • I am del_optimist (https://keybase.io/del_optimist) on keybase.
  • I have a public key ASBDbB3r6PQDxpUfT_JJC6SWXYqJG3puCiNueNh_0jbAxAo

To claim this, I am signing this object: