tree: f465d2a2859e58b2acfbfdc9d2dbada03b9afc4a [path history] [tgz]
  1. charts/
  2. crds/
  3. templates/
  4. .helmignore
  5. Chart.yaml
  6. README.md
  7. README.md.gotmpl
  8. values.yaml
charts/apisix-ingress-controller/README.md

Apache APISIX ingress controller

APISIX Ingress controller for Kubernetes using Apache APISIX as a high performance reverse proxy and load balancer.

If you have installed multiple ingress controller, add the kubernetes.io/ingress.class: apisix annotation to your Ingress resources.

This chart bootstraps an apisix-ingress-controller deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

Apisix ingress controller requires Kubernetes version 1.16+.

Get Repo Info

helm repo add apisix https://apache.github.io/apisix-helm-chart
helm repo update

Install Chart

Important: only helm3 is supported

helm install [RELEASE_NAME] apisix/apisix-ingress-controller --namespace ingress-apisix --create-namespace

The command deploys apisix-ingress-controller on the Kubernetes cluster in the default configuration.

See configuration below.

See helm install for command documentation.

Uninstall Chart

helm uninstall [RELEASE_NAME] --namespace ingress-apisix

This removes all the Kubernetes components associated with the chart and deletes the release.

See helm uninstall for command documentation.

Upgrading Chart

helm upgrade [RELEASE_NAME] [CHART] --install

See helm upgrade for command documentation.

Configuration

See Customizing the Chart Before Installing. To see all configurable options with detailed comments, visit the chart's values.yaml, or run these configuration commands:

helm show values apisix/apisix-ingress-controller

Pod priority

priorityClassName field referenced a name of a created PriorityClass object. Check here for more details.

Security context

A security context provides us with a way to define privilege and access control for a Pod or even at the container level.

Check here to see the SecurityContext resource with more detail.

Check also here to see a full explanation and some examples to configure the security context.

Right below you have an example of the security context configuration. In this case, we define that all the processes in the container will run with user ID 1000.

...

spec:
  securityContext:
    runAsUser: 1000
    runAsGroup: 3000
...

The same for the group definition, where we define the primary group of 3000 for all processes.

It's quite important to know, if the runAsGroup is omited, the primary group will be root(0), which in some cases goes against some security policies.

To define this configuration at the pod level, you need to set:

    --set podSecurityContext.runAsUser=«VALUE»
    --set podSecurityContext.runAsGroup=«VALUE»
    ...

The same for container level, you need to set:

    --set securityContext.runAsUser=«VALUE»
    --set SecurityContext.runAsGroup=«VALUE»
    ...

Values

KeyTypeDefaultDescription
apisix.adminService.namestring"apisix-admin"
apisix.adminService.namespacestring"apisix-ingress"
apisix.adminService.portint9180
autoscaling.enabledboolfalse
autoscaling.minReplicasint1
config.controllerNamestring"apisix.apache.org/apisix-ingress-controller"
config.enableHTTP2boolfalse
config.execADCTimeoutstring"15s"
config.kubernetes.defaultIngressClassboolfalse
config.kubernetes.ingressClassstring"apisix"
config.leaderElection.disableboolfalse
config.leaderElection.idstring"apisix-ingress-controller-leader"
config.leaderElection.leaseDurationstring"15s"
config.leaderElection.renewDeadlinestring"10s"
config.leaderElection.retryPeriodstring"2s"
config.logLevelstring"info"
config.metricsAddrstring":8080"
config.probeAddrstring":8081"
config.provider.initSyncDelaystring"20m"
config.provider.syncPeriodstring"1m"
config.provider.typestring"apisix"
config.secureMetricsboolfalse
deployment.adcContainerobject{"config":{"logLevel":"info"},"image":{"repository":"ghcr.io/api7/adc","tag":"0.21.2"}}Set adc sidecar container configuration
deployment.affinityobject{}
deployment.annotationsobject{}Add annotations to Apache APISIX ingress controller resource
deployment.image.pullPolicystring"IfNotPresent"
deployment.image.repositorystring"apache/apisix-ingress-controller"
deployment.image.tagstring"2.0.0-rc5"
deployment.nodeSelectorobject{}
deployment.podAnnotationsobject{}
deployment.podSecurityContextobject{"fsGroup":2000}Set security context for the pod fsGroup: 2000 ensures containers can share Unix socket files via a common group.
deployment.replicasint1
deployment.resourcesobject{}Set pod resource requests & limits
deployment.tolerationslist[]
deployment.topologySpreadConstraintslist[]Topology Spread Constraints for pod assignment spread across your cluster among failure-domains ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/#spread-constraints-for-pods
fullnameOverridestring""
gatewayProxy.createDefaultboolfalseControls whether to create a default GatewayProxy custom resource.
gatewayProxy.providerobject{"controlPlane":{"auth":{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"},"endpoints":[],"service":{"name":"","port":9180}},"pluginMetadata":{},"plugins":[],"type":"ControlPlane"}Configuration for the GatewayProxy provider connection
gatewayProxy.provider.controlPlaneobject{"auth":{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"},"endpoints":[],"service":{"name":"","port":9180}}ControlPlane provider specific configuration Either endpoints or service must be specified, but not both.
gatewayProxy.provider.controlPlane.authobject{"adminKey":{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}},"type":"AdminKey"}Authentication configuration for control plane connection
gatewayProxy.provider.controlPlane.auth.adminKeyobject{"value":"edd1c9f034335f136f87ad84b625c8f1","valueFrom":{}}AdminKey authentication configuration. Either value or valueFrom must be specified, but not both.
gatewayProxy.provider.controlPlane.auth.adminKey.valuestring"edd1c9f034335f136f87ad84b625c8f1"The admin key value for authentication.
gatewayProxy.provider.controlPlane.auth.adminKey.valueFromobject{}Reference to admin key stored in a Kubernetes Secret
gatewayProxy.provider.controlPlane.auth.typestringAdminKeyAuthentication type. Only AdminKey is currently supported.
gatewayProxy.provider.controlPlane.endpointslist[]List of APISIX control plane Admin API endpoints. example: [“http://apisix-admin.default.svc.cluster.local:9180”]
gatewayProxy.provider.controlPlane.serviceobject{"name":"","port":9180}Alternatively, reference a Kubernetes Service for the APISIX Admin API.
gatewayProxy.provider.pluginMetadataobject{}Global plugin metadata shared by all instances of the same plugin.
gatewayProxy.provider.pluginslist[]List of global plugins to be enabled on the GatewayProxy.
gatewayProxy.provider.typestring"ControlPlane"Specifies the provider type for the GatewayProxy.
labelsOverrideobject{}Override default labels assigned to Apache APISIX ingress controller resource
nameOverridestring""Default values for apisix-ingress-controller. This is a YAML-formatted file. Declare variables to be passed into your templates.
podDisruptionBudgetobject{"enabled":false,"maxUnavailable":1,"minAvailable":"90%"}See https://kubernetes.io/docs/tasks/run-application/configure-pdb/ for more details
podDisruptionBudget.enabledboolfalseEnable or disable podDisruptionBudget
podDisruptionBudget.maxUnavailableint1Set the maxUnavailable of podDisruptionBudget
podDisruptionBudget.minAvailablestring"90%"Set the minAvailable of podDisruptionBudget. You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget. See Specifying a Disruption Budget for your Application for more details
serviceMonitor.annotationsobject{}@param serviceMonitor.annotations ServiceMonitor annotations
serviceMonitor.enabledboolfalseEnable or disable ServiceMonitor
serviceMonitor.intervalstring"15s"@param serviceMonitor.interval Interval at which metrics should be scraped
serviceMonitor.labelsobject{}@param serviceMonitor.labels ServiceMonitor extra labels
serviceMonitor.metricRelabelingsobject{}@param serviceMonitor.metricRelabelings MetricRelabelConfigs to apply to samples before ingestion. ref: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs
serviceMonitor.namespacestring"monitoring"@param serviceMonitor.namespace Namespace in which to create the ServiceMonitor
webhook.certificate.providedboolfalseSet to true if you want to provide your own certificate
webhook.enabledbooltrueEnable or disable admission webhook
webhook.failurePolicystring"Fail"Failure policy for the webhook (Fail or Ignore)
webhook.portint9443The port for the webhook server to listen on
webhook.timeoutSecondsint10Timeout in seconds for the webhook