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 documentation to fmi-routes #106

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion charts/fmi-routes/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: fmi-routes
description: Helm chart for defining multiple routes
type: application
version: 0.1.0
version: 0.1.1
keywords:
- fmi
- route
Expand Down
66 changes: 66 additions & 0 deletions charts/fmi-routes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# fmi-routes

This chart helps you to add routes to your service.

## Example values.yaml

Let's assume that the project name is `project-name`.

```yaml
fmi-routes:
routes:
project-name-default:
enabled: true
annotations:
haproxy.router.openshift.io/timeout: 90s
host: project-name.out.ock.fmi.fi
targetPort: project-name-port
targetService: project-name-service
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
type: external
```

## Configuration

Parameter configuration prefix in the `values.yaml` is assumed to be `fmi-routes.routes.project-name-default`

| Parameter | Description | Default |
| --------------- | -------------------------------------------------- | ------- |
| `enabled` | Is the route enabled? | false |
| `annotations` | Custom annotations to Openshift | "" |
| `host` | Host name of the service. More documentation below | "" |
| `targetPort` | Port of the service which should be exposed | "" |
| `targetService` | Service name which should be exposed | "" |
| `tls` | TLS settings, more documentation below | "" |
| `type` | TODO what is this? | ? |

### `host`

Openshift is configured to parse the host variable as follows. The parameter `host` must be given in form `project-name.[out|apps].[ock|ocp].fmi.fi` where

- `out`: the route is visible to the internet
- `apps`: the rout is visible only to FMI network and no to the internet
- `ock`: the route is in ock (development) cluster
- `ocp`: the route is in ocp (production) cluster

### `tls`

#### `tls.termination`

This settings configures how HTTPS traffic will be handled:

- `tls.termination: edge`: Terminate TLS in Openshift's haproxy(?). It means that pod will get the traffic in HTTP and won't have to terminate TLS itself
- `tls.termination: somethingelse`: The traffic to the pod will be HTTP and the application has to terminate TLS itself

#### `tls.insecureEdgeTerminationPolicy`

This setting configures what to do when the application gets HTTP traffic

- `tls.insecureEdgeTerminationPolicy: redirect`: Makes a redirect so that all HTTP -> HTTPS
- `tls.insecureEdgeTerminationPolicy: allow`: Allows HTTP traffic

### `type`

- `type: external`: TODO what is this and what are the other options?
Loading