20 Commits
Author SHA1 Message Date
kacerr b114da7a17 Merge pull request 'House conventions port and valid listener names for wildcard certificates' (#1) from feat/house-conventions into main
Deploy to K8s / deploy (push) Successful in 16s
Build and Push / check (push) Successful in 2m59s
Build and Push / build (push) Successful in 22s
Reviewed-on: #1
2026-10-08 20:48:31 +02:00
kacerrandClaude Opus 5.5 5c4a148b36 docs: close out the conventions and listener-name plans
Deploy to K8s / deploy (push) Successful in 14s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:47:53 +02:00
kacerrandClaude Opus 5.5 42b53b7538 fix: produce valid listener names for wildcard and unusual DNS names
A DNS name like *.home.hrajfrisbee.cz put "*" into the listener name; the
API server rejected the patch, which blocked every certificate on that
Gateway.

- lowercase the DNS part, spell "*" as "wildcard", map other characters
  outside [a-z0-9] to "-"
- names over 253 chars are cut and get a hash suffix instead of a blind cut
- names that were valid before are unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:47:44 +02:00
kacerrandClaude Opus 5.5 6698eab1d8 docs: add plan for sanitizing listener names
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:46:47 +02:00
kacerrandClaude Opus 5.5 60360ca5b9 fix: address review findings on the conventions branch
- ci: reject a manual dispatch with tag "latest"; concurrency group per tag
- Dockerfile: declare GIT_COMMIT after the module download layer
- Makefile: docker-build targets linux/amd64 by default
- patch.go: no shared package-level pointers; main.go: no init()
- tests: assert that merge replaces managed listener content
- docs: flows.md startup section matches main.go; review saved to docs/reviews

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:43:02 +02:00
kacerrandClaude Opus 5.5 8c074288c6 ci: gate the image build on vet/build/test, push sha tags, protect latest
- check job runs go vet, go build and go test -short before the build
- images are pushed as :<tag> and :sha-<12>; :latest moves only on tag pushes
- GIT_COMMIT build arg and OCI source/created labels

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:36:22 +02:00
kacerrandClaude Opus 5.5 ab408403bc test: add baseline table-driven tests for listener build, merge and compare
Covers current correct behaviour of the pure functions in internal/gateway.
Known-buggy inputs (wildcards, collisions, truncation) are left out on purpose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:36:11 +02:00
kacerrandClaude Opus 5.5 3766e94b35 feat: stamp the build commit, add --version and zap flags, rename module
- module path is now gitea.home.hrajfrisbee.cz/kacerr/gatewayapi-certificates-operator
- internal/version resolves the commit from ldflags or Go build info;
  --version prints it and the first log line carries it
- --metrics-bind-address is passed to the manager instead of being dropped
- Dockerfile takes GIT_COMMIT, honours TARGETARCH, labels the image revision

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:34:49 +02:00
kacerrandClaude Opus 5.5 0eb588e8bd chore: add Makefile with check gate, golangci-lint config, dockerignore
- make check runs lint + vet + test-short; lint is pinned to the go.mod
  toolchain so it works when the host Go is newer than golangci-lint's
- gofumpt main.go and patch.go; drop unused gatewayGroup/gatewayKind vars

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:32:53 +02:00
kacerrandClaude Opus 5.5 2be69b9aac chore: add Claude settings, ship/release commands, reviewer agents, changelog
- /ship now commits and pushes with a branch guard and no longer tags;
  /release tags vMAJOR.MINOR.PATCH and confirms before pushing
- operator-reviewer and go-operator-reviewer agents from egress-proxies-operator
- committed permission allowlist; settings.local.json ignored

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:31:26 +02:00
kacerrandClaude Opus 5.5 7a559bacd0 docs: rewrite CLAUDE.md to house conventions, fix flows.md and README
- CLAUDE.md in five sections with Go, testing, plan, changelog, branching
  and tagging rules; known sharp edges moved to Gotchas
- docs/flows.md: metrics are served on :8080, name collisions are rejected
  by the API server, last-cert deletion never cleans up
- README moved to the repo root, deploy command corrected

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:31:00 +02:00
kacerrandClaude Opus 5.5 36030f4011 docs: add plan for porting house conventions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 20:29:48 +02:00
kacerrandClaude Sonnet 4.6 21468b9f78 deploy: fix image name to match Gitea repository name
Build and Push / build (push) Successful in 5s
Deploy to K8s / deploy (push) Successful in 12s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 14:05:34 +01:00
kacerrandClaude Sonnet 4.6 e61e397229 deploy: update image reference to use full Gitea registry path
Build and Push / build (push) Successful in 6s
Deploy to K8s / deploy (push) Successful in 7s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:58:19 +01:00
kacerrandClaude Sonnet 4.6 12969b137e ci: also tag built image as latest
Deploy to K8s / deploy (push) Successful in 11s
Build and Push / build (push) Successful in 5s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:46:49 +01:00
kacerrandClaude Sonnet 4.6 2c4126eac8 deploy: fix ExternalSecret namespace to gateway-cert-operator-system
Deploy to K8s / deploy (push) Successful in 11s
Build and Push / build (push) Successful in 4s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:42:38 +01:00
kacerrandClaude Sonnet 4.6 f7353d48f4 deploy: add Gitea registry pull secret and ExternalSecret
Deploy to K8s / deploy (push) Successful in 8s
Build and Push / build (push) Successful in 5s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:37:16 +01:00
kacerrandClaude Sonnet 4.6 4d800ffbfb convert deploy manifests to kustomization format
Deploy to K8s / deploy (push) Successful in 9s
Build and Push / build (push) Successful in 5s
Adds kustomization.yaml to enforce explicit resource ordering
(namespace before deployment/service). Updates CI to use
kubectl apply -k instead of kubectl apply -f.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 13:20:19 +01:00
kacerrandClaude Sonnet 4.6 6ec6a3664f feat: add Gitea CI workflows and split deploy manifests
Build and Push / build (push) Successful in 2m1s
Deploy to K8s / deploy (push) Failing after 7s
Add build and kubernetes-deploy Gitea Actions workflows, and split deploy/manifests.yaml into individual manifest files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 11:35:10 +01:00
kacerrandClaude Sonnet 4.6 a78e4421ef feat: initial implementation of gateway-cert-operator
Kubernetes operator that automates HTTPS listener configuration on
Gateway API Gateway resources whenever a cert-manager Certificate is
created or updated.

Core behaviour:
- Watches cert-manager Certificate resources for the annotation
  gateway-cert-operator.io/gateway-name to identify the target Gateway
- Builds HTTPS listeners (prefixed "auto-") from each Certificate's
  DNS SANs and merges them into the target Gateway's listener list
- Preserves any manually-managed listeners; removes stale auto-listeners
  when Certificates are deleted or their annotations are removed
- Supports optional annotations to override the target namespace and
  listener port (default 443)

Components:
- main.go                            – manager setup, scheme registration,
                                       health/readiness probes
- internal/controller/               – Certificate reconciler with field
                                       indexing and dual-watch pattern
- internal/gateway/patch.go          – listener construction, merge, and
                                       equality helpers
- deploy/manifests.yaml              – Namespace, RBAC, and Deployment
- docs/README.md                     – usage guide and architecture notes
- Dockerfile                         – distroless multi-stage build

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 10:54:33 +01:00