Skip to content
Merged
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
18 changes: 9 additions & 9 deletions charts/shopsys-infra/templates/deployment-redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: redis-exporter
image: {{ include "shopsys.image" .Values.redis.exporter.image | quote }}
imagePullPolicy: {{ .Values.redis.exporter.image.pullPolicy | default "IfNotPresent" }}
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
{{- toYaml .Values.redis.exporter.resources | nindent 12 }}
- name: redis
image: {{ include "shopsys.image" .Values.redis.image | quote }}
{{- with .Values.redis.image.pullPolicy }}
Expand Down Expand Up @@ -100,4 +91,13 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.redis.resources | nindent 12 }}
- name: redis-exporter
image: {{ include "shopsys.image" .Values.redis.exporter.image | quote }}
imagePullPolicy: {{ .Values.redis.exporter.image.pullPolicy | default "IfNotPresent" }}
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
{{- toYaml .Values.redis.exporter.resources | nindent 12 }}
{{- end }}
11 changes: 7 additions & 4 deletions charts/shopsys-infra/tests/infra_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ templates:
- templates/ingress-rabbitmq.yaml
- templates/rbac-deploy-hooks.yaml
tests:
- it: runs redis with the exporter sidecar and health probes
- it: runs redis as the first container with the exporter sidecar and health probes
template: templates/deployment-redis.yaml
asserts:
- equal:
path: spec.template.spec.containers[0].name
value: redis-exporter
value: redis
- equal:
path: spec.template.spec.containers[1].image
path: spec.template.spec.containers[0].image
value: "redis:7.4-alpine"
- equal:
path: spec.template.spec.containers[1].name
value: redis-exporter
- matchRegex:
path: spec.template.spec.containers[1].livenessProbe.exec.command[2]
path: spec.template.spec.containers[0].livenessProbe.exec.command[2]
pattern: liveness.sh

- it: provisions rabbitmq with persistent storage and credentials
Expand Down
2 changes: 2 additions & 0 deletions docs/migrating-from-shopsys-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,5 @@ Intentional differences of the phase-1 rewrite; everything else is a 1:1 port.
16. **Standard Helm labels** (`app.kubernetes.io/name|instance|managed-by`, `helm.sh/chart`)
are added to every resource. Purely additive — the legacy `app:` selector labels are kept
untouched (selectors are immutable on existing Deployments).
17. **Redis is the first container** of its pod (exporter second) so `kubectl logs` and
`kubectl exec` target the `redis` container by default (adopted from shopsys/deployment#74).
26 changes: 13 additions & 13 deletions tests/golden/scenarios/basic-production/expected/continuous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,6 @@ spec:
name: redis
defaultMode: 0755
containers:
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- name: redis
image: "redis:7.4-alpine"
ports:
Expand Down Expand Up @@ -245,6 +232,19 @@ spec:
requests:
cpu: 100m
memory: 2500Mi
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi

---
# Source: shopsys-infra/templates/statefulset-rabbitmq.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,6 @@ spec:
name: redis
defaultMode: 0755
containers:
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- name: redis
image: "redis:7.4-alpine"
ports:
Expand Down Expand Up @@ -245,6 +232,19 @@ spec:
requests:
cpu: 100m
memory: 2500Mi
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi

---
# Source: shopsys-infra/templates/statefulset-rabbitmq.yaml
Expand Down
26 changes: 13 additions & 13 deletions tests/golden/scenarios/basic-production/expected/first-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,6 @@ spec:
name: redis
defaultMode: 0755
containers:
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- name: redis
image: "redis:7.4-alpine"
ports:
Expand Down Expand Up @@ -245,6 +232,19 @@ spec:
requests:
cpu: 100m
memory: 2500Mi
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi

---
# Source: shopsys-infra/templates/statefulset-rabbitmq.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,6 @@ spec:
name: redis
defaultMode: 0755
containers:
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- name: redis
image: "redis:7.4-alpine"
ports:
Expand Down Expand Up @@ -245,6 +232,19 @@ spec:
requests:
cpu: "0.01"
memory: 100Mi
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi

---
# Source: shopsys-infra/templates/statefulset-rabbitmq.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,6 @@ spec:
name: redis
defaultMode: 0755
containers:
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- name: redis
image: "redis:7.4-alpine"
ports:
Expand Down Expand Up @@ -245,6 +232,19 @@ spec:
requests:
cpu: "0.01"
memory: 100Mi
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi

---
# Source: shopsys-infra/templates/statefulset-rabbitmq.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,6 @@ spec:
name: redis
defaultMode: 0755
containers:
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- name: redis
image: "redis:7.4-alpine"
ports:
Expand Down Expand Up @@ -245,6 +232,19 @@ spec:
requests:
cpu: "0.01"
memory: 100Mi
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi

---
# Source: shopsys-infra/templates/statefulset-rabbitmq.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,6 @@ spec:
name: redis
defaultMode: 0755
containers:
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- name: redis
image: "redis:7.4-alpine"
ports:
Expand Down Expand Up @@ -245,6 +232,19 @@ spec:
requests:
cpu: "0.01"
memory: 100Mi
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi

---
# Source: shopsys-infra/templates/statefulset-rabbitmq.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,6 @@ spec:
name: redis
defaultMode: 0755
containers:
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi
- name: redis
image: "redis:7.4-alpine"
ports:
Expand Down Expand Up @@ -245,6 +232,19 @@ spec:
requests:
cpu: "0.01"
memory: 100Mi
- name: redis-exporter
image: "oliver006/redis_exporter:v1.89.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter
containerPort: 9121
protocol: TCP
resources:
limits:
memory: 128Mi
requests:
cpu: 10m
memory: 128Mi

---
# Source: shopsys-infra/templates/statefulset-rabbitmq.yaml
Expand Down
Loading
Loading