netscaler-ipam-controller

by NetScaler

Helm chartv2.5.2App 2.5.2Verified publisher

A Helm chart for NetScaler IPAM Controller which automatically allocate an IP address to the service of type LoadBalancer.

About this chart

NetScaler IPAM controller.

NetScaler provides a controller called IPAM controller for IP address management. When you create a service of type LoadBalancer, you can use the NetScaler IPAM controller to automatically allocate an IP address to the service. Once the IPAM controller is deployed, it allocates IP address to services of type LoadBalancer from predefined IP address ranges. The NetScaler ingress controller configures the IP address allocated to the service as virtual IP (VIP) in NetScaler MPX or VPX.

TL;DR;

helm repo add netscaler https://netscaler.github.io/netscaler-helm-charts/

helm install ipam netscaler/netscaler-ipam-controller --set vipRange=<IP-address-range>

Introduction

This Helm chart deploys a NetScaler IPAM controller in the Kubernetes or in the Openshift cluster using the Helm package manager.

IPAM controller has the ability to either allocate the same IP for all ingresses (default behaviour) or it can allocate unique IP until the IP range is exhausted. This behaviour can be controlled using the reuseIngressVip parameter of the helm chart. Please note that for services of type LoadBalancer, distinct IPs are allocated from the specified IP range until all available addresses are exhausted.

Prerequisites

  • The Kubernetes version is 1.24 or later if using Kubernetes environment.
  • Kubernetes version 1.29 or later is required to enable API Priority and Fairness (apiPriorityAndFairness.enabled=true).
  • The Openshift version 4.8 or later if using OpenShift platform.
  • Openshift version 4.16 or later is required to enable API Priority and Fairness (apiPriorityAndFairness.enabled=true).
  • The Helm version 3.x or later. You can follow instruction given here to install the same.
  • For Infoblox integration, ensure that you create a user role in Infoblox with the following permissions:
    • Allocate and manage IP addresses.
    • Create, update, and delete host records.
    • Create, update, and delete extensible attributes.
    • Create, update, and delete Network Views.
  • For binddns setup TSIG (Transaction SIGnatures) and provide access controls in binddns following the documentation here. Keep the TSIG KEY and TSIG Secret which will be used later.

Deploy the IPAM controller with the following configurations for enabling BIND DNS:

  • Create generic secret in Kubernetes for the Infoblox User:
    kubectl create secret generic infobloxsecret --from-literal=username=<Infoblox Username> --from-literal=password=<Infoblox Password> -n <namespace>
    
  • For BindDNS integration, create a Kubernetes Secret containing the TSIG key name and secret:
    kubectl create secret generic binddns-tsig-secret --from-literal=tsigKey=<TSIG Key Name> --from-literal=tsigSecret=<Base64-encoded HMAC Secret> -n <namespace>
    

Installing the Chart

Add the NetScaler IPAM Controller helm chart repository using command:

helm repo add netscaler https://netscaler.github.io/netscaler-helm-charts/

To install the chart with the release name my-release:

helm install my-release netscaler/netscaler-ipam-controller --set vipRange=<IP-address-range>

Note:

By default the chart installs the recommended RBAC roles and role bindings.

Installed components

The following components are installed:

Configuration

The following table lists the configurable parameters of the NetScaler CPX with NetScaler ingress controller as side car chart and their default values.

ParametersMandatory or OptionalDefault valueDescription
imageRegistryMandatoryquay.ioThe NetScaler IPAM Controller image registry
imageRepositoryMandatorynetscaler/netscaler-ipam-controllerThe NetScaler IPAM Controller image repository
imageTagMandatory2.5.2The NetScaler IPAM Controller image tag
pullPolicyMandatoryIfNotPresentThe NetScaler IPAM Controller image pull policy.
vipRangeMandatoryN/AThis variable allows you to define the IP address range. You can either define IP address range or an IP address range associated with a unique name. NetScaler IPAM controller assigns the IP address from this IP address range to the service of type LoadBalancer.
reuseIngressVipOptionalTrueThis variable allows you to use same IP for all ingresses using the same vipRange.
clusterMandatory if infoblox.enabled is trueN/AThis variable allows you to provide cluster name thatis used to identify the cluster in which the IPAM controller is deployed.
infoblox.enabledOptionalfalseBoolean value that allows you to enable/disable infoblox IPAM.
infoblox.gridHostMandatory if infoblox.enabled is trueN/AInfoblox grid host IP or FQDN. Should be reachable from Cluster.
infoblox.credentialSecretMandatory if infoblox.enabled is trueN/AKubernetes Secret in the same namespace having infoblox username and password with desired access privileges as listed in prerequisites.
infoblox.httpTimeoutOptional10This variable allows you to provide infoblox client HTTP Timeout in seconds.
infoblox.maxRetriesOptional3This variable allows you to provide infoblox client max retries in case of failure.
infoblox.netViewOptionaldefaultThis variable allows you to provide infoblox Network View. If the Network View is not present it will be created.
infoblox.vipRangeMandatory if infoblox.enabled is trueN/AInfoblox IPAM VIP Range that will be managed by the controller. All IPs in this range will be managed in Infoblox by the controller and should not be conflicting for any other processes. IP range should be in CIDR format a.b.c.d/n. Example: "[{"infoblox-range": ["1.1.1.0/24"]}]"
infoblox.sslVerifyOptionaltrueVerify the Infoblox Grid Master's TLS certificate on WAPI calls. Secure by default. Set to false to disable verification (use only for testing).
infoblox.caBundleSecretOptional""Name of a Kubernetes Secret (same namespace) holding the CA bundle that signed the Infoblox Grid Master certificate. Required when the Grid Master uses a self-signed or private-CA certificate. The Secret must contain a key ca.crt; it is mounted read-only and used for verification.
serviceAccount.createMandatorytrueCreate serviceAccount for NetScaler IPAM Controller
serviceAccount.tokenExpirationSecondsMandatory31536000Time in seconds when the token of serviceAccount get expired
serviceAccount.nameOptional""Name of the ServiceAccount for the IPAM Controller. If you want to use a ServiceAccount that you have already created and manage yourself, specify its name here and set serviceAccount.create to false.
createClusterRoleAndBindingMandatorytrueIf you want to use a ClusterRole and Cluster Role Binding that you have already created and manage yourself then set to false. Please make sure you have bound the serviceaccount with the cluster role properly.
podAnnotationsOptionalN/AMap of annotations to add to the pods.
affinityOptionalN/AAffinity labels for pod assignment.
nodeSelector.keyOptionalN/ANode label key to be used for nodeSelector option in IPAM controller deployment.
nodeSelector.valueOptionalN/ANode label value to be used for nodeSelector option in IPAM controller deployment.
tolerationsOptionalN/ASpecify the tolerations for the IPAM Controller deployment.
resourcesOptional{}CPU/Memory resource requests/limits for NetScaler IPAM Controller container
apiPriorityAndFairness.enabledOptionalfalseEnable API Priority and Fairness flow control for the controller's API server requests. Creates a PriorityLevelConfiguration and FlowSchema.
apiPriorityAndFairness.priorityLevelConfiguration.nominalConcurrencySharesOptional40Relative weight of this priority level vs other levels (default workload gets 30).
apiPriorityAndFairness.priorityLevelConfiguration.lendablePercentOptional25Percentage of seats that can be lent to other priority levels when idle.
apiPriorityAndFairness.priorityLevelConfiguration.limitResponse.typeOptionalQueueType of limit response.
apiPriorityAndFairness.priorityLevelConfiguration.limitResponse.queuing.queuesOptional16Number of shuffle-sharded queues.
apiPriorityAndFairness.priorityLevelConfiguration.limitResponse.queuing.handSizeOptional4Spread factor per flow.
apiPriorityAndFairness.priorityLevelConfiguration.limitResponse.queuing.queueLengthLimitOptional50Max pending requests per queue.
apiPriorityAndFairness.flowSchema.matchingPrecedenceOptional1000Matching precedence for the FlowSchema (lower = higher priority; system uses 0-999).
apiPriorityAndFairness.flowSchema.distinguisherMethod.typeOptionalByNamespaceMethod to distinguish flows. Supported values: ByNamespace, ByUser.
dns.enabledOptionalfalseBoolean value that allows you to enable/disable DNS integration.
dns.typeMandatory if dns.enabled is truebinddnsDNS provider type.
dns.binddns.serverMandatory if dns.type is binddnsN/AIP address of the BIND DNS server.
dns.binddns.zoneMandatory if dns.type is binddnsN/ADNS zone managed by the BIND server.
dns.binddns.tsigKeySecretMandatory if dns.type is binddnsN/AName of a Kubernetes Secret containing TSIG credentials. Required keys: tsigKey (key name), tsigSecret (base64-encoded HMAC secret).
dns.binddns.fudgeOptional300TSIG clock skew tolerance in seconds. Increase if clocks are out of sync.

Alternatively, you can define a YAML file with the values for the parameters and pass the values while installing the chart. For example:

helm install my-release netscaler/netscaler-ipam-controller -f values.yaml

Example: Installing with BindDNS

helm install my-release netscaler/netscaler-ipam-controller \
  --set vipRange='[{"Prod":["10.1.2.0/24"]}]' \
  --set dns.enabled=true \
  --set dns.type=binddns \
  --set dns.binddns.server=10.106.166.228 \
  --set dns.binddns.zone=example.com \
  --set dns.binddns.tsigKeySecret=binddns-tsig-secret

Tip:

The values.yaml contains the default values of the parameters.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete my-release

Related documentation

Deploy netscaler-ipam-controller with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has netscaler-ipam-controller on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnetscaler-ipam-controller is pinned at v2.5.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply