feat: add configurable Docker registry support#27
feat: add configurable Docker registry support#27JohnPreston wants to merge 1 commit intofivexl:mainfrom
Conversation
- Make Docker registry and image name configurable via environment variables - Update GoReleaser to use REGISTRY and IMAGE_NAME env vars - Add workflow-level environment variables with sensible defaults - Create comprehensive CONTRIBUTING.md with setup instructions - Support multiple registries (GHCR, Docker Hub, GCR) - Maintain backward compatibility with original ghcr.io/fivexl/lprobe
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| if err := validateIPAddress(ip); err != nil { | ||
| return fmt.Errorf("hostname %q resolves to disallowed IP %s: %v", hostname, ip, err) | ||
| } | ||
| } |
There was a problem hiding this comment.
Bug: IP validation: Intent vs. Implementation conflict.
The validateHostname function's comment states "Check if any resolved IP is allowed" but the implementation requires ALL resolved IPs to be allowed. When a hostname resolves to multiple IPs (like localhost resolving to both 127.0.0.1 and ::1), if any single IP fails validation, the entire hostname is rejected. This contradicts the comment and could incorrectly reject valid hostnames that have at least one allowed IP address.
| echo "URL HTTP path test failed" | ||
| docker stop nginx-lprobe-test | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Bug: Test Fails Custom Path Validation
The test labeled "URL HTTP with custom path Check Test" uses the same URL as the previous test (http://127.0.0.1:8080/) without actually testing a custom path. This makes the test redundant and fails to validate the intended functionality of custom path handling in the -url flag.
|
Hi, @JohnPreston |
Hey. Sorry about the cursor bot stuff as I am here. I just created an account with it by curiosity through GH and here it goes, doing all sorts of things I didn't want it to do.... So I no longer have an account now 😅 . Be damned with tracking... Right, so I thought, while trying to make the -url a little friendlier, that we wanted to retain the single hop limit. I just thought that in a cloud environment, it might be something that one might want to be able to query as well, although now that I think about it "out loud", the purpose is debatable 🤔 I'd be quite a niche thing to be able to query those specific IP addresses. Happy to take those out, that's easy enough. |
Note
Add URL-based health check with hostname/IP validation, make Docker registry/image configurable across CI and GoReleaser, add CONTRIBUTING docs, and update dependencies.
-urloption with automatic scheme/port/path parsing, TLS inference, and-tls-server-namesetting.127.0.0.1,::1,169.254.169.254,169.254.170.2,fd00:ec2::254.host.scripts/test.shwith URL-based HTTP checks and failure cases.REGISTRYandIMAGE_NAMEenv vars with defaults; use in Docker login and GoReleaser steps (.github/workflows/ci.yml).{{ .Env.REGISTRY }}/{{ .Env.IMAGE_NAME }}fordockersanddocker_manifests.{{ .Env.GITHUB_REPOSITORY_OWNER }}.CONTRIBUTING.mdwith instructions for publishing images to custom registries and contribution guidelines.go.mod/go.sum), includinggo-spiffe,grpc,x/*,genproto,protobuf.Written by Cursor Bugbot for commit ff06cd6. This will update automatically on new commits. Configure here.