browsertrix/chart/templates/operators.yaml
Ilya Kreymer fa6627ce70
ensure QA configmap is updated for long running QA runs: (#1865)
- add a 'expire_at_duration_seconds' which is 75% of actual presign
duration time, or <25% remaining until presigned URL actually expires to
ensure presigned URLs are updated early than when they actually expire
- set cached expireAt time to the renew at time for more frequent
updates
- update QA configmap in place with updated presigned URLs when expireAt
time is reached
- mount qa config volume under /tmp/qa/ without subPath to get automatic
updates, which crawler will handle
- tests: fix qa test typo (from main)
- fixes #1864
2024-06-12 10:51:35 -07:00

143 lines
3.2 KiB
YAML

---
apiVersion: metacontroller.k8s.io/v1alpha1
kind: CompositeController
metadata:
name: crawljobs-operator
spec:
generateSelector: false
resyncPeriodSeconds: {{ .Values.operator_resync_seconds | default 10 }}
parentResource:
apiVersion: btrix.cloud/v1
resource: crawljobs
childResources:
- apiVersion: v1
resource: pods
updateStrategy:
method: OnDelete
- apiVersion: v1
resource: persistentvolumeclaims
updateStrategy:
method: InPlace
- apiVersion: v1
resource: configmaps
updateStrategy:
method: InPlace
hooks:
sync:
webhook:
service:
namespace: {{ .Release.Namespace }}
name: {{ .Values.name }}-backend
port: {{ .Values.opPort }}
path: /op/crawls/sync
finalize:
webhook:
service:
namespace: {{ .Release.Namespace }}
name: {{ .Values.name }}-backend
port: {{ .Values.opPort }}
path: /op/crawls/finalize
customize:
webhook:
service:
namespace: {{ .Release.Namespace }}
name: {{ .Values.name }}-backend
port: {{ .Values.opPort }}
path: /op/crawls/customize
---
apiVersion: metacontroller.k8s.io/v1alpha1
kind: CompositeController
metadata:
name: profilejobs-operator
spec:
generateSelector: false
resyncPeriodSeconds: 30
parentResource:
apiVersion: btrix.cloud/v1
resource: profilejobs
childResources:
- apiVersion: v1
resource: pods
updateStrategy:
method: InPlace
hooks:
sync:
webhook:
service:
namespace: {{ .Release.Namespace }}
name: {{ .Values.name }}-backend
port: {{ .Values.opPort }}
path: /op/profilebrowsers/sync
---
apiVersion: metacontroller.k8s.io/v1alpha1
kind: DecoratorController
metadata:
name: cron-crawljobs-operator
spec:
resyncPeriodSeconds: 30
resources:
- apiVersion: batch/v1
resource: jobs
labelSelector:
matchLabels:
role: scheduled-crawljob
attachments:
- apiVersion: btrix.cloud/v1
resource: crawljobs
updateStrategy:
method: InPlace
hooks:
sync:
webhook:
service:
namespace: {{ .Release.Namespace }}
name: {{ .Values.name }}-backend
port: {{ .Values.opPort }}
path: /op/cronjob/sync
customize:
webhook:
service:
namespace: {{ .Release.Namespace }}
name: {{ .Values.name }}-backend
port: {{ .Values.opPort }}
path: /op/cronjob/customize
---
apiVersion: metacontroller.k8s.io/v1alpha1
kind: DecoratorController
metadata:
name: background-job-operator
spec:
resyncPeriodSeconds: 30
resources:
- apiVersion: batch/v1
resource: jobs
labelSelector:
matchLabels:
role: background-job
hooks:
sync:
webhook:
service:
namespace: {{ .Release.Namespace }}
name: {{ .Values.name }}-backend
port: {{ .Values.opPort }}
path: /op/backgroundjob/sync
finalize:
webhook:
service:
namespace: {{ .Release.Namespace }}
name: {{ .Values.name }}-backend
port: {{ .Values.opPort }}
path: /op/backgroundjob/finalize