---
title: Charmhub | nginx-route interface
description: Interfaces describe the relation between two charms. This interface shows
  opinionated, standardized interface specifications for charm relations.
url: https://charmhub.io/integrations/nginx-route
---

# nginx-route

## Overview

This relation interface describes the expected behaviour of any charm
interfacing with Kubernetes Nginx ingress resources.

## Usage

An application charm can use the `nginx-route` relation to request the creation
of a Nginx ingress resource in the Kubernetes cluster. The specific
configuration of the ingress resources can be controlled by the data provided
by the relation's requirer. The [`nginx_route` charm library](https://charmhub.io/nginx-ingress-integrator/libraries/nginx_route)
can be used to handle the provider and requirer sides of this relation.

## Direction

The `nginx-route` interface is a one-way relation. The requirer of this relation
provides the configuration for the required ingress resources as relation data,
and the provider does not return anything in the relation.

## Behavior

The requirer and the provider must adhere to a certain set of criteria to be
considered compatible with the interface.

### Provider

* Is expected to create ingress resources in the Kubernetes cluster if the
  requirer's requirements are valid.
* Is expected to display an error message in the charm status and ignore
  requirer's request, if the request specified by the requirer is not valid.
* Is expected to create ingress resources with host-based routing.

### Requirer

* Is expected to provide a valid ingress resource configuration.

## Relation Data

### Provider

The provider does not provide anything in the relation databag.

[[Pydantic Schema]](https://github.com/canonical/charmlibs/blob/main/interfaces/nginx-route/interface/vv0/schema.py)

### Requirer

The `nginx-route` relation uses the same set of data as in the charm
configuration of the Nginx ingress integrator charm, with the exception that
`service-hostname`, `service-name`, `service-port`, and `service-namespace`
are required in the relation data.

[[Pydantic Schema]](https://github.com/canonical/charmlibs/blob/main/interfaces/nginx-route/interface/vv0/schema.py)

#### Example

```
application-data:
  service-hostname: example.test
  service-name: test-app
  service-port: 8080
  service-namespace: test-namespace
```

## Charms implementing this interface

### Providers

### Requirers

## Other charms using this interface

### Providers

* [nginx-ingress-integrator](https://charmhub.io/nginx-ingress-integrator)
* [content-cache-k8s](https://charmhub.io/content-cache-k8s)

### Requirers

* [discourse-k8s](https://charmhub.io/discourse-k8s)
* [indico](https://charmhub.io/indico)
* [trino-k8s](https://charmhub.io/trino-k8s)
* [wordpress-k8s](https://charmhub.io/wordpress-k8s)
* [temporal-k8s](https://charmhub.io/temporal-k8s)
* [juju-dashboard-k8s](https://charmhub.io/juju-dashboard-k8s)
* [juju-dashboard](https://charmhub.io/juju-dashboard)
* [superset-k8s](https://charmhub.io/superset-k8s)
* [juju-jimm-k8s](https://charmhub.io/juju-jimm-k8s)
* [temporal-ui-k8s](https://charmhub.io/temporal-ui-k8s)
* [content-cache-k8s](https://charmhub.io/content-cache-k8s)
* [ranger-k8s](https://charmhub.io/ranger-k8s)
* [canonical-livepatch-server-k8s](https://charmhub.io/canonical-livepatch-server-k8s)
