Skip to content

Commit

Permalink
Merge pull request #369 from stakater/update-route-docs
Browse files Browse the repository at this point in the history
updated docs accordingly
  • Loading branch information
rasheedamir authored Jan 17, 2025
2 parents 3eef4ea + 1741126 commit 0e9c15c
Showing 1 changed file with 5 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,12 @@ This guide provides a step-by-step process to configure an OpenShift `Route` res

Before proceeding, ensure the following prerequisites are met:

- **Cert Manager Issuer**: Verify with your cluster administrator that cert manager `Issuer` is properly configured.
- **Cert Manager Certificate**: Verify with your cluster administrator that cert manager `Certificate` is properly configured.
- **External DNS**: Confirm that External DNS is set up and operational for managing DNS records.

## Step 1: Setup Cert Manager Certificate
## Step 1: Deploy the Route

A [`Certificate`](https://cert-manager.io/docs/usage/certificate/#creating-certificate-resources) resource is used to automatically manage TLS certificates for your application by integrating with a certificate authority (e.g., Let’s Encrypt). It handles the issuance, renewal, and revocation of certificates, ensuring secure communication over https. Follow the steps below to configure the Certificate resource

### Update `values.yaml`

In your application's Helm chart, add the following snippet in `values.yaml`.

```yaml
application:
...
certificate:
enabled: true
secretName: <secret name where tls creds will be stored>
dnsNames:
- <DNS for which we need to generate certificate for example:example.com>
issuerRef:
name: <cert manager's Issuer name.>
kind: Issuer
```
#### Important Details
- **Certificate**:
- Instruct Cert-Manager to generate TLS certificates for specific DNS entries.
- Requires:
- `.certificate.secretName`: This is the name of secret that `Certificate` will create. It will contain TLS credentials that will find its utilization in next steps.
- `.certificate.dnsNames`: DNS name for which this certificate will be valid. It can contain wildcard names like `*.example.com` or specific names like `api.example.com`.
- `.certificate.issuerRef.name`: Name of the issuer that this certificate will reference. We have created this issuer in previous steps. You can find this in the cluster console by switching to `Administrator` view and navigate to `Home > Search` and search for `Issuer` in your current namespace.

## Step 2: Deploy the Route

A [`Route`](https://docs.openshift.com/container-platform/4.17/networking/routes/route-configuration.html) resource is used to expose your application to the internet using a specific DNS name. Follow the steps below to configure the Route.
A [`Route`](https://docs.openshift.com/container-platform/4.17/networking/routes/route-configuration.html) resource is used to expose your application to the internet using a specific host name. Follow the steps below to configure the Route.

### Update `values.yaml`

Expand All @@ -54,9 +24,9 @@ application:
enabled: true
annotations:
cert-utils-operator.redhat-cop.io/certs-from-secret: <name-of-certificate-secret>
external-dns.alpha.kubernetes.io/hostname: <desired-dns-name>
external-dns.alpha.kubernetes.io/hostname: <desired-host-name>
cert-utils-operator.redhat-cop.io/inject-CA: "false"
host: <desired-dns-name>
host: <desired-host-name>
path: <desired-path>
```
Expand All @@ -75,19 +45,6 @@ application:

After updating the `values.yaml` file and applying the Helm chart, verify the deployment:

#### Certificate

1. In the cluster console, switch to `Administrator` view and navigate to `Home > Search`.
1. Select the namespace and search for `Certificate` in the `Resources` dropdown.
1. Inspect the deployed certificate. In the `Condition` section, confirm that the certificate is up-to-date.

![OpenShift Console](images/console.png)

![Certificate Details](images/certificate-details.png)

!!! note
If the certificate status is not updated, wait a few minutes as Cert-Manager may take time to generate the certificate.

#### Route

1. Navigate to the OpenShift cluster console.
Expand Down

0 comments on commit 0e9c15c

Please sign in to comment.