CHART NAME: {{ .Chart.Name }}
CHART VERSION: {{ .Chart.Version }}
APP VERSION: {{ .Chart.AppVersion }}

⚠ WARNING: Since August 28th, 2025, only a limited subset of images/charts are available for free.
    Subscribe to Bitnami Secure Images to receive continued support and security updates.
    More info at https://bitnami.com and https://github.com/bitnami/containers/issues/83267

** Please be patient while the chart is being deployed **

{{- if .Values.diagnosticMode.enabled }}
The chart has been deployed in diagnostic mode. All probes have been disabled and the command has been overwritten with:

  command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 4 }}
  args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 4 }}

Get the list of pods by executing:

  kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}

Access the pod you want to debug by executing

  kubectl exec --namespace {{ include "common.names.namespace" . | quote }} -ti <NAME OF THE POD> -- bash

{{- else }}

The following controllers have been deployed:

  {{- if .Values.dataPlane.enabled }}
  - data-plane
  {{- end }}
  {{- if .Values.controlPlane.enabled }}
  - control-plane
  {{- end }}
  {{- if .Values.ingressController.enabled }}
  - ingress-controller
  {{- end }}

{{- end }}

Check the status of the pods by running this command:

  kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l app.kubernetes.io/instance={{ .Release.Name }}

{{- if .Values.controlPlane.dashboardEnabled }}

APISIX Dashboard:

    Your APISIX Dashboard site can be accessed through the following DNS name from within your cluster:

        {{ include "apisix.control-plane.fullname" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }} (port {{ .Values.controlPlane.service.ports.adminAPI }})

    To access your APISIX site from outside the cluster follow the steps below:

    {{- if .Values.controlPlane.ingress.enabled }}

    1. Get the APISIX URL and associate APISIX hostname to your cluster external IP:

       export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
       echo "APISIX URL: http{{ if .Values.controlPlane.ingress.tls }}s{{ end }}://{{ .Values.controlPlane.ingress.hostname }}/ui"
       echo "$CLUSTER_IP  {{ .Values.controlPlane.ingress.hostname }}" | sudo tee -a /etc/hosts

    {{- else }}
    {{- $port := .Values.controlPlane.service.ports.adminAPI | toString }}

    1. Get the APISIX URL by running these commands:

    {{- if contains "NodePort" .Values.controlPlane.service.type }}

       export NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "apisix.control-plane.fullname" . }})
       export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
       echo "APISIX Dashboard URL: {{ ternary "https" "http" .Values.controlPlane.tls.enabled }}://$NODE_IP:$NODE_PORT/ui"

    {{- else if contains "LoadBalancer" .Values.controlPlane.service.type }}

      NOTE: It may take a few minutes for the LoadBalancer IP to be available.
            Watch the status with: 'kubectl get svc --namespace {{ include "common.names.namespace" . }} -w {{ include "apisix.control-plane.fullname" . }}'

       export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ include "apisix.control-plane.fullname" . }} --include "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
       echo "APISIX Dashboard URL: {{ ternary "https" "http" .Values.controlPlane.tls.enabled }}://$SERVICE_IP:{{ .Values.controlPlane.service.ports.adminAPI }}/ui"

    {{- else if contains "ClusterIP"  .Values.controlPlane.service.type }}

       kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "apisix.control-plane.fullname" . }} {{ .Values.controlPlane.service.ports.adminAPI }}:{{ .Values.controlPlane.service.ports.adminAPI }} &
       echo "APISIX Dashboard URL: {{ ternary "https" "http" .Values.controlPlane.tls.enabled }}://127.0.0.1:{{ .Values.controlPlane.service.ports.adminAPI }}/ui"

    {{- end }}
    {{- end }}

    2. Open a browser and access the APISIX Dashboard using the obtained URL.

    3. Login with the APISIX admin token below:

      echo Admin token: $(kubectl get secret --namespace {{ include "common.names.namespace" . }} {{ include "apisix.control-plane.secretName" . }} -o jsonpath="admin-token" | base64 -d)

{{- end }}

{{- if .Values.controlPlane.enabled }}

APISIX Control Plane:

    Your APISIX Control Plane Admin API site can be accessed through the following DNS name from within your cluster:

        {{ include "apisix.control-plane.fullname" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }} (port {{ .Values.controlPlane.service.ports.adminAPI }})

    To access your APISIX site from outside the cluster follow the steps below:

    {{- if .Values.controlPlane.ingress.enabled }}

    1. Get the APISIX Control Plane URL and associate APISIX hostname to your cluster external IP:

       export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
       echo "APISIX URL: http{{ if .Values.controlPlane.ingress.tls }}s{{ end }}://{{ .Values.controlPlane.ingress.hostname }}/"
       echo "$CLUSTER_IP  {{ .Values.controlPlane.ingress.hostname }}" | sudo tee -a /etc/hosts

    {{- else }}
    {{- $port := .Values.controlPlane.service.ports.adminAPI | toString }}

    1. Get the APISIX URL by running these commands:

    {{- if contains "NodePort" .Values.controlPlane.service.type }}

       export NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "apisix.control-plane.fullname" . }})
       export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
       echo "APISIX Control Plane Admin API URL: http://$NODE_IP:$NODE_PORT/"

    {{- else if contains "LoadBalancer" .Values.controlPlane.service.type }}

      NOTE: It may take a few minutes for the LoadBalancer IP to be available.
            Watch the status with: 'kubectl get svc --namespace {{ include "common.names.namespace" . }} -w {{ include "apisix.control-plane.fullname" . }}'

       export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ include "apisix.control-plane.fullname" . }} --include "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
       echo "APISIX URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.controlPlane.service.ports.adminAPI }}{{ end }}/"

    {{- else if contains "ClusterIP"  .Values.controlPlane.service.type }}

       kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "apisix.control-plane.fullname" . }} {{ .Values.controlPlane.service.ports.adminAPI }}:{{ .Values.controlPlane.service.ports.adminAPI }} &
       echo "APISIX Control Plane Admin API URL: http://127.0.0.1{{- if ne $port "80" }}:{{ .Values.controlPlane.service.ports.adminAPI }}{{ end }}//"

    {{- end }}
    {{- end }}

    2. Access the API using the API Token below:

      echo API Token: $(kubectl get secret --namespace {{ include "common.names.namespace" . }} {{ include "apisix.control-plane.secretName" . }} -o jsonpath="{.data.{{ include "apisix.control-plane.adminTokenKey" . }}}" | base64 -d)

{{- end }}

{{- if .Values.dataPlane.enabled }}

APISIX Data Plane:

    Your APISIX Data Plane Admin API site can be accessed through the following DNS name from within your cluster:

        {{ include "apisix.data-plane.fullname" . }}.{{ include "common.names.namespace" . }}.svc.{{ .Values.clusterDomain }} (port {{ .Values.dataPlane.service.ports.http }})

    To access your APISIX site from outside the cluster follow the steps below:

    {{- if .Values.dataPlane.ingress.enabled }}

    1. Get the APISIX Data Plane URL and associate APISIX hostname to your cluster external IP:

       export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
       echo "APISIX URL: http{{ if .Values.dataPlane.ingress.tls }}s{{ end }}://{{ .Values.dataPlane.ingress.hostname }}/"
       echo "$CLUSTER_IP  {{ .Values.dataPlane.ingress.hostname }}" | sudo tee -a /etc/hosts

    {{- else }}
    {{- $port := .Values.dataPlane.service.ports.http | toString }}

    1. Get the APISIX URL by running these commands:

    {{- if contains "NodePort" .Values.dataPlane.service.type }}

       export NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "apisix.data-plane.fullname" . }})
       export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . }} -o jsonpath="{.items[0].status.addresses[0].address}")
       echo "APISIX Data Plane Admin API URL: http://$NODE_IP:$NODE_PORT/"

    {{- else if contains "LoadBalancer" .Values.dataPlane.service.type }}

      NOTE: It may take a few minutes for the LoadBalancer IP to be available.
            Watch the status with: 'kubectl get svc --namespace {{ include "common.names.namespace" . }} -w {{ include "apisix.data-plane.fullname" . }}'

       export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . }} {{ include "apisix.data-plane.fullname" . }} --include "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
       echo "APISIX URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.dataPlane.service.ports.http }}{{ end }}/"

    {{- else if contains "ClusterIP"  .Values.dataPlane.service.type }}

       kubectl port-forward --namespace {{ include "common.names.namespace" . }} svc/{{ include "apisix.data-plane.fullname" . }} {{ .Values.dataPlane.service.ports.http }}:{{ .Values.dataPlane.service.ports.http }} &
       echo "APISIX Data Plane Admin API URL: http://127.0.0.1{{- if ne $port "80" }}:{{ .Values.dataPlane.service.ports.http }}{{ end }}//"

    {{- end }}
    {{- end }}
{{- end }}

{{- if .Values.ingressController.enabled }}

The Ingress Class name to use the APISIX Ingress Controller is: {{ .Values.ingressController.ingressClass.name | quote }}

{{- end }}

{{- include "common.warnings.rollingTag" .Values.image }}
{{- include "common.warnings.rollingTag" .Values.ingressController.image }}
{{- include "apisix.validateValues" . }}
{{- include "common.warnings.resources" (dict "sections" (list "controlPlane" "dataPlane" "ingressController") "context" $) }}
{{- include "common.warnings.modifiedImages" (dict "images" (list .Values.image .Values.ingressController.image .Values.waitContainer.image) "context" $) }}
{{- include "common.errors.insecureImages" (dict "images" (list .Values.image .Values.ingressController.image .Values.waitContainer.image) "context" $) }}
