Helm / Advanced: compatibility, trust and delivery evidence / Lesson 17
Rollout, configuration and capacity contracts
Connect chart inputs to Pod-template changes, readiness, resource requests and controlled configuration propagation without prescribing universal tuning.
On this page
Lesson goals
- Explain which changes create a new workload template.
- Use configuration identity deliberately rather than random restarts.
- Evaluate availability and capacity assumptions together.
Distinguish object and Pod-template changes
A Deployment rollout follows changes to its Pod template, not every edit to every related object. Updating ConfigMap data may leave existing environment variables unchanged because the process reads them at startup. Changing only top-level Deployment annotations does not necessarily change the Pod template. Place a deliberate configuration identity under spec.template.metadata when a restart is the documented propagation mechanism. This connects two contracts: the chart knows which configuration bytes changed and the application agrees that restarting processes is an appropriate way to consume them. Neither contract alone guarantees a correct or available rollout.
Use checksums with explicit inputs
The first fragment hashes the rendered ConfigMap template into a Pod-template annotation. A changed rendered configuration changes that annotation and therefore the desired Pod template. The include path is appropriate for this application-chart layout and must be adapted for library helpers or a different source structure. A checksum is not encryption and should not encourage embedding real secrets in public configuration. It also needs a stable input: timestamps inside the ConfigMap would generate unnecessary restarts. Review which bytes are included and whether an unrelated metadata change should intentionally restart the application.
spec:
template:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
This is an unexecuted chart fragment. Its intended effect depends on a real configuration template and the workload controller.
Define meaningful health
Readiness says whether a Pod should receive traffic according to the configured probe; liveness is a restart-related signal; startup probes can protect slow initialization from premature liveness checks. Choosing identical checks for every application can cause needless restarts or route traffic too early. A dependency outage should not automatically imply restarting all processes. Expose only settings with a documented application interpretation, and choose illustrative values without asserting they fit every workload. Helm wait observes selected readiness conditions but cannot replace a user transaction assertion such as returning the expected synthetic catalog item.
Reason about surge and capacity
Rolling updates can require capacity for old and new Pods simultaneously. Resource requests inform scheduling; limits constrain execution through resource-specific mechanisms. Setting requests without measurement can understate real needs or make a rollout unschedulable. The second example computes a deliberately simple count ceiling for three desired replicas and one extra Pod. It excludes terminating Pods, controller timing, quota, topology and other workloads, so it is not a capacity planner. Its value is revealing why steady-state replica count is insufficient when reviewing rollout capacity and availability assumptions together.
desired = 3
max_surge = 1
illustrative_count = desired + max_surge
print(illustrative_count)
print("count model only")
4
count model only
Four is the arithmetic result under the stated simplified assumptions. Real resource demand can differ and was not measured.
Align autoscaling and ownership
When an autoscaler manages replicas, repeatedly rendering a fixed replica count can compete with that controller’s intent depending on the delivery model. Document whether the chart omits replicas when autoscaling is enabled and test both branches. Availability also depends on application behavior, disruption policy, topology and storage, so a chart cannot guarantee it by selecting a replica number alone. Make rollout strategy and configuration propagation part of the same review: a harmless settings edit can become disruptive if it restarts a stateful singleton without a compatible plan. No rollout or capacity test is executed in this course.
Common errors and fixes
A ConfigMap update never changes environment variables
- Why it happens
- The process captures them at startup and no restart contract was defined.
- How to fix it
- Choose documented reload or Pod-template change behavior for the application.
- Prevent it next time
- Test configuration propagation as a user-visible acceptance condition.
A checksum changes on every render
- Why it happens
- Its input contains time, randomness or other unstable text.
- How to fix it
- Hash stable intended configuration bytes and remove irrelevant variation.
- Prevent it next time
- Compare identical-input renders before approving restart behavior.
A rollout stalls despite enough steady-state capacity
- Why it happens
- Temporary old/new overlap and scheduling constraints were omitted.
- How to fix it
- Review strategy, requests, quota and topology with environment-specific evidence.
- Prevent it next time
- Separate steady-state and transition capacity assumptions.
Check your understanding
1. Why must checksum/config sit inside the Pod template rather than only Deployment metadata?
Show worked solution
The workload controller uses the Pod template to determine a new rollout. A top-level descriptive annotation can change without changing the desired Pods. The checksum connects approved configuration changes to that template intentionally. It still requires stable inputs, valid configuration and an availability-aware rollout strategy; it is a trigger, not a correctness guarantee.
2. Why is three replicas plus one surge not a complete resource forecast?
Show worked solution
The arithmetic excludes resource sizes, terminating Pods, other workloads, topology, quota and real controller timing. It is useful for identifying an overlap requirement, not for approving capacity. Combine measured application needs with the target environment’s constraints and examine failure cases before selecting a rollout policy.
Key takeaways
- Configuration propagation depends on application reload behavior and Pod-template identity.
- Availability requires application and transition-capacity evidence beyond chart values.