Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed

Conversation

zplinuxlover
Copy link

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.

… not podSecurityContext

2. pod.spec.containers.securityContext should reference apisix.podSecurityContext not podSecurityContext
… 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.
… when we change the config `ingress-controller.enabled` default behaviour, we could not install the apisix-ingress chart.
Copy link
Member

@tao12345666333 tao12345666333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helm install apisix apisix/apisix --set gateway.type=NodePort --set ingress-controller.enabled=true --set ingress-controller.config.apisix.serviceNamespace=apisix --namespace apisix --create-namespace --set ingress-controller.config.apisix.serviceName=apisix-admin

Thanks, you can pass --set ingress-controller.config.apisix.serviceNamespace=apisix and --set ingress-controller.config.apisix.serviceName=apisix-admin .

Release Namespace is not used directly because of the scenario of a standalone installation of the APISIX Ingress controller (although it is not recommended)

I don't think this change is reasonable.

@zplinuxlover
Copy link
Author

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

@tao12345666333
Copy link
Member

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

@zplinuxlover zplinuxlover closed this by deleting the head repository Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants