Skip to content

Commit

Permalink
Merge pull request #1500 from xtuchyna/mi-scheduler/feature/merge-cro…
Browse files Browse the repository at this point in the history
…njob

Add merge cronjob
  • Loading branch information
sesheta authored Jun 4, 2021
2 parents c775265 + c34356d commit c512358
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 10 deletions.
90 changes: 83 additions & 7 deletions mi-scheduler/base/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ spec:
secretKeyRef:
name: sesheta-srcops
key: github-access-token
- name: SCHEDULE_KEBECHET_ANALYSIS
value: "0"
- name: SCHEDULE_GH_REPO_ANALYSIS
value: "1"
- name: THOTH_ADJUST_LOGGING
Expand All @@ -60,12 +58,12 @@ spec:
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
labels:
app: mi-scheduler-kebechet
app: mi-scheduler-kebechet-analyse

spec:
schedule: "@daily"
schedule: "0 0 * * *"
suspend: false
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 2
Expand All @@ -74,7 +72,7 @@ spec:
spec:
template:
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
spec:
serviceAccount: mi-scheduler
containers:
Expand Down Expand Up @@ -133,8 +131,86 @@ spec:
key: github-access-token
- name: SCHEDULE_KEBECHET_ANALYSIS
value: "1"
- name: SCHEDULE_GH_REPO_ANALYSIS
- name: THOTH_ADJUST_LOGGING
value: 'thoth.mi-scheduler:INFO'
restartPolicy: OnFailure
---
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet-merge
labels:
app: mi-scheduler-kebechet-merge

spec:
schedule: "0 8 * * *"
suspend: false
concurrencyPolicy: Forbid
successfulJobsHistoryLimit: 2
failedJobsHistoryLimit: 4
jobTemplate:
spec:
template:
metadata:
name: mi-scheduler-kebechet-merge
spec:
serviceAccount: mi-scheduler
containers:
- image: mi-scheduler
name: mi-scheduler
resources:
limits:
cpu: 256m
memory: 500Mi
requests:
cpu: 256m
memory: 500Mi
env:
- name: KUBERNETES_VERIFY_TLS
value: "0"
- name: APP_FILE
value: "app.py"
- name: THOTH_MIDDLETIER_NAMESPACE
valueFrom:
configMapKeyRef:
name: thoth
key: middletier-namespace
- name: THOTH_INFRA_NAMESPACE
valueFrom:
configMapKeyRef:
name: thoth
key: infra-namespace
- name: KNOWLEDGE_GRAPH_HOST
valueFrom:
configMapKeyRef:
key: postgresql-host
name: thoth
- name: KNOWLEDGE_GRAPH_PORT
value: "5432"
- name: KNOWLEDGE_GRAPH_SSL_DISABLED
value: "1"
- name: KNOWLEDGE_GRAPH_USER
valueFrom:
secretKeyRef:
name: postgresql
key: database-user
- name: KNOWLEDGE_GRAPH_PASSWORD
valueFrom:
secretKeyRef:
name: postgresql
key: database-password
- name: KNOWLEDGE_GRAPH_DATABASE
valueFrom:
secretKeyRef:
name: postgresql
key: database-name
- name: GITHUB_ACCESS_TOKEN
valueFrom:
secretKeyRef:
name: sesheta-srcops
key: github-access-token
- name: SCHEDULE_KEBECHET_MERGE
value: "1"
- name: THOTH_ADJUST_LOGGING
value: 'thoth.mi-scheduler:INFO'
restartPolicy: OnFailure
9 changes: 8 additions & 1 deletion mi-scheduler/overlays/cnv-prod/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ spec:
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
spec:
suspend: true
---
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet-merge
spec:
suspend: true
9 changes: 8 additions & 1 deletion mi-scheduler/overlays/ocp4-stage/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ spec:
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
spec:
suspend: true
---
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet-merge
spec:
suspend: true
9 changes: 8 additions & 1 deletion mi-scheduler/overlays/test/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ spec:
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet
name: mi-scheduler-kebechet-analyse
spec:
suspend: true
---
kind: CronJob
apiVersion: batch/v1beta1
metadata:
name: mi-scheduler-kebechet-merge
spec:
suspend: true

0 comments on commit c512358

Please sign in to comment.