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

Add Twiist #317

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
52 changes: 50 additions & 2 deletions charts/tidepool/charts/auth/templates/1-deployment.yaml
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ metadata:
name: auth
namespace: {{.Release.Namespace}}
annotations:
secret.reloader.stakater.com/reload: "server,{{ .Values.mongo.secretName }},abbott,dexcom,auth"
configmap.reloader.stakater.com/reload: "abbott,dexcom"
secret.reloader.stakater.com/reload: "server,{{ .Values.mongo.secretName }},abbott,dexcom,auth,twiist"
configmap.reloader.stakater.com/reload: "abbott,dexcom,twiist"
{{ if .Values.deployment.annotations }}
{{- .Values.deployment.annotations | toYaml | nindent 4 }}
{{- end }}
@@ -134,6 +134,54 @@ spec:
name: dexcom
key: StateSalt
optional: true
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_AUTHORIZE_URL
valueFrom:
configMapKeyRef:
name: twiist
key: AuthorizeURL
optional: true
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_REDIRECT_URL
valueFrom:
configMapKeyRef:
name: twiist
key: RedirectURL
optional: true
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_TOKEN_URL
valueFrom:
configMapKeyRef:
name: twiist
key: TokenURL
optional: true
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_JWKS_URL
valueFrom:
configMapKeyRef:
name: twiist
key: JWKSURL
optional: true
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_CLIENT_ID
valueFrom:
secretKeyRef:
name: twiist
key: ClientID
optional: true
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: twiist
key: ClientSecret
optional: true
- name: TIDEPOOL_SERVICE_PROVIDER_TWIIST_STATE_SALT
valueFrom:
secretKeyRef:
name: twiist
key: StateSalt
optional: true
- name: TIDEPOOL_TWIIST_SERVICE_ACCOUNT_IDS
valueFrom:
configMapKeyRef:
name: twiist
key: ServiceAccountIDs
optional: true
- name: TIDEPOOL_AUTH_SERVICE_DOMAIN
value: {{ .Values.global.gateway.default.domain }}
- name: TIDEPOOL_AUTH_SERVICE_SERVER_ADDRESS
8 changes: 8 additions & 0 deletions charts/tidepool/charts/auth/templates/4-routetable.yaml
Original file line number Diff line number Diff line change
@@ -133,4 +133,12 @@ spec:
single:
upstream:
name: auth
- matchers:
- methods:
- DELETE
regex: /v1/partners/twiist/links/[^/]+
routeAction:
single:
upstream:
name: auth
{{- end }}
6 changes: 6 additions & 0 deletions charts/tidepool/charts/data/templates/1-deployment.yaml
Original file line number Diff line number Diff line change
@@ -111,6 +111,12 @@ spec:
name: abbott
key: PartnerURL
optional: true
- name: TIDEPOOL_TWIIST_SERVICE_ACCOUNT_IDS
valueFrom:
configMapKeyRef:
name: twiist
key: ServiceAccountIDs
optional: true
- name: TIDEPOOL_DATA_SERVICE_SECRET
valueFrom:
secretKeyRef:
1 change: 1 addition & 0 deletions charts/tidepool/charts/data/templates/4-routetable.yaml
Original file line number Diff line number Diff line change
@@ -429,4 +429,5 @@ spec:
single:
upstream:
name: data
weight: 10
{{- end }}
22 changes: 22 additions & 0 deletions charts/tidepool/charts/twiist/.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/twiist/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: twiist
version: 0.1.0
home: https://github.com/tidepool-org/development/charts
24 changes: 24 additions & 0 deletions charts/tidepool/charts/twiist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# twiist

![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.enabled | bool | `false` | whether to generate a configmap |
| configmap.redirectURL | string | `""` | OAuth2 redirect URL |
| configmap.tokenURL | string | `""` | OAuth2 token URL |
| configmap.authorizeURL | string | `""` | OAuth2 authorization URL |
| configmap.jwksURL | string | `""` | jwks URL |
| configmap.scopes | string | `""` | OAuth2 scopes |
| secret.enabled | bool | `false` | whether to create a secret |
| secret.data_.clientId | string | `""` | plaintext OAuth2 client id |
| secret.data_.clientSecret | string | `""` | plaintext OAuth2 client secret |
| secret.data_.stateSalt | string | `""` | plaintext OAuth2 state salt |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.3.0](https://github.com/norwoodj/helm-docs/releases/v1.3.0)
20 changes: 20 additions & 0 deletions charts/tidepool/charts/twiist/templates/0-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ if .Values.configmap.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: twiist
namespace: {{ .Release.Namespace }}
labels:
{{ include "charts.labels.standard" . }}
data:
{{ if .Values.configmap.redirectURL }}
RedirectURL: {{ .Values.configmap.redirectURL }}
{{ else }}
RedirectURL: "{{include "charts.host.api" .}}/v1/oauth/twiist/redirect"
{{ end }}
TokenURL: {{ .Values.configmap.tokenURL | default "" }}
AuthorizeURL: {{ .Values.configmap.authorizeURL | default "" }}
JWKSURL: {{ .Values.configmap.jwksURL | default "" }}
Scopes: {{ .Values.configmap.scopes | default "" }}
ServiceAccountIDs: {{ .Values.configmap.serviceAccountIDs | default "" }}
{{ end }}
15 changes: 15 additions & 0 deletions charts/tidepool/charts/twiist/templates/0-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{ if .Values.secret.enabled -}}
---
apiVersion: v1
{{ with .Values.secret.data_ -}}
data:
ClientID: {{ .clientId | default "" | b64enc | quote }}
ClientSecret: {{ .clientSecret | default "" | b64enc | quote }}
StateSalt: {{ .stateSalt | default "" | b64enc | quote }}
{{- end }}
kind: Secret
metadata:
name: twiist
namespace: {{ .Release.Namespace }}
type: Opaque
{{- end }}
14 changes: 14 additions & 0 deletions charts/tidepool/charts/twiist/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
configmap:
enabled: false
redirectURL: ""
tokenURL: ""
authorizeURL: ""
scopes: ""
jwksURL: ""
serviceAccountIDs: ""
secret:
enabled: false
data_:
clientId: ""
clientSecret: ""
stateSalt: ""