Skip to content

Commit e1cab61

Browse files
joelmccoymjnagel
andauthored
feat!: set istio passthrough gateway as optional component (#547)
BREAKING CHANGE: Istio passthrough gateway is no longer deployed by default ## Description - Sets the `istio-passthrough-gateway` as not required in the `slim-dev` and `standard` package. - Added `istio-passthrough-gateway` as an included `optionalComponent` in the `k3d-standard` bundle so that it can still be deployed and tested. - Added some documentation around the istio gateways and use cases ... ## Related Issue Fixes #510 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [ ] [Contributor Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md) followed BEGIN_COMMIT_OVERRIDE feat!: set istio passthrough gateway as optional component (#547) Release-As: 0.24.0 END_COMMIT_OVERRIDE --------- Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
1 parent e2efdf9 commit e1cab61

7 files changed

Lines changed: 102 additions & 5 deletions

File tree

bundles/k3d-standard/uds-bundle.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ packages:
3636
# x-release-please-start-version
3737
ref: 0.23.0
3838
# x-release-please-end
39+
optionalComponents:
40+
- istio-passthrough-gateway
3941
overrides:
4042
loki:
4143
loki:

docs/configuration/istio/_index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: Istio Configuration for UDS Core
3+
type: docs
4+
weight: 5
5+
---
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Configuring Istio Ingress
3+
type: docs
4+
weight: 1
5+
---
6+
7+
UDS Core leverages Istio for ingress into the service mesh. This document provides an overview and examples of the Istio resources that UDS Core deploys to handle ingress.
8+
9+
## Gateways
10+
11+
UDS Core provides a few Istio [Gateway](https://istio.io/latest/docs/reference/config/networking/gateway/) resources to allow ingress into the service mesh. Each one serves a different purpose and can be used to route traffic to different services.
12+
13+
1. **(Required)** Tenant Gateway - This gateway provides ingress to typical end-user applications. By default, UDS Core deploys a few services on this gateway, such as the Keycloak SSO portal. This gateway is typically exposed to end users of the applications deployed on top of UDS Core.
14+
2. **(Required)** Admin Gateway - This gateway provides ingress to admin-related applications that are not for use by the default end user. By default, UDS Core deploys a few services on this gateway, such as the Admin Keycloak interface. This gateway is typically accessible to admins of the applications deployed on top of UDS Core. *Since the Admin and Tenant Gateways are logically separated, it is possible to have different security controls on each gateway.*
15+
3. **(Optional)** Passthrough Gateway - This gateway allows mesh ingress without TLS termination performed by Istio. This could be useful for applications that need to (or currently) handle their own TLS termination. This gateway used to be a default component of UDS Core but is no longer deployed by default. To deploy this gateway, you must specify `istio-passthrough-gateway` as an `optionalComponent` in your UDS Bundle configuration.
16+
17+
### Enable Passthrough Gateway
18+
19+
In order to enable the Passthrough Gateway, you must specify `istio-passthrough-gateway` as an `optionalComponent` in your UDS Bundle configuration. Here is an example of how to do this:
20+
21+
```yaml
22+
kind: UDSBundle
23+
metadata:
24+
name: core-with-passthrough
25+
description: A UDS example bundle for packaging UDS core with the passthrough gateway enabled
26+
version: "0.0.1"
27+
28+
packages:
29+
- name: core
30+
repository: oci://ghcr.io/defenseunicorns/packages/uds/core
31+
ref: 0.23.0-upstream
32+
# You must specify the istio-passthrough-gateway as an optionalComponent or else it will not be deployed
33+
optionalComponents:
34+
- istio-passthrough-gateway
35+
```
36+
37+
### Configure Domain Name and TLS for Istio Gateways
38+
39+
By default, the UDS Core Istio Gateways are set up to use the `uds.dev` domain and have a valid TLS certificate packaged. You will want to change the domain name for your environment and provide a valid TLS certificate for this domain.
40+
41+
You can set the TLS certs via overrides in a [UDS Bundle](https://uds.defenseunicorns.com/bundles/) (see below).
42+
43+
```yaml
44+
kind: UDSBundle
45+
metadata:
46+
name: core-with-cert-override
47+
description: A UDS example bundle for packaging UDS core with a custom TLS certificate
48+
version: "0.0.1"
49+
50+
packages:
51+
- name: core
52+
repository: oci://ghcr.io/defenseunicorns/packages/uds/core
53+
ref: 0.23.0-upstream
54+
overrides:
55+
istio-admin-gateway:
56+
uds-istio-config:
57+
variables:
58+
- name: ADMIN_TLS_CERT
59+
description: "The TLS cert for the admin gateway (must be base64 encoded)"
60+
path: tls.cert
61+
- name: ADMIN_TLS_KEY
62+
description: "The TLS key for the admin gateway (must be base64 encoded)"
63+
path: tls.key
64+
istio-tenant-gateway:
65+
uds-istio-config:
66+
variables:
67+
- name: TENANT_TLS_CERT
68+
description: "The TLS cert for the tenant gateway (must be base64 encoded)"
69+
path: tls.cert
70+
- name: TENANT_TLS_KEY
71+
description: "The TLS key for the tenant gateway (must be base64 encoded)"
72+
path: tls.key
73+
```
74+
75+
You can then either use environment variables (`UDS_ADMIN_TLS_CERT`, `UDS_ADMIN_TLS_KEY`, `UDS_TENANT_TLS_CERT`, and `UDS_TENANT_TLS_KEY`) or a config file to configure the certs for each gateway. These values should be base64 encoded strings of the TLS certificate and key for the admin and tenant gateways respectively.
76+
77+
Domain should be set via your [uds-config](https://uds.defenseunicorns.com/cli/quickstart-and-usage/#variables-and-configuration) file using the shared key to override the Zarf Domain Variable (see example `uds-config.yaml` below).
78+
79+
```yaml
80+
shared:
81+
domain: yourawesomedomain.com # shared across all packages in a bundle
82+
83+
# TLS Certs/Keys if not provided via environment variables
84+
variables:
85+
core:
86+
admin_tls_cert: # base64 encoded admin cert here
87+
admin_tls_key: # base64 encoded admin key here
88+
tenant_tls_cert: # base64 encoded tenant cert here
89+
tenant_tls_key: # base64 encoded tenant key here
90+
```

packages/slim-dev/zarf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ components:
3131
path: ../../src/istio
3232

3333
- name: istio-passthrough-gateway
34-
required: true
34+
required: false
3535
import:
3636
path: ../../src/istio
3737

packages/standard/zarf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ components:
3131
path: ../../src/istio
3232

3333
- name: istio-passthrough-gateway
34-
required: true
34+
required: false
3535
import:
3636
path: ../../src/istio
3737

src/istio/zarf.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ components:
6969
- "values/config-tenant.yaml"
7070

7171
- name: istio-passthrough-gateway
72-
required: true
72+
required: false
7373
charts:
7474
- name: gateway
7575
url: https://istio-release.storage.googleapis.com/charts

tasks/deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ tasks:
2323
- description: "Deploy the Istio package, if UDS_PKG != istio"
2424
cmd: |
2525
if [ "${UDS_PKG}" != "istio" ]; then
26-
uds zarf package deploy build/zarf-package-uds-core-istio-${UDS_ARCH}.tar.zst --confirm --no-progress
26+
uds zarf package deploy build/zarf-package-uds-core-istio-${UDS_ARCH}.tar.zst --confirm --no-progress --components '*'
2727
fi
2828
- description: "Deploy the Pepr Module"
2929
cmd: |
3030
PEPR_VERSION=$(npm pkg get version | tr -d '"')
3131
uds zarf package deploy build/zarf-package-pepr-uds-core-${UDS_ARCH}-${PEPR_VERSION}.tar.zst --confirm --no-progress --set UDS_SINGLE_TEST=true
3232
- description: "Deploy the requested Zarf Package (must set UDS_PKG environment variable)"
33-
cmd: uds zarf package deploy build/zarf-package-uds-core-${UDS_PKG}-${UDS_ARCH}.tar.zst --confirm --no-progress
33+
cmd: uds zarf package deploy build/zarf-package-uds-core-${UDS_PKG}-${UDS_ARCH}.tar.zst --confirm --no-progress --components '*'
3434

3535
- name: latest-package-release
3636
actions:

0 commit comments

Comments
 (0)