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

add how to do openshift ingress/route for frontend http access #5

Merged
merged 1 commit into from
Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion openshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For that to work, configure your terminal to use `oc` CLI against your Openshift

# Deploy OBP-API to your OpenShift Cluster

1. Ensure your secrets are configured as intended (see `obp.yaml`)
1. Ensure your secrets are configured as intended (see [`obp.yaml`](#openshift/obp.yaml))
2. Apply the OBP manifest(s) to your k8s cluster

A quickstart valid OBP-API deployment manifest is provided:
Expand All @@ -35,6 +35,33 @@ Validate:
oc get pods
```

## Configure routing to web interface

This will generate a frontent url for your app, which you may then use as a DNS `CNAME`
for ingress traffic.

> Openshift doesn't appear to use the [standard](https://xkcd.com/927/) Kubernetes [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) way of defining routes to applications, and uses a ["`kind: Reoute`" concept instead](https://cloud.redhat.com/blog/kubernetes-ingress-vs-openshift-route). Therefore we provide a special `route.yaml` for special OpenShift:

Apply the route:
```
oc apply -f route.yaml
route.route.openshift.io/obp-frontend created
```

View the assigned route address:
```
oc get route obp-frontend
```

Example output:

```
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
obp-frontend obp-frontend-chrisjsimpson-dev.apps.sandbox-m2.ll9k.p1.openshiftapps.com obpapi-service <all> None
```

You may then choose to configure your DNS, adding a `CNAME` for the generated route to the app web frontend.


# Deploy OBP API to your local development environment

Expand Down
2 changes: 1 addition & 1 deletion openshift/route.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: obp-frontend
Expand Down