apisix-helm-chart icon indicating copy to clipboard operation
apisix-helm-chart copied to clipboard

could not install apisix-ingress if ingress-controller.enabled changed to true when helm install apisix charts

Open zplinuxlover opened this issue 3 years ago • 2 comments

apisix chart and apisix-dashboard chart use {{ .Release.Namespace }}, when we change the config ingress-controller.enabled default behaviour, we could not install the apisix-ingress chart.

In apisix charts values.yaml

ingress-controller:
  enabled: false

changed to

ingress-controller:
  enabled: true

I want to install apisix and apisix-ingress at the same time. but apisix-ingress could not install successfully. In apisix chart, we do not specify the namesapce, we use {{ .Release.Namespace }}, but in apisix-ingress charts, we use the configured namespace in values.yaml

  apisix:
    serviceName: apisix-admin
    #serviceNamespace: ingress-apisix

the code in apisix-ingress-controller charts deployment.yaml, we use a different namespace configured in values.yaml,

command: ['sh', '-c', "until nc -z {{ .Values.config.apisix.serviceName }}.{{ Values.config.apisix.serviceNamespace }}.svc.{{ .Values.clusterDomain }} {{ .Values.config.apisix.servicePort }} ;

the init container could not success, so the apisix ingress controller could not startup

image

we should use .Release.Namespace consistent with others charts, apisix charts and apisix-dashboard.

zplinuxlover avatar May 13 '22 07:05 zplinuxlover

should set serviceNamespace: ingress-apisix from ingress-apisix to default, hence user can use helm install apisix . in apisix charts dir to install all the components including apisix, apisix-ingress, apisix-ingress-controller

zplinuxlover avatar May 13 '22 10:05 zplinuxlover

But this won't work if APISIX and APISIX Ingress are in different namespaces

tao12345666333 avatar May 14 '22 05:05 tao12345666333