Compare commits

..

20 Commits

Author SHA1 Message Date
unkin-agent ac7db6f88a Point S3 consumers at s3.ceph.unkin.net
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful
2026-11-15 22:26:50 +11:00
unkin-agent 04f9d37a7f ceph-system: serve rgw over TLS on a PureLB IP (#584)
The in-cluster RGW only listens on plain HTTP via a ClusterIP, so S3 clients outside the cluster cannot reach it. TLS terminates in beast to avoid proxy body-size and timeout limits on large uploads.

- add a vault-issuer Certificate covering the existing radosgw SANs, rgw.k8s.syd1.au.unkin.net and 198.18.200.11
- mount the cert and enable beast ssl_port 7443, keeping 7480 for probes
- add rgw-external LoadBalancer on 198.18.200.11:443 with externalTrafficPolicy Local

Part of #582

Reviewed-on: #584
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-15 22:19:06 +11:00
unkin-agent 26e53ee35c ceph-system: run radosgw as a deployment (#583)
Part of #582. RGW runs on VMs (ausyd1nxvm2115-2119) and needs to move into k8s under GitOps; this adds the `ceph-system` namespace with an in-cluster RGW behind a ClusterIP service. Cutover comes later.

- add `ceph-system` app to the platform applicationset
- add ceph.conf configmap with a shared `client.rgw.syd1` section and explicit keyring path
- add rgw keyring from vault `kubernetes/namespace/ceph-system/default/rgw-keyring` (`keyring`)
- add 3-replica `quay.io/ceph/ceph:v18.2.8` radosgw deployment, non-root, read-only root, startup probe, hard per-node spread, PDB + VPA
- add ClusterIP service `rgw` on 7480

Requires unkin/terraform-artifactapi#78 merged first.

Reviewed-on: #583
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-15 21:51:59 +11:00
unkin-agent 166605d3f1 iuclabs-runners: trust Vault CA in runner pods (#581)
Workflows on the iuclabs-k8s scale set log into https://vault.service.consul:8200, which serves a cert from the internal unkin.net CA that the runner image does not trust, so vault-action and curl fail TLS verification.

- Mount the reflected `vault-ca-cert` Secret read-only at `/etc/vault-ca` in the runner container.
- Set `NODE_EXTRA_CA_CERTS=/etc/vault-ca/ca.crt` so Node actions (vault-action) trust it alongside public CAs.
- curl callers pass `--cacert /etc/vault-ca/ca.crt`; `SSL_CERT_FILE` stays untouched to keep public TLS working.

Reviewed-on: #581
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-14 22:02:55 +11:00
unkin-agent 283ccde24f Enable ARC metrics with VictoriaMetrics scrapes and dashboard (#580)
ARC runs with metrics disabled, so scale-set behaviour (assigned jobs, desired/idle runners, job startup time) and controller health are invisible.

- enable controller and listener metrics on :8080 via chart `metrics:` values
- add VMPodScrapes for the controller and listener pods in arc-system
- keep runner-namespace labels on listener/ephemeral-runner series so the dashboard filters match
- add the upstream ARC Autoscaling Runner Set dashboard (gha-runner-scale-set-0.15.1) resolved to VictoriaMetrics

Reviewed-on: #580
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-11 00:17:16 +11:00
unkin-agent fd3446ae8a Add ARC self-hosted runners for IUCLabs (#579)
IUCLabs public repos need self-hosted CI capacity, but anyone can open PRs there, so runners must only execute trusted code and must not reach internal services.

- deploy the ARC controller chart in arc-system, pulled through artifactapi
- keep shared runner resources (namespace, manager Role/RoleBinding, VSO secret, hooks) in the iuclabs-runners base
- package each scale set as a kustomize component (AutoscalingRunnerSet + its HTTPS/Vault egress policy), starting with iuclabs-k8s
- allow only push/dispatch/schedule/merge_group/release and trusted pull_request jobs via a job-started hook, tested in pre-commit
- default-deny the namespace and allow DNS

Depends on the github-app secret existing in Vault.

Reviewed-on: #579
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-10 23:27:40 +11:00
unkin-agent 19f7919851 puppet: bump compiler encapic to v0.4.0 (#578)
Keep the k8s puppetserver compilers on the current encapic release, matching the VM masters.

- Bump `ENCAPIC_VERSION` in the compiler initContainer from v0.1.0 to v0.4.0.

Reviewed-on: #578
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-08 22:14:48 +11:00
unkin-agent 7c4a01785b encapi: bump to v0.3.0 (#577)
Ships the encapi testing restore endpoint (restore a node from testing to its recorded previous environment).

- Bump encapi image pin v0.2.0 -> v0.3.0 in apps/base/encapi/deployment.yaml
- v0.3.0 adds migration 0002 (previous_environment column), applied by encapi on startup

Reviewed-on: #577
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-08 17:53:48 +11:00
unkin-agent 592b2ec9e2 Mount per-pod emptyDir for puppetdb logs (#576)
Both puppetdb replicas write logback logs to the same logs/ dir on the shared RWX PVC. Concurrent rollovers race on compression and leave orphaned .tmp files that maxHistory never removes, eventually filling the volume quota and failing /pdb/cmd/v1 with "Disk quota exceeded".

- mount a per-pod emptyDir (sizeLimit 512Mi) at /opt/puppetlabs/server/data/puppetdb/logs

Reviewed-on: #576
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-08 17:53:23 +11:00
unkin-agent dadada0274 Bump artifactapi to v3.25.2 (#575)
v3.25.2 preserves repo_type on remote update (with a repair migration), fixing 404s on virtual repo redirects, and lets registry /v2/token accept OAuth2 POST form credentials, fixing 401s on buildkit/helm OCI pushes.

- bump artifactapi API image to v3.25.2
- bump artifactapi-ui image to v3.25.2
- bump image-keeper api and ui images to v3.25.2

Reviewed-on: #575
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-08 11:56:51 +11:00
unkin-agent a4efca8ee5 Require tokens for artifactapi uploads (#574)
Woodpecker uploaders now mint Vault OIDC tokens, so anonymous local-repo writes can be rejected.

- set `ARTIFACTAPI_AUTH_UPLOADS: "true"` in the artifactapi `api-env` configmap

Merge after unkin/vault-plugin-secrets-litellm#6.

Reviewed-on: #574
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-26 20:33:29 +11:00
unkin-agent 0552be6028 Bump artifactapi to v3.25.0 (#573)
Artifactapi v3.25.0 adds github_rpm cache_repodata toggle and general fixes.

- Bump artifactapi and artifactapi-ui images to v3.25.0

Reviewed-on: #573
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-25 23:45:54 +11:00
unkin-agent 4b5d14cf52 Bump artifactapi to v3.24.0 (#572)
Pull in artifactapi v3.24.0 images (per-remote sync_interval and GitHub sync spreading).

- Update artifactapi image from v3.23.0 to v3.24.0
- Update artifactapi-ui image from v3.23.0 to v3.24.0

Reviewed-on: #572
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-25 20:25:21 +11:00
unkin-agent ec35ef9830 bump artifactapi to v3.23.0 (#571)
v3.23.0 adds virtual alpine repositories and drops local files and metadata when a repo is deleted.

- pin api, ui and image-keeper to v3.23.0

Reviewed-on: #571
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-24 20:40:34 +11:00
unkin-agent bb0cc51e0a bump artifactapi to v3.22.0 (#570)
v3.22.0 adds the vcs remote type for git provider source archives and release assets.

- pin api, ui and image-keeper to v3.22.0

Reviewed-on: #570
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-24 17:28:37 +11:00
unkin-agent bcde44ffab bind-resolvers: RBL zones as BindZones (#569)
bind-operator v0.4.0 renders a forward BindZone without forwarders as `forwarders { };`, so the RBL direct-resolution zones no longer need raw zone clauses in the openforwarder view extraOptions.

- add rbl-zones.yaml with one forwarder-less forward BindZone per RBL domain
- remove the raw RBL zone lines from the openforwarder view

Reviewed-on: #569
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-24 17:06:09 +11:00
unkin-agent 90600e3840 bump artifactapi to v3.21.0 (#568)
v3.21.0 adds virtual deb repositories.

- pin api, ui and image-keeper to v3.21.0

Reviewed-on: #568
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-24 16:41:34 +11:00
unkin-agent 2dad204428 Deploy encapi v0.2.0 with Vault OIDC (#567)
encapi v0.2.0 authenticates writes with Vault identity OIDC tokens; it must validate the issuer, which is served with the internal Vault CA.

- bump encapi image to v0.2.0
- set ENCAPI_OIDC_ISSUER to the Vault identity OIDC issuer
- trust the Vault CA via a combined bundle and SSL_CERT_FILE, matching artifactapi

Reviewed-on: #567
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-23 23:02:00 +11:00
unkin-agent f4cd6160ab Raise puppet-postgres memory (#566)
The puppet-postgres primary is repeatedly OOMKilled at its 512Mi limit, causing repeated failovers; one left a replica diverged and serving stale PuppetDB reads.

- raise memory request 256Mi -> 1Gi and limit 512Mi -> 2Gi
- raise shared_buffers 128MB -> 256MB
- raise effective_cache_size 256MB -> 1GB

Reviewed-on: #566
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-23 21:25:31 +11:00
unkin-agent 45aa23942f bump artifactapi to v3.20.0 (#565)
v3.20.0 adds virtual puppet repositories and filtered remote Forge release listings.

- pin api, ui and image-keeper to v3.20.0

Reviewed-on: #565
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-20 22:25:18 +11:00
79 changed files with 1029 additions and 312 deletions
+6
View File
@@ -42,3 +42,9 @@ repos:
entry: ci/validate-no-secrets.sh
language: system
pass_filenames: false
- id: runner_hooks
name: test arc runner job-started hook
entry: ci/test-runner-hooks.sh
language: system
pass_filenames: false
files: ^(apps/base/iuclabs-runners/job-started\.sh|ci/test-runner-hooks\.sh|ci/fixtures/runner-hooks/)
@@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- a
- mx
- txt
- cname
- namespace.yaml
- pdb.yaml
- vmpodscrape.yaml
+5
View File
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: arc-system
+12
View File
@@ -0,0 +1,12 @@
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: arc-controller
namespace: arc-system
spec:
minAvailable: 1
selector:
matchLabels:
app.kubernetes.io/name: gha-rs-controller
app.kubernetes.io/instance: arc
+40
View File
@@ -0,0 +1,40 @@
---
# Controller metrics. gha_controller_*_ephemeral_runners carry the runner
# namespace, which the dashboard filters on, so restore it over the target's.
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
name: arc-controller
namespace: arc-system
spec:
selector:
matchLabels:
app.kubernetes.io/name: gha-rs-controller
app.kubernetes.io/instance: arc
podMetricsEndpoints:
- port: metrics
path: /metrics
metricRelabelConfigs:
- sourceLabels: [__name__, exported_namespace]
regex: gha_controller_.+_ephemeral_runners;(.+)
targetLabel: namespace
---
# Listener metrics carry their own name/namespace (the runner scale set), and
# the dashboard also expects the scale-set pod labels.
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMPodScrape
metadata:
name: arc-listener
namespace: arc-system
spec:
selector:
matchLabels:
app.kubernetes.io/component: runner-scale-set-listener
app.kubernetes.io/part-of: gha-runner-scale-set
podMetricsEndpoints:
- port: metrics
path: /metrics
honorLabels: true
relabelConfigs:
- action: labelmap
regex: __meta_kubernetes_pod_label_(actions_github_com_scale_set_.+)
+1 -1
View File
@@ -36,7 +36,7 @@ spec:
mountPath: /combined-certs
containers:
- name: api
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/artifactapi:v3.19.0
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/artifactapi:v3.25.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8000
+2 -1
View File
@@ -5,6 +5,7 @@ metadata:
name: api-env
namespace: artifactapi
data:
ARTIFACTAPI_AUTH_UPLOADS: "true"
ARTIFACTAPI_OIDC_AUDIENCE: artifactapi
ARTIFACTAPI_OIDC_ISSUER: https://vault.service.consul:8200/v1/identity/oidc
DBHOST: postgres-pooler
@@ -12,7 +13,7 @@ data:
DBPORT: "5432"
DBUSER: artifacts
MINIO_BUCKET: artifactapi-prod-k8s-syd1-au
MINIO_ENDPOINT: radosgw.service.consul
MINIO_ENDPOINT: s3.ceph.unkin.net
MINIO_SECURE: "true"
REDIS_URL: redis://redis:6379
SSL_CERT_FILE: /etc/ssl/combined/ca-certificates.crt
+2 -2
View File
@@ -49,7 +49,7 @@ spec:
capabilities:
drop: ["ALL"]
- name: api
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/artifactapi:v3.19.0
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/artifactapi:v3.25.2
imagePullPolicy: IfNotPresent
command: ["/keeper/true"]
volumeMounts:
@@ -69,7 +69,7 @@ spec:
capabilities:
drop: ["ALL"]
- name: ui
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/artifactapi-ui:v3.19.0
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/artifactapi-ui:v3.25.2
imagePullPolicy: IfNotPresent
command: ["true"]
resources:
+1 -1
View File
@@ -22,7 +22,7 @@ spec:
automountServiceAccountToken: true
containers:
- name: ui
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/artifactapi-ui:v3.19.0
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/artifactapi-ui:v3.25.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: edge-mta1-a
namespace: bind-external
spec:
zoneRef: edge-unkin-net
name: "mta1"
type: A
ttl: 3600
values:
- 66.226.148.207
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: edge-mta2-a
namespace: bind-external
spec:
zoneRef: edge-unkin-net
name: "mta2"
type: A
ttl: 3600
values:
- 66.226.149.50
@@ -1,6 +0,0 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- a
@@ -8,6 +8,4 @@ resources:
- tsigkey.yaml
- zones.yaml
- acme-unkin-net
- main-unkin-net
- edge-unkin-net
- agent-dns-rolebinding.yaml
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-mail-in-a
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "mail-in"
type: A
ttl: 3600
values:
- 103.216.191.185
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-acme-challenge-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "_acme-challenge"
type: CNAME
ttl: 3600
values:
- _acme-challenge.main.acme.unkin.net.
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-au-syd1-pve-api-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "au-syd1-pve-api"
type: CNAME
ttl: 3600
values:
- lb1.unkin.net.
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-au-syd1-pve-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "au-syd1-pve"
type: CNAME
ttl: 3600
values:
- lb1.unkin.net.
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-grafana-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "grafana"
type: CNAME
ttl: 3600
values:
- lb1.unkin.net.
@@ -1,15 +0,0 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- acme-challenge.yaml
- au-syd1-pve.yaml
- au-syd1-pve-api.yaml
- grafana.yaml
- lidarr.yaml
- nzbget.yaml
- prowlarr.yaml
- radarr.yaml
- readarr.yaml
- sonarr.yaml
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-lidarr-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "lidarr"
type: CNAME
ttl: 3600
values:
- lb1.unkin.net.
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-nzbget-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "nzbget"
type: CNAME
ttl: 3600
values:
- lb1.unkin.net.
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-prowlarr-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "prowlarr"
type: CNAME
ttl: 3600
values:
- lb1.unkin.net.
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-radarr-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "radarr"
type: CNAME
ttl: 3600
values:
- lb1.unkin.net.
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-readarr-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "readarr"
type: CNAME
ttl: 3600
values:
- lb1.unkin.net.
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-sonarr-cname
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "sonarr"
type: CNAME
ttl: 3600
values:
- lb1.unkin.net.
@@ -1,14 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-apex-mx
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "@"
type: MX
ttl: 3600
values:
- "10 mta1.edge.unkin.net."
- "20 mta2.edge.unkin.net."
@@ -1,6 +0,0 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- apex.yaml
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-apex-txt
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "@"
type: TXT
ttl: 3600
values:
- '"v=spf1 ip4:66.226.148.207 ip4:66.226.149.50 -all"'
@@ -1,13 +0,0 @@
---
apiVersion: bind.unkin.net/v1alpha1
kind: DNSRecord
metadata:
name: main-dmarc-txt
namespace: bind-external
spec:
zoneRef: main-unkin-net
name: "_dmarc"
type: TXT
ttl: 3600
values:
- '"v=DMARC1; p=none; rua=mailto:dmarc@unkin.net; adkim=r; aspf=r"'
@@ -1,7 +0,0 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- apex.yaml
- dmarc.yaml
-36
View File
@@ -28,39 +28,3 @@ spec:
type: A
ttl: 3600
values: ["103.216.191.185"]
---
# Public mail zones, delegated from Google Cloud DNS to acme-ns1.unkin.net like
# acme.unkin.net. DNSRecords are applied with the zone's update key.
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: main-unkin-net
namespace: bind-external
spec:
clusterRef: bind-external
zoneName: main.unkin.net
type: primary
defaultTTL: 3600
dynamicUpdate: true
updateKeyRef: certmanager
allowTransfer:
- key certmanager
nameservers:
- acme-ns1.unkin.net.
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: edge-unkin-net
namespace: bind-external
spec:
clusterRef: bind-external
zoneName: edge.unkin.net
type: primary
defaultTTL: 3600
dynamicUpdate: true
updateKeyRef: certmanager
allowTransfer:
- key certmanager
nameservers:
- acme-ns1.unkin.net.
@@ -7,3 +7,4 @@ resources:
- acls.yaml
- view.yaml
- forward-zones.yaml
- rbl-zones.yaml
@@ -0,0 +1,121 @@
# DNSBLs refuse queries relayed via public resolvers, so these zones resolve directly.
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-spamhaus-org
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: spamhaus.org
type: forward
catalog: false
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-mailspike-net
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: mailspike.net
type: forward
catalog: false
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-spameatingmonkey-net
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: spameatingmonkey.net
type: forward
catalog: false
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-dnswl-org
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: dnswl.org
type: forward
catalog: false
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-virusfree-cz
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: virusfree.cz
type: forward
catalog: false
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-blocklist-de
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: blocklist.de
type: forward
catalog: false
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-msbl-org
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: msbl.org
type: forward
catalog: false
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-surbl-org
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: surbl.org
type: forward
catalog: false
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-uribl-com
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: uribl.com
type: forward
catalog: false
---
apiVersion: bind.unkin.net/v1alpha1
kind: BindZone
metadata:
name: rbl-rspamd-com
namespace: bind-internal
spec:
clusterRef: bind-resolvers
viewRef: openforwarder
zoneName: rspamd.com
type: forward
catalog: false
@@ -23,14 +23,3 @@ spec:
- "allow-query-cache { any; }"
# pods have no IPv6 route; v6 NS attempts burn the recursion-query budget
- "server ::/0 { bogus yes; }"
# RBL zones resolve directly: DNSBLs refuse queries relayed via public resolvers.
- 'zone "spamhaus.org" { type forward; forwarders { }; }'
- 'zone "mailspike.net" { type forward; forwarders { }; }'
- 'zone "spameatingmonkey.net" { type forward; forwarders { }; }'
- 'zone "dnswl.org" { type forward; forwarders { }; }'
- 'zone "virusfree.cz" { type forward; forwarders { }; }'
- 'zone "blocklist.de" { type forward; forwarders { }; }'
- 'zone "msbl.org" { type forward; forwarders { }; }'
- 'zone "surbl.org" { type forward; forwarders { }; }'
- 'zone "uribl.com" { type forward; forwarders { }; }'
- 'zone "rspamd.com" { type forward; forwarders { }; }'
+26
View File
@@ -0,0 +1,26 @@
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: rgw-tls
namespace: ceph-system
labels:
app.kubernetes.io/name: rgw
spec:
secretName: rgw-tls
issuerRef:
kind: ClusterIssuer
name: vault-issuer
commonName: s3.ceph.unkin.net
dnsNames:
- s3.ceph.unkin.net
- rgw.k8s.syd1.au.unkin.net
- radosgw.service.consul
- radosgw.query.consul
- radosgw.service.au-syd1.consul
- radosgw.main.unkin.net
ipAddresses:
- 198.18.200.11
privateKey:
algorithm: RSA
size: 4096
+26
View File
@@ -0,0 +1,26 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: ceph-conf
namespace: ceph-system
data:
ceph.conf: |
[global]
fsid = de96a98f-3d23-465a-a899-86d3d67edab8
mon_host = 198.18.23.9,198.18.23.10,198.18.23.11,198.18.23.12,198.18.23.13
auth_client_required = cephx
auth_cluster_required = cephx
auth_service_required = cephx
ms_bind_ipv4 = true
ms_bind_ipv6 = false
[client.rgw.syd1]
rgw_realm = unkin
rgw_zonegroup = au
rgw_zone = syd1
rgw_frontends = beast port=7480 ssl_port=7443 ssl_certificate=/etc/rgw/tls/tls.crt ssl_private_key=/etc/rgw/tls/tls.key
keyring = /var/lib/ceph/radosgw/ceph-rgw.syd1/keyring
log_to_file = false
log_to_stderr = true
err_to_stderr = true
+133
View File
@@ -0,0 +1,133 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: rgw
namespace: ceph-system
labels:
app.kubernetes.io/name: rgw
app.kubernetes.io/component: rgw
app.kubernetes.io/version: v18.2.8
annotations:
reloader.stakater.com/auto: "true"
spec:
replicas: 3
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 0
selector:
matchLabels:
app.kubernetes.io/name: rgw
template:
metadata:
labels:
app.kubernetes.io/name: rgw
app.kubernetes.io/component: rgw
spec:
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 167
runAsGroup: 167
fsGroup: 167
seccompProfile:
type: RuntimeDefault
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
app.kubernetes.io/name: rgw
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: rgw
containers:
- name: rgw
image: quay.io/ceph/ceph:v18.2.8
imagePullPolicy: IfNotPresent
command:
- radosgw
- -f
- --cluster
- ceph
- --name
- client.rgw.syd1
ports:
- name: http
containerPort: 7480
- name: https
containerPort: 7443
startupProbe:
httpGet:
path: /
port: http
periodSeconds: 5
failureThreshold: 30
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /
port: http
periodSeconds: 20
failureThreshold: 6
resources:
requests:
cpu: "1"
memory: 2Gi
limits:
cpu: "2"
memory: 4Gi
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
volumeMounts:
- name: ceph-conf
mountPath: /etc/ceph
readOnly: true
- name: tls
mountPath: /etc/rgw/tls
readOnly: true
- name: keyring
mountPath: /var/lib/ceph/radosgw/ceph-rgw.syd1
readOnly: true
- name: run
mountPath: /var/run/ceph
- name: log
mountPath: /var/log/ceph
- name: tmp
mountPath: /tmp
volumes:
- name: ceph-conf
configMap:
name: ceph-conf
- name: tls
secret:
secretName: rgw-tls
- name: keyring
secret:
secretName: rgw-keyring
items:
- key: keyring
path: keyring
- name: run
emptyDir: {}
- name: log
emptyDir: {}
- name: tmp
emptyDir: {}
+15
View File
@@ -0,0 +1,15 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- configmap.yaml
- vaultauth.yaml
- vaultstaticsecret.yaml
- deployment.yaml
- service.yaml
- service-external.yaml
- certificate.yaml
- pdb.yaml
- vpa.yaml
+5
View File
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: ceph-system
+11
View File
@@ -0,0 +1,11 @@
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: rgw
namespace: ceph-system
spec:
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/name: rgw
@@ -0,0 +1,21 @@
---
apiVersion: v1
kind: Service
metadata:
name: rgw-external
namespace: ceph-system
labels:
app.kubernetes.io/name: rgw
annotations:
purelb.io/service-group: common
purelb.io/addresses: 198.18.200.11
external-dns.alpha.kubernetes.io/hostname: rgw.k8s.syd1.au.unkin.net
spec:
type: LoadBalancer
externalTrafficPolicy: Local
selector:
app.kubernetes.io/name: rgw
ports:
- name: https
port: 443
targetPort: https
+16
View File
@@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
name: rgw
namespace: ceph-system
labels:
app.kubernetes.io/name: rgw
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: rgw
ports:
- name: http
port: 7480
targetPort: http
+18
View File
@@ -0,0 +1,18 @@
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultAuth
metadata:
name: default
namespace: ceph-system
spec:
method: kubernetes
mount: k8s/au/syd1
vaultConnectionRef: vso-system/default
allowedNamespaces:
- ceph-system
kubernetes:
role: default
serviceAccount: default
audiences:
- vault
tokenExpirationSeconds: 600
@@ -0,0 +1,18 @@
---
# Seed kv/kubernetes/namespace/ceph-system/default/rgw-keyring field `keyring` with the client.rgw.syd1 keyring.
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultStaticSecret
metadata:
name: rgw-keyring
namespace: ceph-system
spec:
vaultAuthRef: default
mount: kv
type: kv-v2
path: kubernetes/namespace/ceph-system/default/rgw-keyring
refreshAfter: 5m
hmacSecretData: true
destination:
name: rgw-keyring
create: true
overwrite: true
+13
View File
@@ -0,0 +1,13 @@
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: rgw-vpa
namespace: ceph-system
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: rgw
updatePolicy:
updateMode: "Off"
+2
View File
@@ -11,3 +11,5 @@ data:
DBPORT: "5432"
DBUSER: encapi
DBSSL: require
ENCAPI_OIDC_ISSUER: https://vault.service.consul:8200/v1/identity/oidc
SSL_CERT_FILE: /etc/ssl/combined/ca-certificates.crt
+28 -1
View File
@@ -6,6 +6,7 @@ metadata:
namespace: encapi
annotations:
configmap.reloader.stakater.com/auto: "true"
secret.reloader.stakater.com/reload: "vault-ca-cert"
spec:
replicas: 2
selector:
@@ -21,9 +22,22 @@ spec:
app: encapi
spec:
automountServiceAccountToken: true
initContainers:
- name: combine-certs
image: alpine:3
command:
- sh
- -c
- cat /etc/ssl/certs/ca-certificates.crt /custom-ca/ca.crt > /combined-certs/ca-certificates.crt
volumeMounts:
- name: vault-ca-cert
mountPath: /custom-ca
readOnly: true
- name: combined-certs
mountPath: /combined-certs
containers:
- name: encapi
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/encapi:v0.1.2
image: artifactapi.k8s.syd1.au.unkin.net/docker-internal/encapi:v0.3.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8000
@@ -38,6 +52,10 @@ spec:
- secretRef:
name: environment
optional: false
volumeMounts:
- name: combined-certs
mountPath: /etc/ssl/combined
readOnly: true
livenessProbe:
httpGet:
path: /healthz
@@ -61,4 +79,13 @@ spec:
limits:
cpu: 500m
memory: 256Mi
volumes:
- name: vault-ca-cert
secret:
secretName: vault-ca-cert
items:
- key: ca.crt
path: ca.crt
- name: combined-certs
emptyDir: {}
restartPolicy: Always
File diff suppressed because one or more lines are too long
+1
View File
@@ -30,3 +30,4 @@ resources:
- dashboards/victoriametrics-cluster.yaml
- dashboards/victoriametrics-vmagent.yaml
- dashboards/cloudnativepg.yaml
- dashboards/arc-runner-scale-set.yaml
@@ -0,0 +1,7 @@
---
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- scaleset.yaml
- networkpolicy.yaml
@@ -0,0 +1,45 @@
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: egress-iuclabs-k8s
namespace: iuclabs-runners
spec:
podSelector:
matchLabels:
runners.unkin.net/scale-set: iuclabs-k8s
policyTypes:
- Egress
egress:
- to:
- ipBlock:
cidr: 0.0.0.0/0
except:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 198.18.0.0/15
- 0.0.0.0/8
- 100.64.0.0/10
- 127.0.0.0/8
- 169.254.0.0/16
- 224.0.0.0/4
- 240.0.0.0/4
ports:
- protocol: TCP
port: 443
# vault.service.consul servers, from `dig vault.service.consul`
- to:
- ipBlock:
cidr: 198.18.25.78/32
- ipBlock:
cidr: 198.18.26.197/32
- ipBlock:
cidr: 198.18.27.116/32
- ipBlock:
cidr: 198.18.28.248/32
- ipBlock:
cidr: 198.18.29.92/32
ports:
- protocol: TCP
port: 8200
@@ -0,0 +1,74 @@
---
apiVersion: actions.github.com/v1alpha1
kind: AutoscalingRunnerSet
metadata:
name: iuclabs-k8s
namespace: iuclabs-runners
labels:
app.kubernetes.io/version: "0.15.1"
annotations:
actions.github.com/cleanup-manager-role-name: arc-manager
actions.github.com/cleanup-manager-role-binding: arc-manager
spec:
githubConfigUrl: https://github.com/IUCLabs
githubConfigSecret: github-app
runnerScaleSetName: iuclabs-k8s
minRunners: 0
maxRunners: 4
template:
metadata:
labels:
runners.unkin.net/scale-set: iuclabs-k8s
spec:
serviceAccountName: runner
automountServiceAccountToken: false
restartPolicy: Never
securityContext:
runAsNonRoot: true
runAsUser: 1001
runAsGroup: 1001
seccompProfile:
type: RuntimeDefault
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
runners.unkin.net/scale-set: iuclabs-k8s
containers:
- name: runner
image: ghcr.io/actions/actions-runner:2.338.2
command: ["/home/runner/run.sh"]
env:
- name: ACTIONS_RUNNER_HOOK_JOB_STARTED
value: /hooks/job-started.sh
- name: NODE_EXTRA_CA_CERTS
value: /etc/vault-ca/ca.crt
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
resources:
requests:
cpu: 1
memory: 512Mi
limits:
cpu: 2
memory: 2Gi
volumeMounts:
- name: hooks
mountPath: /hooks
readOnly: true
- name: vault-ca-cert
mountPath: /etc/vault-ca
readOnly: true
volumes:
- name: hooks
configMap:
name: runner-hooks
defaultMode: 0555
- name: vault-ca-cert
secret:
secretName: vault-ca-cert
+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
set -eu
event="${GITHUB_EVENT_NAME:-}"
refuse() {
echo "job-started hook: refusing '${event}' job: $1" >&2
exit 1
}
[ -r "${GITHUB_EVENT_PATH:-}" ] || refuse "event payload missing"
jq -e 'type == "object"' "${GITHUB_EVENT_PATH}" >/dev/null 2>&1 || refuse "event payload unparseable"
case "${event}" in
push | workflow_dispatch | schedule | merge_group | release) ;;
pull_request)
trusted=$(jq -r '
.pull_request.head.repo.full_name as $head
| if $head == null then false
elif $head == .repository.full_name then true
else (.pull_request.author_association | IN("OWNER", "MEMBER", "COLLABORATOR"))
end' "${GITHUB_EVENT_PATH}") || refuse "event payload unreadable"
[ "${trusted}" = true ] || refuse "pull request from untrusted fork"
;;
*) refuse "event not allowed on self-hosted runners" ;;
esac
@@ -0,0 +1,22 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- vaultauth.yaml
- vaultstaticsecret.yaml
- networkpolicy.yaml
- rbac.yaml
components:
- components/iuclabs-k8s
generatorOptions:
disableNameSuffixHash: true
configMapGenerator:
- name: runner-hooks
namespace: iuclabs-runners
files:
- job-started.sh
+5
View File
@@ -0,0 +1,5 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: iuclabs-runners
@@ -0,0 +1,34 @@
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: iuclabs-runners
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-dns
namespace: iuclabs-runners
spec:
podSelector: {}
policyTypes:
- Egress
egress:
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
+44
View File
@@ -0,0 +1,44 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: runner
namespace: iuclabs-runners
automountServiceAccountToken: false
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: arc-manager
namespace: iuclabs-runners
finalizers:
- actions.github.com/cleanup-protection
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["create", "delete", "get"]
- apiGroups: [""]
resources: ["pods/status"]
verbs: ["get"]
- apiGroups: [""]
resources: ["secrets", "serviceaccounts"]
verbs: ["create", "delete", "get", "list", "patch", "update"]
- apiGroups: ["rbac.authorization.k8s.io"]
resources: ["roles", "rolebindings"]
verbs: ["create", "delete", "get", "patch", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: arc-manager
namespace: iuclabs-runners
finalizers:
- actions.github.com/cleanup-protection
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: arc-manager
subjects:
- kind: ServiceAccount
name: arc-gha-rs-controller
namespace: arc-system
+18
View File
@@ -0,0 +1,18 @@
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultAuth
metadata:
name: default
namespace: iuclabs-runners
spec:
allowedNamespaces:
- iuclabs-runners
kubernetes:
audiences:
- vault
role: default
serviceAccount: default
tokenExpirationSeconds: 600
method: kubernetes
mount: k8s/au/syd1
vaultConnectionRef: vso-system/default
@@ -0,0 +1,17 @@
---
apiVersion: secrets.hashicorp.com/v1beta1
kind: VaultStaticSecret
metadata:
name: github-app
namespace: iuclabs-runners
spec:
destination:
create: true
name: github-app
overwrite: true
hmacSecretData: true
mount: kv
path: kubernetes/namespace/iuclabs-runners/default/github-app
refreshAfter: 5m
type: kv-v2
vaultAuthRef: default
+1 -1
View File
@@ -55,7 +55,7 @@ spec:
- name: PAPERCLIP_STORAGE_S3_REGION
value: us-east-1
- name: PAPERCLIP_STORAGE_S3_ENDPOINT
value: https://radosgw.service.consul
value: https://s3.ceph.unkin.net
- name: PAPERCLIP_STORAGE_S3_FORCE_PATH_STYLE
value: "true"
- name: NODE_EXTRA_CA_CERTS
+4 -4
View File
@@ -85,7 +85,7 @@ spec:
archive_mode: "on"
archive_timeout: 5min
dynamic_shared_memory_type: posix
effective_cache_size: 256MB
effective_cache_size: 1GB
full_page_writes: "on"
log_destination: csvlog
log_directory: /controller/log
@@ -98,7 +98,7 @@ spec:
max_parallel_workers: "16"
max_replication_slots: "16"
max_worker_processes: "16"
shared_buffers: 128MB
shared_buffers: 256MB
shared_memory_type: mmap
ssl_max_protocol_version: TLSv1.3
ssl_min_protocol_version: TLSv1.3
@@ -127,10 +127,10 @@ spec:
resources:
limits:
cpu: 500m
memory: 512Mi
memory: 2Gi
requests:
cpu: 50m
memory: 256Mi
memory: 1Gi
smartShutdownTimeout: 180
startDelay: 3600
stopDelay: 1800
@@ -93,6 +93,8 @@ spec:
- mountPath: /opt/puppetlabs/server/data/puppetdb/stockpile
name: puppetdb-storage
subPathExpr: stockpile/$(POD_NAME)
- mountPath: /opt/puppetlabs/server/data/puppetdb/logs
name: puppetdb-logs
- mountPath: /etc/puppetlabs/puppetdb/conf.d/read-database.conf
name: puppetdb-read-database-conf
subPath: read-database.conf
@@ -191,6 +193,9 @@ spec:
- name: puppetdb-storage
persistentVolumeClaim:
claimName: puppetserver-puppetdb-claim
- name: puppetdb-logs
emptyDir:
sizeLimit: 512Mi
- name: puppetdb-read-database-conf
configMap:
name: puppetdb-read-database-conf
@@ -202,7 +202,7 @@ spec:
# Install the encapic ENC client (stdlib-only Go binary) to the shared
# bin volume. It replaces the uv/python ENC script, whose
# first-invocation dependency resolution failed on fresh compiler pods.
ENCAPIC_VERSION=v0.1.0
ENCAPIC_VERSION=v0.4.0
BASE=https://git.unkin.net/unkin/encapic/releases/download/$ENCAPIC_VERSION
cd /tmp
curl -fsSL -o encapic "$BASE/encapic_linux_amd64"
@@ -0,0 +1,15 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../base/arc-system
helmCharts:
- name: gha-runner-scale-set-controller
repo: oci://artifactapi.k8s.syd1.au.unkin.net/ghcr/actions/actions-runner-controller-charts
version: "0.15.1"
releaseName: arc
namespace: arc-system
valuesFile: values.yaml
includeCRDs: true
@@ -0,0 +1,39 @@
---
replicaCount: 2
podSecurityContext:
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app.kubernetes.io/name: gha-rs-controller
app.kubernetes.io/instance: arc
flags:
logLevel: info
logFormat: json
metrics:
controllerManagerAddr: ":8080"
listenerAddr: ":8080"
listenerEndpoint: "/metrics"
+1 -1
View File
@@ -50,7 +50,7 @@ global:
- name: AUTHENTIK_STORAGE__BACKEND
value: s3
- name: AUTHENTIK_STORAGE__S3__ENDPOINT
value: https://radosgw.service.consul/
value: https://s3.ceph.unkin.net/
- name: AUTHENTIK_STORAGE__S3__BUCKET_NAME
value: authentik
- name: AUTHENTIK_STORAGE__S3__ADDRESSING_STYLE
@@ -3,5 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- mta1.yaml
- mta2.yaml
- ../../../base/ceph-system
@@ -3,4 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- mail-in.yaml
- ../../../base/iuclabs-runners
+3
View File
@@ -16,9 +16,11 @@ spec:
- path: apps/overlays/*/bind-internal
- path: apps/overlays/*/bind-external
- path: apps/overlays/*/age-api
- path: apps/overlays/*/arc-system
- path: apps/overlays/*/cattle-system
- path: apps/overlays/*/cert-manager
- path: apps/overlays/*/certificates
- path: apps/overlays/*/ceph-system
- path: apps/overlays/*/cephrgw-system
- path: apps/overlays/*/cnpg-system
- path: apps/overlays/*/consul
@@ -31,6 +33,7 @@ spec:
- path: apps/overlays/*/grafana-system
- path: apps/overlays/*/haproxy
- path: apps/overlays/*/inteldeviceplugins-system
- path: apps/overlays/*/iuclabs-runners
- path: apps/overlays/*/jfrog
- path: apps/overlays/*/k8up-system
- path: apps/overlays/*/kanidm
+3
View File
@@ -14,6 +14,7 @@ spec:
- oci://ghcr.io/woodpecker-ci/helm/woodpecker
- oci://ghcr.io/netbox-community/netbox-chart/netbox
- oci://docker.gitea.com/charts
- oci://artifactapi.k8s.syd1.au.unkin.net/ghcr/actions/actions-runner-controller-charts/gha-runner-scale-set-controller
destinations:
- namespace: '*-system'
server: https://kubernetes.default.svc
@@ -45,6 +46,8 @@ spec:
server: https://kubernetes.default.svc
- namespace: 'haproxy'
server: https://kubernetes.default.svc
- namespace: 'iuclabs-runners'
server: https://kubernetes.default.svc
- namespace: 'jfrog'
server: https://kubernetes.default.svc
- namespace: 'kanidm'
+1
View File
@@ -0,0 +1 @@
not json {
@@ -0,0 +1,11 @@
{
"comment": {
"author_association": "NONE"
},
"issue": {
"number": 1
},
"repository": {
"full_name": "IUCLabs/app"
}
}
@@ -0,0 +1,11 @@
{
"pull_request": {
"author_association": "MEMBER",
"head": {
"repo": null
}
},
"repository": {
"full_name": "IUCLabs/app"
}
}
@@ -0,0 +1,14 @@
{
"pull_request": {
"author_association": "NONE",
"head": {
"repo": {
"fork": true,
"full_name": "evil/app"
}
}
},
"repository": {
"full_name": "IUCLabs/app"
}
}
@@ -0,0 +1,14 @@
{
"pull_request": {
"author_association": "NONE",
"head": {
"repo": {
"fork": false,
"full_name": "evil/app"
}
}
},
"repository": {
"full_name": "IUCLabs/app"
}
}
+14
View File
@@ -0,0 +1,14 @@
{
"pull_request": {
"author_association": "MEMBER",
"head": {
"repo": {
"fork": true,
"full_name": "someone/app"
}
}
},
"repository": {
"full_name": "IUCLabs/app"
}
}
@@ -0,0 +1,14 @@
{
"pull_request": {
"author_association": "CONTRIBUTOR",
"head": {
"repo": {
"fork": false,
"full_name": "IUCLabs/app"
}
}
},
"repository": {
"full_name": "IUCLabs/app"
}
}
+3
View File
@@ -0,0 +1,3 @@
{
"ref": "refs/heads/main"
}
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
hook=apps/base/iuclabs-runners/job-started.sh
fixtures=ci/fixtures/runner-hooks
fail=0
check() {
local want=$1 event=$2 fixture=$3 got=0
local -a env=(-u GITHUB_EVENT_NAME -u GITHUB_EVENT_PATH)
[ "$event" = - ] || env+=("GITHUB_EVENT_NAME=$event")
[ "$fixture" = - ] || env+=("GITHUB_EVENT_PATH=$fixtures/$fixture")
env "${env[@]}" "$hook" >/dev/null 2>&1 || got=1
if [ "$got" -ne "$want" ]; then
echo "FAIL: $event $fixture exit=$got want=$want" >&2
fail=1
fi
}
for e in push workflow_dispatch schedule merge_group release; do
check 0 "$e" push.json
done
check 0 pull_request pr-member.json
check 0 pull_request pr-same-repo.json
check 1 pull_request pr-fork-none.json
check 1 pull_request pr-fork-spoofed.json
check 1 pull_request pr-deleted-fork.json
check 1 pull_request push.json
for e in pull_request_target workflow_run pull_request_review pull_request_review_comment issue_comment issues discussion discussion_comment create delete unknown_event; do
check 1 "$e" pr-member.json
done
check 1 pull_request_review pr-fork-none.json
check 1 issue_comment issue-comment.json
check 1 push -
check 1 push missing.json
check 1 push invalid.txt
check 1 - push.json
exit "$fail"