Skip to content

Commit

Permalink
fix(scrutiny): use kruise advancedcronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
jfroy committed Aug 29, 2024
1 parent 0b0ae1b commit 73d9d03
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 193 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
apiVersion: apps.kruise.io/v1alpha1
kind: AdvancedCronJob
metadata:
name: scrutiny-collector
annotations:
kustomize.toolkit.fluxcd.io/force: enabled
spec:
schedule: "30 * * * *" # every hour on the half hour
template:
broadcastJobTemplate:
spec:
template:
spec:
containers:
- name: collector
image: ghcr.io/analogj/scrutiny:v0.8.1-collector@sha256:5f6536d68be2d7424627647cdd658e6b4c1f69751a21622fb97b999a3155ba86
imagePullPolicy: IfNotPresent
command:
- /opt/scrutiny/bin/scrutiny-collector-metrics
- run
env:
- name: COLLECTOR_API_ENDPOINT
value: http://scrutiny.observability.svc.cluster.local:8080
- name: COLLECTOR_HOST_ID
valueFrom:
fieldRef:
fieldPath: spec.nodeName
securityContext:
priviledged: true
runAsUser: 0
readOnlyRootFilesystem: true
volumeMounts:
- mountPath: /opt/scrutiny/config
name: config
- mountPath: /run/udev
name: udev
readOnly: true
- mountPath: /dev
name: dev
readOnly: true
restartPolicy: Never
volumes:
- name: config
emptyDir:
sizeLimit: 10Mi
- name: udev
hostPath:
path: /run/udev
- name: dev
hostPath:
path: /dev
completionPolicy:
type: Always
ttlSecondsAfterFinished: 30

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- ./advancedcronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
commonMetadata:
labels:
app.kubernetes.io/name: *app
dependsOn:
- name: openkruise
path: ./kubernetes/apps/observability-agents/scrutiny-collector/app
prune: true
sourceRef:
Expand Down

0 comments on commit 73d9d03

Please sign in to comment.