Skip to content

Instantly share code, notes, and snippets.

View waveywaves's full-sized avatar
🏠
Working from home

Vibhav Bobade waveywaves

🏠
Working from home
View GitHub Profile
@waveywaves
waveywaves / hpa-vpa-conflict-test.md
Created October 13, 2025 15:13
The HPA VPA feedback loop

Deployment we will use to test the HPA VPA conflict

apiVersion: apps/v1                                                                                                                            
 kind: Deployment                                                                                                                               
 metadata:                                                                                                                                      
   name: web-app                                                                                                                                
   namespace: production                                                                                                                        
 spec:                                                                                                                                          
   replicas: 3  # initial 3 replicas as shown in diagram                                
@waveywaves
waveywaves / create_public_eks_cluster.sh
Created May 2, 2024 17:44
eksctl command to create cluster accessible from the internet
#!/bin/bash
# Initialize an empty variable to hold all public subnet IDs
ALL_PUBLIC_SUBNETS=""
# Get VPC IDs
VPC_IDS=$(aws ec2 describe-vpcs r--query 'Vpcs[*].VpcId' --output text)
# Loop through each VPC ID and append public subnets to the ALL_PUBLIC_SUBNETS variable
for VPC_ID in $VPC_IDS; do
@waveywaves
waveywaves / aws_public_subnets.sh
Last active May 2, 2024 17:24
get all your public subnets ids for your aws account
#!/bin/bash
# Get VPC IDs
VPC_IDS=$(aws ec2 describe-vpcs --query 'Vpcs[*].VpcId' --output text)
# Loop through each VPC ID and describe public subnets
for VPC_ID in $VPC_IDS; do
echo "Public subnets in VPC $VPC_ID:"
aws ec2 describe-subnets --filters "Name=vpc-id,Values=$VPC_ID" "Name=map-public-ip-on-launch,Values=true" --query 'Subnets[*].{ID:SubnetId,CIDR:CidrBlock}' --output table
done
@waveywaves
waveywaves / airgapped-vcluster.sh
Last active March 7, 2024 20:59
Running a vcluster in an airgapped environment using zarf
# Install Helm
brew install helm
# Install Zarf
brew tap defenseunicorns/tap && brew install zarf
#Install vcluster
brew install loft-sh/tap/vcluster
# start in an empty dir
@waveywaves
waveywaves / gist:03bd398baa2fd4c6401542eaae84e5d7
Created May 10, 2020 21:23
API call to rebuild Github Pages
curl -u user:token -X POST https://api.github.com/repos/user/repo/pages/builds
/**
* Copyright 2016 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software