Repository navigation
Conversation
… wait-etcd The etcd host was built as <release>-etcd, which misses etcd.nameOverride, etcd.namespaceOverride and release names that already contain etcd. Use the etcd chart's own name helpers so both point at the Service it creates. Fixes apache#1049 Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
3d972fc to
6eed6fa
Compare
moonming
left a comment
There was a problem hiding this comment.
Thanks for the focused fix, @cvas22! I checked the two original cases with Helm: demo with etcd.nameOverride=store, and a release named demo-etcd. On master, APISIX and wait-etcd use the wrong Service name; with this branch, both point to the Service rendered by the etcd subchart.
Before merging, could you please:
- Add regression coverage to
test/render/etcd-access.shfor those two cases, asserting that the ConfigMap host and wait-etcd target match the rendered Service name, rather than checking only the NetworkPolicy label. - Update the now-stale
APISIX does not find etcd under an etcd.nameOverrideerror message and its test expectation.
The namespaceOverride DNS change looks reasonable, but this PR does not need to claim complete cross-namespace support: NetworkPolicy and Secret references have separate namespace constraints. We can handle that independently.
The chart 3.1.1 bump looks right. Thanks again!
… error Signed-off-by: Srinivas Chippagiri <cvas22@gmail.com>
|
Added render tests for both cases (nameOverride=store on demo, and a release named demo-etcd) that compare the ConfigMap host and the wait-etcd target with the Service the etcd subchart renders, and updated the stale error message and its test, in 38b4624. Agreed on leaving the cross-namespace NetworkPolicy and Secret parts for a separate PR. thx |
moonming
left a comment
There was a problem hiding this comment.
Thanks for the quick update, @cvas22! The new tests cover both original cases and compare the ConfigMap and wait-etcd against the actual Service. I ran the full render suite locally: 93 checks passed. Running the new tests against unchanged master produces the expected five failures. CI on 38b4624 is green. Approving.
Fixes #1049
The ConfigMap and the wait-etcd init container built the etcd host as
<release>-etcd, soetcd.nameOverride,etcd.namespaceOverrideor a release name that already has etcd in it pointed APISIX at a Service that doesn't exist. I added anapisix.etcd.hosthelper that calls the etcd chart's owncommon.names.fullnameandcommon.names.namespacethrough.Subcharts.etcd, same as the secret name helper already does. With onlyetcd.fullnameOverrideset the output stays the bare name like before, so those releases don't get a config change.Notes
I rendered it with
helm templatefor the default release,demowithetcd.nameOverride=store, a release calleddemo-etcd,fullnameOverridewith and withoutnamespaceOverride, and external etcd, and checked the host matched the etcd Service each time.helm lintis clean. Bumped the chart to 2.19.1.