auth:
- authentication required for non-public endpoints
- authorization rules documented and tested
data:
- secrets stored outside source control
- encryption in transit enabled
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
cleanup_expired_sessions:
cron: '0 2 * * *' # Daily at 2 AM
class: CleanupExpiredSessionsWorker
queue: low
description: Remove expired sessions from Redis
# Pre-commit hooks configuration
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
package com.example.health;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
package com.example.billing.config;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Configuration
# HPA v2 with multiple metrics
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: web-app-hpa
namespace: production
---
# Main playbook
- name: Configure web servers
hosts: webservers
become: yes
vars:
<?php
namespace App\Report;
use App\Repository\OrderRepository;
use Symfony\Contracts\Cache\ItemInterface;
# === Vault Agent Injector: Auto-inject secrets into pods ===
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-server
namespace: production