OSDOCS-14879: add enablement procedure#94480
Conversation
|
@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. DetailsIn response to this:
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. |
|
🤖 Fri Jun 13 19:10:27 - Prow CI generated the docs preview: |
|
@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. DetailsIn response to this:
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. |
|
@rhamini3 could you PTAL at this docs PR for QE ack? thank you |
lahinson
left a comment
There was a problem hiding this comment.
Nice work! Just a few nits for your consideration.
|
one small suggestion, otherwise |
|
@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. DetailsIn response to this:
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. |
|
/assign @candita @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 |
There was a problem hiding this comment.
Does it tell them anywhere how to create the wildcard.crt and wildcard.key?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
I think we could do this in a followup.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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?
| = 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. | ||
|
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
In the Getting Started guide, it's ok to get them started without extra work for DNS.
| type: Published | ||
| dnsZone: | ||
| id: ... | ||
| ---- |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
@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 | ||
| ---- |
There was a problem hiding this comment.
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>
There was a problem hiding this comment.
@kalexand-rh @jldohmann is there any way this can be fixed before docs freeze?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
| $ curl -I -cacert <local cert file> https://example.gwapi.${DOMAIN}:443 | |
| $ curl -I --cacert /tmp/gwapi/ca.crt https://example.gwapi.${DOMAIN}:443 |
There was a problem hiding this comment.
Hm, the "-k" means don't validate certs. Is it really needed?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@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: |
There was a problem hiding this comment.
This would need to change per https://github.com/openshift/openshift-docs/pull/94480/files#r2145462579:
| .. 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 |
There was a problem hiding this comment.
| [source,terminal] | ||
| ---- | ||
| httproute.gateway.networking.k8s.io/http created | ||
| httproute.gateway.networking.k8s.io/http example-route |
There was a problem hiding this comment.
Should be:
httproute.gateway.networking.k8s.io/example-route created
637777d to
5901380
Compare
| + | ||
| 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: |
There was a problem hiding this comment.
| .. 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: |
There was a problem hiding this comment.
| . Create a secret by using the default certificate by running the following command: | |
| . Create a secret by running the following command: |
| [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 | ||
| ---- |
There was a problem hiding this comment.
nit: might want to swap the positions of these two, putting the example output with the corresponding command.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
This can be handled in a follow up.
| <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 |
There was a problem hiding this comment.
| example-gateway 1/1 1 1 25s | |
| example-gateway-openshift-default 1/1 1 1 25s |
| rules: <4> | ||
| - backendRefs: |
There was a problem hiding this comment.
| rules: <4> | |
| - backendRefs: | |
| rules: | |
| - backendRefs: <4> |
| id: ... | ||
| ---- | ||
|
|
||
| . Create an `HTTPRoute` resource that directs requests to your application: |
There was a problem hiding this comment.
| . 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`: |
|
Thanks @kalexand-rh ! /lgtm |
46d0486 to
d38c6f6
Compare
|
New changes are detected. LGTM label has been removed. |
|
/lgtm |
|
@jldohmann: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
/cherrypick enterprise-4.19 |
|
@kalexand-rh: new pull request created: #94790 DetailsIn response to this:
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. |

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:
Additional information: