Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for network changes starting with Istio v1.10 and greater #2538

Merged
merged 9 commits into from
Sep 21, 2021

Conversation

lennyphan
Copy link
Member

Beginning with Istio v1.10, network changes were made by Istio where the proxy no longer redirects the traffic to the localhost interface, but instead forwards it to the network interface associated with the pod IP (e.g. eth0). Since the operator has to support all versions of Istio, we are adding additional WebLogic network channels for binding to the localhost and pod IP network interfaces. This will allow the WebLogic managed servers to continue to receive application traffic through either network interfaces. During introspection, copies of the readiness probe and any custom WebLogic NAP's are created and listening addresses set to '127.0.0.1' so that the NAP's are bound to the localhost interface. We continue to customize any existing defined NAPs and override the listening address by setting it to the defined service name (e.g. sample-domain1-managed-server${id}).

For DII and DomainOnPV domains, we generate additional NAP's in situational config files. For example:

<d:network-access-point f:combine-mode="add">
<d:name f:combine-mode="add">http-probe</d:name>
<d:protocol f:combine-mode="add">http</d:protocol>
<d:listen-address f:combine-mode="add">sample-domain1-admin-server.sample-domain1-ns</d:listen-address>
<d:public-address f:combine-mode="add">sample-domain1-admin-server.sample-domain1-ns</d:public-address>
<d:listen-port f:combine-mode="add">8888</d:listen-port>
<d:http-enabled-for-this-protocol f:combine-mode="add">true</d:http-enabled-for-this-protocol>
<d:outbound-enabled f:combine-mode="add">true</d:outbound-enabled>
<d:enabled f:combine-mode="add">true</d:enabled>
</d:network-access-point>
<d:network-access-point f:combine-mode="add">
<d:name f:combine-mode="add">http-probe-lh01</d:name>
<d:protocol f:combine-mode="add">http</d:protocol>
<d:listen-address f:combine-mode="add">127.0.0.1</d:listen-address>
<d:public-address f:combine-mode="add">sample-domain1-admin-server.sample-domain1-ns</d:public-address>
<d:listen-port f:combine-mode="add">8888</d:listen-port>
<d:http-enabled-for-this-protocol f:combine-mode="add">true</d:http-enabled-for-this-protocol>
<d:outbound-enabled f:combine-mode="add">true</d:outbound-enabled>
<d:enabled f:combine-mode="add">true</d:enabled>
</d:network-access-point>

Since container port names are limited to a maximum of 15 characters, we truncate the names of any cloned network channel to the first 10 characters and append the identifier '-lhNN' (e.g 'http-probe-lh01')

Have successfully run all Istio integration tests on Kind cluster using Istio v1.7.3, v1.10.4, and v1.11.2

@@ -142,6 +142,39 @@ If the WebLogic administration port is enabled on the Administration Server:
Additionally, when Istio support is enabled for a domain, the operator
ensures that the Istio sidecar is not injected into the introspector job's pods.

#### Support for network changes in Istio v1.10 and later

Prior to Istio release 1.10, the Istio Envoy proxy redirected all inbound traffic to the localhost
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the "prior to" paragraph is necessary and you can just begin with "Starting with Istio 1.10". Also, let's link to that article describing the change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that you did link the article later. Move the link up here :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed. Moved the link up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, removed the text describing the previous Istio network behavior.

were bound to the localhost interface in order for WebLogic to receive the inbound traffic.
Starting with Istio 1.10, the networking behavior was changed in that the proxy no longer redirects
the traffic to the localhost interface, but instead forwards it to the network interface associated
to the pod's IP. In order to support Istio v1.10 and later, as well as pre-1.10 releases, the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"pre-1.10 releases" -> "previous releases"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

|----|----|----|--------|-----|
|`T3Channel-lh01`| `5556` | `127.0.0.1` | `t3`| Yes |

To learn more about changes to Istio networking beginning with Istio 1.10, see [Upcoming networking changes in Istio 1.10](https://istio.io/latest/blog/2021/upcoming-networking-changes//).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the user need to do anything if upgrading istio from 1.9 to 1.10 or higher, does he/she needs to re-run the introspector by updating the introspectVersion or something else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very good question. With this change, we can support all versions of Istio and so I don't believe re-running introspection would make much difference or is necessary. Do we have a documented process for upgrading Istio in a cluster? That is, do we recommend shutting down the domain before upgrading Istio or can you upgrade Istio while a domain is running?

self.writeln("<d:listen-port f:combine-mode=\"add\">" + str(listen_port) + "</d:listen-port>")

def writePublicAddress(self, public_address):
self.writeln("<d:public-address f:combine-mode=\"add\">" + public_address + "</d:public-address>")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will public_address be None and can sitconfig take None at this stanza (vs not set) ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MBean method for setting public address can handle null when looking at the generated MBean method implementation but added a conditional check. Please review.

@rjeberhard rjeberhard merged commit 2039844 into main Sep 21, 2021
@lennyphan lennyphan deleted the istio-work branch November 1, 2021 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants