$ oc create namespace openshift-frr-k8s
Migrating FRR-K8s custom resources is required when upgrading from OKD 4.17 or earlier with the MetalLB Operator deployed. Existing FRRConfiguration resources in the metallb-system namespace must be moved to the openshift-frr-k8s namespace to align with the updated architecture. Learn how to migrate these resources using the CLI and how to verify that the migration completed successfully.
All user-created FRR-K8s custom resources (CRs) in the metallb-system namespace under OKD 4.17 and earlier releases must be migrated to the openshift-frr-k8s namespace. As a cluster administrator, you can migrate your FRR-K8s custom resources to the openshift-frr-k8s namespace using the CLI.
You can migrate the FRR-K8s FRRConfiguration custom resources from the metallb-system namespace to the openshift-frr-k8s namespace.
When upgrading from an earlier version of OKD with the Metal LB Operator deployed, you must manually migrate your custom FRRConfiguration configurations from the metallb-system namespace to the openshift-frr-k8s namespace.
You have installed the OpenShift CLI (oc).
You are logged in to the cluster as a user with the cluster-admin role.
To create the openshift-frr-k8s namespace, enter the following command:
$ oc create namespace openshift-frr-k8s
To automate the migration, create a shell script named migrate.sh with the following contents:
#!/bin/bash
OLD_NAMESPACE="metallb-system"
NEW_NAMESPACE="openshift-frr-k8s"
FILTER_OUT="metallb-"
oc get frrconfigurations.frrk8s.metallb.io -n "${OLD_NAMESPACE}" -o json |\
jq -r '.items[] | select(.metadata.name | test("'"${FILTER_OUT}"'") | not)' |\
jq -r '.metadata.namespace = "'"${NEW_NAMESPACE}"'"' |\
oc create -f -
To execute the migration, run the following command:
$ bash migrate.sh
To confirm that the migration succeeded, run the following command:
$ oc get frrconfigurations.frrk8s.metallb.io -n openshift-frr-k8s
After the migration is complete, you can remove the FRRConfiguration custom resources from the metallb-system namespace.