Skip to content

Instantly share code, notes, and snippets.

Avatar

Laxman Singh Mandloi Laxman-SM

  • Rubik.ai Intertrust technologies india
  • US, Hyderabad (india)
View GitHub Profile
View jenkins.yaml
def COLOR_MAP = [
'SUCCESS': 'good',
'FAILURE': 'danger',
]
properties([pipelineTriggers([githubPush()])])
pipeline {
agent any
environment {
//put your environment variables
@Laxman-SM
Laxman-SM / tfonly
Created Aug 15, 2020 — forked from immanuelpotter/tfonly
If you only want to perform actions on resources in one terraform file, this will do that for you
View tfonly
#!/bin/bash
COMMAND="$1"
TF_FILE="$2"
usage(){
echo "Usage: $0 (plan|apply|destroy) [tf-filename]"
}
@Laxman-SM
Laxman-SM / cluster.tf
Created Aug 7, 2020 — forked from cwoolum/cluster.tf
AKS Cluster with Managed Identity and an ACR
View cluster.tf
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West US 2"
}
data "azurerm_client_config" "current" {
}
resource "azurerm_kubernetes_cluster" "example" {
name = "example-aks1"
View gist:6d51e9712011751b75ac7b7d6130ff9e
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"route53:ListHostedZones",
"route53:GetChange"
],
"Resource": [
@Laxman-SM
Laxman-SM / get_spot_price.py
Created Jul 15, 2020 — forked from brunodasilvalenga/get_spot_price.py
Script python to get spot price with last 4 hours.
View get_spot_price.py
import boto3
import datetime
client = boto3.client('ec2', region_name='us-west-2')
regions = [x["RegionName"] for x in client.describe_regions()["Regions"]]
print(regions)
INSTANCE = "t3.xlarge"
print("Instance: %s" % INSTANCE)
results = []
for region in regions:
client = boto3.client('ec2', region_name=region)
@Laxman-SM
Laxman-SM / get-all-the-k8s-things-yaml.sh
Created Mar 5, 2020 — forked from philoserf/get-all-the-k8s-things-yaml.sh
Get all the kubernetes objects YAML from your cluster
View get-all-the-k8s-things-yaml.sh
for n in $(kubectl get -o=name namespaces | cut -f 2 -d "/"); do
for o in $(kubectl get -o=name pvc,configmap,serviceaccount,secret,ingress,service,deployment,statefulset,hpa,job,cronjob --namespace $n); do
mkdir -p $(dirname $o)
kubectl get -o=yaml --export $o --namespace $n >$o.yaml
done
done
View print_kubernetes_resource.sh
#/!bin/bash
print_kubernetes_resource() {
printf "\n\nGlobal\n======"
resource_count=$(expr $(kubectl api-resources --namespaced=false | wc -l) - 1)
resources=$(kubectl api-resources --namespaced=false | tail -n $resource_count | awk '{print $1}')
for resource in $resources; do
printf "\n\nChecking $resource...\n"
kubectl get $resource
done
@Laxman-SM
Laxman-SM / envs
Created Mar 2, 2020 — forked from takuma-saito/envs
kubernetes-fluentd-deamonset.sh
View envs
LOG_GROUP_NAME=xxxxxxxxxxx
AWS_ACCESS_KEY_ID=xxxxxxxxxxx
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxx
AWS_REGION=ap-northeast-1
View presto-howto.md
View PV_PVC.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-001
spec:
capacity:
storage: 100Mi
accessModes:
- ReadWriteOnce
- ReadWriteMany
You can’t perform that action at this time.