Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
edb0d3f
feat(consul-postgres-ha): phase 0 ICE hole-punch feasibility on dstack
h4x3rotab May 1, 2026
dc36797
feat(consul-postgres-ha): stage 1 mesh-conn MVP — TUN+ICE overlay
h4x3rotab May 1, 2026
dd61dfa
refactor(consul-postgres-ha): mesh-conn — TUN to UDP port-forwarder
h4x3rotab May 1, 2026
619036a
test(consul-postgres-ha): N=4 mesh-conn verification (1 control + 3 w…
h4x3rotab May 1, 2026
52846e2
feat(consul-postgres-ha): mesh-conn — add TCP forwarding via yamux
h4x3rotab May 1, 2026
5cbeb92
feat(consul-postgres-ha): mesh-conn — multi-port forwarding per peer-…
h4x3rotab May 1, 2026
ff65416
feat(consul-postgres-ha): stage 2 — Consul cluster on the mesh-conn o…
h4x3rotab May 1, 2026
14fd7f5
docs(consul-postgres-ha): stage 2 SETUP — how to configure Consul on …
h4x3rotab May 1, 2026
b1dc70a
feat(consul-postgres-ha): stage 3a — Consul service discovery + /all …
h4x3rotab May 1, 2026
eb49a65
chore(consul-postgres-ha): drop accidentally-committed webdemo binary…
h4x3rotab May 1, 2026
a2f7422
feat(consul-postgres-ha): stage 3b — Consul Connect (Envoy + mTLS) ov…
h4x3rotab May 1, 2026
c7de008
docs(consul-postgres-ha): ARCHITECTURE.md + ROBUSTNESS.md
h4x3rotab May 1, 2026
db4cbf7
fix(consul-postgres-ha): punch-list 1+2+4 — reconnect bug, gossip key…
h4x3rotab May 2, 2026
cdde376
docs(consul-postgres-ha): STAGE4_PLAN.md — dev-experience overhaul
h4x3rotab May 2, 2026
8a1dc90
docs(consul-postgres-ha): record verification of punch-list 1+2+4
h4x3rotab May 2, 2026
ab0002f
docs(consul-postgres-ha): revise STAGE4_PLAN — terraform, TEE secrets…
h4x3rotab May 2, 2026
0407ef6
feat(consul-postgres-ha): stage-4 shakedown of phala-network/phala TF…
h4x3rotab May 2, 2026
8be4b1e
docs(consul-postgres-ha): STAGE4 rev 2 + disk-persistence verification
h4x3rotab May 2, 2026
de0eebd
docs(consul-postgres-ha): STAGE4 — correct SDK API shape after checki…
h4x3rotab May 2, 2026
d3cf95d
feat(consul-postgres-ha): stage4 — bootstrap-secrets init container
h4x3rotab May 2, 2026
0539603
feat(consul-postgres-ha): stage 4 — integrated dev experience
h4x3rotab May 2, 2026
c037bb9
fix(consul-postgres-ha): stage 4 — first end-to-end smoke surfaced bugs
h4x3rotab May 2, 2026
e2401fb
fix(consul-postgres-ha): stage 4 — full mesh + Connect mTLS demo working
h4x3rotab May 2, 2026
d67dd6b
docs(consul-postgres-ha): record what surfaced during the smoke
h4x3rotab May 2, 2026
5b4099f
docs(consul-postgres-ha): repoint env-drift bug to phala-cloud#246
h4x3rotab May 2, 2026
2f96edc
feat(consul-postgres-ha): stage 4 — bring Patroni + Postgres back
h4x3rotab May 2, 2026
4c36c76
fix(consul-postgres-ha): mesh-conn pollLoop must keep the LATEST auth…
h4x3rotab May 2, 2026
17f4642
feat(consul-postgres-ha): stage 4 — multi-server Consul HA
h4x3rotab May 2, 2026
6e198c1
fix(consul-postgres-ha): signaling broker drops sender's stale messag…
h4x3rotab May 2, 2026
de37e56
docs(consul-postgres-ha): cross-reference phala-cloud#247
h4x3rotab May 2, 2026
96bb3d4
fix(consul-postgres-ha): worker peer ID must use ordinal, not slot
h4x3rotab May 2, 2026
9bbc086
feat(consul-postgres-ha): mesh-conn relay-only escape hatch + document
h4x3rotab May 3, 2026
5c51dfa
fix(consul-postgres-ha): mesh-conn instrumentation + packetizing adapter
h4x3rotab May 3, 2026
d95b6b6
docs(consul-postgres-ha): stage 4 RESUME.md for picking back up
h4x3rotab May 3, 2026
c7fa297
docs(consul-postgres-ha): RESUME note about uncommitted QUIC swap in …
h4x3rotab May 3, 2026
e724eba
feat(consul-postgres-ha): swap mesh-conn yamux→QUIC; stage 4 HA verified
h4x3rotab May 3, 2026
f2ae489
docs(consul-postgres-ha): stage 4 failover demo recipe + measured RTO
h4x3rotab May 3, 2026
ed3310a
docs(consul-postgres-ha): stage 4 hard-kill failover variant + measur…
h4x3rotab May 3, 2026
823f6c9
refactor(consul-postgres-ha): mesh-conn post-QUIC cleanup pass
h4x3rotab May 3, 2026
6214d3a
ci(consul-postgres-ha): publish stage 4 images to GHCR with build pro…
h4x3rotab May 3, 2026
4b7f962
chore(consul-postgres-ha): pin provider >= 0.2.0-beta.3, reframe hot-…
h4x3rotab May 3, 2026
0f912d7
chore(consul-postgres-ha): pin provider exactly + document disk-loss …
h4x3rotab May 3, 2026
c8c6067
fix(consul-postgres-ha): mesh-conn PacketConn shim must delegate dead…
h4x3rotab May 4, 2026
d69c762
refactor(consul-postgres-ha): consolidate to single polished template
h4x3rotab May 4, 2026
d204f50
docs(consul-postgres-ha): design briefs for single-sidecar + attestat…
h4x3rotab May 4, 2026
cfc19ac
refactor(consul-postgres-ha): collapse platform plumbing to single si…
h4x3rotab May 4, 2026
f36201f
Merge pull request #96 from Dstack-TEE/gap2/consolidate-platform-sidecar
h4x3rotab May 5, 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
137 changes: 137 additions & 0 deletions .github/workflows/consul-postgres-ha-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: Publish consul-postgres-ha images

# Builds and publishes the four container images the consul-postgres-ha
# example needs (mesh-sidecar, patroni, webdemo, signaling). On push
# to main, images are tagged with the commit SHA *and* `latest`,
# pushed to GHCR, and attested with Sigstore-backed GitHub Build
# Provenance so consumers can verify "this image came from this
# commit of this repo" without us managing any keys. PRs build to
# verify but do not push or attest.
#
# Why one workflow for all four: the example needs them in lockstep —
# bumping one but leaving the rest stale leads to mixed-version
# clusters that are hard to reason about. One workflow means one set
# of tags moves together.
#
# `mesh-sidecar` is the consolidated platform-plumbing image (formerly
# four images: bootstrap-secrets, mesh-conn, the legacy keepalive, and
# the old envoy-only sidecar). Its build context is the parent
# consul-postgres-ha/ directory so its Dockerfile can pull the Go
# sources from sibling subdirs. The other three images build from
# their own subdirs.
#
# Verifying a published image (consumer side):
#
# gh attestation verify \
# oci://ghcr.io/dstack-tee/dstack-examples/consul-postgres-ha-mesh-sidecar:latest \
# --repo Dstack-TEE/dstack-examples

on:
push:
branches: [main]
paths:
- 'consul-postgres-ha/bootstrap-secrets/**'
- 'consul-postgres-ha/mesh-conn/**'
- 'consul-postgres-ha/mesh-sidecar/**'
- 'consul-postgres-ha/patroni/**'
- 'consul-postgres-ha/webdemo/**'
- 'consul-postgres-ha/signaling/**'
- '.github/workflows/consul-postgres-ha-publish.yml'
pull_request:
paths:
- 'consul-postgres-ha/bootstrap-secrets/**'
- 'consul-postgres-ha/mesh-conn/**'
- 'consul-postgres-ha/mesh-sidecar/**'
- 'consul-postgres-ha/patroni/**'
- 'consul-postgres-ha/webdemo/**'
- 'consul-postgres-ha/signaling/**'
- '.github/workflows/consul-postgres-ha-publish.yml'
workflow_dispatch:

env:
REGISTRY: ghcr.io

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# id-token + attestations are required for Sigstore-backed
# GitHub Build Provenance via actions/attest-build-provenance.
id-token: write
attestations: write

strategy:
fail-fast: false
matrix:
include:
# `mesh-sidecar` builds with the parent dir as context so
# its Dockerfile can pull bootstrap-secrets/ and mesh-conn/
# Go sources from siblings.
- name: mesh-sidecar
context: consul-postgres-ha
dockerfile: consul-postgres-ha/mesh-sidecar/Dockerfile
- name: patroni
context: consul-postgres-ha/patroni
- name: webdemo
context: consul-postgres-ha/webdemo
- name: signaling
context: consul-postgres-ha/signaling

steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract image metadata
id: meta
uses: docker/metadata-action@v5
with:
# Image namespace lives one level under the repo so all four
# images sit side-by-side: ghcr.io/<owner>/<repo>/consul-postgres-ha-<name>
images: ${{ env.REGISTRY }}/${{ github.repository }}/consul-postgres-ha-${{ matrix.name }}
tags: |
type=sha,format=long
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr

- name: Build and push
id: push
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
# Most images use the default Dockerfile in the context.
# `mesh-sidecar` overrides this to point at
# mesh-sidecar/Dockerfile while keeping the parent context.
file: ${{ matrix.dockerfile || format('{0}/Dockerfile', matrix.context) }}
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=consul-postgres-ha-${{ matrix.name }}
cache-to: type=gha,scope=consul-postgres-ha-${{ matrix.name }},mode=max

# Sigstore-backed build provenance. Binds {image digest, repo,
# workflow, commit SHA, runner identity} into an attestation
# signed with a short-lived Sigstore cert obtained via this
# workflow's GitHub OIDC token — no keys we have to rotate. The
# attestation is uploaded to GitHub *and* (via push-to-registry)
# written next to the image on GHCR so `gh attestation verify
# oci://...` and `cosign verify-attestation` both work.
- name: Attest build provenance
if: github.event_name != 'pull_request'
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}/consul-postgres-ha-${{ matrix.name }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
19 changes: 18 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
*~

*~
.claude/

# consul-postgres-ha — compiled Go binaries (build artifacts)
consul-postgres-ha/.local/
consul-postgres-ha/bootstrap-secrets/bootstrap-secrets
consul-postgres-ha/mesh-conn/mesh-conn
consul-postgres-ha/quic-on-ice/quic-on-ice
consul-postgres-ha/signaling/signaling
consul-postgres-ha/signaling/icetest
consul-postgres-ha/webdemo/webdemo

# consul-postgres-ha — local terraform state (per-deploy, not for git)
consul-postgres-ha/cluster-example/.terraform/
consul-postgres-ha/cluster-example/.terraform.lock.hcl
consul-postgres-ha/cluster-example/terraform.tfstate*
consul-postgres-ha/cluster-example/terraform.tfvars
Loading
Loading