Modify network configuration on an existing machine since 2.19.0

TechPreview

Caution

For MOSK-based deployments, the feature support will become available in one of the following Container Cloud releases.

Since Container Cloud 2.19.0, modification of network configuration of an existing machine requires a separate approval step from the Infrastructure Operator. This validation is required to prevent accidental cluster failures due to misconfiguration.

While making approval decisions, the Operator verifies the result of network configuration changes per host using the fields located in the IpamHost object status.

For more details, see IpamHost status.

To modify network configuration on an existing machine since 2.19.0:

  1. Edit the L2 template as required.

  2. Verify the statuses of the IpamHost objects that use the L2 template being updated:

    kubectl get IpamHost <ipamHostName> -o=jsonpath-as-json=\"{.status['netconfigV2','netconfigV2state','netconfigFilesState','messages']}\"
    
    • If the configuration is valid:

      • The netconfigV2 field contains the Netplan configuration file candidate rendered using the modified L2 template

      • The netconfigV2state and netconfigFilesState fields have the OK status

      • The netconfigFilesState field contains the old checksum meaning that the effective Netplan configuration is still based on the old version of the L2 template

      • The messages field may contain some warnings but no errors

    • If the L2 template rendering fails, the candidate of Netplan configuration is empty and its netconfigV2state status contains an error message. A broken candidate of Netplan configuration cannot be approved and copied to the effective Netplan configuration.

    Warning

    Do not proceed to the next step until you make sure that the the netconfigV2 field contains the required configuration and this configuration is valid.

  3. Approve the new network configuration for the related IpamHost objects:

    kubectl patch IpamHost <ipamHostName> --type='merge' -p '{\"spec\":{\"netconfigUpdateAllow\":true}}'
    

    Once applied, new settings are copied to the effective Netplan configuration and sent to the corresponding nodes by the LCM Controller.

  4. Verify the statuses of the updated IpamHost objects:

    kubectl get IpamHost <ipamHostName> -o=jsonpath-as-json=\"{.status['netconfigV2','netconfigV2state','netconfigFilesState','messages']}\"
    

    The new configuration is copied to the effective Netplan configuration and both configurations are valid when:

    • The netconfigV2state and netconfigFilesState fields have the OK status and the same checksum

    • The messages list does not contain any errors