Hardening Kubernetes: Moving away from Pod Security Policies

Pod Security Policies (PSP) are deprecated in K8s 1.21. The industry is moving to Pod Security Standards (PSS) and Admission Controllers like OPA Gatekeeper or Kyverno. The New Standard Kubernetes now has built-in labels for namespaces to enforce security levels: Setting this label automatically rejects any Pod that tries to run as Root or mount […]

Read more โ†’

Bicep Modules: Enterprise Infrastructure Scale

Copy-pasting Bicep code defeats the purpose of Infrastructure as Code. **Modules** allow you to strictly define inputs and outputs for reusable components (like a standardized VNET or Storage Account), enforcing compliance across the enterprise. Creating a Module Consuming the Module Key Takeaways Publish modules to a **Private Bicep Registry** (ACR) for cross-team sharing. Use `br:myregistry.azurecr.io/bicep/storage:v1` […]

Read more โ†’

C# 10 Preview: Global Usings

C# 10 (coming with .NET 6) aims to reduce file clutter. **Global Usings** allow you to define namespace imports once for the entire project. Manual Creation Create a file `GlobalUsings.cs`: Implicit Usings The SDK can do it for you based on project type. This automatically imports `System.Net.Http.Json`, `Microsoft.AspNetCore.Builder`, etc., in Web projects. Key Takeaways Reduces […]

Read more โ†’

Dapr v1.0: Building Microservices for Any Cloud

Dapr v1.0 is production-ready. It solves the hardest parts of distributed systems: State management, Service Invocation, and Event-driven messaging. This guide implements the “Virtual Actor” pattern using Dapr actors. Virtual Actors Actors are single-threaded units of state and logic. Dapr handles their lifetime (activating them when a message arrives, deactivating them after timeout). Output Bindings […]

Read more โ†’

C# 9 Source Generators: Removing Reflection

Reflection is slow. It happens at runtime, bypasses type safety, and prevents trimming. Source Generators solve this by generating code at compile time. In this guide, we build a generator that automatically implements a `MapTo` method for DTOs, replacing AutoMapper. The Goal The Generator Logic Key Takeaways Source Generators enable **Zero-Overhead abstractions**. They are essential […]

Read more โ†’

Azure Durable Functions: Fan-Out/Fan-In Pattern

The Fan-Out/Fan-In pattern allows you to execute tasks in parallel and then aggregate the results. This is famously difficult in standard serverless, but trivial with Durable Functions. The Orchestrator How it Scales Key Takeaways The Orchestrator function replays from the start after every `await`. Avoid non-deterministic code (like `DateTime.Now`) inside the orchestrator logic. Activities run […]

Read more โ†’