Skip to content

Commit 5128ffb

Browse files
authored
feat: cluster-less crd pipeline (#2316)
## Description - Adds new script to generate CRD yaml manifests and add to helm chart - Removes register.ts - Updates gen-crd to use this and local yaml files instead of requiring cluster - Adds check for templates path to existing crd check ## Related Issue Fixes #2292 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Steps to Validate - If this PR introduces new functionality to UDS Core or addresses a bug, please document the steps to test the changes. ## Checklist before merging - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md) followed
1 parent 2f08ee5 commit 5128ffb

19 files changed

Lines changed: 1589 additions & 387 deletions

File tree

.github/actions/autogenerated-check/action.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2025 Defense Unicorns
1+
# Copyright 2025-2026 Defense Unicorns
22
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial
33

44
name: autogenerated-check
@@ -18,13 +18,6 @@ runs:
1818
# renovate: datasource=github-tags depName=google/addlicense versioning=semver
1919
GOPATH="$HOME/go" go install github.com/google/addlicense@v1.1.1
2020
21-
# We need a cluster for generating our CRD files - args used to simplify cluster setup
22-
k3d cluster create --k3s-arg "--disable=traefik@server:*" \
23-
--k3s-arg "--disable=metrics-server@server:*" \
24-
--k3s-arg "--disable=servicelb@server:*" \
25-
--k3s-arg "--disable=local-storage@server:*" \
26-
--no-lb
27-
2821
# Generate CRD files
2922
uds run -f src/pepr/tasks.yaml gen-crds
3023
@@ -43,10 +36,10 @@ runs:
4336
# Check for specific diffs
4437
DIFFS=false
4538
46-
if [ ! -z "$(git status -s src/pepr/operator/crd/generated/ schemas/ docs/reference/configuration/custom-resources/)" ]; then
39+
if [ ! -z "$(git status -s src/pepr/operator/crd/generated/ schemas/ docs/reference/configuration/custom-resources/ src/pepr/uds-cluster-crds/templates/)" ]; then
4740
# Diffs for CRDs
4841
DIFFS=true
49-
echo -e "\033[33m⚠️ Autogenerated CRD files are not up to date, please run \`uds run -f src/pepr/tasks.yaml gen-crds\` (with an active cluster) and commit the changes.\033[0m"
42+
echo -e "\033[33m⚠️ Autogenerated CRD files are not up to date, please run \`uds run -f src/pepr/tasks.yaml gen-crds\` and commit the changes.\033[0m"
5043
fi
5144
5245
if [ ! -z "$(git status -s src/istio/values/)" ]; then

adrs/0007-cluster-less-crd-generation-workflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Date: 2026-01-13
44

55
## Status
66

7-
Proposed
7+
Accepted
88

99
## Context
1010

docs/reference/configuration/custom-resources/clusterconfig-v1alpha1-cr.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ sidebar:
5454
</tr>
5555
</thead>
5656
<tbody>
57-
<tr><td style="white-space: nowrap;">attributes</td><td style="white-space: nowrap;"><a href="#Attributes">Attributes</a></td><td></td></tr><tr><td style="white-space: nowrap;">caBundle</td><td style="white-space: nowrap;"><a href="#CaBundle">CaBundle</a></td><td></td></tr><tr><td style="white-space: nowrap;">expose</td><td style="white-space: nowrap;"><a href="#Expose">Expose</a></td><td></td></tr><tr><td style="white-space: nowrap;">networking</td><td style="white-space: nowrap;"><a href="#Networking">Networking</a></td><td></td></tr><tr><td style="white-space: nowrap;">policy</td><td style="white-space: nowrap;"><a href="#Policy">Policy</a></td><td></td></tr>
57+
<tr><td style="white-space: nowrap;">attributes</td><td style="white-space: nowrap;"><a href="#Attributes">Attributes</a></td><td></td></tr><tr><td style="white-space: nowrap;">networking</td><td style="white-space: nowrap;"><a href="#Networking">Networking</a></td><td></td></tr><tr><td style="white-space: nowrap;">caBundle</td><td style="white-space: nowrap;"><a href="#CaBundle">CaBundle</a></td><td></td></tr><tr><td style="white-space: nowrap;">expose</td><td style="white-space: nowrap;"><a href="#Expose">Expose</a></td><td></td></tr><tr><td style="white-space: nowrap;">policy</td><td style="white-space: nowrap;"><a href="#Policy">Policy</a></td><td></td></tr>
5858
</tbody>
5959
</table>
6060
</div>
@@ -77,10 +77,10 @@ sidebar:
7777
</table>
7878
</div>
7979

80-
<a id="CaBundle"></a>
80+
<a id="Networking"></a>
8181
<div style="margin-left: 60px; padding-top: 30px;">
8282

83-
### CaBundle
83+
### Networking
8484
<table style="width: 100%; table-layout: fixed;">
8585
<thead>
8686
<tr>
@@ -90,15 +90,15 @@ sidebar:
9090
</tr>
9191
</thead>
9292
<tbody>
93-
<tr><td style="white-space: nowrap;">certs</td><td style="white-space: nowrap;">string</td><td>Contents of user provided CA bundle certificates</td></tr><tr><td style="white-space: nowrap;">includeDoDCerts</td><td style="white-space: nowrap;">boolean</td><td>Include DoD CA certificates in the bundle</td></tr><tr><td style="white-space: nowrap;">includePublicCerts</td><td style="white-space: nowrap;">boolean</td><td>Include public CA certificates in the bundle</td></tr>
93+
<tr><td style="white-space: nowrap;">kubeApiCIDR</td><td style="white-space: nowrap;">string</td><td>CIDR range for your Kubernetes control plane nodes. This is a manual override that can be used instead of relying on Pepr to automatically watch and update the values</td></tr><tr><td style="white-space: nowrap;">kubeNodeCIDRs</td><td style="white-space: nowrap;">string[]</td><td>CIDR(s) for all Kubernetes nodes (not just control plane). Similar reason to above,annual override instead of relying on watch</td></tr>
9494
</tbody>
9595
</table>
9696
</div>
9797

98-
<a id="Expose"></a>
98+
<a id="CaBundle"></a>
9999
<div style="margin-left: 60px; padding-top: 30px;">
100100

101-
### Expose
101+
### CaBundle
102102
<table style="width: 100%; table-layout: fixed;">
103103
<thead>
104104
<tr>
@@ -108,15 +108,15 @@ sidebar:
108108
</tr>
109109
</thead>
110110
<tbody>
111-
<tr><td style="white-space: nowrap;">adminDomain</td><td style="white-space: nowrap;">string</td><td>Domain all cluster services on the admin gateway will be exposed on</td></tr><tr><td style="white-space: nowrap;">caCert</td><td style="white-space: nowrap;">string</td><td>The trusted CA that signed your domain certificates if using Private PKI</td></tr><tr><td style="white-space: nowrap;">domain</td><td style="white-space: nowrap;">string</td><td>Domain all cluster services will be exposed on</td></tr>
111+
<tr><td style="white-space: nowrap;">certs</td><td style="white-space: nowrap;">string</td><td>Contents of user provided CA bundle certificates</td></tr><tr><td style="white-space: nowrap;">includeDoDCerts</td><td style="white-space: nowrap;">boolean</td><td>Include DoD CA certificates in the bundle</td></tr><tr><td style="white-space: nowrap;">includePublicCerts</td><td style="white-space: nowrap;">boolean</td><td>Include public CA certificates in the bundle</td></tr>
112112
</tbody>
113113
</table>
114114
</div>
115115

116-
<a id="Networking"></a>
116+
<a id="Expose"></a>
117117
<div style="margin-left: 60px; padding-top: 30px;">
118118

119-
### Networking
119+
### Expose
120120
<table style="width: 100%; table-layout: fixed;">
121121
<thead>
122122
<tr>
@@ -126,7 +126,7 @@ sidebar:
126126
</tr>
127127
</thead>
128128
<tbody>
129-
<tr><td style="white-space: nowrap;">kubeApiCIDR</td><td style="white-space: nowrap;">string</td><td>CIDR range for your Kubernetes control plane nodes. This is a manual override that can be used instead of relying on Pepr to automatically watch and update the values</td></tr><tr><td style="white-space: nowrap;">kubeNodeCIDRs</td><td style="white-space: nowrap;">string[]</td><td>CIDR(s) for all Kubernetes nodes (not just control plane). Similar reason to above,annual override instead of relying on watch</td></tr>
129+
<tr><td style="white-space: nowrap;">domain</td><td style="white-space: nowrap;">string</td><td>Domain all cluster services will be exposed on</td></tr><tr><td style="white-space: nowrap;">adminDomain</td><td style="white-space: nowrap;">string</td><td>Domain all cluster services on the admin gateway will be exposed on</td></tr><tr><td style="white-space: nowrap;">caCert</td><td style="white-space: nowrap;">string</td><td>The trusted CA that signed your domain certificates if using Private PKI</td></tr>
130130
</tbody>
131131
</table>
132132
</div>

docs/reference/configuration/custom-resources/exemptions-v1alpha1-cr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ sidebar:
5454
</tr>
5555
</thead>
5656
<tbody>
57-
<tr><td style="white-space: nowrap;">description</td><td style="white-space: nowrap;">string</td><td>Reasons as to why this exemption is needed</td></tr><tr><td style="white-space: nowrap;">matcher</td><td style="white-space: nowrap;"><a href="#Matcher">Matcher</a></td><td>Resource to exempt (Regex allowed for name)</td></tr><tr><td style="white-space: nowrap;">policies</td><td style="white-space: nowrap;">Policies[] (enum):<ul><li><code>DisallowHostNamespaces</code></li><li><code>DisallowNodePortServices</code></li><li><code>DisallowPrivileged</code></li><li><code>DisallowSELinuxOptions</code></li><li><code>DropAllCapabilities</code></li><li><code>RequireNonRootUser</code></li><li><code>RestrictCapabilities</code></li><li><code>RestrictExternalNames</code></li><li><code>RestrictHostPathWrite</code></li><li><code>RestrictHostPorts</code></li><li><code>RestrictIstioAmbientOverrides</code></li><li><code>RestrictIstioSidecarOverrides</code></li><li><code>RestrictIstioTrafficOverrides</code></li><li><code>RestrictIstioUser</code></li><li><code>RestrictProcMount</code></li><li><code>RestrictSeccomp</code></li><li><code>RestrictSELinuxType</code></li><li><code>RestrictVolumeTypes</code></li></ul></td><td>A list of policies to override</td></tr><tr><td style="white-space: nowrap;">title</td><td style="white-space: nowrap;">string</td><td>title to give the exemption for reporting purposes</td></tr>
57+
<tr><td style="white-space: nowrap;">title</td><td style="white-space: nowrap;">string</td><td>title to give the exemption for reporting purposes</td></tr><tr><td style="white-space: nowrap;">description</td><td style="white-space: nowrap;">string</td><td>Reasons as to why this exemption is needed</td></tr><tr><td style="white-space: nowrap;">policies</td><td style="white-space: nowrap;">Policies[] (enum):<ul><li><code>DisallowHostNamespaces</code></li><li><code>DisallowNodePortServices</code></li><li><code>DisallowPrivileged</code></li><li><code>DisallowSELinuxOptions</code></li><li><code>DropAllCapabilities</code></li><li><code>RequireNonRootUser</code></li><li><code>RestrictCapabilities</code></li><li><code>RestrictExternalNames</code></li><li><code>RestrictHostPathWrite</code></li><li><code>RestrictHostPorts</code></li><li><code>RestrictIstioAmbientOverrides</code></li><li><code>RestrictIstioSidecarOverrides</code></li><li><code>RestrictIstioTrafficOverrides</code></li><li><code>RestrictIstioUser</code></li><li><code>RestrictProcMount</code></li><li><code>RestrictSeccomp</code></li><li><code>RestrictSELinuxType</code></li><li><code>RestrictVolumeTypes</code></li></ul></td><td>A list of policies to override</td></tr><tr><td style="white-space: nowrap;">matcher</td><td style="white-space: nowrap;"><a href="#Matcher">Matcher</a></td><td>Resource to exempt (Regex allowed for name)</td></tr>
5858
</tbody>
5959
</table>
6060
</div>
@@ -72,7 +72,7 @@ sidebar:
7272
</tr>
7373
</thead>
7474
<tbody>
75-
<tr><td style="white-space: nowrap;">kind</td><td style="white-space: nowrap;">string (enum):<ul><li><code>pod</code></li><li><code>service</code></li></ul></td><td></td></tr><tr><td style="white-space: nowrap;">name</td><td style="white-space: nowrap;">string</td><td></td></tr><tr><td style="white-space: nowrap;">namespace</td><td style="white-space: nowrap;">string</td><td></td></tr>
75+
<tr><td style="white-space: nowrap;">namespace</td><td style="white-space: nowrap;">string</td><td></td></tr><tr><td style="white-space: nowrap;">name</td><td style="white-space: nowrap;">string</td><td></td></tr><tr><td style="white-space: nowrap;">kind</td><td style="white-space: nowrap;">string (enum):<ul><li><code>pod</code></li><li><code>service</code></li></ul></td><td></td></tr>
7676
</tbody>
7777
</table>
7878
</div>

0 commit comments

Comments
 (0)