Skip to content

bug: docker image standalone check fails on valid config files #12427

Description

@jesse-r-s-hines

Current Behavior

In the apisix docker image, the /check_standalone_config.sh checks that the config is in "standalone mode". However it uses hard-coded greps for strings in the yaml such as role: data_plane. This means the check will fail if the yaml is formated even slightly different, e.g.

deployment:
  role: "data_plane"

or

deployment: {"role": "data_plane"}

Also, the check does not respect the APISIX_PROFILE environment variable and so will be looking in the wrong config file entirely if you are using multiple profiles.

Expected Behavior

The docker image should accept valid YAML files.

Error Logs

Error: /usr/local/apisix/conf/config.yaml does not contain 'role: data_plane'. Deployment role must be set to 'data_plane' for standalone mode.
Please refer to the APISIX documentation for deployment modes: https://apisix.apache.org/docs/apisix/deployment-modes/

Steps to Reproduce

Run apisix via the docker image, with config set to something like this:

 role: "data_plane"
  role_data_plane:
    config_provider: yaml

Environment

Apisix docker image, tag 3.12.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions