Skip to content

Instantly share code, notes, and snippets.

View sahajamit's full-sized avatar

Amit Rawat sahajamit

View GitHub Profile
@sahajamit
sahajamit / Dockerfile_simple.txt
Last active December 31, 2020 05:05
Dockerfile_simple.txt
FROM centos:centos7
ARG JAVA_VERSION="1.8.0"
LABEL maintainer="sahajamit@gmail.com"
WORKDIR /app
RUN chmod 666 /etc/passwd && chown root:root /etc/passwd
RUN yum install -y java-$JAVA_VERSION-openjdk-devel unzip && mkdir -p /opt/lib
package main
import (
"context"
"flag"
"fmt"
"math/rand"
"os"
"time"
https://github.com/kubernetes/client-go/blob/master/examples/out-of-cluster-client-configuration/main.go
https://github.com/kubernetes/client-go/blob/master/tools/clientcmd/client_config.go
https://github.com/kubernetes/client-go/tree/master/examples/create-update-delete-deployment
https://stackoverflow.com/questions/53891862/patching-deployments-via-kubernetes-client-go
https://stackoverflow.com/questions/32554893/how-can-i-create-a-simple-client-app-with-the-kubernetes-go-library
apiVersion: v1
kind: Pod
metadata:
name: demo-pod
spec:
containers:
- name: busybox-demo
image: busybox
args:
[
@sahajamit
sahajamit / WaterfallGraph.js
Last active May 4, 2020 10:40
Highcharts Waterfall Graph for Microservices Timings
Highcharts.chart('container', {
chart: {
type: 'columnrange',
inverted: true
},
title: {
text: 'Different MicroServices Timings in a Waterfall Chart'
},
subtitle: {
text: 'Time taken by each microservice'
<style id="jsbin-css">
@import 'https://code.highcharts.com/css/highcharts.css';
.highcharts-waterfall-series .highcharts-point {
fill: #90ed7d;
}
.highcharts-color-0 {
fill: rgb(89, 166, 89);
stroke: rgb(89, 166, 89);
}
apiVersion: apps/v1
kind: Deployment
metadata:
name: selenium-grid-k8s-autoscaler-deployment
labels:
app: selenium-grid-k8s-autoscaler
name: selenium-grid-k8s-autoscaler
spec:
replicas: 1
selector:
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: scale-apps_auto-scale-robot
namespace: default
roleRef:
kind: Role
name: scale-apps
apiGroup: rbac.authorization.k8s.io
subjects:
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: scale-apps
namespace: default
rules:
- apiGroups:
- "apps/v1"
verbs:
- get
apiVersion: v1
kind: ServiceAccount
metadata:
name: auto-scale-robot-sa