Skip to content

OSDOCS-14879: add enablement procedure#94480

Merged
kalexand-rh merged 1 commit intoopenshift:mainfrom
jldohmann:OSDOCS-14879
Jun 13, 2025
Merged

OSDOCS-14879: add enablement procedure#94480
kalexand-rh merged 1 commit intoopenshift:mainfrom
jldohmann:OSDOCS-14879

Conversation

@jldohmann
Copy link
Contributor

@jldohmann jldohmann commented Jun 9, 2025

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 9, 2025

@jldohmann: This pull request references OSDOCS-14879 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.20." or "openshift-4.20.", but it targets "openshift-4.19" instead.

Details

In response to this:

Version(s): 4.19+

Issue: https://issues.redhat.com/browse/OSDOCS-14879

Link to docs preview:

QE review:

  • QE has approved this change.

Additional information:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jun 9, 2025
@openshift-ci openshift-ci bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jun 9, 2025
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Jun 9, 2025

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 9, 2025

@jldohmann: This pull request references OSDOCS-14879 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.20." or "openshift-4.20.", but it targets "openshift-4.19" instead.

Details

In response to this:

Version(s): 4.19+

Issue: https://issues.redhat.com/browse/OSDOCS-14879

Link to docs preview: https://94480--ocpdocs-pr.netlify.app/openshift-enterprise/latest/networking/configuring_ingress_cluster_traffic/ingress-gateway-api.html#nw-ingress-gateway-api-enable_ingress-gateway-api

QE review:

  • QE has approved this change.

Additional information:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@jldohmann
Copy link
Contributor Author

@rhamini3 could you PTAL at this docs PR for QE ack? thank you

@jldohmann jldohmann added the peer-review-needed Signifies that the peer review team needs to review this PR label Jun 10, 2025
@lahinson lahinson added peer-review-in-progress Signifies that the peer review team is reviewing this PR and removed peer-review-needed Signifies that the peer review team needs to review this PR labels Jun 10, 2025
Copy link
Contributor

@lahinson lahinson left a comment

Choose a reason for hiding this comment

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

Nice work! Just a few nits for your consideration.

@lahinson lahinson added peer-review-done Signifies that the peer review team has reviewed this PR and removed peer-review-in-progress Signifies that the peer review team is reviewing this PR labels Jun 10, 2025
@rhamini3
Copy link

one small suggestion, otherwise
/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Jun 10, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jun 10, 2025

@jldohmann: This pull request references OSDOCS-14879 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.20." or "openshift-4.20.", but it targets "openshift-4.19" instead.

Details

In response to this:

Version(s): 4.19+

Issue: https://issues.redhat.com/browse/OSDOCS-14879

Link to docs preview: https://94480--ocpdocs-pr.netlify.app/openshift-enterprise/latest/networking/configuring_ingress_cluster_traffic/ingress-gateway-api.html#nw-ingress-gateway-api-enable_ingress-gateway-api

QE review:

  • QE has approved this change.

Additional information:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@candita
Copy link

candita commented Jun 11, 2025

/assign @candita
/assign @grzpiotrowski

@jldohmann would you mind waiting to merge until the two of us lgtm and approve?

+
[source,terminal]
----
$ oc -n openshift-ingress create secret tls gwapi-wildcard --cert=wildcard.crt --key=wildcard.key
Copy link

Choose a reason for hiding this comment

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

Does it tell them anywhere how to create the wildcard.crt and wildcard.key?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we have a lot of existing docs on creating certificates. do you mean something like this? https://docs.redhat.com/en/documentation/openshift_container_platform/4.18/html/security_and_compliance/configuring-certificates i can link it

Choose a reason for hiding this comment

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

In the tech preview guides we had this bit of context about the creation of a secret:

Certificates are handled differently in Gateway API compared to OpenShift Route objects. Gateway API uses references to
Kubernetes Secret objects whereas the OpenShift Route API embeds the certificate and key strings in the Route object.

WDYT about including it here @candita?

Copy link

Choose a reason for hiding this comment

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

I think we could do this in a followup.

Choose a reason for hiding this comment

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

Actually after seeing What's New in 4.19, I think that the statement I quoted is not longer true as Routes can reference Secrets too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@grzpiotrowski @candita so to clarify, is the request to add that snippet within this doc or create a new procedure for handling secrets for Gateway API?

@grzpiotrowski
Copy link

/lgtm
I'm ok with the changes I suggested to be included as a follow-up. Leaving the approve as @candita and @rhamini3 are going to have another pass too before merge.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2025
= Getting started with Gateway API for the Ingress Operator

When you enable Gateway API, it installs the subscription, the Istio operator, the custom resource definitions (CRDs), and creates the Istio resources.

Choose a reason for hiding this comment

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

This part is a bit confusing for me, If the user is using 4.19+ gatewayAPI is already enabled with the proper CRDs. From my understanding, the subscription, and operator are only installed after a gatewayclass is created.
CC @candita

Copy link

Choose a reason for hiding this comment

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

I think this is ok for now, but we could follow up after the docs freeze. The reader doesn't need to know all the specifics.

Copy link

Choose a reason for hiding this comment

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

from: All
----
<1> The `Gateway` object must be created in the `openshift-ingress` namespace.
<2> The `Gateway` object must reference the name of the previously created `GatewayClass` object.

Choose a reason for hiding this comment

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

the gateway does not have to be in openshift-ingress namespace, might be better to change this to if it isn't created in openshift-ingress there will be no DNS management

Copy link

Choose a reason for hiding this comment

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

In the Getting Started guide, it's ok to get them started without extra work for DNS.

type: Published
dnsZone:
id: ...
----

Choose a reason for hiding this comment

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

not finding the right output when using that command, this command has correct output
oc -n openshift-ingress get dnsrecord -l gateway.networking.k8s.io/gateway-name=example-gateway -o yaml

Copy link

Choose a reason for hiding this comment

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

@kalexand-rh @jldohmann Can this be fixed before merge?

----
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
example-gateway LoadBalancer 10.1.2.3 <external_ipname> <port_info> 47s
----

Choose a reason for hiding this comment

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

the example output and oc command should be updated, the name of the service and deployment is not the same as the gateway name, it has a post-fix openshift-default (gatewayClass name)

iamin@iamin-mac Downloads % oc -n openshift-ingress get deployment
NAME                                READY   UP-TO-DATE   AVAILABLE   AGE
example-gateway-openshift-default   1/1     1            1           3m52s
istiod-openshift-gateway            1/1     1            1           16m
router-default                      2/2     2            2           80m
iamin@iamin-mac Downloads % oc -n openshift-ingress get service   
NAME                                TYPE           CLUSTER-IP       EXTERNAL-IP                                                               PORT(S)                                 AGE
example-gateway-openshift-default   LoadBalancer   172.30.168.184   a31cac2304a8249b697976d111041eeb-1454708237.us-east-2.elb.amazonaws.com   15021:30345/TCP,443:31776/TCP           4m16s
istiod-openshift-gateway            ClusterIP      172.30.211.131   <none>                                                                    15010/TCP,15012/TCP,443/TCP,15014/TCP   16m
router-default                      LoadBalancer   172.30.15.214    a20263ea8928442b1986ef3c08bfc7bb-1704144520.us-east-2.elb.amazonaws.com   80:30266/TCP,443:31405/TCP              80m
router-internal-default             ClusterIP      172.30.225.70    <none>         

Copy link

Choose a reason for hiding this comment

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

@kalexand-rh @jldohmann is there any way this can be fixed before docs freeze?

Copy link

@candita candita Jun 13, 2025

Choose a reason for hiding this comment

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

These commands would also need to change:
[source,terminal]

$ oc get deployment -n openshift-ingress example-gateway-openshift-default

[source,terminal]

$ oc get service -n openshift-ingress example-gateway-openshift-default

+
[source,terminal]
----
$ curl -I -cacert <local cert file> https://example.gwapi.${DOMAIN}:443
Copy link

@rhamini3 rhamini3 Jun 13, 2025

Choose a reason for hiding this comment

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

Suggested change
$ curl -I -cacert <local cert file> https://example.gwapi.${DOMAIN}:443
$ curl -I --cacert /tmp/gwapi/ca.crt https://example.gwapi.${DOMAIN}:443

Copy link

Choose a reason for hiding this comment

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

Hm, the "-k" means don't validate certs. Is it really needed?

Choose a reason for hiding this comment

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

I noticed that in my cluster without the -k I get error:

curl: (60) SSL: certificate subject name '*.apps.iamin-aws0613.qe.devcluster.openshift.com' does not match target host name 'example.gwapi.apps.iamin-aws0613.qe.devcluster.openshift.com'
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Choose a reason for hiding this comment

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

-k not needed

Copy link

Choose a reason for hiding this comment

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

@kalexand-rh the "--cacert" is needed, please accept @rhamini3 's suggestion.

example-gateway LoadBalancer 10.1.2.3 <external_ipname> <port_info> 47s
----

.. Optional: The Ingress Operator automatically creates a `DNSRecord` CR using the hostname from the listeners, and adds the label `istio.io/gateway-name=example-gateway`. Verify the status of the DNS record by running the following command:
Copy link

Choose a reason for hiding this comment

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

This would need to change per https://github.com/openshift/openshift-docs/pull/94480/files#r2145462579:

Suggested change
.. Optional: The Ingress Operator automatically creates a `DNSRecord` CR using the hostname from the listeners, and adds the label `istio.io/gateway-name=example-gateway`. Verify the status of the DNS record by running the following command:
.. Optional: The Ingress Operator automatically creates a `DNSRecord` CR using the hostname from the listeners, and adds the label `gateway.networking.k8s.io/gateway-name=example-gateway`. Verify the status of the DNS record by running the following command:

+
[source,terminal]
----
$ oc get dnsrecord -n openshift-ingress -l istio.io/gateway-name=example-gateway -o yaml
Copy link

Choose a reason for hiding this comment

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

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2025
[source,terminal]
----
httproute.gateway.networking.k8s.io/http created
httproute.gateway.networking.k8s.io/http example-route
Copy link

Choose a reason for hiding this comment

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

Should be:
httproute.gateway.networking.k8s.io/example-route created

+
During the creation of the `GatewayClass` resource, the Ingress Operator installs a lightweight version of {SMProductName}, an Istio custom resource, and a new deployment in the `openshift-ingress` namespace.

.. Optional: Verify that the new deployment, `istio-ingressgateway` is ready and available:
Copy link

Choose a reason for hiding this comment

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

Suggested change
.. Optional: Verify that the new deployment, `istio-ingressgateway` is ready and available:
.. Optional: Verify that the new deployment, `istiod-openshift-gateway` is ready and available:

router-default 2/2 2 2 6h4m
----

. Create a secret by using the default certificate by running the following command:
Copy link

Choose a reason for hiding this comment

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

Suggested change
. Create a secret by using the default certificate by running the following command:
. Create a secret by running the following command:

Comment on lines 125 to 137
[source,terminal]
----
$ oc get service -n openshift-ingress example-gateway-openshift-default
----
+
.Example output
[source,terminal]
----
NAME READY UP-TO-DATE AVAILABLE AGE
example-gateway 1/1 1 1 25s
----
Copy link

Choose a reason for hiding this comment

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

nit: might want to swap the positions of these two, putting the example output with the corresponding command.

Copy link
Contributor

Choose a reason for hiding this comment

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

image

Copy link

Choose a reason for hiding this comment

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

They should both be named "example-gateway-openshift-default" in the output.

[id="nw-ingress-gateway-api-enable_{context}"]
= Getting started with Gateway API for the Ingress Operator

When you enable Gateway API, it installs the subscription, the Istio operator, the custom resource definitions (CRDs), and creates the Istio resources.
Copy link

Choose a reason for hiding this comment

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

Suggested change
When you enable Gateway API, it installs the subscription, the Istio operator, the custom resource definitions (CRDs), and creates the Istio resources.
When you create a GatewayClass as shown in the first step, it configures Gateway API for use on your cluster.

<2> The `Gateway` object must reference the name of the previously created `GatewayClass` object.
<3> The HTTPS listener listens for HTTPS requests that match a subdomain of the cluster domain. You use this listener to configure ingress to your applications by using Gateway API `HTTPRoute` resources.
<4> The hostname must be a subdomain of the Ingress Operator domain. If you use a domain, the listener tries to serve all traffic in that domain.
<5> The name of the previously created secret using the default certificate.
Copy link

Choose a reason for hiding this comment

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

This can be handled in a follow up.

Suggested change
<5> The name of the previously created secret using the default certificate.
<5> The name of the previously created secret.

[source,terminal]
----
NAME READY UP-TO-DATE AVAILABLE AGE
example-gateway 1/1 1 1 25s
Copy link

Choose a reason for hiding this comment

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

Suggested change
example-gateway 1/1 1 1 25s
example-gateway-openshift-default 1/1 1 1 25s

Comment on lines 195 to 196
rules: <4>
- backendRefs:
Copy link

Choose a reason for hiding this comment

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

Suggested change
rules: <4>
- backendRefs:
rules:
- backendRefs: <4>

id: ...
----

. Create an `HTTPRoute` resource that directs requests to your application:
Copy link

Choose a reason for hiding this comment

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

Suggested change
. Create an `HTTPRoute` resource that directs requests to your application:
. Create an `HTTPRoute` resource that directs requests to your already-created namespace and application called `example-app/example-app`:

@candita
Copy link

candita commented Jun 13, 2025

Thanks @kalexand-rh !

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2025
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2025
@openshift-ci
Copy link

openshift-ci bot commented Jun 13, 2025

New changes are detected. LGTM label has been removed.

@candita
Copy link

candita commented Jun 13, 2025

/lgtm

@openshift-ci
Copy link

openshift-ci bot commented Jun 13, 2025

@jldohmann: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@kalexand-rh kalexand-rh merged commit 7f121b4 into openshift:main Jun 13, 2025
2 checks passed
@kalexand-rh
Copy link
Contributor

/cherrypick enterprise-4.19

@openshift-cherrypick-robot

@kalexand-rh: new pull request created: #94790

Details

In response to this:

/cherrypick enterprise-4.19

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@jldohmann jldohmann deleted the OSDOCS-14879 branch June 17, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch/enterprise-4.19 jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. peer-review-done Signifies that the peer review team has reviewed this PR qe-approved Signifies that QE has signed off on this PR size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants