feat: add OAuth 2.0 support for GSC monitoring
Some checks failed
Build and Deploy / build (push) Has been cancelled

- Updated monitor.py to support both OAuth and Service Account
- Created setup-oauth-local.py for easy local authorization
- Created cronjob-oauth.yaml for OAuth-based deployment
- Updated README with both authentication options
- OAuth is now the recommended method (no key file needed)
This commit is contained in:
Unchained
2026-03-30 17:56:49 +02:00
parent 771e9dc20b
commit 36915a3f75
5 changed files with 458 additions and 10 deletions

View File

@@ -0,0 +1,32 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: gsc-monitoring-oauth
namespace: manoonoils
spec:
schedule: "0 9 * * *" # Run daily at 9 AM UTC
jobTemplate:
spec:
template:
spec:
containers:
- name: gsc-monitor
image: gcr.io/manoonoils/gsc-monitoring:latest
env:
- name: GSC_OAUTH_FILE
value: /etc/gsc-monitoring/oauth-credentials.json
- name: PYTHONUNBUFFERED
value: "1"
volumeMounts:
- name: gsc-oauth-credentials
mountPath: /etc/gsc-monitoring
readOnly: true
- name: logs
mountPath: /var/log/gsc-monitoring
volumes:
- name: gsc-oauth-credentials
secret:
secretName: gsc-oauth-credentials
- name: logs
emptyDir: {}
restartPolicy: OnFailure