Skip to content

Commit 1f35579

Browse files
authored
Merge pull request #49752 from Amrita42/CFE-520-526new
ingress controller and dns mgt
2 parents c0a6db6 + cdc44f4 commit 1f35579

File tree

4 files changed

+119
-0
lines changed

4 files changed

+119
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,9 @@ Topics:
997997
- Name: Understanding the Ingress Operator
998998
File: ingress-operator
999999
Distros: openshift-enterprise,openshift-origin
1000+
- Name: Configuring the Ingress Controller for manual DNS management
1001+
File: ingress-controller-dnsmgt
1002+
Distros: openshift-enterprise,openshift-origin
10001003
- Name: Configuring the Ingress Controller endpoint publishing strategy
10011004
File: nw-ingress-controller-endpoint-publishing-strategies
10021005
Distros: openshift-enterprise,openshift-origin
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Module included in the following assemblies:
2+
//
3+
// *ingress-controller-dnsmgt.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="creating-a-custom-ingress-controller_{context}"]
7+
= Creating a custom Ingress Controller with the `Unmanaged` DNS management policy
8+
9+
As a cluster administrator, you can create a new custom Ingress Controller with the `Unmanaged` DNS management policy.
10+
11+
.Prerequisites
12+
13+
* Install the OpenShift CLI (`oc`).
14+
* Log in as a user with `cluster-admin` privileges.
15+
16+
.Procedure
17+
18+
. Create a custom resource (CR) file named `sample-ingress.yaml` containing the following:
19+
20+
+
21+
[source,yaml]
22+
----
23+
apiVersion: operator.openshift.io/v1
24+
kind: IngressController
25+
metadata:
26+
namespace: openshift-ingress-operator
27+
name: <name> <1>
28+
spec:
29+
domain: <domain> <2>
30+
endpointPublishingStrategy:
31+
type: LoadBalancerService
32+
loadBalancer:
33+
scope: External <3>
34+
dnsManagementPolicy: Unmanaged <4>
35+
----
36+
<1> Specify the `<name>` with a name for the `IngressController` object.
37+
<2> Specify the `domain` based on the DNS record that was created as a prerequisite.
38+
<3> Specify the `scope` as `External` to expose the load balancer externally.
39+
<4> `dnsManagementPolicy` indicates if the Ingress Controller is managing the lifecycle of the wildcard DNS record associated with the load balancer.
40+
The valid values are `Managed` and `Unmanaged`. The default value is `Managed`.
41+
42+
43+
. Save the file to apply the changes.
44+
+
45+
[source,terminal]
46+
----
47+
oc apply -f <name>.yaml <1>
48+
----
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Module included in the following assemblies:
2+
//
3+
// *ingress-controller-dnsmgt.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="modifying-an-existing-ingress-controller_{context}"]
7+
= Modifying an existing Ingress Controller
8+
9+
As a cluster administrator, you can modify an existing Ingress Controller to manually manage the DNS record lifecycle.
10+
11+
.Prerequisites
12+
13+
* Install the OpenShift CLI (`oc`).
14+
* Log in as a user with `cluster-admin` privileges.
15+
16+
.Procedure
17+
18+
. Modify the chosen `IngressController` to set `dnsManagementPolicy`:
19+
20+
+
21+
[source,terminal]
22+
----
23+
SCOPE=$(oc -n openshift-ingress-operator get ingresscontroller <name> -o=jsonpath="{.status.endpointPublishingStrategy.loadBalancer.scope}")
24+
25+
oc -n openshift-ingress-operator patch ingresscontrollers/<name> --type=merge --patch='{"spec":{"endpointPublishingStrategy":{"type":"LoadBalancerService","loadBalancer":{"dnsManagementPolicy":"Unmanaged", "scope":"${SCOPE}"}}}}'
26+
----
27+
28+
. Optional: You can delete the associated DNS record in the cloud provider.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
:_content-type: ASSEMBLY
2+
[id="ingress-controller-dnsmgt"]
3+
= Configuring an Ingress Controller for manual DNS Management
4+
include::_attributes/common-attributes.adoc[]
5+
:context: ingress-controller-dnsmgt
6+
7+
toc::[]
8+
9+
As a cluster administrator, when you create an Ingress Controller, the Operator manages the DNS records automatically. This has some limitations when the required DNS zone is different from the cluster DNS zone or when the DNS zone is hosted outside the cloud provider.
10+
11+
As a cluster administrator, you can configure an Ingress Controller to stop automatic DNS management and start manual DNS management. Set `dnsManagementPolicy` to specify when it should be automatically or manually managed.
12+
13+
When you change an Ingress Controller from `Managed` to `Unmanaged` DNS management policy, the Operator does not clean up the previous wildcard DNS record provisioned on the cloud.
14+
When you change an Ingress Controller from `Unmanaged` to `Managed` DNS management policy, the Operator attempts to create the DNS record on the cloud provider if it does not exist or updates the DNS record if it already exists.
15+
16+
[IMPORTANT]
17+
====
18+
When you set `dnsManagementPolicy` to `unmanaged`, you have to manually manage the lifecycle of the wildcard DNS record on the cloud provider.
19+
====
20+
21+
== `Managed` DNS management policy
22+
The `Managed` DNS management policy for Ingress Controllers ensures that the lifecycle of the wildcard DNS record on the cloud provider is automatically managed by the Operator.
23+
24+
== `Unmanaged` DNS management policy
25+
The `Unmanaged` DNS management policy for Ingress Controllers ensures that the lifecycle of the wildcard DNS record on the cloud provider is not automatically managed, instead it becomes the responsibility of the cluster administrator.
26+
27+
[NOTE]
28+
====
29+
On the AWS cloud platform, if the domain on the Ingress Controller does not match with `dnsConfig.Spec.BaseDomain` then the DNS management policy is automatically set to `Unmanaged`.
30+
====
31+
32+
include::modules/creating-a-custom-ingress-controller.adoc[leveloffset=+1]
33+
34+
include::modules/modifying-an-existing-ingress-controller.adoc[leveloffset=+1]
35+
36+
37+
[role="_additional-resources"]
38+
[id="configuring-ingress-controller-dns-management-additional-resources"]
39+
== Additional resources
40+
* xref:../networking/ingress-operator.adoc#nw-ingress-controller-configuration-parameters_configuring-ingress[Ingress Controller configuration parameters]

0 commit comments

Comments
 (0)