mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
73 lines
2.6 KiB
Plaintext
73 lines
2.6 KiB
Plaintext
// Modules included in the following assemblies:
|
|
//
|
|
// * networking/configuring_ingress_cluster_traffic/configuring-ingress-cluster-traffic-load-balancer-allowed-source-ranges.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="nw-configuring-lb-allowed-source-ranges-migration_{context}"]
|
|
= Migrating to load balancer allowed source ranges
|
|
|
|
[role="_abstract"]
|
|
To ensure long-term compatibility and use stable API parameters in {product-title}, migrate from the legacy `service.beta.kubernetes.io/load-balancer-source-ranges` annotation to load balancer allowed source ranges.
|
|
|
|
When you set the `AllowedSourceRanges`, the Ingress Controller sets the `spec.loadBalancerSourceRanges` parameter based on the `AllowedSourceRanges` value and unsets the `service.beta.kubernetes.io/load-balancer-source-ranges` annotation.
|
|
|
|
[NOTE]
|
|
====
|
|
If you have already set the `spec.loadBalancerSourceRanges` parameter or the load balancer service anotation `service.beta.kubernetes.io/load-balancer-source-ranges` in a previous version of {product-title}, the Ingress Controller starts reporting `Progressing=True` after an upgrade. To fix this, set `AllowedSourceRanges` that overwrites the `spec.loadBalancerSourceRanges` parameter and clears the `service.beta.kubernetes.io/load-balancer-source-ranges` annotation. The Ingress Controller starts reporting `Progressing=False` again.
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* You have set the `service.beta.kubernetes.io/load-balancer-source-ranges` annotation.
|
|
|
|
.Procedure
|
|
|
|
. Check that the `service.beta.kubernetes.io/load-balancer-source-ranges` is set by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get svc router-default -n openshift-ingress -o yaml
|
|
----
|
|
+
|
|
.Example output
|
|
[source,yaml]
|
|
----
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
annotations:
|
|
service.beta.kubernetes.io/load-balancer-source-ranges: 192.168.0.1/32
|
|
----
|
|
|
|
. Check that the `spec.loadBalancerSourceRanges` parameter is unset by entering the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get svc router-default -n openshift-ingress -o yaml
|
|
----
|
|
+
|
|
.Example output
|
|
[source,yaml]
|
|
----
|
|
...
|
|
spec:
|
|
loadBalancerSourceRanges:
|
|
- 0.0.0.0/0
|
|
...
|
|
----
|
|
|
|
. Update your cluster to {product-title} {product-version}.
|
|
|
|
. Set the allowed source ranges API for the `ingresscontroller` by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc -n openshift-ingress-operator patch ingresscontroller/default \
|
|
--type=merge --patch='{"spec":{"endpointPublishingStrategy": \
|
|
{"loadBalancer":{"allowedSourceRanges":["0.0.0.0/0"]}}}}'
|
|
----
|
|
+
|
|
where:
|
|
+
|
|
`allowedSourceRanges`:: The example value `0.0.0.0/0` specifies the allowed source range.
|