Skip to content

Instantly share code, notes, and snippets.

View yindia's full-sized avatar
:shipit:
Building

Yuvraj yindia

:shipit:
Building
View GitHub Profile
@yindia
yindia / kyverno-policy.yaml
Last active June 30, 2020 17:33
kyverno policy for generate rules
# ➜ ~ kubectl apply -f mem-cpu-limit.yaml
# clusterpolicy.kyverno.io/mem-cpu-limit created
# ➜ ~ kubectl create ns new2
# namespace/new2 created
# ➜ ~ kubectl get -n new2 ResourceQuota
# NAME CREATED AT
# cpu-mem-resource-quoto 2020-06-30T08:46:52Z
apiVersion: kyverno.io/v1
kind: ClusterPolicy
@yindia
yindia / service-checklist.md
Created March 15, 2020 21:01 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@yindia
yindia / .tmux.conf
Last active April 29, 2020 11:08
Tmux Conf
set-option -g prefix C-a
unbind %
bind | split-window -h
bind - split-window -v
bind N break-pane
# Set status bar
set -g status-bg black
set -g status-fg white
# Highlight active window
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: tiller
apiVersion: v1
kind: ServiceAccount
metadata:
name: tiller
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: tiller
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: prom-rbac
subjects:
- kind: User
name: yuvraj@zoop.one
roleRef:
kind: ClusterRole
name: prom-admin
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: prom-admin
rules:
# Just an example, feel free to change it
- apiGroups: [""]
resources: ["clusterRole", "clusterRoleBinding"]
verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: tiller-clusterrolebinding
subjects:
- kind: ServiceAccount
name: tiller
namespace: kube-system
roleRef:
kind: ClusterRole
# Stage 1 - the build process
FROM node:10.11.0-alpine AS base
MAINTAINER evalsocket@protonmail.com
WORKDIR /usr/src/app
# dev image contains everything needed for testing, development and building
FROM base AS development
COPY package.json yarn.lock ./
# first set aside prod dependencies so we can copy in to the prod image
---
listeners:
- address: tcp://0.0.0.0:9999
use_original_dst: true
filters:
- type: read
name: http_connection_manager
config:
codec_type: auto
stat_prefix: ingress_http