package health
import (
"context"
"net"
"net/http"
apiVersion: apps/v1
kind: Deployment
metadata:
name: web-app
namespace: production
labels:
# ConfigMap from literal values
apiVersion: v1
kind: ConfigMap
metadata:
name: web-app-config
namespace: production
apiVersion: apps/v1
kind: Deployment
metadata:
name: user-service
labels:
app: user-service
import express, { type Express, type Request, type Response } from 'express';
export function buildApp(isShuttingDown: () => boolean): Express {
const app = express();
app.disable('x-powered-by');
package com.example.health;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
# HPA v2 with multiple metrics
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: web-app-hpa
namespace: production
# === Vault Agent Injector: Auto-inject secrets into pods ===
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-server
namespace: production
# === ArgoCD Application: Single app deployment ===
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: myapp-production
namespace: argocd
module HealthCheckable
extend ActiveSupport::Concern
CheckResult = Struct.new(:name, :ok, :message, keyword_init: true)
private
package com.example.health;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;
import org.springframework.stereotype.Component;
const withTimeout = (promise, timeoutMs, name) => {
let timer;
const timeout = new Promise((_, reject) => {
timer = setTimeout(
() => reject(new Error(`check '${name}' timed out after ${timeoutMs}ms`)),
timeoutMs