Skip to content

Commit

Permalink
Enable Debian combine-to-osv on prod (google#2168)
Browse files Browse the repository at this point in the history
Deploy `debian-cve-convert` cron job on production.
  • Loading branch information
hogo6002 authored Jun 4, 2024
1 parent f07f7eb commit a65693b
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 20 deletions.
30 changes: 30 additions & 0 deletions deployment/clouddeploy/gke-workers/base/debian-cve-convert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: debian-cve-convert
spec:
schedule: "0 */1 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
activeDeadlineSeconds: 3600
template:
spec:
containers:
- name: debian-cve-convert
image: debian-cve-convert
imagePullPolicy: Always
securityContext:
privileged: true
resources:
requests:
cpu: 1
memory: "1G"
limits:
cpu: 1
memory: "2G"
restartPolicy: OnFailure
volumes:
- name: "ssd"
hostPath:
path: "/mnt/disks/ssd0"
1 change: 1 addition & 0 deletions deployment/clouddeploy/gke-workers/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ resources:
- importer-deleter.yaml
- exporter.yaml
- alpine-cve-convert.yaml
- debian-cve-convert.yaml
- combine-to-osv.yaml
- debian-convert.yaml
- debian-first-version.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,14 @@ kind: CronJob
metadata:
name: debian-cve-convert
spec:
schedule: "0 */1 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
activeDeadlineSeconds: 3600
template:
spec:
containers:
- name: debian-cve-convert
image: debian-cve-convert
imagePullPolicy: Always
env:
- name: GOOGLE_CLOUD_PROJECT
value: oss-vdb-test
- name: OUTPUT_GCS_BUCKET
value: osv-test-cve-osv-conversion
securityContext:
privileged: true
resources:
requests:
cpu: 1
memory: "1G"
limits:
cpu: 1
memory: "2G"
restartPolicy: OnFailure
volumes:
- name: "ssd"
hostPath:
path: "/mnt/disks/ssd0"
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
resources:
- ../../base
- debian-cve-convert.yaml
patches:
- path: workers.yaml
- path: scaler.yaml
- path: importer.yaml
- path: importer-deleter.yaml
- path: exporter.yaml
- path: alpine-cve-convert.yaml
- path: debian-cve-convert.yaml
- path: combine-to-osv.yaml
- path: debian-convert.yaml
- path: debian-first-version.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: debian-cve-convert
spec:
jobTemplate:
spec:
template:
spec:
containers:
- name: debian-cve-convert
env:
- name: GOOGLE_CLOUD_PROJECT
value: oss-vdb
- name: OUTPUT_GCS_BUCKET
value: cve-osv-conversion
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ patches:
- path: importer-deleter.yaml
- path: exporter.yaml
- path: alpine-cve-convert.yaml
- path: debian-cve-convert.yaml
- path: combine-to-osv.yaml
- path: debian-convert.yaml
- path: debian-first-version.yaml
Expand Down

0 comments on commit a65693b

Please sign in to comment.