feat: add OAuth 2.0 support for GSC monitoring
Some checks failed
Build and Deploy / build (push) Has been cancelled
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:
32
scripts/gsc-monitoring/cronjob-oauth.yaml
Normal file
32
scripts/gsc-monitoring/cronjob-oauth.yaml
Normal 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
|
||||
Reference in New Issue
Block a user