Skip to content

armgit / ax

Public Imported from GitHub
0

Agent Executor (AX) is Google's open agentic orchestration runtime

Go

Use ko to build images (#223)

Jaana Doganb02a2a0dced4
diff --git a/.ko.yaml b/.ko.yaml
new file mode 100644
index 0000000..0041fed
--- /dev/null
+++ b/.ko.yaml
@@ -0,0 +1,15 @@
+# Copyright 2026 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+defaultBaseImage: gcr.io/distroless/static
diff --git a/Makefile b/Makefile
index 7f89956..e1d5a9d 100644
--- a/Makefile
+++ b/Makefile
@@ -79,6 +79,17 @@ clean-logs:
mkdir ./eventlog
ax-image:
- @echo "Building and pushing container image with docker..."
- docker build -t $(DOCKER_REPO)/ax:latest .
- docker push $(DOCKER_REPO)/ax:latest
+ @echo "Building container image with ko..."
+ @if [ -z "$$KO_DOCKER_REPO" ]; then \
+ echo "Error: KO_DOCKER_REPO is not set. Please set it to your container registry (e.g., gcr.io/my-project)."; \
+ exit 1; \
+ fi
+ GOFLAGS="-tags=ate" ko build --base-import-paths ./cmd/ax
+
+ate-agent-image:
+ @echo "Building ATE agent container image with ko..."
+ @if [ -z "$$KO_DOCKER_REPO" ]; then \
+ echo "Error: KO_DOCKER_REPO is not set. Please set it to your container registry (e.g., gcr.io/my-project)."; \
+ exit 1; \
+ fi
+ GOFLAGS="-tags=ate" ko build --base-import-paths ./internal/examples/ate_agent
diff --git a/internal/examples/ate_agent/manifest.yaml b/internal/examples/ate_agent/manifest.yaml
index 9f425bb..f06557e 100644
--- a/internal/examples/ate_agent/manifest.yaml
+++ b/internal/examples/ate_agent/manifest.yaml
@@ -25,9 +25,9 @@ metadata:
spec:
replicas: 10
container:
- image: gcr.io/ax-container-images/example-ax-agent:latest
+ image: gcr.io/ax-container-images/ate_agent:latest
ports:
- - containerPort: 8494
+ - containerPort: 50051
---
apiVersion: ate.gke.io/v1alpha1
kind: ActorTemplate