Skip to content

Commit

Permalink
removed unused APNS environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Mar 13, 2024
1 parent 3ce21d7 commit 9f7a0b5
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 37 deletions.
4 changes: 0 additions & 4 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ DB_NAME=campus_db
DB_ROOT_PASSWORD=secret_root_password
DB_PORT=3306

APNS_KEY_ID=
APNS_TEAM_ID=
APNS_P8_FILE_PATH=/secrets/AuthKey_XXXX.p8

SENTRY_DSN=

CAMPUS_API_TOKEN=
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ __debug_bin

.env.local

apns_auth_key.p8
venv
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ The following environment variables need to be set for the server to work proper
* [OPTIONAL] `DB_PORT`: The port of the database server. Defaults to `3306`.
* [OPTIONAL] `SENTRY_DSN`: The Sentry [Data Source Name](https://sentry-docs-git-patch-1.sentry.dev/product/sentry-basics/dsn-explainer/) for reporting issues and crashes.
* [OPTIONAL] `OMDB_API_KEY`: The key to get more information for tu-film movies from [omdbapi](https://omdbapi.com/). See [omdbapi](https://omdbapi.com/apikey.aspx) for a key.
* **[iOS Push Notification Service [OPTIONAL]](#ios-push-notifications-service)**:
* [REQUIRED] `APNS_KEY_ID`: The key ID of the APNs key => APNs Key needs to be downloaded from the Apple Developer Portal the name of the file also contains the key ID.
* [REQUIRED] `APNS_TEAM_ID`: The team ID of the iOS app can be found in AppStoreConnect.
* [REQUIRED] `APNS_P8_FILE_PATH`: The path to the APNs key file (e.g. `/secrets/AuthKey_XXXX.p8`) in the docker container. The file itself needs to exist in the same directory as the `docker-compose.yml` file and called `apns_auth_key.p8`.
* [REQUIRED] `CAMPUS_API_TOKEN`: A token used to authenticate with TUMonline (used for example for the grades)

## Metrics
Our service uses prometheus to collect metrics to display in grafana.
Expand Down
19 changes: 0 additions & 19 deletions deployment/charts/backend/templates/deployments/backend-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ spec:
env:
- name: ENVIRONMENT
value: prod
- name: APNS_P8_FILE_PATH
value: /etc/apns_auth_key.p8
- name: OMDB_API_KEY
valueFrom:
secretKeyRef:
Expand Down Expand Up @@ -87,24 +85,10 @@ spec:
key: SMTP_PORT
- name: DB_DSN
value: "{{ $db.username }}:{{ $db.password }}@tcp(tca-backend-mariadb.{{ $.Values.namespace }}.svc.cluster.local:3306)/{{ $db.database }}?charset=utf8mb4&parseTime=True&loc=Local"
- name: APNS_KEY_ID
valueFrom:
secretKeyRef:
name: backend-api-keys
key: APNS_KEY_ID
- name: APNS_TEAM_ID
valueFrom:
secretKeyRef:
name: backend-api-keys
key: APNS_TEAM_ID
volumeMounts:
- mountPath: /Storage/
name: storage-vol
readOnly: false
- mountPath: /etc/apns_auth_key.p8
subPath: apns_auth_key.p8
name: backend-api-keys
readOnly: true
ports:
- containerPort: 50051
name: http
Expand Down Expand Up @@ -179,9 +163,6 @@ data:
OMDB_API_KEY: {{ $.Values.backend.omdbApiKey | b64enc }}
CAMPUS_API_TOKEN: {{ $.Values.backend.campusApiToken | b64enc }}
SENTRY_DSN: {{ $.Values.backend.sentry.dsn | b64enc }}
apns_auth_key.p8: {{ $.Values.backend.apns.auth_key }}
APNS_KEY_ID: {{ $.Values.backend.apns.key_id | b64enc }}
APNS_TEAM_ID: {{ $.Values.backend.apns.team_id | b64enc }}
SMTP_PASSWORD: {{ $.Values.backend.smtp.password | b64enc }}
SMTP_URL: {{ $.Values.backend.smtp.url | b64enc }}
SMTP_FROM: {{ $.Values.backend.smtp.username | b64enc }}
Expand Down
4 changes: 0 additions & 4 deletions deployment/charts/backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ backend:
campusApiToken: changeme-changeme-changeme
sentry:
dsn: changeme-changeme-changeme
apns:
auth_key: changeme-changeme-changeme
key_id: changeme-changeme-changeme
team_id: changeme-changeme-changeme
smtp:
password: change-me
url: smtp.gmail.com
Expand Down
4 changes: 0 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ services:
- DB_DSN=root:${DB_ROOT_PASSWORD}@tcp(db:${DB_PORT:-3306})/${DB_NAME}?charset=utf8mb4&parseTime=True&loc=Local
- ENVIRONMENT=dev
- SENTRY_DSN=${SENTRY_DSN}
- APNS_KEY_ID=${APNS_KEY_ID}
- APNS_TEAM_ID=${APNS_TEAM_ID}
- APNS_P8_FILE_PATH=${APNS_P8_FILE_PATH}
- OMDB_API_KEY=${OMDB_API_KEY}
- CAMPUS_API_TOKEN=${CAMPUS_API_TOKEN}
- SMTP_PASSWORD=${SMTP_PASSWORD}
Expand All @@ -24,7 +21,6 @@ services:
- SMTP_PORT=${SMTP_PORT:-587}
volumes:
- backend-storage:/Storage
- ./apns_auth_key.p8:${APNS_P8_FILE_PATH}
user: 1000:3000
depends_on:
db:
Expand Down

0 comments on commit 9f7a0b5

Please sign in to comment.