Skip to content

Instantly share code, notes, and snippets.

View tirumaraiselvan's full-sized avatar

Tirumarai Selvan tirumaraiselvan

View GitHub Profile
@tirumaraiselvan
tirumaraiselvan / deployment.yaml
Last active October 4, 2020 04:42
tcpdump kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: hasura
hasuraService: custom
name: hasura
namespace: default
spec:
replicas: 1
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@tirumaraiselvan
tirumaraiselvan / shim.js
Last active July 31, 2023 17:05
Mount Hasura on Apollo federated gateway
const { ApolloServer } = require("apollo-server");
const gql = require("graphql-tag");
const fetch = require("node-fetch");
const {
introspectionQuery,
buildClientSchema,
printSchema
} = require("graphql");
const typeDefs = gql`
@tirumaraiselvan
tirumaraiselvan / deploy.sh
Created March 7, 2019 10:42
Bash script to package and deploy Lambda and then link it with API Gateway route
#!/usr/bin/env bash
set -o nounset
set -o errexit
set -o pipefail
current_function="$1"
current_build="${current_function}_${DEPLOY_ENVIRONMENT}"
cd $current_function
@tirumaraiselvan
tirumaraiselvan / config.yml
Created March 7, 2019 10:14
CircleCI config to build lambdas
version: 2
jobs:
build_dev:
working_directory: ~/project
docker:
- image: buildpack-deps:xenial
environment:
DEPLOY_ENVIRONMENT: dev
steps:
- checkout
@tirumaraiselvan
tirumaraiselvan / setupadmissionwebhook.md
Last active April 28, 2024 10:16
Setup admission webhooks in Kubernetes
@tirumaraiselvan
tirumaraiselvan / datanode-stateful-set.yaml
Created February 9, 2018 09:04
Datanode stateful-set
- apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
labels:
app: datanode
hasuraService: custom
name: datanode
namespace: default
spec:
serviceName: "datanode"
@tirumaraiselvan
tirumaraiselvan / service.yaml
Last active February 9, 2018 08:28
Namenode service
- apiVersion: v1
kind: Service
metadata:
app: namenode
hasuraService: custom
name: namenode
namespace: default
spec:
ports:
- port: 8020 #map service port 8020 to pod port 8020