Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
d69a67e
test: define T4 API v1 client conformance
Jul 21, 2026
6058f1c
feat: define T4 API v1 contract and SDK boundary
Jul 21, 2026
329ac18
ci: emit T4 API generation artifacts
Jul 21, 2026
b50b7d9
build: recover T4 API generation lockfile
Jul 21, 2026
8a7e8cc
fix: use OpenAPI parser named API
Jul 21, 2026
e549d60
feat: add generated T4 API v1 types
Jul 21, 2026
6cd0e12
fix: typecheck T4 API conformance fixtures
Jul 21, 2026
bcca1cb
test: expose T4 API semantic blockers
Jul 21, 2026
797717c
fix: enforce T4 API public contract semantics
Jul 21, 2026
65a8524
build: accept authorized T4 API schema artifact
Jul 21, 2026
93f50e5
test: complete bounded API conformance cases
Jul 21, 2026
033e64d
test: expose remaining API runtime blockers
Jul 21, 2026
788516d
fix: fail closed across public API payloads
Jul 21, 2026
b0a7445
build: accept revised T4 API schema artifact
Jul 21, 2026
4a21fce
fix: select bounded conformance frames
Jul 21, 2026
cdbf49d
test: assert bounded consecutive watch retries
Jul 21, 2026
bf6a356
test: cover OP03 fail-closed review contracts
Jul 21, 2026
dfba497
fix: close OP03 fail-closed review gaps
Jul 21, 2026
77c9380
build: accept authorized OP03 schema artifact
Jul 21, 2026
9209caf
fix: enforce exact watch response contract
Jul 21, 2026
ecc29a0
fix: close watch retry and body ownership gaps
Jul 21, 2026
fb42ef8
test: prove watch media and stream cleanup
Jul 21, 2026
ed2c7f7
test: align terminal watch protocol assertions
Jul 21, 2026
7673616
test: cover Unicode bounds and SSE cancellation
Jul 21, 2026
578e3c4
fix: validate response lengths by code point
Jul 21, 2026
b555a13
test: cover strict response protocol gaps
Jul 21, 2026
ac59504
fix: enforce declared response protocol
Jul 21, 2026
afb136c
test: reject invalid mutations before idempotency
Jul 21, 2026
3a056c7
fix: close strict API contract gaps
Jul 21, 2026
2b1433f
test: type omitted command metadata
Jul 21, 2026
94e74df
fix: preserve optional generated defaults
Jul 21, 2026
b541ed5
chore: accept authorized API schema artifact
Jul 21, 2026
ca908f9
fix: require API generation in release gate
Jul 21, 2026
1577e8b
test: cover final strict conformance gaps
Jul 21, 2026
d31442e
fix: validate create and watch contracts
Jul 21, 2026
ff25fda
test: cover final header and precondition parity
Jul 21, 2026
e0f3972
fix: align required response headers
Jul 21, 2026
a0c3a08
chore: accept required-header schema artifact
Jul 21, 2026
d71383f
test(t4-api): cover final strict response gaps
Jul 22, 2026
deff712
fix(t4-api): close strict response gaps
Jul 22, 2026
6ca35ab
test(t4-api): isolate watch query validation
Jul 22, 2026
643de6e
test(t4-api): pin leap dates and RFC850 pivot
Jul 22, 2026
451b327
fix(t4-api): validate announced leap seconds
Jul 22, 2026
8423958
test(t4-api): require declared request media
Jul 22, 2026
01a49d6
fix(t4-api): enforce JSON request media
Jul 22, 2026
681f6db
test(t4-api): sanitize media fixture keys
Jul 22, 2026
2df2da4
test(t4-api): bound resync session ids
Jul 22, 2026
319ccf1
fix(t4-api): bound resync session ids
Jul 22, 2026
32aab1e
test(t4-api): require truthful mutation contracts
Jul 22, 2026
b115a3f
feat(t4-api): expose truthful mutation contracts
Jul 22, 2026
d430685
chore: accept truthful API schema artifact
Jul 22, 2026
1f574dc
test(t4-api): use fixture auth proof
Jul 22, 2026
409882b
test(t4-api): reject malformed page cursors
Jul 22, 2026
e15eb7c
test(t4-api): reject silent version downgrade
Jul 22, 2026
3fa3bf3
fix(t4-api): reject invalid cursors and downgrades
Jul 22, 2026
ad46ce7
test(t4-api): require issued page cursors
Jul 22, 2026
c4e2336
fix(t4-api): bind issued page cursors
Jul 22, 2026
907b5aa
fix(t4-api): issue unique opaque page cursors
Jul 22, 2026
97fe26f
test(t4-api): reject stale issued cursors
Jul 22, 2026
3e5295a
fix(t4-api): sign scoped page cursors
Jul 22, 2026
5ae50a0
test(t4-api): reject noncanonical cursor signatures
Jul 22, 2026
9cd5494
fix(t4-api): require canonical cursor signatures
Jul 22, 2026
00c27f3
test(t4-api): cover every cursor signature alias
Jul 22, 2026
da2f32d
test(t4-api): reject every cursor signature alias
Jul 22, 2026
5c8ae41
test(t4-api): avoid needless alias allocation
Jul 22, 2026
4859cac
test(t4-api): reject oversized snapshots and duplicate cursors
Jul 22, 2026
9ce270c
fix(t4-api): align snapshot and watch cursor bounds
Jul 22, 2026
8292dac
test(operator): define CRD lifecycle contract
Jul 21, 2026
73f1d74
feat(operator): enforce CRD lifecycle gates
Jul 21, 2026
0cbf2b2
fix(operator): close lifecycle contract test
Jul 21, 2026
c6b333c
fix(operator): use structural fixture round trips
Jul 21, 2026
2747843
fix(operator): assert default without new modules
Jul 21, 2026
3e84b06
test(operator): expose CRD lifecycle blockers
Jul 21, 2026
53d7c1c
fix(operator): validate proposed CRD semantics
Jul 21, 2026
20e2384
test(operator): account for local preflight
Jul 21, 2026
721c84c
ci(operator): emit validator module metadata
Jul 21, 2026
7b1affa
ci(operator): freeze validator dependencies
Jul 21, 2026
1b84fa7
ci(operator): preserve ordinary Go gate
Jul 21, 2026
e27f3f9
test(operator): expose transition CEL gap
Jul 21, 2026
8bd18a1
fix(operator): validate unchanged CEL transitions
Jul 21, 2026
1a207e1
test(operator): expose live CR narrowing gap
Jul 22, 2026
de9bf6f
fix(operator): validate every live CR before apply
Jul 22, 2026
1e22cdd
test(t4-api): cover snapshot boundary and heartbeat cursors
Jul 22, 2026
2ebbf13
test(operator): require dependency event convergence
Jul 21, 2026
f91517b
feat(operator): reconcile dependency changes
Jul 21, 2026
72c6a19
test(operator): require host policy convergence
Jul 21, 2026
bb851a8
fix(operator): fail closed on host storage drift
Jul 21, 2026
4ccae52
fix(operator): require explicit workspace storage class
Jul 21, 2026
30752e2
test(operator): reject stale dependency authority
Jul 21, 2026
95da911
fix(operator): revoke untrusted dependency authority
Jul 21, 2026
d954667
test(operator): revoke terminal storage authority
Jul 21, 2026
187baf2
fix(operator): clear terminal storage authority
Jul 21, 2026
75762da
test(operator): stop owned siblings on conflict
Jul 21, 2026
55539e5
fix(operator): stop owned siblings on conflict
Jul 21, 2026
764f460
test(operator): preserve dependency status on conflicts
Jul 21, 2026
e24b6dc
fix(operator): preserve ready dependencies on conflicts
Jul 21, 2026
96ccd96
test(operator): cover cleanup and create races
Jul 21, 2026
2a8b7ae
fix(operator): close child ownership races
Jul 21, 2026
e366c52
test(operator): model stale cache after create race
Jul 21, 2026
4916c10
test(operator): cover workspace PVC create race
Jul 21, 2026
db95dd6
fix(operator): validate authoritative create winners
Jul 21, 2026
ee5d009
test(operator): cover authoritative cleanup policy
Jul 21, 2026
d9ef139
fix(operator): precondition authoritative cleanup
Jul 21, 2026
32d4a04
test(operator): cover split-reader dependency cleanup
Jul 21, 2026
a10e70b
fix(operator): authoritatively clean revoked sessions
Jul 21, 2026
3d09b4a
test(operator): expose stale workspace session cache
Jul 21, 2026
d428c0a
fix(operator): list workspace sessions authoritatively
Jul 21, 2026
4a7cdf6
test(operator): reject stale PVC authority
Jul 22, 2026
b98470d
fix(operator): revalidate PVC authority
Jul 22, 2026
b9163ce
fix(t4-api): preserve heartbeat cursor semantics
Jul 22, 2026
ece837c
test(operator): gate existing pods on PVC authority
Jul 22, 2026
0768883
test(t4-api): model heartbeat cursor liveness
Jul 22, 2026
20e9878
fix(operator): gate child repairs on PVC authority
Jul 22, 2026
fb9ebf4
chore(op05): integrate final operator and API contracts
Jul 22, 2026
6d319d9
test(cluster-server): require durable PostgreSQL gateway
Jul 22, 2026
3c1a1ea
test(cluster-server): expose durable gateway red
Jul 22, 2026
4c43a86
feat(cluster-server): persist public gateway ledger
Jul 22, 2026
d25c26f
fix(cluster-server): transact durable migrations
Jul 22, 2026
5b7915e
fix(cluster-server): validate durable ledger epochs
Jul 22, 2026
8c0ae56
test(cluster-server): compare PostgreSQL counts as bigint
Jul 22, 2026
8b7dd06
test(cluster-server): scope PostgreSQL suite to service job
Jul 22, 2026
8584ff0
test(cluster): cover durable gateway review repairs
Jul 22, 2026
dc15203
fix(cluster): harden durable gateway ledger
Jul 22, 2026
9aebb07
fix(cluster): close durable gateway race gaps
Jul 22, 2026
a387783
test(cluster): stabilize durable gateway concurrency proof
Jul 22, 2026
c55e9bc
test(cluster): pause atomic event retention boundary
Jul 22, 2026
265bfa4
test(cluster): isolate durable gateway scenarios
Jul 22, 2026
18925e9
test(cluster): preserve durable restart state
Jul 22, 2026
fca3d2c
test(cluster): preserve lease owner across restart
Jul 22, 2026
366fae8
test(chart): match quoted secret projection keys
Jul 22, 2026
8c80250
test(cluster): cover review repair contracts
Jul 22, 2026
c813647
fix(cluster): close durable gateway review defects
Jul 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 62 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,46 @@ jobs:
[[ "$HEAD_SHA" =~ ^[0-9a-f]{40}$ ]]
git diff --name-only -z "$BASE_SHA...$HEAD_SHA" | node scripts/ci-paths.mjs >> "$GITHUB_OUTPUT"

t4-api-generation:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out exact source
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Install pinned pnpm
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: 11.10.0

- name: Install pinned Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24.13.1

- name: Install dependencies from the committed lockfile
run: pnpm install --frozen-lockfile

- name: Validate OpenAPI and deterministic generation
run: |
pnpm --filter @t4-code/t4-api-contract validate
pnpm --filter @t4-code/t4-api-contract generate:ci
pnpm --filter @t4-code/t4-api-contract check:generated
pnpm --filter @t4-code/t4-api-client typecheck
pnpm --filter @t4-code/client typecheck
pnpm --filter @t4-code/client exec vp test run test/t4-api-v1-conformance.test.ts
- name: Upload deterministic T4 API client
if: ${{ always() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: t4-api-generated-${{ github.run_id }}
path: artifacts/t4-api/generated/schema.ts
if-no-files-found: error



core:
runs-on: ubuntu-24.04
timeout-minutes: 25
Expand Down Expand Up @@ -237,6 +277,23 @@ jobs:
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.cluster == 'true' }}
runs-on: ubuntu-24.04
timeout-minutes: 25
services:
postgres:
image: postgres:17.6-bookworm@sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3
env:
POSTGRES_DB: t4_test
POSTGRES_USER: t4_test
POSTGRES_PASSWORD: t4_test_password
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U t4_test -d t4_test"
--health-interval 2s
--health-timeout 5s
--health-retries 15
env:
T4_TEST_POSTGRES_URL: postgres://t4_test:t4_test_password@127.0.0.1:5432/t4_test

steps:
- name: Check out source
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
Expand Down Expand Up @@ -294,6 +351,8 @@ jobs:

- name: Run operator tests
working-directory: packages/cluster-operator
env:
GOFLAGS: -mod=readonly
run: go test ./...

- name: Lint cluster chart
Expand Down Expand Up @@ -521,14 +580,15 @@ jobs:
verify:
name: verify
if: ${{ always() }}
needs: [changes, core, legacy-bridge-continuity, official-omp-gate0, cluster, tooling, android-debug, flutter, flutter-android, flutter-apple]
needs: [changes, t4-api-generation, core, legacy-bridge-continuity, official-omp-gate0, cluster, tooling, android-debug, flutter, flutter-android, flutter-apple]
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Require every selected CI leg
shell: bash
env:
CHANGES_RESULT: ${{ needs.changes.result }}
T4_API_GENERATION_RESULT: ${{ needs.t4-api-generation.result }}
CORE_RESULT: ${{ needs.core.result }}
CONTINUITY_RESULT: ${{ needs.legacy-bridge-continuity.result }}
OFFICIAL_OMP_GATE0_RESULT: ${{ needs.official-omp-gate0.result }}
Expand All @@ -541,6 +601,7 @@ jobs:
run: |
set -euo pipefail
test "$CHANGES_RESULT" = success
test "$T4_API_GENERATION_RESULT" = success
test "$CORE_RESULT" = success
for result in \
"$CONTINUITY_RESULT" \
Expand Down
41 changes: 38 additions & 3 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ clone:
depth: 50
partial: false

services:
- name: postgres
image: mirror.gcr.io/library/postgres:17.6-bookworm@sha256:f3bd19c606e442c3d7bdfa8002e03fe260a1023351e0ea4598032022b68dd6e3
environment:
POSTGRES_DB: t4_test
POSTGRES_USER: t4_test
POSTGRES_PASSWORD: t4_test_password

steps:
dependencies:
image: mirror.gcr.io/library/node:24.13.1-bookworm@sha256:00e9195ebd49985a6da8921f419978d85dfe354589755192dc090425ce4da2f7
Expand All @@ -31,6 +39,32 @@ steps:
memory: 2Gi
ephemeral-storage: 4Gi

t4-api-contract:
depends_on: [dependencies]
image: mirror.gcr.io/library/node:24.13.1-bookworm@sha256:00e9195ebd49985a6da8921f419978d85dfe354589755192dc090425ce4da2f7
commands:
- corepack enable
- pnpm --filter @t4-code/t4-api-contract validate
- pnpm --filter @t4-code/t4-api-contract generate:ci
- test -f artifacts/t4-api/generated/schema.ts
- echo "T4_API_GENERATED_ARTIFACT=artifacts/t4-api/generated/schema.ts"
- pnpm --filter @t4-code/t4-api-contract check:generated
- pnpm --filter @t4-code/t4-api-client typecheck
- pnpm --filter @t4-code/client typecheck
- pnpm --filter @t4-code/client exec vp test run test/t4-api-v1-conformance.test.ts
backend_options:
kubernetes:
serviceAccountName: woodpecker-ci-untrusted
resources:
requests:
cpu: "0"
memory: 256Mi
ephemeral-storage: 256Mi
limits:
cpu: "1"
memory: 2Gi
ephemeral-storage: 2Gi

bun-runtime:
depends_on: [dependencies]
image: mirror.gcr.io/oven/bun:1.3.14@sha256:e10577f0db68676a7024391c6e5cb4b879ebd17188ab750cf10024a6d700e5c4
Expand All @@ -50,7 +84,7 @@ steps:
ephemeral-storage: 256Mi

upstream-core:
depends_on: [cluster-ci-contracts, bun-runtime]
depends_on: [cluster-ci-contracts, t4-api-contract, bun-runtime]
image: mirror.gcr.io/library/node:24.13.1-bookworm@sha256:00e9195ebd49985a6da8921f419978d85dfe354589755192dc090425ce4da2f7
commands:
- export PATH="$PWD/.ci:$PATH"
Expand Down Expand Up @@ -204,6 +238,7 @@ steps:
image: mirror.gcr.io/oven/bun:1.3.14@sha256:e10577f0db68676a7024391c6e5cb4b879ebd17188ab750cf10024a6d700e5c4
environment:
T4_PROOF_OUTPUT_DIR: artifacts/cluster-proof/scenarios
T4_TEST_POSTGRES_URL: postgres://t4_test:t4_test_password@postgres:5432/t4_test
commands:
- export SSL_CERT_FILE="$PWD/.ci/ca-certificates.crt"
- export NODE_EXTRA_CA_CERTS="$SSL_CERT_FILE"
Expand Down Expand Up @@ -250,9 +285,9 @@ steps:
image: mirror.gcr.io/library/golang:1.25.1-bookworm@sha256:c423747fbd96fd8f0b1102d947f51f9b266060217478e5f9bf86f145969562ee
directory: packages/cluster-operator
commands:
- GOMAXPROCS=1 GOFLAGS=-p=1 go test ./api/... ./controllers/... ./cmd/...
- GOMAXPROCS=1 GOFLAGS='-mod=readonly -p=1' go test ./api/... ./controllers/... ./cmd/...
- mkdir -p ../../artifacts/cluster-proof
- CGO_ENABLED=0 GOMAXPROCS=1 GOFLAGS=-p=1 go test -c ./charttests -o ../../artifacts/cluster-proof/chart-contract.test
- CGO_ENABLED=0 GOMAXPROCS=1 GOFLAGS='-mod=readonly -p=1' go test -c ./charttests -o ../../artifacts/cluster-proof/chart-contract.test
backend_options:
kubernetes:
serviceAccountName: woodpecker-ci-untrusted
Expand Down
25 changes: 25 additions & 0 deletions deploy/charts/t4-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,28 @@ app.kubernetes.io/instance: {{ .Release.Name | quote }}
{{- define "t4-cluster.image" -}}
{{- printf "%s@%s" .repository .digest -}}
{{- end -}}

{{- define "t4-cluster.validatePublicApi" -}}
{{- if .Values.publicApi.enabled -}}
{{- $existingSecret := required "publicApi.existingSecret is required when publicApi.enabled is true" .Values.publicApi.existingSecret -}}
{{- $postgresURLKey := required "publicApi.postgresURLKey is required when publicApi.enabled is true" .Values.publicApi.postgresURLKey -}}
{{- $credentialsKey := required "publicApi.credentialsKey is required when publicApi.enabled is true" .Values.publicApi.credentialsKey -}}
{{- if eq $postgresURLKey $credentialsKey -}}
{{- fail "publicApi.postgresURLKey and publicApi.credentialsKey must be different" -}}
{{- end -}}
{{- if not .Values.networkPolicy.enabled -}}
{{- fail "networkPolicy.enabled must be true when publicApi.enabled is true" -}}
{{- end -}}
{{- if empty .Values.networkPolicy.postgresPorts -}}
{{- fail "networkPolicy.postgresPorts must contain at least one port when publicApi.enabled is true" -}}
{{- end -}}
{{- $hasPostgresNamespaceSelector := not (empty .Values.networkPolicy.postgres.namespaceSelector) -}}
{{- $hasPostgresPodSelector := not (empty .Values.networkPolicy.postgres.podSelector) -}}
{{- if ne $hasPostgresNamespaceSelector $hasPostgresPodSelector -}}
{{- fail "networkPolicy.postgres namespaceSelector and podSelector must both be configured or both be empty" -}}
{{- end -}}
{{- if and (empty .Values.networkPolicy.postgresCIDRs) (not $hasPostgresNamespaceSelector) -}}
{{- fail "publicApi.enabled requires a PostgreSQL CIDR or complete selector destination" -}}
{{- end -}}
{{- end -}}
{{- end -}}
25 changes: 25 additions & 0 deletions deploy/charts/t4-cluster/templates/deployments.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.enabled }}
{{- include "t4-cluster.validatePublicApi" . -}}
{{- if eq .Values.session.omp.modelsKey .Values.session.omp.settingsKey }}
{{- fail "session.omp.modelsKey and session.omp.settingsKey must be different" }}
{{- end }}
Expand Down Expand Up @@ -258,6 +259,14 @@ spec:
valueFrom: {fieldRef: {fieldPath: metadata.name}}
- name: POD_UID
valueFrom: {fieldRef: {fieldPath: metadata.uid}}
{{- if .Values.publicApi.enabled }}
- name: T4_POSTGRES_URL_FILE
value: /var/run/secrets/t4-public-api/postgres-url
- name: T4_PUBLIC_API_CREDENTIALS_FILE
value: /var/run/secrets/t4-public-api/credentials.json
- name: T4_PUBLIC_API_RUNTIME_PROFILE
value: {{ first .Values.clusterHost.runtimeProfiles | quote }}
{{- end }}
{{- if .Values.woodpecker.existingSecret }}
- name: T4_WOODPECKER_TOKEN
valueFrom:
Expand Down Expand Up @@ -324,6 +333,11 @@ spec:
- name: kubernetes-api-access
mountPath: /var/run/secrets/kubernetes.io/serviceaccount
readOnly: true
{{- if .Values.publicApi.enabled }}
- name: public-api
mountPath: /var/run/secrets/t4-public-api
readOnly: true
{{- end }}
{{- if .Values.woodpecker.serviceAccountAudience }}
- name: ci-identity
mountPath: /var/run/secrets/t4-ci
Expand Down Expand Up @@ -351,6 +365,17 @@ spec:
items:
- key: ca.crt
path: ca.crt
{{- if .Values.publicApi.enabled }}
- name: public-api
secret:
secretName: {{ .Values.publicApi.existingSecret | quote }}
defaultMode: 0440
items:
- key: {{ .Values.publicApi.postgresURLKey | quote }}
path: postgres-url
- key: {{ .Values.publicApi.credentialsKey | quote }}
path: credentials.json
{{- end }}
{{- if .Values.woodpecker.serviceAccountAudience }}
- name: ci-identity
projected:
Expand Down
26 changes: 25 additions & 1 deletion deploy/charts/t4-cluster/templates/networkpolicies.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if and .Values.enabled .Values.networkPolicy.enabled }}
{{- if .Values.enabled }}
{{- include "t4-cluster.validatePublicApi" . -}}
{{- if .Values.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
Expand Down Expand Up @@ -101,6 +103,27 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- if and .Values.publicApi.enabled .Values.networkPolicy.postgresPorts }}
{{- range .Values.networkPolicy.postgresCIDRs }}
- to:
- ipBlock: {cidr: {{ . | quote }}}
ports:
{{- range $.Values.networkPolicy.postgresPorts }}
- {protocol: TCP, port: {{ . }}}
{{- end }}
{{- end }}
{{- if and (not (empty .Values.networkPolicy.postgres.namespaceSelector)) (not (empty .Values.networkPolicy.postgres.podSelector)) }}
- to:
- namespaceSelector:
{{- toYaml .Values.networkPolicy.postgres.namespaceSelector | nindent 12 }}
podSelector:
{{- toYaml .Values.networkPolicy.postgres.podSelector | nindent 12 }}
ports:
{{- range .Values.networkPolicy.postgresPorts }}
- {protocol: TCP, port: {{ . }}}
{{- end }}
{{- end }}
{{- end }}
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
Expand Down Expand Up @@ -205,3 +228,4 @@ spec:
ingress: []
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion deploy/charts/t4-cluster/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ rules:
verbs: [get, list, watch]
- apiGroups: [cluster.t4.dev]
resources: [t4workspaces, t4sessions]
verbs: [get, list, watch, create, delete]
verbs: [get, list, watch, create, patch, delete]
- apiGroups: ['']
resources: [pods, services, endpoints]
verbs: [get, list, watch]
Expand Down
52 changes: 51 additions & 1 deletion deploy/charts/t4-cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"server",
"session",
"storage",
"publicApi",
"woodpecker",
"ingress",
"networkPolicy",
Expand Down Expand Up @@ -129,6 +130,17 @@
}
}
},
"publicApi": {
"type": "object",
"required": ["enabled", "existingSecret", "postgresURLKey", "credentialsKey"],
"properties": {
"enabled": { "type": "boolean" },
"existingSecret": { "$ref": "#/definitions/optionalDNSSubdomain" },
"postgresURLKey": { "$ref": "#/definitions/configKey" },
"credentialsKey": { "$ref": "#/definitions/configKey" }
},
"additionalProperties": false
},
"woodpecker": {
"type": "object",
"required": ["existingSecret", "tokenKey", "configMap", "baseURLKey", "webBaseURLKey", "repositoriesKey", "serviceAccountAudience", "tokenExpirationSeconds"],
Expand Down Expand Up @@ -172,7 +184,7 @@
},
"networkPolicy": {
"type": "object",
"required": ["enabled", "kubernetesApiCIDRs", "modelRouteCIDRs", "modelRoutePorts", "modelRoute", "ciProviderCIDRs", "ciProviderPorts", "ciProvider", "dns", "gatewayIngress", "observability"],
"required": ["enabled", "kubernetesApiCIDRs", "modelRouteCIDRs", "modelRoutePorts", "modelRoute", "ciProviderCIDRs", "ciProviderPorts", "ciProvider", "postgresCIDRs", "postgresPorts", "postgres", "dns", "gatewayIngress", "observability"],
"properties": {
"enabled": { "type": "boolean" },
"kubernetesApiCIDRs": { "$ref": "#/definitions/cidrList" },
Expand All @@ -182,6 +194,9 @@
"ciProviderCIDRs": { "$ref": "#/definitions/cidrList" },
"ciProviderPorts": { "$ref": "#/definitions/tcpPortList" },
"ciProvider": { "$ref": "#/definitions/pairedSelectors" },
"postgresCIDRs": { "$ref": "#/definitions/cidrList" },
"postgresPorts": { "$ref": "#/definitions/tcpPortList" },
"postgres": { "$ref": "#/definitions/pairedSelectors" },
"dns": {
"type": "object",
"required": ["namespaceSelector", "podSelector"],
Expand Down Expand Up @@ -397,6 +412,41 @@
}
}
},
{
"if": {
"properties": {
"publicApi": { "properties": { "enabled": { "const": true } } }
}
},
"then": {
"properties": {
"publicApi": {
"properties": {
"existingSecret": { "minLength": 1 }
}
},
"networkPolicy": {
"properties": {
"enabled": { "const": true },
"postgresPorts": { "minItems": 1 }
},
"anyOf": [
{ "properties": { "postgresCIDRs": { "minItems": 1 } } },
{
"properties": {
"postgres": {
"properties": {
"namespaceSelector": { "minProperties": 1 },
"podSelector": { "minProperties": 1 }
}
}
}
}
]
}
}
}
},
{
"if": { "properties": { "ingress": { "properties": { "enabled": { "const": true } } } } },
"then": {
Expand Down
Loading