A leader-only runnable checks every configured provider concurrently under one timeout per round (first round at start, then every interval), keeps the latest results for the metrics collector, logs targets going down, changing reason or coming back, and publishes one ProviderHealth object per provider: created with a managed-by label when missing, then a status merge patch. Per-target lastTransitionTime survives rounds in which ready does not flip. Objects of providers that are no longer configured are deleted once at start; with checks turned off, all are. Reads go through the API reader, so no cluster-wide informer is needed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
67 lines
835 B
YAML
67 lines
835 B
YAML
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
name: manager-role
|
|
rules:
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- pods
|
|
verbs:
|
|
- create
|
|
- delete
|
|
- get
|
|
- list
|
|
- watch
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- secrets
|
|
verbs:
|
|
- get
|
|
- list
|
|
- watch
|
|
- apiGroups:
|
|
- crawl.example.com
|
|
resources:
|
|
- providerhealths
|
|
verbs:
|
|
- create
|
|
- delete
|
|
- get
|
|
- list
|
|
- apiGroups:
|
|
- crawl.example.com
|
|
resources:
|
|
- providerhealths/status
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- apiGroups:
|
|
- crawl.example.com
|
|
resources:
|
|
- proxies
|
|
verbs:
|
|
- create
|
|
- delete
|
|
- get
|
|
- list
|
|
- patch
|
|
- update
|
|
- watch
|
|
- apiGroups:
|
|
- crawl.example.com
|
|
resources:
|
|
- proxies/finalizers
|
|
verbs:
|
|
- update
|
|
- apiGroups:
|
|
- crawl.example.com
|
|
resources:
|
|
- proxies/status
|
|
verbs:
|
|
- get
|
|
- patch
|
|
- update
|