Skip to content

Commit 9e419be

Browse files
committed
Reconcile fork features with upstream
Keep the vanilla Kubernetes packaging, configurable resource names, actor lock heartbeat, PostgreSQL Helm E2E coverage, and release updates while omitting the removed ateapi JWT client mode. Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
1 parent 448ef39 commit 9e419be

57 files changed

Lines changed: 4447 additions & 179 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/helm-e2e.yaml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: helm-e2e
16+
on:
17+
pull_request:
18+
push:
19+
branches: [main]
20+
permissions:
21+
contents: read
22+
jobs:
23+
e2e-test:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
28+
- name: Setup Go
29+
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
30+
with:
31+
go-version-file: go.mod
32+
- name: Setup Helm
33+
uses: azure/setup-helm@v4
34+
- name: Cache micro-VM assets
35+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
36+
with:
37+
path: bin/microvm-assets/amd64
38+
key: microvm-assets-amd64-${{ hashFiles('hack/microvm-assets/assemble.sh') }}
39+
- name: Enable KVM
40+
run: |
41+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
42+
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
43+
sudo udevadm control --reload-rules
44+
sudo udevadm trigger --name-match=kvm
45+
- name: Create cluster
46+
run: hack/create-kind-cluster.sh
47+
- name: Create install namespace
48+
run: kubectl create namespace ate-system
49+
- name: Install observability fixtures
50+
run: |
51+
kubectl apply -f manifests/ate-install/kind/otel-collector.yaml
52+
kubectl apply -f manifests/ate-install/kind/prometheus.yaml
53+
- name: Build chart images
54+
run: |
55+
for component in ateapi atecontroller atelet podcertcontroller atenet; do
56+
KO_DOCKER_REPO="localhost:5001/${component}" \
57+
./hack/run-tool.sh ko build --bare --tags helm-e2e \
58+
--platform linux/amd64 "./cmd/${component}"
59+
done
60+
- name: Install Agent Substrate with Helm
61+
run: |
62+
helm upgrade --install substrate-crds charts/substrate-crds
63+
helm upgrade --install substrate charts/substrate \
64+
--namespace ate-system \
65+
--create-namespace \
66+
--set image.registry=localhost:5001 \
67+
--set image.tag=helm-e2e \
68+
--set 'atelet.extraArgs[0]=--localhost-registry-replacement=kind-registry:5000' \
69+
--set otel.endpoint=http://opentelemetry-collector.otel-system.svc:4317 \
70+
--set postgres.resources.requests.cpu=500m
71+
- name: Bootstrap mTLS authorities
72+
run: |
73+
hack/install-ate-kind.sh --create-podcertificate-controller-cas
74+
hack/install-ate-kind.sh --create-jwt-authority-pool-secret
75+
hack/install-ate-kind.sh --create-actor-id-ca-pool-secret
76+
hack/install-ate-kind.sh --create-actor-id-ca-certs-secret
77+
hack/install-ate-kind.sh --create-api-authentication-config
78+
- name: Wait for Helm install
79+
run: |
80+
helm upgrade substrate charts/substrate \
81+
--namespace ate-system \
82+
--reuse-values \
83+
--wait --timeout=10m
84+
- name: Deploy egress gateway fixture
85+
env:
86+
KO_DOCKER_REPO: localhost:5001
87+
KO_DEFAULTPLATFORMS: linux/amd64
88+
run: |
89+
./hack/run-tool.sh ko apply -f manifests/ate-install/atenet-egress.yaml -- --context=kind-kind
90+
kubectl --context kind-kind rollout status deployment/atenet-egress -n ate-system --timeout=120s
91+
- name: Deploy micro-VM counter demo
92+
run: hack/run-microvm-demo-kind.sh --skip-control-plane
93+
- name: Deploy gVisor counter demo
94+
run: hack/install-ate-kind.sh --deploy-demo-counter
95+
- name: Deploy egress demo
96+
run: hack/install-ate-kind.sh --deploy-demo-egress
97+
- name: Wait for micro-VM golden snapshot
98+
run: |
99+
kubectl --context kind-kind wait --for=condition=Ready \
100+
actortemplate/counter-microvm -n ate-demo-counter-microvm --timeout=600s
101+
- name: Run E2E tests (gVisor)
102+
run: hack/run-e2e-kind.sh -v -args --no-color
103+
- name: Run E2E tests (micro-VM)
104+
env:
105+
E2E_TEMPLATE_NAMESPACE: ate-demo-counter-microvm
106+
E2E_TEMPLATE_NAME: counter-microvm
107+
E2E_TEMPLATE_READY_TIMEOUT: 600s
108+
run: hack/run-e2e-kind.sh ./internal/e2e/suites/demo -v -args --no-color
109+
- name: Dump diagnostics on failure
110+
if: failure()
111+
run: |
112+
kubectl --context kind-kind get actortemplate,workerpool,pods -A -o wide || true
113+
for p in $(kubectl --context kind-kind get pods -n ate-system -o name 2>/dev/null); do
114+
echo "=== logs: ate-system/${p} ==="
115+
kubectl --context kind-kind logs -n ate-system "$p" --all-containers --tail=300 || true
116+
done

.github/workflows/release.yaml

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ jobs:
6767
- name: Install ko
6868
uses: ko-build/setup-ko@v0.7
6969

70+
- name: Install Helm
71+
uses: azure/setup-helm@v4
72+
7073
- name: Log in to GHCR
7174
uses: docker/login-action@v3
7275
with:
@@ -85,7 +88,7 @@ jobs:
8588
run: |
8689
set -o errexit -o nounset -o pipefail
8790
88-
for component in ateapi atelet ateom-gvisor podcertcontroller atenet; do
91+
for component in ateapi atecontroller atelet ateom-gvisor ateom-microvm podcertcontroller atenet; do
8992
KO_DOCKER_REPO="${IMAGE_REPOSITORY}/${component}" \
9093
./hack/run-tool.sh ko build \
9194
--tags "${IMAGE_TAGS}" \
@@ -94,9 +97,58 @@ jobs:
9497
"./cmd/${component}"
9598
done
9699
100+
- name: Package and push Helm charts
101+
if: inputs.create_release
102+
env:
103+
HELM_EXPERIMENTAL_OCI: "1"
104+
CHART_REPOSITORY: oci://ghcr.io/kagent-dev/substrate/helm
105+
run: |
106+
set -o errexit -o nounset -o pipefail
107+
108+
tag="${{ steps.tag.outputs.value }}"
109+
chart_version="${tag#v}"
110+
package_dir="${RUNNER_TEMP}/helm-packages"
111+
mkdir -p "${package_dir}"
112+
113+
echo "${{ secrets.GITHUB_TOKEN }}" \
114+
| helm registry login ghcr.io \
115+
--username "${{ github.actor }}" \
116+
--password-stdin
117+
118+
helm package charts/substrate-crds \
119+
--destination "${package_dir}" \
120+
--version "${chart_version}" \
121+
--app-version "${tag}"
122+
helm package charts/substrate \
123+
--destination "${package_dir}" \
124+
--version "${chart_version}" \
125+
--app-version "${tag}"
126+
127+
helm push "${package_dir}/substrate-crds-${chart_version}.tgz" "${CHART_REPOSITORY}"
128+
helm push "${package_dir}/substrate-${chart_version}.tgz" "${CHART_REPOSITORY}"
129+
130+
- name: Build kubectl-ate release binaries
131+
if: inputs.create_release
132+
env:
133+
VERSION: ${{ steps.tag.outputs.value }}
134+
run: |
135+
set -o errexit -o nounset -o pipefail
136+
137+
mkdir -p dist
138+
for os in linux darwin; do
139+
for arch in amd64 arm64; do
140+
CGO_ENABLED=0 GOOS="${os}" GOARCH="${arch}" go build \
141+
-trimpath \
142+
-ldflags="-s -w -X=github.com/agent-substrate/substrate/internal/version.Version=${VERSION}" \
143+
-o "dist/kubectl-ate-${os}-${arch}" \
144+
./cmd/kubectl-ate
145+
done
146+
done
147+
97148
- name: Create GitHub Release
98149
if: inputs.create_release
99150
uses: softprops/action-gh-release@v2
100151
with:
101152
tag_name: ${{ steps.tag.outputs.value }}
102153
generate_release_notes: true
154+
files: dist/kubectl-ate-*

Makefile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ build: build-images build-atectl
4040

4141
.PHONY: build-images
4242
build-images:
43-
$(KO) build \
43+
$(KO) build --base-import-paths \
4444
--ldflags="$(LDFLAGS)" \
4545
./cmd/ateapi \
46+
./cmd/atecontroller \
4647
./cmd/atelet \
4748
./cmd/podcertcontroller \
4849
./cmd/atenet
@@ -96,3 +97,19 @@ verify: test
9697
.PHONY: clean
9798
clean:
9899
rm -rf $(BINDIR)
100+
101+
# Render the substrate Helm chart into manifests/ate-install/ (mTLS mode,
102+
# the historical default install). Run this whenever charts/substrate/ changes.
103+
.PHONY: helm-template
104+
helm-template:
105+
@./hack/render-manifests.sh
106+
107+
# Verify that manifests/ate-install/ matches the chart output. Used in CI.
108+
.PHONY: verify-helm-template
109+
verify-helm-template:
110+
@./hack/render-manifests.sh --check
111+
112+
# Verify that the CRD chart mirrors the generated CRDs.
113+
.PHONY: verify-crd-chart
114+
verify-crd-chart:
115+
@./hack/verify/crd-chart.sh

charts/substrate-crds/Chart.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
apiVersion: v2
16+
name: substrate-crds
17+
description: Agent Substrate CustomResourceDefinitions.
18+
type: application
19+
version: 0.1.0
20+
appVersion: "0.1.0"
21+
home: https://github.com/agent-substrate/substrate
22+
sources:
23+
- https://github.com/agent-substrate/substrate
24+
keywords:
25+
- agent
26+
- actor
27+
- substrate
28+
- crds

charts/substrate-crds/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# substrate-crds
2+
3+
Helm chart for installing the Agent Substrate CRDs.
4+
5+
Install this chart before installing the main `substrate` chart:
6+
7+
```bash
8+
helm upgrade --install substrate-crds ./charts/substrate-crds
9+
helm upgrade --install substrate ./charts/substrate --namespace ate-system --create-namespace
10+
```
11+
12+
The CRD YAMLs in `templates/` mirror `manifests/ate-install/generated/`.
13+
Run `hack/verify/crd-chart.sh` to verify they are in sync.

0 commit comments

Comments
 (0)