add surveybot
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Aaron Riedel 2024-07-12 14:44:14 +02:00
parent 60da8056f4
commit ee1b1376c4
Signed by: aaron
GPG key ID: 643004654D40D577
2 changed files with 58 additions and 1 deletions

View file

@ -92,7 +92,7 @@ spec:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: hoylogo-staging
name: surveybot
namespace: argocd
spec:
project: default
@ -108,3 +108,23 @@ spec:
- CreateNamespace=true
automated:
prune: true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: surveybot
namespace: argocd
spec:
project: default
source:
repoURL: https://git.ar21.de/aaron/k8s-deployments.git
targetRevision: HEAD
path: surveybot
destination:
server: https://kubernetes.default.svc
namespace: surveybot
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
prune: true

37
surveybot/surveybot.yaml Normal file
View file

@ -0,0 +1,37 @@
apiVersion: v1
kind: Namespace
metadata:
name: surveybot
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: surveybot
namespace: surveybot
spec:
schedule: "00 16 * * 5"
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 3
jobTemplate:
spec:
ttlSecondsAfterFinished: 240
template:
spec:
containers:
- name: surveybot
image: git.ar21.de/secondhemd/shbot:latest
env:
- name: SURVEY_CHANNEL
value: "1121451742983368744"
- name: MENTION_ID
value: "1121451741704093726"
- name: GUILD_ID
value: "261575556708040705"
- name: TOKEN
valueFrom:
secretKeyRef:
name: surveybot-token
key: TOKEN
command: ["python", "survey.py"]
imagePullPolicy: Always
restartPolicy: Never