update the calendar URL due to new scheudle

This commit is contained in:
2026-03-02 13:37:23 +00:00
parent b22d3d6a28
commit 365d98a6f6
6 changed files with 148 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
#install required packages
apk add curl wget
destination_folder="/storage"
pagerduty_webcal_url="https://prometheusgroup.pagerduty.com/private/ec39afcfcc8fad708b335db797b2c1f4324f7f7097b3c1b65c3c0cea08388915/feed/PLHRBFV"
today_date=$(date "+%Y-%m-%d")
curl -s -A "$USER_AGENT" -o "$destination_folder/pagerduty_export_$today_date.ics" "$pagerduty_webcal_url"
+36
View File
@@ -0,0 +1,36 @@
apiVersion: v1
kind: Namespace
metadata:
name: pagerduty-schedule
---
apiVersion: batch/v1
kind: Job
metadata:
name: pagerduty-schedule
namespace: pagerduty-schedule
spec:
template:
spec:
containers:
- name: pagerduty-schedule
image: bash
imagePullPolicy: Always
volumeMounts:
- mountPath: /config
name: scripts
- mountPath: /storage
name: pagerduty-schedule-storage
command:
- bash
- /config/pagerduty-schedule.sh
restartPolicy: Never
volumes:
- configMap:
defaultMode: 0744
name: pagerduty-schedule
name: scripts
- name: pagerduty-schedule-storage
persistentVolumeClaim:
claimName: pagerduty-schedule-storage
backoffLimit: 4
+38
View File
@@ -0,0 +1,38 @@
apiVersion: v1
kind: Namespace
metadata:
name: pagerduty-schedule
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: pagerduty-schedule
namespace: pagerduty-schedule
spec:
schedule: "0 0 * * *"
jobTemplate:
spec:
backoffLimit: 4
ttlSecondsAfterFinished: 100
template:
spec:
containers:
- name: pagerduty-schedule
image: bash
command:
- bash
- /config/pagerduty-schedule.sh
volumeMounts:
- mountPath: /config
name: scripts
- mountPath: /storage
name: pagerduty-schedule-storage
volumes:
- name: scripts
configMap:
defaultMode: 0744
name: pagerduty-schedule
- name: pagerduty-schedule-storage
persistentVolumeClaim:
claimName: pagerduty-schedule-storage
restartPolicy: Never
+18
View File
@@ -0,0 +1,18 @@
apiVersion: v1
data:
pagerduty-schedule.sh: |
#!/bin/bash
#install required packages
apk add curl wget
destination_folder="/storage"
pagerduty_webcal_url="https://prometheusgroup.pagerduty.com/private/ec39afcfcc8fad708b335db797b2c1f4324f7f7097b3c1b65c3c0cea08388915/feed/PLHRBFV"
today_date=$(date "+%Y-%m-%d")
curl -s -A "$USER_AGENT" -o "$destination_folder/pagerduty_export_$today_date.ics" "$pagerduty_webcal_url"
kind: ConfigMap
metadata:
creationTimestamp: null
name: pagerduty-schedule
namespace: pagerduty-schedule
+12
View File
@@ -0,0 +1,12 @@
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: pagerduty-schedule-storage
namespace: pagerduty-schedule
spec:
storageClassName: nfs-storage-intelligent
accessModes:
- ReadWriteMany
resources:
requests:
storage: 2Gi
+34
View File
@@ -0,0 +1,34 @@
apiVersion: batch/v1
kind: Job
metadata:
name: stash-reddit-dowloader
namespace: stash
spec:
template:
spec:
containers:
- name: stash-reddit-dowloader
image: alpine
imagePullPolicy: Always
volumeMounts:
- mountPath: /config
name: scripts
- mountPath: /data
mountPropagation: None
name: data-pvc
command:
- /bin/sh
- -c
- sleep 3600
# - /config/reddit_downloader.sh Countem1a /data
restartPolicy: Never
volumes:
- configMap:
defaultMode: 365
name: stash-reddit-dowloader
name: scripts
- name: data-pvc
persistentVolumeClaim:
claimName: data-pvc
backoffLimit: 4