Configure IP protocols for Helm chart components

5 minute read

Starting with v2024.03.0, you can configure CloudBees CD/RO components to specifically use IPv4 or IPv6 protocols. To set the preferred IP protocol, the protocol must be set in the component wrapper configuration file, which can be passed from the component Helm chart.

The capability to configure CloudBees CD/RO components to use specific IP protocols is only possible in v2024.03.0 and later. You must install or upgrade to v2024.03.0 or later to enable this feature.

If you attempt to perform the following configurations on earlier versions, your installation/upgrade may fail or your platform components will be unable to communicate with CloudBees CD/RO.

For the Java-based CloudBees CD/RO components:

  • flow-server

  • flow-agent

  • flow-repository

There are two directives that can be used with specific options:

  • java.net.preferIPv4Stack=true|false

  • java.net.preferIPv6Addresses=true|false

The behavior of these directives is described in the following table:

Table 1. IP protocol configuration behavior

java.net.preferIPv4Stack

java.net.preferIPv6Addresses

default address

true

false

IPv4 only 1

false (DEFAULT)

false (DEFAULT)

IPv4 preferred 2

false

true

IPv6 preferred 3!

Table annotations
  • 1 IPv4 hosts only, and the component will not communicate with IPv6 hosts.

  • 2 This is the default configuration. IPv4 is preferred, but if IPv4 is not available, IPv6 is used.

  • 3 IPv6 is preferred, but if IPv6 is not available, IPv4 is used.

    If you are using CloudBees CD/RO in an IPv6-based clustered multi-node environment, you must set server.ecconfigure to use preferIPv6Addresses=true. For more information, refer to Configure IP protocol for CloudBees CD/RO server.
By default, all CloudBees CD/RO components are set to accept communications from both IPv4 and IPv6 hosts. If you configure any CloudBees CD/RO component to use only IPv4 hosts, the component will not accept communications from IPv6 hosts, even in situations where no IPv4 host is present.

The web server (web-server) is PHP-based, and uses:

  • System settings (DEFAULT): --webPhpCurlIPResolve=WHATEVER 1

  • IPv4 only: --webPhpCurlIPResolve=IPv4 2

  • IPv6 only: --webPhpCurlIPResolve=IPv6 3

List annotations
  • 1 Default. Uses whatever IPs are allowed by your system.

  • 2 IPv4 hosts only, and the component will not communicate with IPv6 hosts.

  • 3 IPv6 hosts only, and the component will not communicate with IPv4 hosts.

By default, all CloudBees CD/RO components are set to accept communications from both IPv4 and IPv6 hosts. If you configure any CloudBees CD/RO component to use only IPv4 hosts, the component will not accept communications from IPv6 hosts, even in situations where no IPv4 host is present.

The following sections describe the specific procedures for setting these configuration for each component.

Configure IP protocol for CloudBees CD/RO server

By default, the CloudBees CD/RO server (flow-server) is configured to communicate with both IPv4 and IPv6 hosts. Where IPv4 hosts are preferred, but if an IPv4 host is not available, an IPv6 host can be used.

If you are using CloudBees CD/RO in an IPv6-based clustered multi-node environment, you must set server.ecconfigure to use preferIPv6Addresses=true.

Starting in v2024.03.0, you can configure CloudBees CD/RO components to use specific IP protocols or to prefer different protocols. To do so, set the desired option for server.ecconfigure in your cloudbees-flow values file:

  • To use only IPv4 hosts, configure server.ecconfigure to:

    ecconfigure: "--serverInitMemoryMB=4096 --serverMaxMemoryMB=4096 --wrapperJavaAdditional=10001=-Djava.net.preferIPv4Stack=true"
    Using the above configuration results in communication with IPv4 hosts only, and the component will not communicate with IPv6 hosts.
  • To use IPv6 as the preferred host, configure server.ecconfigure to:

    ecconfigure: "--serverInitMemoryMB=4096 --serverMaxMemoryMB=4096 --wrapperJavaAdditional=10002=-Djava.net.preferIPv6Addresses=true"
    Using the above configuration results IPv6 being the preferred host. However, if an IPv6 host is not available, an IPv4 is still accepted.

Configure IP protocol for CloudBees CD/RO repository

By default, the CloudBees CD/RO repository (flow-repository) is configured to communicate with both IPv4 and IPv6 hosts. Where IPv4 hosts are preferred, but if an IPv4 host is not available, an IPv6 host can be used.

Starting in v2024.03.0, you can configure CloudBees CD/RO components to use specific IP protocols or to prefer different protocols. To do so, set the desired option for repository.ecconfigure in your cloudbees-flow values file:

  • To use only IPv4 hosts, configure repository.ecconfigure to:

    ecconfigure: "--repositoryInitMemoryMB=512 --repositoryMaxMemoryMB=1024 --repositoryWrapperJavaAdditional=10001=-Djava.net.preferIPv4Stack=true"
    Using the above configuration results in communication with IPv4 hosts only, and the component will not communicate with IPv6 hosts.
  • To use IPv6 as the preferred host, configure repository.ecconfigure to:

    ecconfigure: "--repositoryInitMemoryMB=512 --repositoryMaxMemoryMB=1024 --repositoryWrapperJavaAdditional=10002=-Djava.net.preferIPv6Addresses=true"
    Using the above configuration results IPv6 being the preferred host. However, if an IPv6 host is not available, an IPv4 is still accepted.

Configure IP protocol for CloudBees CD/RO web server

By default, the CloudBees CD/RO web (web-server) is configured to communicate with both IPv4 and IPv6 hosts. Where IPv4 hosts are preferred, but if an IPv4 host is not available, an IPv6 host can be used.

Starting in v2024.03.0, you can configure CloudBees CD/RO components to use specific IP protocols or to prefer different protocols. To do so, set the desired option for web.ecconfigure in your cloudbees-flow values file:

  • To use only IPv4 hosts, configure web.ecconfigure to:

    ecconfigure: "--webPhpCurlIPResolve=IPv4"
    Using the above configuration results in communication with IPv4 hosts only, and the component will not communicate with IPv6 hosts.
  • To use IPv6 as the preferred host, configure web.ecconfigure to:

    ecconfigure: "--webPhpCurlIPResolve=IPv6"
    Using the above configuration results in communication with IPv6 hosts only, and the component will not communicate with IPv4 hosts.

Configure IP protocol for CloudBees Analytics server

By default, the CloudBees Analytics server (flow-analytics) is configured to communicate with both IPv4 and IPv6 hosts. Where IPv4 hosts are preferred, but if an IPv4 host is not available, an IPv6 host can be used.

Starting in v2024.03.0, you can configure CloudBees CD/RO components to use specific IP protocols or to prefer different protocols. To do so, set the desired option for analytics.extraEnvs in your cloudbees-flow values file:

  • To use only IPv4 hosts, configure analytics.extraEnvs to:

    extraEnvs: - name: CBF_ANALYTICS_PREFER_IPV4_ADDRESSES value: "true"
    Using the above configuration results in communication with IPv4 hosts only, and the component will not communicate with IPv6 hosts.
  • To use IPv6 as the preferred host, configure analytics.extraEnvs to:

    extraEnvs: - name: CBF_ANALYTICS_PREFER_IPV6_ADDRESSES value: "true"
    Using the above configuration results IPv6 being the preferred host. However, if an IPv6 host is not available, an IPv4 is still accepted.

Configure IP protocol for CloudBees CD/RO agents

By default, CloudBees CD/RO bound agents (flow-bound-agent) are configured to communicate with both IPv4 and IPv6 hosts. Where IPv4 hosts are preferred, but if an IPv4 host is not available, an IPv6 host can be used.

Starting in v2024.03.0, you can configure CloudBees CD/RO components to use specific IP protocols or to prefer different protocols. To do so, set the desired option for boundAgent.ecconfigure in your cloudbees-flow values file:

  • To use only IPv4 hosts, configure boundAgent.ecconfigure to:

    ecconfigure: "--agentInitMemoryMB=256 --agentMaxMemoryMB=256 --agentWrapperJavaAdditional=10001=-Djava.net.preferIPv4Stack=true"
    Using the above configuration results in communication with IPv4 hosts only, and the component will not communicate with IPv6 hosts.
  • To use IPv6 as the preferred host, configure boundAgent.ecconfigure to:

    ecconfigure: "--agentInitMemoryMB=16 --agentMaxMemoryMB=64" --agentWrapperJavaAdditional=10002=-Djava.net.preferIPv6Addresses=true"
    Using the above configuration results IPv6 being the preferred host. However, if an IPv6 host is not available, an IPv4 is still accepted.

Apply IP protocol changes to Kubernetes deployments

For IP protocol changes in your values file Helm charts to take effect, they must be applied to your installation or updated in your deployment. For more information, refer to: