Skip to content

Commit

Permalink
Documentation for ingress allow list (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsgstrabo authored Sep 26, 2024
1 parent 94d50a0 commit d28a04c
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 1 deletion.
58 changes: 57 additions & 1 deletion public-site/docs/radix-config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,9 @@ spec:
publicPort: http
```

The `publicPort` field of a component, if set to `<PORT_NAME>`, is used to make the component accessible on the internet by generating a public endpoint. Any component without `publicPort: <PORT_NAME>` can only be accessed from another component in the app. If specified, the `<PORT_NAME>` should exist in the `ports` field.
The `publicPort` field of a component, if set to `<PORT_NAME>`, is used to make the component accessible on the internet by generating a public endpoint. By default, the public endpoint can be accessed from all public IP addresses. You can restrict access to the public endpoints by configuring a list of IP address ranges in `network.ingress.public.allow`, see [network](#network-1) for more information.

A component without `publicPort: <PORT_NAME>` can only be accessed from another component in the app. If specified, the `<PORT_NAME>` should exist in the `ports` field.

:::tip
If no [ports](./#ports) specified for a component, `publicPort` should not be set.
Expand Down Expand Up @@ -924,6 +926,24 @@ spec:

See [runtime](#runtime-1) for more information.

#### `network`

```yaml
spec:
components:
- name: backend
environmentConfig:
- environment: prod
network:
ingress:
public:
allow:
- 100.1.1.1
- 100.2.2.2/30
```

See [network](#network-1) for more information.

### `authentication`

```yaml
Expand Down Expand Up @@ -1133,6 +1153,42 @@ If you use the [`build and deploy`](/guides/build-and-deploy) pipeline to build

For deploy-only components and jobs (with [`image`](#image) property set), make sure that the selected image supports the configured architecture. Many frequently used public images, like [nginx-unprivileged](https://hub.docker.com/r/nginxinc/nginx-unprivileged) and [bitnami/redis](https://hub.docker.com/r/bitnami/redis/tags), includes variants for both `amd64` and `arm64` in the same image. Radix (Kubernetes) will pull the appropriate variant based on the configured architecture.

### `network`

```yaml
spec:
environment:
- name: dev
- name: qa
- name: prod
components:
- name: backend
network:
ingress:
public:
allow:
- 100.1.1.1
- 110.1.1.1/30
environmentConfig:
- environment: dev
network:
ingress:
public:
allow: []
- environment: qa
network:
ingress:
public:
allow:
- 200.1.1.1
- 200.10.1.1
- environment: prod
```

The `network.ingress.public.allow` property defines a list of public IP addresses or CIDRs allowed to access the component's public endpoints. The `allow` list can be configured on the component level and/or in `environmentConfig` for a specific environment. `environmentConfig` takes precedence over component level configuration. Setting `allow` to an empty list allows access from all public IP addresses.

In the example, `allow` is configured on the component level with two IP address ranges. This configuration will apply to all environments, unless `allow` is configured in `environmentConfig`. For environment `dev`, `allow` to en empty list, which will allow all public IP addresses to access the component. In the `qa` environment, `allow` is configured with a new list if IP addresses. These will be used instead of the IP addresses configured on the component level. The `environmentConfig` for `prod` does not specify `allow`, which means that the configuration from the component level will be used.

## `jobs`

This is where you specify the various [jobs](/guides/jobs) for your application.
Expand Down
11 changes: 11 additions & 0 deletions public-site/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ const config: Config = {
themeConfig: {
// Replace with your project's social card
// image: 'img/docusaurus-social-card.jpg',

metadata:[
{name: 'Content-Security-Policy', content: `default-src 'self'; object-src 'none'; img-src 'self' data:; style-src 'self' https://cdn.eds.equinor.com/font/; font-src 'self' https://cdn.eds.equinor.com/font/; frame-ancestors 'none'; upgrade-insecure-requests; block-all-mixed-content`},
{name: 'Permissions-Policy', content: 'none'},
{name: 'Cross-Origin-Resource-Policy', content: 'same-origin'},
{name: 'Referrer-Policy', content: 'no-referrer'},
{name: 'X-Content-Type-Options', content: 'nosniff'},
{name: 'X-Frame-Options', content: 'deny'},
{name: 'X-Permitted-Cross-Domain-Policies', content: 'none'},
],

navbar: {
title: 'Omnia Radix',
logo: {
Expand Down

0 comments on commit d28a04c

Please sign in to comment.