Skip to content

Make redis the first container of its pod - #28

Merged
henzigo merged 3 commits into
mainfrom
redis-container-first
Aug 18, 2026
Merged

Make redis the first container of its pod#28
henzigo merged 3 commits into
mainfrom
redis-container-first

Conversation

@henzigo

@henzigo henzigo commented Aug 18, 2026

Copy link
Copy Markdown
Member

What

Swaps the container order of the redis pod: the redis container is now first and the
redis-exporter sidecar second.

Why

kubectl logs / kubectl exec deployment/redis target the first container by default —
until now that was the exporter, which is confusing during operations. Port of the upstream
change shopsys/deployment#74 into the chart.

Changes

  • charts/shopsys-infra/templates/deployment-redis.yaml — container order swap (with an
    explanatory template comment)
  • charts/shopsys-infra/tests/infra_test.yaml — assertions follow the new order
  • golden snapshots regenerated
  • documented as deviation 17 in docs/migrating-from-shopsys-deployment.md

No functional change to either container's spec — image, probes, resources and mounts are
identical, only the order differs.

🤖 Generated with Claude Code

The redis container is now first and the exporter sidecar second, so
kubectl logs/exec target redis by default. Adopted from
shopsys/deployment#74; documented as deviation 17.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 21:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Swaps the container order in the Redis Deployment so the redis container is listed first (and thus becomes the default target for kubectl logs / kubectl exec), matching operational expectations and aligning with the referenced upstream change.

Changes:

  • Reordered redis / redis-exporter containers in the shopsys-infra Redis Deployment template (with an explanatory comment).
  • Updated helm-unittest assertions to match the new container ordering.
  • Regenerated golden snapshots to reflect the updated rendered manifest ordering and documented the deviation.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
charts/shopsys-infra/templates/deployment-redis.yaml Reorders Redis containers (redis first, exporter second) and adds a template comment explaining why.
charts/shopsys-infra/tests/infra_test.yaml Updates test assertions to reflect the new container order.
docs/migrating-from-shopsys-deployment.md Documents the container-order change as a new intentional deviation (#17).
tests/golden/scenarios/basic-production/expected/continuous.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/basic-production/expected/first-deploy-with-demo-data.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/basic-production/expected/first-deploy.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/development-single-domain/expected/continuous.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/development-single-domain/expected/first-deploy-with-demo-data.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/development-single-domain/expected/first-deploy.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/development-with-cloudflare/expected/continuous.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/development-with-cloudflare/expected/first-deploy-with-demo-data.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/development-with-cloudflare/expected/first-deploy.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/escaping-env/expected/continuous.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/escaping-env/expected/first-deploy-with-demo-data.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/escaping-env/expected/first-deploy.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/production-with-cloudflare/expected/continuous.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/production-with-cloudflare/expected/first-deploy-with-demo-data.yaml Golden snapshot updated for reordered Redis containers.
tests/golden/scenarios/production-with-cloudflare/expected/first-deploy.yaml Golden snapshot updated for reordered Redis containers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread charts/shopsys-infra/templates/deployment-redis.yaml Outdated
Comment thread docs/migrating-from-shopsys-deployment.md Outdated
henzigo and others added 2 commits August 19, 2026 00:20
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@henzigo
henzigo merged commit c5794bd into main Aug 18, 2026
5 checks passed
@henzigo
henzigo deleted the redis-container-first branch August 18, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants