Skip to main content

Migrate the inbounds to Gateway API

ThingPark Enterprise 8.1.2 introduce the support of Gateway API for inbound flows. The ingress support is deprecated at same time, and will be retired with the 9.0.

As for legacy Ingress architecture, both API and base station inbounds are routed by one load balancer

The migration is done by deploying first the Gateway and the corresponding load balancer.The switch to this new load balancer is done by updating DNS entry to point the new ip(s).

Pre requisite to enable the Gateway API​

The thingpark enterprise deployment require the deployment of Istio control plan and Gateway API Custom Resource Definition

helm repo add istio https://istio-release.storage.googleapis.com/charts
helm upgrade -i istio-base istio/base -n istio-system --version 1.30.2 --set defaultRevision=default --create-namespace
helm upgrade -i istiod istio/istiod -n istio-system --version 1.30.2 --wait -f values-istiod.yaml
kubectl apply --server-side -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.5.0/experimental-install.yaml
info

The values-istiod.yaml configuration file can be found in the configuration repository with customization files (examples/customization folder)

Enable the installation of ingress gateway for the deployment in the values-thingpark-stack-all.yaml file

global:
gatewayApi:
enabled: true
# If the letsencrypt issuer is used, the thingpark-application-controller chart must be updated to configure cert-manager
cert-manager:
config:
enableGatewayAPI: true

Configure the Gateway to enable the load balancer integration in the targetted infrastructure (example for Azure)

global:
gatewayApi:
annotations:
service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path: /healthz/ready
service.beta.kubernetes.io/port_80_health-probe_port: "15021"
service.beta.kubernetes.io/port_443_health-probe_port: "15021"
service.beta.kubernetes.io/port_443_health-probe_protocol: HTTP
service.beta.kubernetes.io/port_4443_health-probe_port: "15021"
service.beta.kubernetes.io/port_3001_health-probe_port: "15021"
service.beta.kubernetes.io/port_3101_health-probe_port: "15021"
service.beta.kubernetes.io/port_3002_health-probe_port: "15021"
service.beta.kubernetes.io/port_2022_health-probe_port: "15021"
sidecar.istio.io/logLevel: info

Gateway API endpoint deployment​

The next step will deploy the Gateway in parallel to the nginx-ingress controller. The installation will deploy a new Load balancer exposing both API and base stations.

  • Upgrade the thingpark-application-controllers chart with the new configuration
helm upgrade -i tpe-controllers -n $NAMESPACE \
actility/thingpark-application-controllers --version $THINGPARK_APPLICATION_CONTROLLERS_VERSION \
-f values-thingpark-stack-all.yaml
  • Upgrade the thingpark-enterprise chart using your customization
helm upgrade -i tpe --debug --timeout 20m -n $NAMESPACE \
actility/thingpark-enterprise --version $THINGPARK_ENTERPRISE_VERSION \
-f values-thingpark-stack-all.yaml

API and base station Switch​

Reconfigure the DNS entry used in .Values.global.dnsHostname to point to the new Load Balancer.

Disable the ingress-nginx controller

ingress-nginx:
enabled: false
helm upgrade -i tpe-controllers -n $NAMESPACE \
actility/thingpark-application-controllers --version $THINGPARK_APPLICATION_CONTROLLERS_VERSION \
-f values-thingpark-stack-all.yaml

Base station will not reconnect automatically until the ingress controller is disabled

Ask AI