martin-mat opened a new pull request, #1017: URL: https://github.com/apache/apisix-helm-chart/pull/1017
Fixes #1015. `apisix.deployment.mode: standalone` mounts the rules file for file-driven standalone, which APISIX defines as `role: data_plane` with the `yaml` config provider ([deployment modes](https://apisix.apache.org/docs/apisix/deployment-modes/#file-driven)). The chart still took the role from `apisix.deployment.role`, whose default is `traditional` on the `etcd` provider. Standalone mode removes the `etcd:` section, so the entrypoint ran `init_etcd` against `127.0.0.1:2379` and the pod crash-looped. **Change** - New helper `apisix.deployment.role` computes the role the config is rendered with. With `mode: standalone`: - `traditional` on a provider other than `yaml` becomes `data_plane`, which is file-driven standalone, what the mode means; - `traditional` on the `yaml` provider, which is API-driven standalone, is kept as configured; - `control_plane` fails the render with a clear message, since a control plane needs etcd. - Every template that read `.Values.apisix.deployment.role` now reads the helper: nine places in `configmap.yaml` and `deployment.yaml`. - The values docs for `mode`, and the README row, say what standalone implies and how to get API-driven standalone instead. - Chart version 2.17.0 → 2.17.1. #1016 bumps to the same version; whichever merges second moves to 2.17.2. **Renders** (`helm template`, `etcd.enabled=false` for the standalone cases): | Values | Before | After | |---|---|---| | `mode: standalone` | `role: traditional`, `config_provider: etcd`, no etcd section: crash loop | `role: data_plane`, `config_provider: yaml` | | `mode: standalone`, `role: data_plane` | `data_plane`, `yaml` | unchanged | | `mode: standalone`, `role_traditional.config_provider: yaml` | `traditional`, `yaml` (API-driven) | unchanged | | `mode: standalone`, `role: control_plane` | a control plane with no etcd | render fails: `mode "standalone" cannot run with role "control_plane": a control plane needs etcd` | | defaults | `traditional`, `etcd` | unchanged | For the default values and for `mode: decoupled` with `role: data_plane`, the full render differs from master only in the `helm.sh/chart` label and in the JWT key the chart generates randomly per render. `helm lint charts/apisix` passes. The first case was also run with the image: it starts as a data plane serving the standalone rules. Related: #974 is the mirror case, where API-driven standalone without `mode: standalone` still renders the `etcd:` section. It is left for a separate change, since it decides whether etcd is configured at all. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
