C Migrating from NGINX to HAProxy Ingress Controller
This section describes the configuration changes required to migrate from the NGINX Ingress Controller to the HAProxy Ingress Controller.
Note:
You must configure all applications to use HAProxy, and then uninstall NGINX.Installing HAProxy Ingress Controller
To install the HAProxy Ingress Controller, see "Planning and Validating Your Cloud Environment" in UIM Cloud Native Deployment Guide.
Configure applications-base.yaml for All Services
The configuration in this section applies to UIM, ATA, Message Bus, and Smart Search. Perform the following before proceeding to the application-specific sections:
- Download the latest
common-cntk, merge the specifications, and retain the required values from your existing configuration. - Ensure that the
ingressControllervalue in thespecsection is set toGENERIC:ingressController: "GENERIC" - Update the loadbalancerport value in the applications-base.yaml file with the HAProxy load balancer port or NodePort:
loadbalancerport: 30543 - Uncomment and configure the required ingress annotations and ingress.className in the applications-base.yaml file based on your ingress controller. The following example shows values for the HAProxy Ingress Controller:
ingress: className: "haproxy" annotations: haproxy.org/cookie-persistence: "uimhaproxycookie"
Migrating UIM to the HAProxy Ingress Controller
To migrate UIM to the HAProxy Ingress Controller:
- If TLS is enabled, replace the NGINX annotations under uim.ingress.annotations in the $SPEC_PATH/$PROJECT/$INSTANCE/app-uim.yaml file.
uim: ingress: annotations: haproxy.org/ssl-redirect: "true" haproxy.org/backend-config-snippet: | http-request del-header WL-Proxy-Client-IP http-request del-header WL-Proxy-SSL http-request set-header X-Forwarded-Proto https http-request set-header WL-Proxy-SSL true - Recreate the UIM ingress and upgrade the instance:
# recreate uim ingress $COMMON_CNTK/scripts/delete-ingress.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a uim $COMMON_CNTK/scripts/create-ingress.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a uim # upgrade uim instance $COMMON_CNTK/scripts/upgrade-applications.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a uim - Verify that the UIM instance is accessible through the HAProxy NodePort or LoadBalancer port.
Migrating ATA and SmartSearch to the HAProxy Ingress Controller
To migrate ATA and Smart Search to the HAProxy Ingress Controller.
Note:
If the applications-base.yaml file is already configured, no additional configuration is required for ATA and SmartSearch.- Recreate the ingress and upgrade the applications:
# ATA Ingress $COMMON_CNTK/scripts/delete-ingress.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a ata $COMMON_CNTK/scripts/create-ingress.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a ata $COMMON_CNTK/scripts/upgrade-applications.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a ata # Smart Search Ingress $COMMON_CNTK/scripts/delete-ingress.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a smartsearch $COMMON_CNTK/scripts/create-ingress.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a smartsearch $COMMON_CNTK/scripts/upgrade-applications.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a smartsearch - Verify that the ATA and SmartSearch instances are accessible through the HAProxy NodePort or LoadBalancer port.
Migrating OpenSearch Dashboard to the HAProxy Ingress Controller
To migrate the OpenSearch Dashboard to the HAProxy Ingress Controller:
- Set the OpenSearch Dashboard service type to ClusterIP.
- Enable ingress and update the ingressClassName to haproxy in the $SPEC_PATH/$PROJECT/opensearch/os_board_values.yaml file.
- Replace the NGINX annotations with HAProxy annotations to enable session persistence:
service: type: ClusterIP ingress: enabled: true ingressClassName: haproxy annotations: haproxy.org/cookie-persistence: "uimhaproxycookie" - Upgrade or create the OpenSearch Dashboard instance:
$COMMON_CNTK/samples/charts/opensearch/scripts/upgrade-opensearch-dashboard.sh - Verify that the OpenSearch Dashboard is accessible through the HAProxy NodePort or LoadBalancer port.
Migrating Message Bus to the HAProxy Ingress Controller
To migrate the Message Bus to the HAProxy Ingress Controller:
- Update the ingress annotations for the Kafka cluster in the $SPEC_PATH/$PROJECT/$INSTANCE/app-messaging-bus.yaml file to enable ingress for the Message Bus:
kafka-cluster: listeners: ingress: ingressSslPort: 30543 annotations: haproxy.org/ssl-passthrough: "true" ingress.kubernetes.io/ssl-passthrough: "true" - Upgrade the Message Bus instance:
$COMMON_CNTK/scripts/upgrade-applications.sh -p $PROJECT -i $INSTANCE -s $SPEC_PATH -a messaging-bus - Verify that the Message Bus instance is accessible through the HAProxy NodePort or LoadBalancer port.
Cleaning Up the NGINX Ingress Controller
To remove the NGINX Ingress Controller after migrating to HAProxy:
- Verify that all applications are accessible through the HAProxy Ingress Controller.
- Uninstall the NGINX Ingress Controller:
helm uninstall nginx-operator -n nginx