Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4be28f1
wip: opt-in ambient
mjnagel Feb 25, 2025
053b5b9
Merge branch 'main' into ambient-opt-in
mjnagel Feb 25, 2025
b0a31a6
wip: cleanup, cycling, validation
mjnagel Feb 25, 2025
98de8ab
wip: fix test import
mjnagel Feb 25, 2025
80835e0
wip: add some testing
mjnagel Feb 26, 2025
e47bc49
wip: add tests for cleanupns, killpods
mjnagel Feb 26, 2025
8efd997
wip: scope to single package
mjnagel Feb 26, 2025
39d0c71
wip: ambient probe netpol
mjnagel Feb 26, 2025
fa225b1
wip: todos
mjnagel Feb 26, 2025
abd15e1
chore: rebase
mjnagel Mar 21, 2025
e7b252a
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Mar 24, 2025
c038efa
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Mar 24, 2025
cd9f95b
wip: add ambient slim dev
mjnagel Mar 24, 2025
d295bc9
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Mar 24, 2025
ceadc0a
chore: fixes and more tests
mjnagel Mar 25, 2025
37dd64d
chore: switch podinfo to ambient for testing
mjnagel Mar 25, 2025
fa18574
fix: test shell commands
mjnagel Mar 25, 2025
29a5468
fix: initcontainers
mjnagel Mar 25, 2025
39e002c
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Mar 26, 2025
79c7092
docs: updates
mjnagel Mar 26, 2025
2622b7c
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 1, 2025
32fe2a7
fix: label ordering and added test
mjnagel Apr 1, 2025
fe99d6c
fix: operator/watch comments and logs
mjnagel Apr 1, 2025
d2cc647
chore: comment on undefined check
mjnagel Apr 1, 2025
d5736af
ci: [skip ci]
mjnagel Apr 1, 2025
9cd55b3
chore: move ambient check to jest
mjnagel Apr 1, 2025
621922b
ci: [skip ci]
mjnagel Apr 1, 2025
6fef44c
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 1, 2025
db3e3f6
fix: missing description [skip ci]
mjnagel Apr 1, 2025
e11ffae
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 1, 2025
8098f1e
chore: rebase docs
mjnagel Apr 1, 2025
e13c261
docs: update docs to note limitations in SSO section [ci skip]
mjnagel Apr 1, 2025
b188c25
chore: cleanup/docs [ci skip]
mjnagel Apr 1, 2025
d383847
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 1, 2025
aecd2bd
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 2, 2025
372169e
chore: exclude egress to system locations
mjnagel Apr 2, 2025
71d0f82
chore: comment
mjnagel Apr 2, 2025
e72bbfc
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 2, 2025
9bc9e69
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 2, 2025
25a1982
docs: update
mjnagel Apr 2, 2025
8cccac1
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 3, 2025
d5f55ba
chore: refactor logic to pull out common functions
mjnagel Apr 3, 2025
272c9b5
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 3, 2025
1260bb0
fix: bug on cleanup/none state
mjnagel Apr 3, 2025
cbe8835
Merge branch 'main' into ambient-opt-in-single-pkg
mjnagel Apr 4, 2025
1b47809
docs: update limitations for ambient
mjnagel Apr 4, 2025
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
14 changes: 11 additions & 3 deletions docs/reference/UDS Core/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,21 @@ In addition, to run Istio ingress gateways (part of Core) you will need to ensur

##### Ambient Mode

Istio can be deployed in [Ambient Mode](https://istio.io/latest/docs/ambient/overview/) by deploying the optional `istio-ambient` component. This mode is still in alpha release and is not recommended for production use or for clusters requiring `FIPS` compliance. The `istio-ambient` component installs the Istio CNI plugin which requires specifying the `CNI_CONF_DIR` and `CNI_BIN_DIR` variables. These values can change based on the environment Istio is being deployed into. By default the package will attempt to auto-detect these values and will use the following values if not specified:
Istio can be deployed in [Ambient Mode](https://istio.io/latest/docs/ambient/overview/) by deploying the optional `istio-ambient` component. This mode is still in alpha release and is not recommended for production use. Also note that only the `unicorn` and `registry1` flavors of core contain `FIPS` compliant images. The `istio-ambient` component is **required** if you want to use UDS Packages with `spec.network.serviceMesh.mode: ambient`. If Ambient mode is not deployed in the cluster, packages configured for ambient mode will automatically fall back to sidecar mode.

When using ambient mode with UDS Packages, you can benefit from:
- Reduced resource overhead compared to sidecar mode, as workloads don't require an injected sidecar container
- Simplified deployment and operations for service mesh capabilities
- Faster pod startup times since there's no need to wait for sidecar initialization

Note that Packages with Authservice clients are not currently supported in ambient mode and will be rejected by the UDS Operator.

The `istio-ambient` component installs the Istio CNI plugin which requires specifying the `CNI_CONF_DIR` and `CNI_BIN_DIR` variables. These values can change based on the environment Istio is being deployed into. By default the package will attempt to auto-detect these values and will use the following values if not specified:

```yaml
# K3d cluster
cniConfDir: /var/lib/rancher/k3s/agent/etc/cni/net.d
cniBinDir: /bin/
cniBinDir: /opt/cni/bin/ # Historically this was `/bin/`

# K3s cluster
cniConfDir: /var/lib/rancher/k3s/agent/etc/cni/net.d
Expand Down Expand Up @@ -160,7 +169,6 @@ sysctl -p
Metrics server is provided as an optional component in UDS Core and can be enabled if needed. For distros where metrics-server is already provided, ensure that you do NOT enable metrics-server. See the below as an example for enabling metrics-server if your cluster does not include it.

```yaml
---
- name: uds-core
repository: ghcr.io/defenseunicorns/packages/private/uds/core
ref: 0.25.2-unicorn
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/configuration/Single Sign-On/auth-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@ For a complete example, see [app-authservice-tenant.yaml](https://github.com/def

## Limitations:
Authservice is intended for simple, basic protection scenarios where an absolute level of protection is acceptable. For more advanced authentication requirements, you should implement authentication directly in your application or via a more comprehensive solution.

Authservice is currently not supported for ambient workloads (Package CR `network.serviceMesh.mode` of `ambient`). Package CRs with ambient configuration will be denied when applying if an Authservice SSO client is present. This restriction will be removed in the future once supported is added for this in the UDS Operator.
8 changes: 6 additions & 2 deletions docs/reference/configuration/UDS operator/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ title: UDS Package

- **Enabling Istio Sidecar Injection:**
- The operator facilitates the activation of Istio sidecar injection within namespaces where the CR is deployed.
- **Support for Istio Ambient Mode:**
- Packages can now opt into Istio's Ambient mode by setting `spec.network.serviceMesh.mode: ambient`. This provides service mesh capabilities and security without sidecars, reducing resource overhead.
- **Establishing Default-Deny Ingress/Egress Network Policies:**
- It sets up default-deny network policies for both ingress and egress, creating a foundational security posture.
- **Implementing Layered Allow-List Approach:**
Expand All @@ -24,7 +26,9 @@ title: UDS Package
- Authservice authentication provides application agnostic SSO for applications that opt-in.

:::caution
Warning: **Authservice Protection** and **SSO Group Authentication** are in Alpha and may not be stable. Avoid using in production. Feedback is appreciated to improve reliability.
Warning: **Istio Ambient Mode** Package support is in Alpha and may not be stable. Different workloads may experience issues when migrating away from sidecars so testing in a development/staging environment is encouraged. In addition there are some known limitations with ambient support at this time:
- `Package` CRs with AuthService SSO clients (`enableAuthserviceSelector`) are not supported in ambient mode. This is a limitation we plan to remove with operator support/configuration of [waypoint proxies](https://istio.io/latest/docs/ambient/usage/waypoint/), track progress on [this issue in GitHub](https://github.com/defenseunicorns/uds-core/issues/1200).
- Metrics of applications in ambient mode will _NOT_ be scraped successfully by Prometheus when STRICT mTLS is being enforced (there may be workarounds to scrape in PERMISSIVE mode but this is not advised). This will be resolved once Prometheus is migrated to ambient mode.
:::

### Example UDS Package CR
Expand Down Expand Up @@ -92,4 +96,4 @@ This example may not contain all fields, the full specification for the Package

:::note
More SSO Package examples might be found [here](/reference/configuration/single-sign-on/overview/).
:::
:::
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ sidebar:
</tr>
</thead>
<tbody>
<tr><td style="white-space: nowrap;">allow</td><td style="white-space: nowrap;"><a href="#Allow">Allow[]</a></td><td>Allow specific traffic (namespace will have a default-deny policy)</td></tr><tr><td style="white-space: nowrap;">expose</td><td style="white-space: nowrap;"><a href="#Expose">Expose[]</a></td><td>Expose a service on an Istio Gateway</td></tr>
<tr><td style="white-space: nowrap;">allow</td><td style="white-space: nowrap;"><a href="#Allow">Allow[]</a></td><td>Allow specific traffic (namespace will have a default-deny policy)</td></tr><tr><td style="white-space: nowrap;">expose</td><td style="white-space: nowrap;"><a href="#Expose">Expose[]</a></td><td>Expose a service on an Istio Gateway</td></tr><tr><td style="white-space: nowrap;">serviceMesh</td><td style="white-space: nowrap;"><a href="#ServiceMesh">ServiceMesh</a></td><td>Service Mesh configuration for the package</td></tr>
</tbody>
</table>
</div>
Expand Down Expand Up @@ -475,6 +475,24 @@ Valid Options: FROM_PROTOCOL_DEFAULT, FROM_REQUEST_PORT</td></tr><tr><td style="
</table>
</div>

<a id="ServiceMesh"></a>
<div style="margin-left: 80px; padding-top: 30px;">

#### ServiceMesh
<table style="width: 100%; table-layout: fixed;">
<thead>
<tr>
<th style="width: 20%; white-space: nowrap;">Field</th>
<th style="width: 25%; white-space: nowrap;">Type</th>
<th style="width: 55%; white-space: nowrap;">Description</th>
</tr>
</thead>
<tbody>
<tr><td style="white-space: nowrap;">mode</td><td style="white-space: nowrap;">string (enum):<ul><li><code>sidecar</code></li><li><code>ambient</code></li></ul></td><td>Set the service mesh mode for this package (namespace), defaults to sidecar</td></tr>
</tbody>
</table>
</div>

<a id="Sso"></a>
<div style="margin-left: 60px; padding-top: 30px;">

Expand Down
26 changes: 26 additions & 0 deletions schemas/package-v1alpha1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@
"$ref": "#/definitions/Expose"
},
"description": "Expose a service on an Istio Gateway"
},
"serviceMesh": {
"$ref": "#/definitions/ServiceMesh",
"description": "Service Mesh configuration for the package"
}
},
"required": [],
Expand Down Expand Up @@ -787,6 +791,19 @@
"required": [],
"title": "FluffyURI"
},
"ServiceMesh": {
"type": "object",
"additionalProperties": false,
"properties": {
"mode": {
"$ref": "#/definitions/Mode",
"description": "Set the service mesh mode for this package (namespace), defaults to sidecar"
}
},
"required": [],
"title": "ServiceMesh",
"description": "Service Mesh configuration for the package"
},
"Sso": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -1112,6 +1129,15 @@
"title": "Gateway",
"description": "The name of the gateway to expose the service on (default: tenant)"
},
"Mode": {
"type": "string",
"enum": [
"sidecar",
"ambient"
],
"title": "Mode",
"description": "Set the service mesh mode for this package (namespace), defaults to sidecar"
},
"ClientAuthenticatorType": {
"type": "string",
"enum": [
Expand Down
3 changes: 3 additions & 0 deletions src/pepr/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export const UDSConfig = {

// Track if UDS Core identity-authorization layer is deployed
isIdentityDeployed: false,

// Track if Istio Ambient optional components are deployed
isAmbientDeployed: false,
};

// configure subproject logger
Expand Down
187 changes: 0 additions & 187 deletions src/pepr/operator/controllers/istio/injection.ts

This file was deleted.

Loading