Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
flavor: [upstream]
uses: defenseunicorns/uds-common/.github/workflows/callable-test.yaml@807de6f4efca9f51ee5e8d3e466d5f089c9eaab8 # v1.34.1
with:
udsCliVersion: "0.42.0"
timeout: 30
options: --set BASE_REPO="ghcr.io/uds-packages"
runsOn: appstore-4-core-amd64
Expand Down
2 changes: 1 addition & 1 deletion README-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ as the package source.

## Local development

Requires [UDS CLI](https://github.com/defenseunicorns/uds-cli?tab=readme-ov-file#install) v0.40.0 or newer.
Requires [UDS CLI](https://github.com/defenseunicorns/uds-cli?tab=readme-ov-file#install) v0.42.0 or newer.
See the [UDS CLI Next documentation](https://docs.defenseunicorns.com/cli/v0-40/reference/next-mode/) for usage and configuration.

```bash
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The canonical guide for turning this scaffolding into a working package is [Crea
After working through that guide, finish the template-specific cleanup below.

The [dev/test bundle](./bundle/bundle.uds.hcl).
Use UDS CLI v0.40.0 or newer. The tasks enable Next through `NEXT_MODE=true`.
Use UDS CLI v0.42.0 or newer. The tasks enable Next through `NEXT_MODE=true`.

## Template cleanup checklist

Expand Down
71 changes: 36 additions & 35 deletions common/zarf.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
# Copyright #TEMPLATE_COPYRIGHT_YEAR# Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial

# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json
kind: ZarfPackageConfig
# yaml-language-server: $schema=https://raw.githubusercontent.com/zarf-dev/zarf/refs/heads/main/src/pkg/schema/zarf-v1beta1-component-schema.json
apiVersion: zarf.dev/v1beta1
kind: ZarfComponentConfig
metadata:
name: #TEMPLATE_APPLICATION_NAME#-common
name: #TEMPLATE_APPLICATION_NAME#
description: "UDS #TEMPLATE_APPLICATION_DISPLAY_NAME# Common Package"

components:
- name: #TEMPLATE_APPLICATION_NAME#
required: true
charts:
- name: uds-#TEMPLATE_APPLICATION_NAME#-config
namespace: #TEMPLATE_APPLICATION_NAME#
version: 0.1.0
localPath: ../chart
values:
- sourcePath: ".uds-#TEMPLATE_APPLICATION_NAME#-config"
targetPath: .
- name: #TEMPLATE_APPLICATION_NAME#
namespace: #TEMPLATE_APPLICATION_NAME#
component:
charts:
- name: uds-#TEMPLATE_APPLICATION_NAME#-config
namespace: #TEMPLATE_APPLICATION_NAME#
local:
path: ../chart
values:
- sourcePath: ".uds-#TEMPLATE_APPLICATION_NAME#-config"
targetPath: .
- name: #TEMPLATE_APPLICATION_NAME#
namespace: #TEMPLATE_APPLICATION_NAME#
git:
url: #TEMPLATE_CHART_REPO#
gitPath: chart
version: 1.2.3
valuesFiles:
- ../values/common-values.yaml
values:
- sourcePath: ".#TEMPLATE_APPLICATION_NAME#"
targetPath: .
# Review chart-specific image and integration settings when selecting the application.
excludePaths:
- ".#TEMPLATE_APPLICATION_NAME#.image"
- ".#TEMPLATE_APPLICATION_NAME#.imagePullSecrets"
- ".#TEMPLATE_APPLICATION_NAME#.global.imageRegistry"
- ".#TEMPLATE_APPLICATION_NAME#.global.imagePullSecrets"
- ".#TEMPLATE_APPLICATION_NAME#.securityContext"
- ".#TEMPLATE_APPLICATION_NAME#.containerSecurityContext"
- ".#TEMPLATE_APPLICATION_NAME#.podSecurityContext"
- ".#TEMPLATE_APPLICATION_NAME#.crds"
- ".#TEMPLATE_APPLICATION_NAME#.installCRDs"
- ".#TEMPLATE_APPLICATION_NAME#.ingress"
path: chart
ref:
tag: "1.2.3"
valuesFiles:
- path: ../values/common-values.yaml
values:
- sourcePath: ".#TEMPLATE_APPLICATION_NAME#"
targetPath: .
# Review chart-specific image and integration settings when selecting the application.
excludePaths:
- ".#TEMPLATE_APPLICATION_NAME#.image"
- ".#TEMPLATE_APPLICATION_NAME#.imagePullSecrets"
- ".#TEMPLATE_APPLICATION_NAME#.global.imageRegistry"
- ".#TEMPLATE_APPLICATION_NAME#.global.imagePullSecrets"
- ".#TEMPLATE_APPLICATION_NAME#.securityContext"
- ".#TEMPLATE_APPLICATION_NAME#.containerSecurityContext"
- ".#TEMPLATE_APPLICATION_NAME#.podSecurityContext"
- ".#TEMPLATE_APPLICATION_NAME#.crds"
- ".#TEMPLATE_APPLICATION_NAME#.installCRDs"
- ".#TEMPLATE_APPLICATION_NAME#.ingress"
11 changes: 4 additions & 7 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,12 @@ tasks:
"

# Patch common/zarf.yaml
./zarf tools yq -i ".components[0].charts[1].version = \"${CHART_VERSION}\"" common/zarf.yaml
./zarf tools yq -i 'del(.components[0].charts[1].gitPath)' common/zarf.yaml
./zarf tools yq -i '.components[0].charts[1].values[0].excludePaths |= (. + [".podinfo.redis", ".podinfo.serviceAccount.imagePullSecrets"] | unique)' common/zarf.yaml
./zarf tools yq -i "del(.component.charts[1].git) |
.component.charts[1].oci = {\"url\": \"${CHART_URL}\", \"ref\": {\"tag\": \"${CHART_VERSION}\"}}" common/zarf.yaml
./zarf tools yq -i '.component.charts[1].values[0].excludePaths |= (. + [".podinfo.redis", ".podinfo.serviceAccount.imagePullSecrets"] | unique)' common/zarf.yaml

# Patch zarf.yaml, set podinfo image
./zarf tools yq -i "(.components[] | select(.only.flavor == \"upstream\")).images = [\"${APP_IMAGE}\"]" zarf.yaml
./zarf tools yq -i 'del(.components[] | select(.only.flavor == "unicorn"))' zarf.yaml
./zarf tools yq -i 'del(.components[] | select(.only.flavor == "registry1"))' zarf.yaml
./zarf tools yq -i '.variables = [{"name": "DOMAIN", "default": "uds.dev"}]' zarf.yaml
./zarf tools yq -i "(.components[] | select(.selector.flavor == \"upstream\")).images = [{\"name\": \"${APP_IMAGE}\"}]" zarf.yaml

# Patch uds-package.yaml: add SSO + Authservice (podinfo has no native OIDC), allow-all network policy
perl -i -0pe 's|( # Customize network policies and expose services via istio)| sso:\n - name: Podinfo\n clientId: uds-podinfo\n redirectUris:\n - "https://podinfo.uds.dev/login"\n enableAuthserviceSelector:\n app.kubernetes.io/name: podinfo\n$1|' chart/templates/uds-package.yaml
Expand Down
16 changes: 8 additions & 8 deletions zarf.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Copyright #TEMPLATE_COPYRIGHT_YEAR# Defense Unicorns
# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial

# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/zarf-dev/zarf/refs/heads/main/src/pkg/schema/zarf-v1beta1-package-schema.json
apiVersion: zarf.dev/v1beta1
kind: ZarfPackageConfig
metadata:
name: #TEMPLATE_APPLICATION_NAME#
Expand All @@ -14,9 +15,8 @@ metadata:
dev.uds.keywords: ""
dev.uds.icon: ""

variables:
- name: DOMAIN
default: "uds.dev"
attachments:
configuration: docs/configuration.md

values:
files:
Expand All @@ -25,14 +25,14 @@ values:

components:
- name: #TEMPLATE_APPLICATION_NAME#
required: true
description: "Deploy #TEMPLATE_APPLICATION_DISPLAY_NAME#"
import:
path: common
only:
local:
- path: common/zarf.yaml
selector:
flavor: upstream
charts:
- name: #TEMPLATE_APPLICATION_NAME#
valuesFiles:
- values/upstream-values.yaml
- path: values/upstream-values.yaml
images: []