User Request
Align the teams service with the architecture documentation in agynio/architecture (commit 4fbedf1): new-service.md, e2e-testing.md, ci-cd.md.
Specification
1. Dockerfile
- Add
--platform=$BUILDPLATFORM on build stage: FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS build
- Switch from Debian (
golang:1.25) to Alpine (golang:1.25-alpine)
- Switch runtime from
gcr.io/distroless/base-debian12 to alpine:3.21
- Add non-root user in Alpine runtime (
addgroup -S app && adduser -S app -G app, USER app)
- Move
ARG TARGETOS TARGETARCH after COPY . ., add ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH
- Proto generation needs to happen in the Dockerfile (add buf stage like gateway/chat) since code imports generated stubs
2. Workflows
Delete docker-ghcr.yml — publishes edge/dev images on main push, not in spec.
Rewrite release.yaml:
- Add
docker/metadata-action@v5 for tags: sha-<short>, semver ({{version}}, {{major}}.{{minor}}, {{major}}), latest
- Add GHA layer cache
- Add manifest verification step with
jq after image push
- Add
helm dependency build before lint
- Remove redundant proto gen steps if Dockerfile handles it
ci.yml — already close to standard, minor cleanup only.
3. buf.gen.yaml / Proto
- Change output directory from
gen/go to .gen/go
- Update
.gitignore from gen/ to .gen/
- Update all Go import paths referencing
gen/go to .gen/go
- Consider removing manual
M option overrides if proto go_package handles it
4. Helm Chart
- Add
service-base dependency:
dependencies:
- name: service-base
version: ">=0.1.4 <1.0.0"
repository: oci://ghcr.io/agynio/charts
- Remove custom templates (
deployment.yaml, hpa.yaml, service.yaml, serviceaccount.yaml, _helpers.tpl). Keep NOTES.txt if present.
- Adjust
values.yaml to use service-base value schema.
5. DevSpace (missing entirely)
Create devspace.yaml following the Go service template from e2e-testing.md:
deployments.e2e-runner with component-chart
dev.e2e-runner with sync
pipelines.test:e2e + dev
commands.test:e2e
- Namespace:
platform, E2E image: ghcr.io/agynio/devcontainer-go:1
6. E2E Tests
- Add
//go:build e2e build tag to all test files in test/e2e/
- Update test addresses to use K8s DNS defaults (e.g.,
teams:50051)
- Tests should run inside the cluster via
devspace run test:e2e
7. README
Rewrite to standard template from new-service.md: title, description, architecture link, Local Development (bootstrap + devspace), Run tests.
Reference
Follow patterns from agynio/gateway, agynio/chat, agynio/notifications, agynio/authorization (all already aligned).
User Request
Align the
teamsservice with the architecture documentation inagynio/architecture(commit4fbedf1):new-service.md,e2e-testing.md,ci-cd.md.Specification
1. Dockerfile
--platform=$BUILDPLATFORMon build stage:FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS buildgolang:1.25) to Alpine (golang:1.25-alpine)gcr.io/distroless/base-debian12toalpine:3.21addgroup -S app && adduser -S app -G app,USER app)ARG TARGETOS TARGETARCHafterCOPY . ., addENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH2. Workflows
Delete
docker-ghcr.yml— publishes edge/dev images on main push, not in spec.Rewrite
release.yaml:docker/metadata-action@v5for tags:sha-<short>, semver ({{version}},{{major}}.{{minor}},{{major}}),latestjqafter image pushhelm dependency buildbefore lintci.yml— already close to standard, minor cleanup only.3. buf.gen.yaml / Proto
gen/goto.gen/go.gitignorefromgen/to.gen/gen/goto.gen/goMoption overrides if protogo_packagehandles it4. Helm Chart
service-basedependency:deployment.yaml,hpa.yaml,service.yaml,serviceaccount.yaml,_helpers.tpl). KeepNOTES.txtif present.values.yamlto useservice-basevalue schema.5. DevSpace (missing entirely)
Create
devspace.yamlfollowing the Go service template frome2e-testing.md:deployments.e2e-runnerwithcomponent-chartdev.e2e-runnerwith syncpipelines.test:e2e+devcommands.test:e2eplatform, E2E image:ghcr.io/agynio/devcontainer-go:16. E2E Tests
//go:build e2ebuild tag to all test files intest/e2e/teams:50051)devspace run test:e2e7. README
Rewrite to standard template from
new-service.md: title, description, architecture link, Local Development (bootstrap + devspace), Run tests.Reference
Follow patterns from
agynio/gateway,agynio/chat,agynio/notifications,agynio/authorization(all already aligned).