Skip to content

Commit

Permalink
ROX-23252: Add emailsender deployment (#1782)
Browse files Browse the repository at this point in the history
* Add emailsender deployment

* Add emailsender deployment

* Update dp-terraform/helm/rhacs-terraform/templates/emailsender.yaml

Co-authored-by: Johannes Malsam <[email protected]>

* Add replicas

---------

Co-authored-by: Johannes Malsam <[email protected]>
  • Loading branch information
kurlov and johannes94 authored May 22, 2024
1 parent cdc535a commit 3a6bebf
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
25 changes: 25 additions & 0 deletions dp-terraform/helm/rhacs-terraform/templates/emailsender-rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if eq .Values.emailsender.enabled false }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: emailsender
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ printf "%s-%s" "emailsender-rb" .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: emailsender-role
subjects:
- kind: ServiceAccount
name: emailsender
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: emailsender-role
{{- end }}
46 changes: 46 additions & 0 deletions dp-terraform/helm/rhacs-terraform/templates/emailsender.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{- if eq .Values.emailsender.enabled false }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: emailsender
namespace: {{ .Release.Namespace }}
labels:
app: emailsender
spec:
replicas: {{ .Values.emailsender.replicas }}
selector:
matchLabels:
app: emailsender
strategy:
type: RollingUpdate
template:
metadata:
labels:
app: emailsender
spec:
serviceAccountName: emailsender
containers:
- name: emailsender
image: "{{ .Values.emailsender.image.repo }}:{{ .Values.emailsender.image.tag }}"
imagePullPolicy: IfNotPresent
command:
- /usr/local/bin/emailsender
env:
- name: CLUSTER_ID
value: {{ .Values.emailsender.clusterId }}
- name: CLUSTER_NAME
value: {{ .Values.emailsender.clusterName }}
- name: ENVIRONMENT
value: {{ .Values.emailsender.environment }}
ports:
- name: monitoring
containerPort: 9090
- name: server
containerPort: 8080
resources:
limits:
memory: {{ .Values.emailsender.resources.limits.memory | quote }}
requests:
cpu: {{ .Values.emailsender.resources.requests.cpu | quote }}
memory: {{ .Values.emailsender.resources.requests.memory | quote }}
{{- end }}
19 changes: 19 additions & 0 deletions dp-terraform/helm/rhacs-terraform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,25 @@ fleetshardSync:
addonAutoUpgradeEnabled: true
addonName: acs-fleetshard

# Email sender service parameters
# - enabled flag is used to completely enable/disable email sender service
emailsender:
enabled: false
replicas: 3
image:
repo: "quay.io/app-sre/emailsender"
tag: "main"
clusterId: ""
clusterName: ""
environment: ""
resources:
requests:
cpu: "100m"
memory: "512Mi"
limits:
cpu: "200m"
memory: "512Mi"

# See available parameters in charts/cloudwatch/values.yaml
# - enabled flag is used to completely enable/disable cloudwatch sub-chart
cloudwatch:
Expand Down

0 comments on commit 3a6bebf

Please sign in to comment.