Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move care partner alerts APNS config to its own helm chart #316

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
22 changes: 22 additions & 0 deletions charts/tidepool/charts/care-partner-alerts/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
6 changes: 6 additions & 0 deletions charts/tidepool/charts/care-partner-alerts/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: care-partner-alerts
version: 0.1.0
home: https://github.com/tidepool-org/development/charts
19 changes: 19 additions & 0 deletions charts/tidepool/charts/care-partner-alerts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# care-partner-alerts

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)

A Helm chart for Kubernetes

**Homepage:** <https://github.com/tidepool-org/development/charts>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| configmap.data_.APNSBundleID | string | `"org.tidepool.carepartner"` | |
| configmap.data_.APNSKeyID | string | `"QA3495JW4S"` | |
| configmap.data_.APNSTeamID | string | `"75U4X84TEG"` | |
| configmap.enabled | bool | `true` | |
| secret.data_.APNSSigningKey | string | `""` | |
| secret.enabled | bool | `false` | |

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{ if .Values.configmap.enabled -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: care-partner-alerts
namespace: {{ .Release.Namespace }}
labels:
{{ include "charts.labels.standard" . }}
{{ with .Values.configmap.data_ -}}
data:
APNSKeyID: {{ .APNSKeyID | default "" }}
APNSTeamID: {{ .APNSTeamID | default "" }}
APNSBundleID: {{ .APNSBundleID | default "" }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/tidepool/charts/care-partner-alerts/templates/0-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{ if .Values.secret.enabled -}}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: care-partner-alerts
namespace: {{ .Release.Namespace }}
labels:
{{ include "charts.labels.standard" . }}
{{ with .Values.secret.data_ -}}
data:
APNSSigningKey: {{ .APNSSigningKey | default "" | b64enc | quote }}
{{- end }}
{{- end }}
11 changes: 11 additions & 0 deletions charts/tidepool/charts/care-partner-alerts/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
configmap:
enabled: true
data_:
APNSKeyID: "QA3495JW4S"
Copy link
Contributor

Choose a reason for hiding this comment

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

Will we use the same APNS key id for production and non-production?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe so, yes. We have only the one key.

At time of submission we can select to use a Sandbox service, but the key remains the same.

APNSTeamID: "75U4X84TEG"
APNSBundleID: "org.tidepool.carepartner"

secret:
enabled: false
data_:
APNSSigningKey: ""
25 changes: 1 addition & 24 deletions charts/tidepool/charts/data/templates/1-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ spec:
{{ include "charts.platform.env.mongo" .}}
{{ include "charts.platform.env.misc" .}}
{{ include "charts.platform.env.clients" .}}
{{ include "charts.platform.env.care-partner-alerts" .}}
{{ include "charts.kafka.common" .}}
{{ include "charts.kafka.cloudevents.client" (dict "Values" .Values "Release" .Release "client" "data") }}
- name: TIDEPOOL_SERVICE_PROVIDER_ABBOTT_AUTHORIZE_URL
Expand Down Expand Up @@ -131,30 +132,6 @@ spec:
name: data
key: AlertsRetryDelays
optional: true
- name: TIDEPOOL_DATA_SERVICE_PUSHER_APNS_SIGNING_KEY
valueFrom:
secretKeyRef:
name: data
key: PusherAPNSSigningKey
optional: true
- name: TIDEPOOL_DATA_SERVICE_PUSHER_APNS_KEY_ID
valueFrom:
configMapKeyRef:
name: data
key: PusherAPNSKeyID
optional: true
- name: TIDEPOOL_DATA_SERVICE_PUSHER_APNS_TEAM_ID
valueFrom:
configMapKeyRef:
name: data
key: PusherAPNSTeamID
optional: true
- name: TIDEPOOL_DATA_SERVICE_PUSHER_APNS_BUNDLE_ID
valueFrom:
configMapKeyRef:
name: data
key: PusherAPNSBundleID
optional: true
image: "{{ .Values.deployment.image }}"
securityContext:
{{- .Values.podSecurityContext | toYaml | nindent 10 }}
Expand Down
25 changes: 1 addition & 24 deletions charts/tidepool/charts/task/templates/1-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ spec:
{{ include "charts.platform.env.mongo" .}}
{{ include "charts.platform.env.misc" .}}
{{ include "charts.platform.env.clients" .}}
{{ include "charts.platform.env.care-partner-alerts" .}}
- name: TIDEPOOL_SERVICE_PROVIDER_DEXCOM_AUTHORIZE_URL
valueFrom:
configMapKeyRef:
Expand Down Expand Up @@ -96,30 +97,6 @@ spec:
name: dexcom
key: ClientURL
optional: true
- name: TIDEPOOL_TASK_SERVICE_PUSHER_APNS_SIGNING_KEY
valueFrom:
secretKeyRef:
name: task
key: PusherAPNSSigningKey
optional: true
- name: TIDEPOOL_TASK_SERVICE_PUSHER_APNS_KEY_ID
valueFrom:
configMapKeyRef:
name: task
key: PusherAPNSKeyID
optional: true
- name: TIDEPOOL_TASK_SERVICE_PUSHER_APNS_TEAM_ID
valueFrom:
configMapKeyRef:
name: task
key: PusherAPNSTeamID
optional: true
- name: TIDEPOOL_TASK_SERVICE_PUSHER_APNS_BUNDLE_ID
valueFrom:
configMapKeyRef:
name: task
key: PusherAPNSBundleID
optional: true
- name: TIDEPOOL_TASK_QUEUE_DELAY
value: {{ .Values.deployment.env.queue.delay | quote }}
- name: TIDEPOOL_TASK_QUEUE_WORKERS
Expand Down
27 changes: 27 additions & 0 deletions charts/tidepool/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,30 @@ Lifecycle hooks for services
key: UserEvents{{ .client | title }}DeadLettersTopic
optional: true
{{ end }}

{{ define "charts.platform.env.care-partner-alerts" }}
- name: TIDEPOOL_CARE_PARTNER_ALERTS_APNS_SIGNING_KEY
valueFrom:
secretKeyRef:
name: care-partner-alerts
key: APNSSigningKey
optional: true
- name: TIDEPOOL_CARE_PARTNER_ALERTS_APNS_KEY_ID
valueFrom:
configMapKeyRef:
name: care-partner-alerts
key: APNSKeyID
optional: true
- name: TIDEPOOL_CARE_PARTNER_ALERTS_APNS_TEAM_ID
valueFrom:
configMapKeyRef:
name: care-partner-alerts
key: APNSTeamID
optional: true
- name: TIDEPOOL_CARE_PARTNER_ALERTS_APNS_BUNDLE_ID
valueFrom:
configMapKeyRef:
name: care-partner-alerts
key: APNSBundleID
optional: true
{{ end }}