You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/01/25 10:06:31 UTC

[GitHub] [apisix-helm-chart] Gallardot opened a new issue #221: Proposal: customized config-default.yaml

Gallardot opened a new issue #221:
URL: https://github.com/apache/apisix-helm-chart/issues/221


   APISIX provides a very rich set of configuration items. When we need to customize the configuration, we need to add configuration items to the [values.yaml](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/values.yaml) and then modify the code in the [templates](https://github.com/apache/apisix-helm-chart/tree/master/charts/apisix/templates). This is a tedious job for the maintenance of Helm Charts. In particular, some configuration items do not need to be associated with other resources, but we do need to modify them in actual production scenarios.
   
   By reviewing the APISIX code, we can see that APISIX reads `config-default.yaml` first and `config.yaml` later. The contents of the two files will eventually be merged. Therefore, I propose to mount the `config-default.yaml` file from the Docker image to the container via configMap.
   
   Eventually, we can form a pattern that looks something like this
   
   [values.yaml](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/values.yaml) 
   
   ```
   apisix:
       conf-default.yaml : |-
         ... the content is copied from conf-default.yaml  ...
         apisix:
           # node_listen: 9080               # APISIX listening port
           node_listen:                      # This style support multiple ports
           - 9080.
           
   ```
   
   [configmap.yaml](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/configmap.yaml)
   
   ```
   apiVersion: v1
   kind: ConfigMap
   metadata:
   name: conf-default
   data:
   conf-default.yaml: |-
   # render apisix.conf-default.yaml
   ```
   
   [apisix deployment](https://github.com/apache/apisix-helm-chart/blob/master/charts/apisix/templates/deployment.yaml)
   
   ```
   volumeMounts:
       - mountPath: /usr/local/apisix/conf/config.yaml
          name: apisix-config
          subPath: config.yaml
       - mountPath: /usr/local/apisix/conf/config-default.yaml
          name: apisix-config
          subPath: config-default.yaml
   ```
   
   
   Please feel free to give your suggestions.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-helm-chart] tao12345666333 closed issue #221: Proposal: customized config.yaml

Posted by GitBox <gi...@apache.org>.
tao12345666333 closed issue #221:
URL: https://github.com/apache/apisix-helm-chart/issues/221


   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-helm-chart] tokers commented on issue #221: Proposal: customized config-default.yaml

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #221:
URL: https://github.com/apache/apisix-helm-chart/issues/221#issuecomment-1021091686


   We don't expose the existence of config-default.yaml to users, if here we support the customization of config-default.yaml, then some questions might be introduced in the same while, like the precedence, and some items in the config-default.yaml should not be updated easily and even should not be absent, these may also confuse people, also, the whole config-default.yaml is too long.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-helm-chart] tao12345666333 commented on issue #221: Proposal: customized config-default.yaml

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #221:
URL: https://github.com/apache/apisix-helm-chart/issues/221#issuecomment-1021029054


   SGTM


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-helm-chart] tokers commented on issue #221: Proposal: customized config.yaml

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #221:
URL: https://github.com/apache/apisix-helm-chart/issues/221#issuecomment-1022031842


   @Gallardot Great! Thanks for your contribution.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-helm-chart] tokers commented on issue #221: Proposal: customized config-default.yaml

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #221:
URL: https://github.com/apache/apisix-helm-chart/issues/221#issuecomment-1021091686


   We don't expose the existence of config-default.yaml to users, if here we support the customization of config-default.yaml, then some questions might be introduced in the same while, like the precedence, and some items in the config-default.yaml should not be updated easily and even should not be absent, these may also confuse people, also, the whole config-default.yaml is too long.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-helm-chart] tao12345666333 commented on issue #221: Proposal: customized config-default.yaml

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #221:
URL: https://github.com/apache/apisix-helm-chart/issues/221#issuecomment-1021029054


   SGTM


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-helm-chart] Gallardot commented on issue #221: Proposal: customized config.yaml

Posted by GitBox <gi...@apache.org>.
Gallardot commented on issue #221:
URL: https://github.com/apache/apisix-helm-chart/issues/221#issuecomment-1022020220


   Through online meetings with @tao12345666333 @tokers , we decided that a full customization of `conf.yaml` file might be a more appropriate approach. I will create a PR to solve this problem.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-helm-chart] tao12345666333 commented on issue #221: Proposal: customized config.yaml

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #221:
URL: https://github.com/apache/apisix-helm-chart/issues/221#issuecomment-1049028044


   #223 has been merged. I will close this one.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org