Skip to content

Commit

Permalink
fix: convert walkers to cron jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulf Lilleengen committed Sep 29, 2023
1 parent 516c53f commit b756c71
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 57 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
{{ if .Values.bombastic.walker.enable }}
apiVersion: apps/v1
kind: Deployment
apiVersion: batch/v1
kind: CronJob
metadata:
name: bombastic-walker
labels:
app.kubernetes.io/name: bombastic-walker
app.kubernetes.io/component: walker
app.kubernetes.io/part-of: trustification
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: bombastic-walker
app.kubernetes.io/component: walker
app.kubernetes.io/part-of: trustification
schedule: "0 1 * * *"
template:
metadata:
labels:
Expand All @@ -36,8 +31,6 @@ spec:
- "-3"
- "--signing-key"
- "{{ .Values.bombastic.walker.signingKey }}"
- "--scan-interval"
- "{{ .Values.bombastic.walker.interval }}"
- "--fix-licenses"
- "true"
env:
Expand Down
57 changes: 57 additions & 0 deletions deploy/k8s/chart/templates/vexination/walker/030-CronJob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{{ if .Values.vexination.walker.enable }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: vexination-walker
labels:
app.kubernetes.io/name: vexination-walker
app.kubernetes.io/component: walker
app.kubernetes.io/part-of: trustification
spec:
schedule: "0 1 * * *"
template:
metadata:
labels:
app.kubernetes.io/name: vexination-walker
app.kubernetes.io/component: walker
app.kubernetes.io/part-of: trustification
spec:
restartPolicy: Never
containers:
- image: {{ .Values.trustImage }}:{{ .Values.release }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
name: walker
command: ["/trust"]
args:
- "vexination"
- "walker"
- "--sink"
- "https://vex.{{ .Values.domain }}"
- "--source"
- "{{ .Values.vexination.walker.source }}"
- "-3"
env:
- name: RUST_LOG
value: info
- name: INFRASTRUCTURE_ENABLED
value: "true"
- name: INFRASTRUCTURE_BIND
value: "[::]:9010"
{{ include "trustification.authentication-client" ( dict "root" . "clientId" "walker" ) | nindent 12 }}
resources:
{{- toYaml .Values.vexination.walker.resources | nindent 12 }}
livenessProbe:
httpGet:
path: /health/live
port: 9010
initialDelaySeconds: 2
readinessProbe:
httpGet:
path: /health/ready
port: 9010
initialDelaySeconds: 2
startupProbe:
httpGet:
path: /health/startup
port: 9010
{{ end }}
45 changes: 0 additions & 45 deletions deploy/k8s/chart/templates/vexination/walker/030-Job.yaml

This file was deleted.

8 changes: 7 additions & 1 deletion deploy/trustification.dev/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ domain: trustification.dev
replicas: 2
imagePullPolicy: IfNotPresent
region: eu-west-1
enableWalkers: false
enableTests: true
createRoutes: true
enableMonitoring: true
Expand Down Expand Up @@ -94,7 +93,14 @@ vexination:
limits:
memory: "1Gi"
walker:
enable: true
source: https://www.redhat.com/.well-known/csaf/provider-metadata.json
resources:
requests:
cpu: "100m"
memory: "2Gi"
limits:
memory: "2Gi"
collectorist:
enabled: true
api:
Expand Down
8 changes: 7 additions & 1 deletion deploy/trustification.dev/staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ enableTests: true
createRoutes: true
enableMonitoring: true
enableDocs: true
enableWalkers: false
config:
enable: true
name: trustification-config
Expand Down Expand Up @@ -105,7 +104,14 @@ vexination:
limits:
memory: "1Gi"
walker:
enable: true
source: https://www.redhat.com/.well-known/csaf/provider-metadata.json
resources:
requests:
cpu: "100m"
memory: "2Gi"
limits:
memory: "2Gi"
collectorist:
enabled: true
api:
Expand Down

0 comments on commit b756c71

Please sign in to comment.