diff --git a/charts/tidepool/charts/care-partner-alerts/.helmignore b/charts/tidepool/charts/care-partner-alerts/.helmignore new file mode 100644 index 00000000..50af0317 --- /dev/null +++ b/charts/tidepool/charts/care-partner-alerts/.helmignore @@ -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/ diff --git a/charts/tidepool/charts/care-partner-alerts/Chart.yaml b/charts/tidepool/charts/care-partner-alerts/Chart.yaml new file mode 100644 index 00000000..16065ace --- /dev/null +++ b/charts/tidepool/charts/care-partner-alerts/Chart.yaml @@ -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 diff --git a/charts/tidepool/charts/care-partner-alerts/README.md b/charts/tidepool/charts/care-partner-alerts/README.md new file mode 100644 index 00000000..e44e3f86 --- /dev/null +++ b/charts/tidepool/charts/care-partner-alerts/README.md @@ -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:** + +## 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` | | + diff --git a/charts/tidepool/charts/care-partner-alerts/templates/0-configmap.yaml b/charts/tidepool/charts/care-partner-alerts/templates/0-configmap.yaml new file mode 100644 index 00000000..f1245d39 --- /dev/null +++ b/charts/tidepool/charts/care-partner-alerts/templates/0-configmap.yaml @@ -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 }} diff --git a/charts/tidepool/charts/care-partner-alerts/templates/0-secret.yaml b/charts/tidepool/charts/care-partner-alerts/templates/0-secret.yaml new file mode 100644 index 00000000..5c7c0e35 --- /dev/null +++ b/charts/tidepool/charts/care-partner-alerts/templates/0-secret.yaml @@ -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 }} diff --git a/charts/tidepool/charts/care-partner-alerts/values.yaml b/charts/tidepool/charts/care-partner-alerts/values.yaml new file mode 100644 index 00000000..755d66cb --- /dev/null +++ b/charts/tidepool/charts/care-partner-alerts/values.yaml @@ -0,0 +1,11 @@ +configmap: + enabled: true + data_: + APNSKeyID: "QA3495JW4S" + APNSTeamID: "75U4X84TEG" + APNSBundleID: "org.tidepool.carepartner" + +secret: + enabled: false + data_: + APNSSigningKey: "" diff --git a/charts/tidepool/charts/data/templates/1-deployment.yaml b/charts/tidepool/charts/data/templates/1-deployment.yaml index 722ee525..cabd5301 100644 --- a/charts/tidepool/charts/data/templates/1-deployment.yaml +++ b/charts/tidepool/charts/data/templates/1-deployment.yaml @@ -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 @@ -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 }} diff --git a/charts/tidepool/charts/task/templates/1-deployment.yaml b/charts/tidepool/charts/task/templates/1-deployment.yaml index 42194f48..ede20d2d 100644 --- a/charts/tidepool/charts/task/templates/1-deployment.yaml +++ b/charts/tidepool/charts/task/templates/1-deployment.yaml @@ -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: @@ -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 diff --git a/charts/tidepool/templates/_helpers.tpl b/charts/tidepool/templates/_helpers.tpl index 95c474d6..c47114bf 100644 --- a/charts/tidepool/templates/_helpers.tpl +++ b/charts/tidepool/templates/_helpers.tpl @@ -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 }}