Forgejo 16 mints an anonymous ("ghost user") registry token on /v2/token and
grants it Read on every package regardless of repo visibility, so all 18 app
images were world-downloadable — including images of private repos
(siriusdevops-site, phs-site, sirius-growth-*, sgs-leadgen).
* FORGEJO__service__REQUIRE_SIGNIN_VIEW=true: /v2/token answers UNAUTHORIZED
to anonymous clients, anonymous manifests get 401. This is the documented
switch in routers/api/packages/container (Authenticate) and
services/context/package.go (determineAccessMode). Side effect: the Forgejo
web UI/API becomes login-only for anonymous visitors.
* imagePullSecrets: [forgejo-pull] on all 18 workloads that pull from the
registry (osint, piedmont, sirius-growth, siriusdevops). The
kubernetes.io/dockerconfigjson Secret is per-namespace and out of band
(never in git); docs/registry-pull-auth.md documents why, how to recreate
it, and the verification commands. No containerd-level credential.
60 lines
1.8 KiB
YAML
60 lines
1.8 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: osint-news-scraper
|
|
namespace: osint
|
|
labels:
|
|
app: osint-news-scraper
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: osint-news-scraper
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: osint-news-scraper
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: forgejo-pull
|
|
tolerations:
|
|
- key: dedicated
|
|
operator: Exists
|
|
effect: PreferNoSchedule
|
|
affinity:
|
|
nodeAffinity:
|
|
# Prefer the amd64 worker (linode) for these stateless CPU loops so
|
|
# they stop drawing on the 15 W-powered ThinkPad. Preferred, not
|
|
# required: if linode is absent they still schedule on siriussec.
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
preference:
|
|
matchExpressions:
|
|
- key: kubernetes.io/hostname
|
|
operator: In
|
|
values:
|
|
- linode
|
|
# keeps these off the arm64 rpi (some of these images are amd64-only)
|
|
nodeSelector:
|
|
kubernetes.io/arch: amd64
|
|
containers:
|
|
- name: news-scraper
|
|
image: forgejo.siriusdevops.com/sirius/osint-news-scraper:amd64-58f71f5b4520
|
|
imagePullPolicy: IfNotPresent
|
|
# Image ENTRYPOINT is `scrapy`; the loop crawls, sleeps, crawls again.
|
|
command: ["python", "run_news_scraper.py"]
|
|
envFrom:
|
|
- configMapRef:
|
|
name: osint-env
|
|
env:
|
|
- name: DB_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: osint-db
|
|
key: password
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
memory: 768Mi
|