lilien1010 commented on a change in pull request #4:
URL: https://github.com/apache/apisix-helm-chart/pull/4#discussion_r534908301
##########
File path: chart/apisix/templates/configmap.yaml
##########
@@ -137,12 +143,19 @@ data:
# ipc_shared_dict: 100m # custom shared cache, format:
`cache-key: cache-size`
etcd:
+ {{- if .Values.etcd.enabled }}
+ host: # it's possible to define multiple
etcd hosts addresses of the same etcd cluster.
+ - "http://{{ .Release.Name }}-etcd.{{ .Release.Namespace
}}.svc.cluster.local:2379"
Review comment:
I think we can change `cluster.local` into vaules.yaml, and make it
configurable ? since some of the K8S cluster name is not by default
```
{{- if .Values.etcd.enabled }}
- "http://{{ .Release.Name }}-etcd.{{ .Release.Namespace }}.svc.{{
.Values.gateway.k8s_domain }}:{{ .Values.etcd.port }}"
{{- else }}
- {{ .Values.etcd.host }}
{{- end }}
```
##########
File path: chart/apisix/templates/deployment.yaml
##########
@@ -77,13 +78,6 @@ spec:
subPath: config.yaml
resources:
{{- toYaml .Values.resources | nindent 12 }}
Review comment:
need make sure etcd is live,before apisix start
```
initContainers:
- name: wait-etcd
image: busybox:1.28
command: ['sh', '-c', "until nc -z {{ .Release.Name }}-etcd-0.{{
.Release.Name }}-etcd.{{ .Release.Namespace }}.svc.{{
.Values.gateway.k8s_domain }} {{ .Values.etcd.port }}; do echo waiting for etcd
`date`; sleep 2; done;"]
# - name: dnsmasq
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]