tkyoo opened a new issue, #705:
URL: https://github.com/apache/apisix-helm-chart/issues/705
When using APISIX standalone mode as a subchart, 'apisix.yaml' configmap is
always re-initialized when upgrading the parent chart.
I think using an external configmap as the "apisix.yaml" is a simple
solution for solving them!
Example: (variable names and paths are very sensitive part of the project,
so this code is just a sample!)
apisix-config-configmap.yaml:
```yaml
{{- if and (eq .Values.deployment.mode "standalone") (eq (len
.Values.apisix.standalone.extraConfigMap) 0 ) }}
kind: ConfigMap
apiVersion: v1
metadata:
name: apisix.yaml
data:
apisix.yaml: |
routes:
-
uri: /hi
upstream:
nodes:
"127.0.0.1:1980": 1
type: roundrobin
#END
{{- end }}
```
_pod.tpl:
```yaml
volumes:
{{- if eq .Values.deployment.mode "standalone" }}
- configMap:
name: {{ .Values.apisix.standalone.extraConfigMap | default
"apisix.yaml" }}
name: apisix-admin
{{- end }}
```
values.yaml:
```yaml
apisix:
...
standalone:
extraConfigMap: "apisix-yaml"
```
Maybe this feature will also be very helpful for other APISIX users :)
--
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]