Skip to content

Commit

Permalink
chore: update to latest k3s patches, switch port mapping to standard …
Browse files Browse the repository at this point in the history
…ports (#76)

* chore: update to latest k3s patches, switch port mapping to standard ports

* more no progress
  • Loading branch information
mjnagel authored May 23, 2024
1 parent c92cf9d commit 6339460
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 22 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ jobs:
strategy:
matrix:
image: ["ghcr.io/defenseunicorns/oss/uds-k3d-k3s"]
version: ["v1.27.11-k3s1", "v1.28.7-k3s1", "v1.29.2-k3s1"]
# Test the default image as well
include:
- image: "rancher/k3s"
version: "v1.27.4-k3s1"
version: ["v1.27.13-k3s1", "v1.28.9-k3s1", "v1.29.4-k3s1"]

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
Expand All @@ -35,10 +31,10 @@ jobs:

- name: Build the custom k3s image
if: ${{matrix.image}} != "rancher/k3s"
run: uds run build-image --set VERSION=${{matrix.version}}
run: uds run build-image --set VERSION=${{matrix.version}} --no-progress

- name: Create and deploy the uds-k3d package
run: uds run --set IMAGE_NAME=${{matrix.image}} --set VERSION=${{matrix.version}}
run: uds run --set IMAGE_NAME=${{matrix.image}} --set VERSION=${{matrix.version}} --no-progress

- name: Validate uds-k3d package
run: uds run validate
run: uds run validate --no-progress
4 changes: 2 additions & 2 deletions .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["v1.27.11-k3s1", "v1.28.7-k3s1", "v1.29.2-k3s1"]
version: ["v1.27.13-k3s1", "v1.28.9-k3s1", "v1.29.4-k3s1"]

permissions:
contents: read
Expand All @@ -39,4 +39,4 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish the custom k3s image
run: uds run publish-image --set VERSION=${{matrix.version}}
run: uds run publish-image --set VERSION=${{matrix.version}} --no-progress
4 changes: 2 additions & 2 deletions chart/templates/nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ spec:
command: ["nginx", "-g", "daemon off;"]
ports:
- containerPort: 80
hostPort: 20080
hostPort: 80
- containerPort: 443
hostPort: 20443
hostPort: 443
volumeMounts:
- name: config-volume
mountPath: /etc/nginx/nginx.conf
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG K3S_TAG="v1.28.7-k3s1"
ARG K3S_TAG="v1.28.9-k3s1"

FROM rancher/k3s:$K3S_TAG as k3s

Expand Down
13 changes: 7 additions & 6 deletions tasks.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
variables:
- name: VERSION
default: "v1.28.7-k3s1"
default: "v1.28.9-k3s1"
- name: IMAGE_NAME
default: "ghcr.io/defenseunicorns/oss/uds-k3d-k3s"
- name: K3D_EXTRA_ARGS
default: ""

tasks:
- name: default
description: "Build and deploy uds-k3d"
actions:
- description: "Build UDS K3d package"
cmd: "uds zarf package create --confirm"
cmd: "uds zarf package create --confirm --no-progress"

- description: "Deploy UDS K3d package"
cmd: "uds zarf package deploy zarf-package-uds-k3d-*.tar.zst --confirm --set K3D_IMAGE=${IMAGE_NAME}:${VERSION}"
cmd: "uds zarf package deploy zarf-package-uds-k3d-*.tar.zst --confirm --set K3D_IMAGE=${IMAGE_NAME}:${VERSION} --set K3D_EXTRA_ARGS=\"${K3D_EXTRA_ARGS}\" --no-progress"

- name: validate
actions:
Expand All @@ -36,10 +38,9 @@ tasks:
- description: Validate zarf init
cmd: |
set -e
# uds zarf tools download-init does not work in 0.9.4 - https://github.com/defenseunicorns/uds-cli/issues/517
uds zarf package pull oci://ghcr.io/defenseunicorns/packages/init:$(uds zarf version)
uds zarf tools download-init --no-progress
# Test zarf init due to containerd issue - https://github.com/defenseunicorns/zarf/issues/592
uds zarf init --confirm
uds zarf init --confirm --no-progress
- name: build-image
actions:
Expand Down
6 changes: 3 additions & 3 deletions zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variables:

- name: K3D_IMAGE
description: "K3d image to use"
default: "rancher/k3s:v1.27.4-k3s1"
default: "ghcr.io/defenseunicorns/oss/uds-k3d-k3s:v1.28.9-k3s1"

- name: K3D_EXTRA_ARGS
description: "Optionally pass k3d arguments to the default"
Expand All @@ -41,8 +41,8 @@ components:
before:
- cmd: |
k3d cluster create \
-p "80:20080@server:*" \
-p "443:20443@server:*" \
-p "80:80@server:*" \
-p "443:443@server:*" \
--api-port 6550 \
--k3s-arg "--disable=traefik@server:*" \
--k3s-arg "--disable=metrics-server@server:*" \
Expand Down

0 comments on commit 6339460

Please sign in to comment.