Skip to content

Instantly share code, notes, and snippets.

@Gangareddy
Gangareddy / pod-node-rules.yaml
Created April 2, 2019 23:17
Prometheus Rules and Alerts
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
generation: 1
labels:
app: prometheus-operator
chart: prometheus-operator-0.1.26
heritage: Tiller
release: prom
name: pod-node-rules
Step 1) Apply CRDS
kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.6/deploy/manifests/00-crds.yaml
Step 2) Label namespace
kubectl label namespace cert-manager certmanager.k8s.io/disable-validation="true"
Step 3) Create Helm Chart
helm install --name cert-manager \
stable/cert-manager \
--namespace cert-manager \
@Gangareddy
Gangareddy / sudoku.scala
Last active May 5, 2020 05:01
Sudoku Solver Made Simple Using Scala List
// Sudoku Solver
object SudokuSolver {
type Board = Array[Array[Char]]
type Chars = Array[Char]
case class Position(i: Int, j: Int, char: Char = '.')
type Positions = List[Position]
def printBoard(board: Board):Unit = {