martin-mat opened a new issue, #1015:
URL: https://github.com/apache/apisix-helm-chart/issues/1015
Setting only `apisix.deployment.mode: standalone`, which is what the values
documentation suggests, produces a pod that never starts. The config provider
is derived from the mode only for the `data_plane` role. With the default
`role: traditional`, `templates/configmap.yaml` renders:
```yaml
deployment:
role: traditional
role_traditional:
config_provider: etcd # default "etcd", regardless of mode
```
At the same time, `mode: standalone` removes the `etcd:` section from the
config and mounts the standalone rules. The container's entrypoint sees an etcd
config provider and runs `apisix init_etcd`, which falls back to
`127.0.0.1:2379`, fails and exits with status 1:
```
/usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd
request etcd endpoint 'http://127.0.0.1:2379/version' error, connection
refused
all etcd nodes are unavailable
```
The pod then sits in CrashLoopBackOff. With `role: data_plane` added, the
same values render `role_data_plane.config_provider: yaml` and the pod starts
and serves the standalone rules.
**Reproduction** (chart 2.17.0, APISIX 3.18.0):
```yaml
apisix:
deployment:
mode: standalone
etcd:
enabled: false
```
**Expected**
`mode: standalone` means rules from a file and no etcd, whatever the role.
Either:
- derive the provider from the mode for the `traditional` role too (`yaml`
when `mode: standalone`, unless `role_traditional.config_provider` is set
explicitly), and fail the render with a clear message for `mode: standalone`
with `role: control_plane`, which has no meaning; or
- at minimum, document next to `apisix.deployment.mode` that standalone
requires `role: data_plane`.
The first keeps the one setting users reach for working as its name says.
**Related**
#974 is the mirror image of the same coupling. There,
`role_traditional.config_provider: yaml` without `mode: standalone` keeps the
`etcd:` section in the config, and APISIX keeps trying to reach etcd. Mode and
role are two switches for one decision, and each combination that sets only one
of them fails in its own way.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]