-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5825 from ministryofjustice/ap-4499/remove-redis-…
…namespace AP-4499: Remove redis namespacing
- Loading branch information
Showing
14 changed files
with
143 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
class TestMailJob | ||
include Sidekiq::Worker | ||
sidekiq_options queue: :default | ||
|
||
CLIENT_CONFIRMATION_EMAIL = "3b18efe5-7d09-4042-927c-7d1ae03fdd7e".freeze | ||
|
||
def perform(email, name) | ||
client = Notifications::Client.new(Rails.configuration.x.govuk_notify_api_key) | ||
|
||
client.send_email( | ||
email_address: email, | ||
template_id: CLIENT_CONFIRMATION_EMAIL, | ||
personalisation: { | ||
client_name: name, | ||
ref_number: "testing-whatever", | ||
}, | ||
) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
helm_deploy/apply-for-legal-aid/templates/deployment_drainer.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "apply-for-legal-aid.fullname" . }}-drainer | ||
labels: | ||
app: {{ template "apply-for-legal-aid.name" . }} | ||
chart: {{ template "apply-for-legal-aid.chart" . }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
replicas: {{ .Values.worker.replicaCount }} | ||
strategy: | ||
type: RollingUpdate | ||
rollingUpdate: | ||
maxUnavailable: 0 | ||
maxSurge: 100% | ||
selector: | ||
matchLabels: | ||
app: {{ template "apply-for-legal-aid.name" . }}-drainer | ||
release: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "apply-for-legal-aid.name" . }}-drainer | ||
release: {{ .Release.Name }} | ||
spec: | ||
serviceAccountName: "{{ .Values.service_account.name }}" | ||
containers: | ||
- name: drainer | ||
image: '{{ .Values.image.repository }}:{{ .Values.image.tag }}' | ||
imagePullPolicy: IfNotPresent | ||
command: ['bundle', 'exec', 'sidekiq'] | ||
{{ include "apply-for-legal-aid.envs" . | nindent 10 }} | ||
- name: NAMEPSPACED_SIDEKIQ_DRAINER | ||
value: "true" | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 1Gi | ||
requests: | ||
cpu: 10m | ||
memory: 512Mi | ||
ports: | ||
- containerPort: 7433 | ||
livenessProbe: | ||
exec: | ||
command: ['bin/sidekiq_health_check'] | ||
initialDelaySeconds: 60 | ||
timeoutSeconds: 5 | ||
readinessProbe: | ||
exec: | ||
command: ['bin/sidekiq_health_check'] | ||
initialDelaySeconds: 60 | ||
timeoutSeconds: 5 | ||
lifecycle: | ||
preStop: | ||
exec: | ||
command: ['bundle', 'exec', 'sidekiqctl', 'quiet'] | ||
terminationGracePeriodSeconds: 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.