<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Karol Reinert — Platform Engineer</title><description>Karol Reinert — platform engineer from Poland. I design and build production platforms: Kubernetes, delivery pipelines, observability and security.</description><link>https://reinert.one/</link><item><title>7 Ways to Cut Your Kubernetes Bill — No Rewrites</title><link>https://reinert.one/blog/kubernetes-cost-optimization/</link><guid isPermaLink="true">https://reinert.one/blog/kubernetes-cost-optimization/</guid><description>The levers that actually move a Kubernetes bill — and the places the usual advice quietly causes incidents. Config and discipline, no application changes.</description><pubDate>Wed, 10 Jun 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Most of a Kubernetes bill is reservation, not use. Someone sets requests once, copies them into the next service&apos;s values, and the scheduler provisions nodes to cover numbers the pods never touch. Fixing it almost never means changing application code. It means config, and the discipline to look at what&apos;s actually running instead of what you reserved.&lt;/p&gt;
&lt;p&gt;Here&apos;s the order I work in, roughly by payback.&lt;/p&gt;
&lt;h2&gt;1. Close the gap between requested and used&lt;/h2&gt;
&lt;p&gt;Requests are what you pay for — not usage, not limits. The scheduler holds that reservation for the pod whether it&apos;s used or not, so step one is comparing requests against a few weeks of real consumption and pulling the obvious offenders down. &lt;code&gt;kubectl top&lt;/code&gt; is enough to start; reach for Prometheus (&lt;code&gt;container_memory_working_set_bytes&lt;/code&gt;, the CPU rate) when you want history.&lt;/p&gt;
&lt;p&gt;Two things bite people here.&lt;/p&gt;
&lt;p&gt;CPU: size the request to the steady state, not the peak. The peak is what bursting and the HPA exist for; reserving for it permanently is how you end up paying 5× for headroom that&apos;s idle 23 hours a day.&lt;/p&gt;
&lt;p&gt;Memory is where the standard advice — &quot;set the limit equal to the request&quot; — quietly causes outages. Working-set memory excludes reclaimable page cache, so the number on your dashboard sits &lt;em&gt;below&lt;/em&gt; what the kernel counts when it decides to OOM-kill. A service that looks comfortable at its average will die on a legitimate spike if the limit is parked right on top of the request. For anything bursty (a JVM or Node process under GC, say) I leave real headroom between request and memory limit, and I alert on OOM kills rather than trusting the usage graph.&lt;/p&gt;
&lt;h2&gt;2. CPU limits: usually leave them off&lt;/h2&gt;
&lt;p&gt;This one&apos;s contentious, so here&apos;s the reasoning. The CFS scheduler enforces a CPU limit over 100ms windows. A service that uses its whole quota in a short burst and then idles still gets throttled for the rest of the window, even though its &lt;em&gt;average&lt;/em&gt; is well under the limit. On a latency-sensitive API that shows up as periodic tail-latency spikes that look like the app&apos;s fault and aren&apos;t.&lt;/p&gt;
&lt;p&gt;So on user-facing services I set CPU requests (for fair scheduling) and skip the limit. The trade-off is real and worth naming: limits give you hard isolation, which you may genuinely want in untrusted multi-tenant clusters. Pick deliberately. Just don&apos;t copy a CPU limit onto a latency-sensitive service because a template had one.&lt;/p&gt;
&lt;h2&gt;3. Let VPA recommend — be careful what you let it change&lt;/h2&gt;
&lt;p&gt;The Vertical Pod Autoscaler in recommendation mode is great: it watches usage and tells you what requests &lt;em&gt;should&lt;/em&gt; be, with no risk. Auto mode is where people get burned. To resize a running pod it evicts and recreates it, which is disruptive on its own — and if you point it at a workload the HPA is already scaling on the same signal, the two end up fighting each other.&lt;/p&gt;
&lt;p&gt;My rule: VPA never touches anything the HPA scales horizontally. I use it for the single-replica and stateful-ish things that can&apos;t scale out anyway, and I take its numbers as input for everything else rather than letting it act.&lt;/p&gt;
&lt;h2&gt;4. The node layer is where the real air hides&lt;/h2&gt;
&lt;p&gt;You can rightsize every pod and still overpay, because half-empty nodes are pure waste. Two levers:&lt;/p&gt;
&lt;p&gt;Run a consolidating autoscaler — Karpenter, or cluster-autoscaler with the right expander — so underused nodes get drained and the workloads repacked instead of lingering. And prefer fewer, larger nodes: every node pays the kubelet and &lt;em&gt;every&lt;/em&gt; DaemonSet again, so a fleet of tiny nodes burns a surprising amount on agents before your apps get a cycle.&lt;/p&gt;
&lt;p&gt;The catch nobody mentions: bigger nodes mean a bigger blast radius and slower scale-up. Land somewhere in the middle rather than chasing the cheapest per-core number.&lt;/p&gt;
&lt;h2&gt;5. Move interruptible work to spot — and handle the interruption&lt;/h2&gt;
&lt;p&gt;Spot/preemptible capacity is 60–90% off, and plenty of work tolerates it: batch jobs, CI runners, stateless consumers, dev environments. The mistake is treating &quot;tolerates eviction&quot; as &quot;needs no handling.&quot; You get a ~2-minute notice; if your job can&apos;t checkpoint or your service can&apos;t drain in that window, you&apos;ve traded a cost line for a reliability one. Keep a small on-demand floor for things that genuinely can&apos;t move, taint the spot pool, and let tolerations route the rest.&lt;/p&gt;
&lt;h2&gt;6. Switch non-prod off out of hours&lt;/h2&gt;
&lt;p&gt;The easiest real money on this list. Dev and staging sit idle roughly fourteen hours a day and all weekend, and most teams pay full price for it. A scheduled job that scales workloads to zero (or drops the node pool) at night and back up in the morning recovers the bulk of that for an afternoon&apos;s work — just save the replica counts before you scale down so morning isn&apos;t a guessing game.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# scale a namespace to zero — capture the current replicas first so you can restore
kubectl -n staging get deploy -o name | xargs -I{} kubectl -n staging scale {} --replicas=0
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;7. Put the cost where people already look, or it comes back&lt;/h2&gt;
&lt;p&gt;Every saving above erodes within a quarter unless someone &lt;em&gt;sees&lt;/em&gt; the number. Label workloads with team/app/env, attribute spend by namespace, and put a cost panel on the dashboard engineers already watch — next to latency, not in a FinOps tool nobody opens. One budget alert per team beats a single cluster-wide one that&apos;s everybody&apos;s problem and therefore nobody&apos;s.&lt;/p&gt;
&lt;p&gt;For honest per-pod and per-team numbers — including the egress and idle cost that request-based tools get wrong — eBPF does it cheaply. That&apos;s &lt;a href=&quot;/blog/kubernetes-cost-per-pod-ebpf&quot;&gt;its own post&lt;/a&gt;.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;None of this is clever, and that&apos;s the point: the wins are in doing it on a cadence instead of once, in a panic, after the bill scared someone. Rightsizing and node consolidation usually recover the most for the least risk. Spot and the nightly shutdown are the big swings for batch and non-prod. Visibility is what decides whether any of it lasts.&lt;/p&gt;
</content:encoded><category>Kubernetes</category><category>FinOps</category><category>Cost</category><category>Platform</category></item><item><title>See Your Kubernetes Cost Per Pod with eBPF</title><link>https://reinert.one/blog/kubernetes-cost-per-pod-ebpf/</link><guid isPermaLink="true">https://reinert.one/blog/kubernetes-cost-per-pod-ebpf/</guid><description>You already have CPU and memory per pod. The part of the bill nobody can explain is network — and that’s the specific problem eBPF is good at. With the honest caveats.</description><pubDate>Wed, 20 May 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;The cloud invoice stops at the node. It tells you a node cost some amount this month; it has nothing to say about which of the forty pods on it, from six teams, actually spent the money. Closing that gap is what &quot;per-pod cost&quot; is about — and there&apos;s a lot of hand-waving around it, so it&apos;s worth being precise about what&apos;s actually hard and where eBPF earns its place.&lt;/p&gt;
&lt;h2&gt;Most of this you already have&lt;/h2&gt;
&lt;p&gt;CPU and memory per pod are not the hard part. cAdvisor exposes per-container usage, kube-state-metrics gives you the requests, and a tool like OpenCost already turns &quot;node price × usage share&quot; into per-namespace dollars. If you only need compute attribution, you probably don&apos;t need eBPF at all — wire up what you&apos;ve got and move on.&lt;/p&gt;
&lt;p&gt;The genuinely hard parts are two: the &lt;em&gt;shared and idle&lt;/em&gt; cost (the half-empty node, the system DaemonSets, the control plane — somebody has to be charged for it, and the rule you choose changes everyone&apos;s number), and &lt;strong&gt;network&lt;/strong&gt;. Network is the one that&apos;s both expensive and invisible.&lt;/p&gt;
&lt;h2&gt;Why network is the mystery&lt;/h2&gt;
&lt;p&gt;Cross-AZ traffic and egress out of the VPC are a real line on the bill, and standard tooling can&apos;t tell you which pod caused them. By the time a packet reaches the cloud&apos;s billing meter, the pod identity is gone — it&apos;s just an IP, and IPs churn as pods reschedule. VPC flow logs see the bytes but not the workload, and they&apos;re coarse and not cheap to store at volume. So &quot;why is egress $X this month&quot; usually ends in a shrug.&lt;/p&gt;
&lt;p&gt;This is the gap eBPF is actually good at.&lt;/p&gt;
&lt;h2&gt;What eBPF buys you here&lt;/h2&gt;
&lt;p&gt;eBPF runs small sandboxed programs in the kernel, attached to events — including the network path — so you can label flows with workload identity &lt;em&gt;at the source&lt;/em&gt;, before the IP loses its meaning. Concretely, for cost that&apos;s:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;bytes per source/destination workload, so cross-AZ and egress traffic gets attributed to the pod and team that generated it;&lt;/li&gt;
&lt;li&gt;continuous measurement at low overhead, because there&apos;s no userspace round trip per packet.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CPU and memory it can also read per cgroup, but as above, that&apos;s not where it&apos;s saving you — the network identity is.&lt;/p&gt;
&lt;h2&gt;The honest cost of getting it&lt;/h2&gt;
&lt;p&gt;The clean path is &lt;strong&gt;Cilium with Hubble&lt;/strong&gt;: if Cilium is already your CNI, Hubble gives you eBPF flow visibility and you&apos;re most of the way there. If it &lt;em&gt;isn&apos;t&lt;/em&gt; your CNI, be clear-eyed — swapping the CNI on a running cluster to get cost dashboards is a real migration with real risk, and rarely worth it on the cost argument alone. In that case a standalone eBPF agent (OpenCost&apos;s, or a lightweight DaemonSet feeding Prometheus) gets you the network attribution without re-plumbing the cluster.&lt;/p&gt;
&lt;p&gt;Either way, two caveats that decide whether the numbers are trustworthy:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Attribution is a model, not a meter.&lt;/strong&gt; Idle and shared cost has to be assigned by &lt;em&gt;some&lt;/em&gt; rule. Make the rule explicit and visible, or the first time a team disputes their number you&apos;ll have no answer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pricing has to be real.&lt;/strong&gt; An eBPF agent counts bytes; it doesn&apos;t know your cross-AZ rate or your committed-use discounts. Feed it real cloud pricing or the dollar figures are decoration.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And the usual: recent-enough kernels for the modern features, and verify the overhead on a canary pool under real load rather than trusting the brochure&apos;s &quot;negligible.&quot;&lt;/p&gt;
&lt;h2&gt;When to actually reach for it&lt;/h2&gt;
&lt;p&gt;If your bill is mostly compute, skip all of this and go rightsize — that&apos;s the bigger lever and you already have the data. Pull eBPF in when egress is the unexplained part of the invoice and &quot;who owns this traffic&quot; keeps coming up without an answer. That&apos;s a narrow, real problem, and it&apos;s the one eBPF solves better than anything else. Used for that, it stops being a buzzword and starts paying for the agent.&lt;/p&gt;
</content:encoded><category>eBPF</category><category>FinOps</category><category>Observability</category><category>Kubernetes</category></item><item><title>Production-Grade Helm Charts: Patterns That Actually Matter</title><link>https://reinert.one/blog/helm-chart-best-practices/</link><guid isPermaLink="true">https://reinert.one/blog/helm-chart-best-practices/</guid><description>A complete, opinionated walkthrough of a production Helm chart for a backend API — values design, JSON Schema validation, the Restricted Pod Security Standard, HPA behavior tuning, and the CI loop that catches regressions before they ship.</description><pubDate>Fri, 20 Jun 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Most charts in the wild quietly skip the things that matter most in production: schema validation, sane HPA behavior, topology spread, security context, and rollout safety.&lt;/p&gt;
&lt;p&gt;This is a complete chart for a backend API, with the reasoning for each choice. The code blocks are copy-pasteable.&lt;/p&gt;
&lt;h2&gt;What you get at the end&lt;/h2&gt;
&lt;p&gt;A chart you can actually trust under load — one that fails CI loudly when someone passes a bad value, refuses to run a privileged container, and rolls out without taking the service down. Concretely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A typed &lt;code&gt;values.yaml&lt;/code&gt; backed by a JSON Schema, so typos fail at &lt;code&gt;helm lint&lt;/code&gt; rather than at 3am.&lt;/li&gt;
&lt;li&gt;A pod template that satisfies the &lt;strong&gt;Restricted&lt;/strong&gt; Pod Security Standard by default.&lt;/li&gt;
&lt;li&gt;An HPA whose scaling behavior is tuned so it doesn&apos;t oscillate.&lt;/li&gt;
&lt;li&gt;A CI loop that lints, templates, and diffs every change before it merges.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Values design&lt;/h2&gt;
&lt;p&gt;Good values are boring values: predictable names, sane defaults, and nothing that requires reading the templates to understand. Group by concern — image, resources, autoscaling, security — and never invent a key you won&apos;t document.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;resources:
  requests:
    cpu: 100m
    memory: 128Mi
  limits:
    memory: 256Mi # no CPU limit: avoid throttling

autoscaling:
  enabled: true
  minReplicas: 3
  maxReplicas: 12
  targetCPUUtilizationPercentage: 70
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Schema validation&lt;/h3&gt;
&lt;p&gt;A &lt;code&gt;values.schema.json&lt;/code&gt; turns silent misconfiguration into a hard error. Helm validates values against it on every &lt;code&gt;install&lt;/code&gt;, &lt;code&gt;upgrade&lt;/code&gt;, and &lt;code&gt;lint&lt;/code&gt; — so a stray string where a number belongs never reaches the cluster.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If a value can break production, it belongs in the schema. The schema is the contract; everything else is a suggestion.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Security context&lt;/h2&gt;
&lt;p&gt;The Restricted profile is non-negotiable for new workloads. Drop all capabilities, run as non-root, and make the root filesystem read-only. Most apps need nothing more than a writable &lt;code&gt;/tmp&lt;/code&gt; via an &lt;code&gt;emptyDir&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;runAsNonRoot: true&lt;/code&gt; and an explicit &lt;code&gt;runAsUser&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;allowPrivilegeEscalation: false&lt;/code&gt;, &lt;code&gt;capabilities.drop: [&quot;ALL&quot;]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;readOnlyRootFilesystem: true&lt;/code&gt; with mounted writable paths where genuinely needed.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;HPA behavior&lt;/h2&gt;
&lt;p&gt;Default HPA behavior scales up fast and down fast — which means it flaps. Add a stabilization window on scale-down and cap how aggressively it scales up, and the autoscaler stops fighting itself during traffic spikes.&lt;/p&gt;
&lt;h2&gt;The CI loop&lt;/h2&gt;
&lt;p&gt;Every change runs &lt;code&gt;helm lint&lt;/code&gt;, renders the chart against a set of representative value files, and diffs the rendered output against what&apos;s live. Reviewers see exactly what Kubernetes will see — no surprises after merge.&lt;/p&gt;
&lt;p&gt;That&apos;s the whole point: make the safe path the default, and make the unsafe path fail loudly, early, and in front of a human.&lt;/p&gt;
</content:encoded><category>Helm</category><category>Kubernetes</category><category>DevOps</category><category>Best Practices</category></item><item><title>Debugging Workflows for Production Kubernetes</title><link>https://reinert.one/blog/debugging-production-kubernetes/</link><guid isPermaLink="true">https://reinert.one/blog/debugging-production-kubernetes/</guid><description>How I move from a vague alert to a confirmed root cause — a layered checklist that works across the application, the platform, and the infrastructure underneath, without guessing.</description><pubDate>Fri, 02 May 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;An alert fires: &lt;code&gt;p99 latency &amp;gt; 800ms&lt;/code&gt;. No stack trace, no obvious cause, and a dashboard that&apos;s all red. The difference between a 10-minute fix and a 2-hour outage is having a &lt;strong&gt;workflow&lt;/strong&gt; instead of a hunch.&lt;/p&gt;
&lt;p&gt;This is the layered checklist I run every time — application, then platform, then the boring infrastructure underneath — so I never skip a layer or chase the wrong one. The commands are copy-pasteable.&lt;/p&gt;
&lt;h2&gt;Start from the signal&lt;/h2&gt;
&lt;p&gt;Before touching the cluster, read the alert literally. What metric, what threshold, since when, and which service? A latency alert and an error-rate alert send you down completely different paths.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scope it:&lt;/strong&gt; one pod, one node, one zone — or everything?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Correlate it:&lt;/strong&gt; did a deploy, a config change, or a traffic spike line up with the start time?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quantify it:&lt;/strong&gt; 1% of requests or 100%? Degraded, or down?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Work the layers&lt;/h2&gt;
&lt;p&gt;Production problems live in layers, and they love to hide one layer below where they surface. A slow API might be a slow query; a slow query might be a saturated node; a saturated node might be a noisy neighbour. Work top-down and confirm each layer before you descend.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The symptom is almost never the cause. Confirm what a layer is actually doing before you blame the layer beneath it.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Application layer&lt;/h3&gt;
&lt;p&gt;Start where the signal is. Pull recent logs, check the pod&apos;s own metrics, and look for the obvious: restarts, OOMKills, and error spikes that began at the alert time.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;kubectl get pods -l app=api --sort-by=.status.containerStatuses[0].restartCount
kubectl top pods -l app=api
kubectl logs deploy/api --since=15m --previous | grep -iE &apos;error|panic|timeout&apos;
kubectl describe pod &amp;lt;pod&amp;gt; | sed -n &apos;/Events/,$p&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you see &lt;code&gt;OOMKilled&lt;/code&gt; or a climbing restart count, you&apos;ve found your layer — memory or a crash loop — and the next question is &lt;em&gt;why&lt;/em&gt;, not &lt;em&gt;where&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;Platform layer&lt;/h3&gt;
&lt;p&gt;If the app looks healthy but slow, drop a layer. Check node pressure, pending pods, and whether the scheduler is fighting resource limits.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;kubectl describe node&lt;/code&gt; for &lt;code&gt;MemoryPressure&lt;/code&gt; / &lt;code&gt;DiskPressure&lt;/code&gt; conditions.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kubectl get events --sort-by=.lastTimestamp&lt;/code&gt; for evictions and failed schedules.&lt;/li&gt;
&lt;li&gt;HPA status — is it pinned at &lt;code&gt;maxReplicas&lt;/code&gt;, or flapping every few minutes?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Confirm and capture&lt;/h2&gt;
&lt;p&gt;Once you have a candidate cause, prove it: revert the change, scale the resource, or roll back the deploy — and watch the original signal recover. If it doesn&apos;t, you found a symptom, not the cause. Keep going.&lt;/p&gt;
&lt;p&gt;Then write it down. A two-line note in the incident channel — &lt;strong&gt;signal, cause, fix&lt;/strong&gt; — is what turns a 2am scramble into next month&apos;s runbook.&lt;/p&gt;
</content:encoded><category>Kubernetes</category><category>Debugging</category><category>Incidents</category><category>Observability</category></item><item><title>CI/CD Shaping for Small Teams</title><link>https://reinert.one/blog/ci-cd-shaping-small-teams/</link><guid isPermaLink="true">https://reinert.one/blog/ci-cd-shaping-small-teams/</guid><description>What actually keeps a small team’s pipeline useful — trust over speed, flaky tests, cache traps, the fork-secrets footgun, and reversible deploys. No platform team required.</description><pubDate>Tue, 18 Mar 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Most CI/CD writing assumes a platform team, a build cluster, and someone whose whole job is the pipeline. If you&apos;re three engineers on a shared main branch, a fair amount of that advice works against you: more gates, slower runs, and a deploy nobody fully trusts. This is the shape I keep for that situation, and the parts of it that aren&apos;t obvious.&lt;/p&gt;
&lt;h2&gt;Trust is the metric, not speed&lt;/h2&gt;
&lt;p&gt;Speed matters, but what actually decides whether CI helps you is whether people trust it. A pipeline they trust, they wait for. One they don&apos;t, they route around — re-running until green, merging past a &quot;known flaky&quot; failure, shipping on a Friday and hoping. Every decision below is really about protecting that trust, because once it&apos;s gone you have all the cost of CI and none of the benefit.&lt;/p&gt;
&lt;h2&gt;Flaky tests are the tax that compounds&lt;/h2&gt;
&lt;p&gt;The fastest way to lose that trust is one or two flaky tests. The moment &quot;red&quot; sometimes means &quot;nothing&apos;s wrong, run it again,&quot; red stops meaning anything — and people quietly start ignoring the real failures next to the noise. So I treat a flaky test as an incident, not an annoyance: quarantine it out of the blocking set the day it flakes, then fix or delete it that week. A small suite people believe beats a large suite they&apos;ve trained themselves to re-run.&lt;/p&gt;
&lt;h2&gt;Make the run short enough to run locally&lt;/h2&gt;
&lt;p&gt;The number people quote is time-to-green, but the one that matters more is whether the same checks run on a laptop before the push. If &lt;code&gt;npm run ci&lt;/code&gt; locally does what CI does, most failures never reach a runner. Order things cheapest-first so the common mistakes fail in seconds, and run independent jobs in parallel rather than in a chain.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# fail on the cheap, high-signal checks before spending minutes on the slow ones
- run: npm ci
- run: npm run lint
- run: npm run typecheck
- run: npm run test
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Cache carefully — a stale cache fails you silently&lt;/h2&gt;
&lt;p&gt;Caching is where teams quietly break their own pipeline. Too loose a key and CI restores a stale dependency or build and goes green for the wrong reason; too tight and it never hits and you&apos;ve added complexity for nothing. Key the cache on a hash of the lockfile, not the branch, and accept that a slow honest build beats a fast one that passed against last week&apos;s &lt;code&gt;node_modules&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;Gate less than you think&lt;/h2&gt;
&lt;p&gt;For a small team, a handful of gates carry their weight: lint and type-check, tests for the paths that actually page you, building the real artifact, and one dependency/secret scan. If you ship a container or a Helm chart, render it in CI and diff it — a broken template should fail there, not at &lt;code&gt;apply&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Everything else — coverage thresholds, performance budgets, formatting — starts as a warning, not a blocker. A gate earns the right to block by catching a real regression first. Block on noise and people learn to override the override, which is worse than not having it.&lt;/p&gt;
&lt;h2&gt;Don&apos;t hand a fork&apos;s pull request your secrets&lt;/h2&gt;
&lt;p&gt;The one security footgun worth calling out: on GitHub, &lt;code&gt;pull_request_target&lt;/code&gt; runs with your repository&apos;s secrets in scope, and if you also check out the PR&apos;s head you&apos;re running a stranger&apos;s code with your deploy credentials. For anything public, keep secrets off PR-triggered runs entirely and only expose them on protected branches. It&apos;s an easy mistake to copy from a tutorial and a genuinely bad one to ship.&lt;/p&gt;
&lt;h2&gt;Reversibility before automation&lt;/h2&gt;
&lt;p&gt;This is the part that matters most and gets skipped. A deploy you can&apos;t undo in one step will always feel risky, and risky deploys get batched into big scary ones. So get reversibility first: immutable artifacts tagged by commit SHA (never a moving &lt;code&gt;latest&lt;/code&gt;), a one-command or one-revert-PR rollback, and a health check that actually gates the rollout so a bad deploy halts itself.&lt;/p&gt;
&lt;p&gt;Only once rollback is a non-event should you automate the deploy on merge. Automating on top of an irreversible deploy doesn&apos;t make you faster — it just lets you break production with less typing.&lt;/p&gt;
&lt;h2&gt;You probably don&apos;t need a merge queue yet&lt;/h2&gt;
&lt;p&gt;Merge queues solve a real problem: PRs that are each green but break once combined. At three people that almost never happens, and a queue is latency and machinery you don&apos;t need. Keep main green by making CI required and fast and rebasing before merge. Revisit when you&apos;re landing enough changes that they start invalidating each other&apos;s green — that&apos;s the signal, not the headcount you wish you had.&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;A small team&apos;s pipeline is working when it&apos;s not a topic of conversation. You get there by keeping it trustworthy — fast, honest, reversible — not by adding stages.&lt;/p&gt;
</content:encoded><category>CI/CD</category><category>GitHub Actions</category><category>Delivery</category></item></channel></rss>