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.
93 lines
2.9 KiB
YAML
93 lines
2.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: sirius-growth-blog
|
|
namespace: sirius-growth
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: sirius-growth-blog
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: sirius-growth-blog
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: forgejo-pull
|
|
tolerations:
|
|
- key: dedicated
|
|
operator: Exists
|
|
effect: PreferNoSchedule
|
|
nodeSelector:
|
|
kubernetes.io/hostname: siriussec
|
|
containers:
|
|
- name: blog
|
|
# Pinned by immutable tag. The blog is mounted at /journal by the
|
|
# site nginx, so it has no Service hostname of its own and no
|
|
# HTTPRoute - the marketing site proxies to this ClusterIP service.
|
|
image: forgejo.siriusdevops.com/sirius/sirius-growth-blog:4378680888a7d3976106533111003e2cb257a362
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- containerPort: 8092
|
|
name: http
|
|
env:
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-blog-app
|
|
key: database-url
|
|
- name: SESSION_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-blog-app
|
|
key: session-secret
|
|
- name: S3_ENDPOINT
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-blog-s3
|
|
key: endpoint
|
|
- name: S3_BUCKET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-blog-s3
|
|
key: bucket
|
|
- name: S3_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-blog-s3
|
|
key: access-key
|
|
- name: S3_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-blog-s3
|
|
key: secret-key
|
|
- name: S3_REGION
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: sirius-growth-blog-s3
|
|
key: region
|
|
# Every URL the service emits (canonical, RSS, sitemap, media,
|
|
# admin form actions) hangs off this; the mount is /journal.
|
|
- name: PUBLIC_BASE_URL
|
|
value: https://siriusgrowthsolutions.com/journal
|
|
- name: PORTAL_BASE_URL
|
|
value: https://siriusgrowthsolutions.com
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8092
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8092
|
|
initialDelaySeconds: 20
|
|
periodSeconds: 20
|
|
resources:
|
|
requests:
|
|
cpu: 50m
|
|
memory: 128Mi
|
|
limits:
|
|
memory: 384Mi
|