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
10 changes: 8 additions & 2 deletions openstack/limes/files/commitment_mail.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</head>
<body>
<p><b>Dear SAP Cloud Infrastructure user</b>,</p>
<p>the following commitments are {{ .condition }} for the
<p>the following commitments {{ .condition }} for the
following project:</p>
<p>
<ul>
Expand All @@ -35,7 +35,10 @@
<table>
<tr style="background-color: #f2f2f2;">
<th>Creator</th>
<th>Amount</th>
<th>{{ if (contains "transferred" .condition) }}Original {{ end }}Amount</th>
{{- if (contains "transferred" .condition) }}
<th>Leftover Amount</th>
{{- end }}
<th>Duration</th>
<th>Date</th>
<th>Service</th>
Expand All @@ -46,6 +49,9 @@
<tr>
<td>{{"{{"}} .Commitment.CreatorName {{"}}"}}</td>
<td>{{"{{"}} .Commitment.Amount {{"}}"}}</td>
{{- if (contains "transferred" .condition) }}
<td>{{"{{"}} .Leftover.Amount {{"}}"}}</td>
{{- end }}
<td>{{"{{"}} .Commitment.Duration {{"}}"}}</td>
<td>{{"{{"}} .DateString {{"}}"}}</td>
<td>{{"{{"}} .Resource.ServiceType {{"}}"}}</td>
Expand Down
3 changes: 3 additions & 0 deletions openstack/limes/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ data:
expiring_commitments:
subject: {{ .Values.campfire.mail_type.expire.subject }}
body: {{ tpl (.Files.Get "files/commitment_mail.tpl") (dict "region" .Values.global.region "condition" .Values.campfire.mail_type.expire.condition "dashboardInfo" $dashboardInfo)| toJson }}
transferred_commitments:
subject: {{ .Values.campfire.mail_type.transferred.subject }}
body: {{ tpl (.Files.Get "files/commitment_mail.tpl") (dict "region" .Values.global.region "condition" .Values.campfire.mail_type.transferred.condition)| toJson }}
{{- end }}
{{ toYaml .Values.limes.clusters.ccloud | indent 4 }}

Expand Down
7 changes: 5 additions & 2 deletions openstack/limes/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ campfire:
mail_type:
expire:
subject: "Information about expiring commitments"
condition: "about to expire"
condition: "are about to expire"
confirmed:
subject: "Information about confirmed commitments"
condition: "confirmed and ready to use"
condition: "were confirmed and are ready to use"
transferred:
subject: "Information about transferred commitments"
condition: "were (partially) transferred to other projects after posting on the public marketplace"

linkerd-support:
annotate_namespace: true
Expand Down