nic-6443 commented on code in PR #12949:
URL: https://github.com/apache/apisix/pull/12949#discussion_r2744854736


##########
docker/utils/check_standalone_config.sh:
##########
@@ -16,20 +16,30 @@
 # limitations under the License.
 #
 
-if ! grep -q 'role: data_plane' "${PREFIX}/conf/config.yaml"; then
-    echo "Error: ${PREFIX}/conf/config.yaml does not contain 'role: 
data_plane'. Deployment role must be set to 'data_plane' for standalone mode."
+CONF_FILE="${PREFIX}/conf/config.yaml"

Review Comment:
   I suggest that we should not validate `config.yaml` through the shell, as it 
is prone to errors. We can move the checking logic to ops.lua, so that we can 
validate `config.yaml` in a semantic way:
   
https://github.com/apache/apisix/blob/adf2ea1573a17dee97ff8a4ad2df835f3ba8a862/apisix/cli/ops.lua#L179-L186
   Here, check the environment variables and fields in the `yaml_conf` object.



-- 
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]

Reply via email to