cubemaster: support dns flag for template image creation#98
Conversation
|
/cubebot review |
|
Claude finished @fslongjin's task in 2m 46s —— View job PR Review: DNS Flag for Template Image Creation
Overall: Clean, well-scoped PR that follows existing patterns. The implementation is correct and consistent with how other override fields (probe, rlimit, env) are handled. A few suggestions below. Issues1. No DNS server input validation The
if len(dnsServers) > 0 {
overrides.DnsConfig = &types.DNSConfig{Servers: dnsServers}
}Consider adding IP validation (e.g., 2. Fingerprint test should also cover DNS vs no-DNS
3. Missing test: no There's no test verifying that when
Nit4.
What looks good
|
Signed-off-by: YangYuS8 <YangYuS8@163.com>
f7befb4 to
227a4c1
Compare
|
Thanks for the review. I addressed the actionable suggestions:
|
Summary
--dnssupport tocubemastercli tpl create-from-imageProblem
cubemastercli tpl create-from-imagepreviously had no way to specify DNS nameservers, even though the underlying container model already supportsDnsConfig.This makes it difficult to create templates for environments that require custom DNS resolution, such as private networks or internal service discovery.
Fix
DnsConfigtoContainerOverrides--dnsvalues in the create-from-image CLI flowExample:
Closes #12
Validation
cd CubeMaster && go test ./cmd/cubemastercli/commands/cubebox -run DNS -count=1cd CubeMaster && go test ./pkg/templatecenter -run DNS -count=1Notes
--dns.--dns-searchor--dns-optionto keep the scope focused.