User Request
Align the authorization service with the architecture documentation in agynio/architecture (commit 4fbedf1): new-service.md, e2e-testing.md, ci-cd.md.
Specification
1. Dockerfile (4 gaps)
- Add
--platform=$BUILDPLATFORM on build stage: FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS build
- Switch from Debian (
golang:1.24) to Alpine (golang:1.24-alpine)
- Switch runtime from
gcr.io/distroless/base-debian12 to alpine:3.21 (or current)
- Move
ARG TARGETOS TARGETARCH after COPY . ., add ENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH per template
- Proto generation needs to happen in the Dockerfile (add buf stage like gateway/chat) since code imports from generated stubs
2. Workflows (7 gaps)
Delete docker-ghcr.yml — not in architecture spec (publishes edge/dev images on main push).
Rewrite release.yml:
- Add
docker/metadata-action@v5 for tags: sha-<short>, semver {{version}}, {{major}}.{{minor}}, {{major}}, latest (no pre-release)
- Add GHA layer cache (
cache-from: type=gha, cache-to: type=gha,mode=max)
- 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, just needs minor cleanup.
3. buf.gen.yaml / Proto (2 gaps)
- 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
- Keep using
buf generate buf.build/agynio/api --path agynio/api/authorization/v1 (already correct)
4. Helm Chart (1 gap)
- Add
service-base dependency to Chart.yaml:
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.
- 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 (missing entirely)
Create test/e2e/ with:
main_test.go — setup, K8s DNS address defaults (authorization:50051)
authorization_test.go — basic gRPC connectivity/health test
//go:build e2e build tag on all files
7. README (missing entirely)
Create standard template from new-service.md.
8. Makefile
Delete Makefile.
Reference
Follow patterns from agynio/gateway and agynio/chat (already aligned), and agynio/notifications (PR #13, just merged).
User Request
Align the
authorizationservice with the architecture documentation inagynio/architecture(commit4fbedf1):new-service.md,e2e-testing.md,ci-cd.md.Specification
1. Dockerfile (4 gaps)
--platform=$BUILDPLATFORMon build stage:FROM --platform=$BUILDPLATFORM golang:1.24-alpine AS buildgolang:1.24) to Alpine (golang:1.24-alpine)gcr.io/distroless/base-debian12toalpine:3.21(or current)ARG TARGETOS TARGETARCHafterCOPY . ., addENV CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCHper template2. Workflows (7 gaps)
Delete
docker-ghcr.yml— not in architecture spec (publishes edge/dev images on main push).Rewrite
release.yml:docker/metadata-action@v5for tags:sha-<short>,semver {{version}},{{major}}.{{minor}},{{major}},latest(no pre-release)cache-from: type=gha,cache-to: type=gha,mode=max)jqafter image pushhelm dependency buildbefore lintci.yml— already close to standard, just needs minor cleanup.3. buf.gen.yaml / Proto (2 gaps)
gen/goto.gen/go.gitignorefromgen/to.gen/gen/goto.gen/goMoption overrides if protogo_packagehandles itbuf generate buf.build/agynio/api --path agynio/api/authorization/v1(already correct)4. Helm Chart (1 gap)
service-basedependency toChart.yaml:deployment.yaml,hpa.yaml,service.yaml,serviceaccount.yaml,_helpers.tpl). KeepNOTES.txt.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 (missing entirely)
Create
test/e2e/with:main_test.go— setup, K8s DNS address defaults (authorization:50051)authorization_test.go— basic gRPC connectivity/health test//go:build e2ebuild tag on all files7. README (missing entirely)
Create standard template from
new-service.md.8. Makefile
Delete
Makefile.Reference
Follow patterns from
agynio/gatewayandagynio/chat(already aligned), andagynio/notifications(PR #13, just merged).