Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

## Upgrade from v5.0.0 to v5.1.0

- changed container order for Redis ([#74](https://github.com/shopsys/deployment/pull/74))
- cache warmup is now run as an init container instead of a `postStart` lifecycle hook ([#73](https://github.com/shopsys/deployment/pull/73))
- cron pod is now always deleted gracefully ([#72](https://github.com/shopsys/deployment/pull/72))
- health check for webserver now uses PHP-FPM `ping` endpoint instead of nginx `stub_status` ([#71](https://github.com/shopsys/deployment/pull/71))
Expand Down
4 changes: 2 additions & 2 deletions deploy/parts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ if [ "${RUNNING_PRODUCTION}" -eq "0" ] || [ "${DOWNSCALE_RESOURCE:-0}" -eq "1" ]
yq e -i '.spec.template.spec.containers[0].resources.requests.cpu = "0.01"' "${CONFIGURATION_TARGET_PATH}/deployments/storefront.yaml"
yq e -i '.spec.template.spec.containers[0].resources.requests.cpu = "0.01"' "${CONFIGURATION_TARGET_PATH}/deployments/webserver-php-fpm.yaml"
yq e -i '.spec.template.spec.containers[1].resources.requests.cpu = "0.01"' "${CONFIGURATION_TARGET_PATH}/deployments/webserver-php-fpm.yaml"
yq e -i '.spec.template.spec.containers[1].resources.requests.cpu = "0.01"' "${CONFIGURATION_TARGET_PATH}/deployments/redis.yaml"
yq e -i '.spec.template.spec.containers[0].resources.requests.cpu = "0.01"' "${CONFIGURATION_TARGET_PATH}/deployments/redis.yaml"
yq e -i '.spec.template.spec.containers[0].resources.requests.cpu = "0.01"' "${CONFIGURATION_TARGET_PATH}/deployments/rabbitmq.yaml"

yq e -i '.spec.template.spec.containers[0].resources.requests.memory = "100Mi"' "${CONFIGURATION_TARGET_PATH}/deployments/webserver-php-fpm.yaml"
yq e -i '.spec.template.spec.containers[1].resources.requests.memory = "100Mi"' "${CONFIGURATION_TARGET_PATH}/deployments/redis.yaml"
yq e -i '.spec.template.spec.containers[0].resources.requests.memory = "100Mi"' "${CONFIGURATION_TARGET_PATH}/deployments/redis.yaml"
Comment on lines +57 to +61
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

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

These yq updates target Redis by array index (containers[0]), which is brittle (container order changes require updating this script). Consider selecting the container by name instead so future sidecars/reordering won’t accidentally patch the wrong container.

Copilot uses AI. Check for mistakes.

echo -e "[${GREEN}OK${NO_COLOR}]"
else
Expand Down
26 changes: 13 additions & 13 deletions kubernetes/deployments/redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,6 @@ spec:
name: redis
defaultMode: 0755
containers:
- name: redis-exporter
image: "oliver006/redis_exporter"
imagePullPolicy: Always
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- name: redis
image: "{{REDIS_VERSION}}"
ports:
Expand Down Expand Up @@ -76,3 +63,16 @@ spec:
requests:
memory: "2500Mi"
cpu: "100m"
- name: redis-exporter
image: "oliver006/redis_exporter"
imagePullPolicy: Always
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,6 @@ spec:
app: redis
spec:
containers:
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- args:
- /usr/local/etc/redis/redis.conf
image: redis:7.4-alpine
Expand Down Expand Up @@ -285,6 +272,19 @@ spec:
- mountPath: /usr/local/etc/redis/redis.conf
name: config
subPath: redis.conf
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
volumes:
- configMap:
defaultMode: 493
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,6 @@ spec:
app: redis
spec:
containers:
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- args:
- /usr/local/etc/redis/redis.conf
image: redis:7.4-alpine
Expand Down Expand Up @@ -285,6 +272,19 @@ spec:
- mountPath: /usr/local/etc/redis/redis.conf
name: config
subPath: redis.conf
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
volumes:
- configMap:
defaultMode: 493
Expand Down
26 changes: 13 additions & 13 deletions tests/scenarios/basic-production/expected/migrate-first-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,6 @@ spec:
app: redis
spec:
containers:
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- args:
- /usr/local/etc/redis/redis.conf
image: redis:7.4-alpine
Expand Down Expand Up @@ -285,6 +272,19 @@ spec:
- mountPath: /usr/local/etc/redis/redis.conf
name: config
subPath: redis.conf
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
volumes:
- configMap:
defaultMode: 493
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,6 @@ spec:
app: redis
spec:
containers:
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- args:
- /usr/local/etc/redis/redis.conf
image: redis:7.4-alpine
Expand Down Expand Up @@ -166,6 +153,19 @@ spec:
- mountPath: /usr/local/etc/redis/redis.conf
name: config
subPath: redis.conf
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
volumes:
- configMap:
defaultMode: 493
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,6 @@ spec:
app: redis
spec:
containers:
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- args:
- /usr/local/etc/redis/redis.conf
image: redis:7.4-alpine
Expand Down Expand Up @@ -166,6 +153,19 @@ spec:
- mountPath: /usr/local/etc/redis/redis.conf
name: config
subPath: redis.conf
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
volumes:
- configMap:
defaultMode: 493
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,6 @@ spec:
app: redis
spec:
containers:
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- args:
- /usr/local/etc/redis/redis.conf
image: redis:7.4-alpine
Expand Down Expand Up @@ -166,6 +153,19 @@ spec:
- mountPath: /usr/local/etc/redis/redis.conf
name: config
subPath: redis.conf
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
volumes:
- configMap:
defaultMode: 493
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,6 @@ spec:
app: redis
spec:
containers:
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- args:
- /usr/local/etc/redis/redis.conf
image: redis:7.4-alpine
Expand Down Expand Up @@ -287,6 +274,19 @@ spec:
- mountPath: /usr/local/etc/redis/redis.conf
name: config
subPath: redis.conf
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
volumes:
- configMap:
defaultMode: 493
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,19 +238,6 @@ spec:
app: redis
spec:
containers:
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- args:
- /usr/local/etc/redis/redis.conf
image: redis:7.4-alpine
Expand Down Expand Up @@ -287,6 +274,19 @@ spec:
- mountPath: /usr/local/etc/redis/redis.conf
name: config
subPath: redis.conf
- image: oliver006/redis_exporter
imagePullPolicy: Always
name: redis-exporter
ports:
- containerPort: 9121
name: exporter
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
volumes:
- configMap:
defaultMode: 493
Expand Down
Loading