yaml

yaml
# Grafana provisioning: datasources
# /etc/grafana/provisioning/datasources/prometheus.yml
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus

Grafana dashboards as code with JSON provisioning

grafana dashboards monitoring
by Ryan Nakamura 2 tabs
yaml
name: semgrep

on: [pull_request]

jobs:
  scan:

Static application security testing with Semgrep in CI

semgrep sast ci
by Kai Nakamura 1 tab
yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: metrics-reader
  namespace: production
---

Kubernetes RBAC roles with least privilege service accounts

kubernetes rbac least-privilege
by Kai Nakamura 1 tab
ruby
module Middleware
  class DatabasePinning
    PIN_WINDOW = 5.seconds

    def initialize(app)
      @app = app

“Read Your Writes” Consistency: Pin to Primary After POST

rails consistency reliability
by codesnips 4 tabs
yaml
# Headless Service for stable DNS
apiVersion: v1
kind: Service
metadata:
  name: postgres
  namespace: production

Kubernetes StatefulSets for stateful workloads

kubernetes k8s statefulsets
by Ryan Nakamura 1 tab
sql
CREATE TABLE users (
    id BIGSERIAL PRIMARY KEY,
    username VARCHAR(100) NOT NULL UNIQUE,
    email VARCHAR(255) NOT NULL UNIQUE,
    password VARCHAR(255) NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,

Database migration with Flyway

java flyway database-migration
by David Kumar 6 tabs
yaml
severities:
  sev1: customer-impacting active compromise or confirmed data exposure
  sev2: high risk suspicious activity with potential customer impact
  sev3: contained issue with low current impact

first_hour:

Incident response severity matrix and first hour checklist

incident-response runbooks security-operations
by Kai Nakamura 1 tab
yaml
web: bin/rails server
css: bin/rails tailwindcss:watch

Tailwind CSS with Rails asset pipeline

tailwind css rails
by Jordan Lee 3 tabs
yaml
:concurrency: 10
:queues:
  - [critical, 4]
  - [default, 2]
  - [low, 1]

Background jobs with Sidekiq and reliable queues

rails sidekiq background-jobs
by Alex Kumar 2 tabs
yaml
- name: Build image
  run: docker build -t app:${{ github.sha }} .

- name: Scan image
  uses: aquasecurity/trivy-action@0.24.0
  with:

Trivy image scanning in pull request pipelines

trivy containers ci
by Kai Nakamura 1 tab
yaml
# Install cert-manager (Helm)
# helm install cert-manager jetstack/cert-manager #   --namespace cert-manager #   --create-namespace #   --set installCRDs=true

---
# ClusterIssuer for Let's Encrypt (staging)
apiVersion: cert-manager.io/v1

SSL/TLS certificates with Lets Encrypt and cert-manager

ssl tls certificates
by Ryan Nakamura 2 tabs
yaml
# === One-off Job: Database migration ===
apiVersion: batch/v1
kind: Job
metadata:
  name: db-migrate
  namespace: production

Kubernetes Jobs and CronJobs for batch workloads

kubernetes cronjob batch
by Ryan Nakamura 1 tab