Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update k3s version, comment out custom image #92

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 2 additions & 6 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
image: ["ghcr.io/defenseunicorns/oss/uds-k3d-k3s"]
version: ["v1.27.13-k3s1", "v1.28.9-k3s1", "v1.29.4-k3s1"]
image: ["rancher/k3s"]
version: ["v1.28.11-k3s2", "v1.29.6-k3s2", "v1.30.2-k3s2"]

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
Expand All @@ -29,10 +29,6 @@ jobs:
username: ${{secrets.IRON_BANK_ROBOT_USERNAME}}
password: ${{secrets.IRON_BANK_ROBOT_PASSWORD}}

- name: Build the custom k3s image
if: ${{matrix.image}} != "rancher/k3s"
run: uds run build-image --set VERSION=${{matrix.version}} --no-progress
MxNxPx marked this conversation as resolved.
Show resolved Hide resolved

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

Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
name: Publish k3s image

on:
push:
branches:
- main
paths:
- docker/**
- .github/workflows/publish-image.yaml
# Workflow is not currently being used, switched to a manual trigger only
on: workflow_dispatch
# push:
# branches:
# - main
# paths:
# - docker/**
# - .github/workflows/publish-image.yaml

jobs:
publish-k3s-image:
runs-on: ubuntu-latest
strategy:
matrix:
version: ["v1.27.13-k3s1", "v1.28.9-k3s1", "v1.29.4-k3s1"]
version: ["v1.28.11-k3s2", "v1.29.6-k3s2", "v1.30.2-k3s2"]

permissions:
contents: read
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
> [!IMPORTANT]
> This package should only be used for development and testing purposes. It is not intended for production use and all data is overwritten when the package is re-deployed.

This zarf package serves as a universal dev (local & remote) and test environment for testing [UDS Core](https://github.com/defenseunicorns/uds-core), invidual UDS Capabilities, and UDS capabilities aggregated via the [UDS CLI](https://github.com/defenseunicorns/uds-cli). If working with a remote cluster over SSH, you can use SSH port-forwarding to connect:
This zarf package serves as a universal dev (local & remote) and test environment for testing [UDS Core](https://github.com/defenseunicorns/uds-core), individual UDS Capabilities, and UDS capabilities aggregated via the [UDS CLI](https://github.com/defenseunicorns/uds-cli). If working with a remote cluster over SSH, you can use SSH port-forwarding to connect:

`ssh -N -L 8080:localhost:80 -L 8443:localhost:443 -L 6550:localhost:6550`
```console
# Non-standard ports
ssh -N -L 8080:localhost:80 -L 8443:localhost:443 -L 6550:localhost:6550 <your-remote-host>

# Standard ports (requires sudo)
sudo ssh -N -L 80:localhost:80 -L 443:localhost:443 -L 6550:localhost:6550 <your-remote-host>
```

> [!NOTE]
> UDS K3d intentionally does not address airgap concerns for K3d or the load balancer logic deployed in this package. This allows running `zarf init` or deploying a Zarf Init Package via a UDS Bundle after the UDS K3d environment is deployed.

## Prerequisites

- [UDS cli](https://github.com/defenseunicorns/uds-cli/blob/main/README.md#install) & [K3d](https://k3d.io/#installation) using the versions specified in the [uds-common repo](https://github.com/defenseunicorns/uds-common/blob/main/README.md#supported-tool-versions)
- [UDS CLI](https://github.com/defenseunicorns/uds-cli/blob/main/README.md#install) & [K3d](https://k3d.io/#installation) using the versions specified in the [uds-common repo](https://github.com/defenseunicorns/uds-common/blob/main/README.md#supported-tool-versions)
- [Docker](https://docs.docker.com/get-docker/) or [Podman](https://podman.io/getting-started/installation) for running K3d

## Deploy
Expand All @@ -35,8 +41,7 @@ This package is published via CI, but can be created locally with the following

## Additional Info

You can set extra k3d args by setting the deploy-time ZARF_VAR_K3D_EXTRA_ARGS.
Set Extra k3d args:
You can set extra k3d args by setting the deploy-time ZARF_VAR_K3D_EXTRA_ARGS. See below `zarf-config.yaml` example k3d args:

```yaml
package:
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG K3S_TAG="v1.28.9-k3s1"
ARG K3S_TAG="v1.29.6-k3s2"

FROM rancher/k3s:$K3S_TAG as k3s

COPY config.toml.tmpl /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
# Do custom image things
27 changes: 0 additions & 27 deletions docker/config.toml.tmpl

This file was deleted.

14 changes: 14 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,19 @@
":semanticPrefixFixDepsChoreOthers",
"replacements:all",
"workarounds:all"
],
"packageRules": [
{
"matchFileNames": ["chart/**", "zarf.yaml"],
"excludePackageNames": ["rancher/k3s"],
"groupName": "dev-stack",
"commitMessageTopic": "dev-stack"
},
{
"matchFileNames": [".github/workflows/**", ".github/actions/**"],
"groupName": "githubactions",
"commitMessageTopic": "githubactions",
"pinDigests": true
}
]
}
20 changes: 10 additions & 10 deletions tasks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
variables:
- name: VERSION
default: "v1.28.9-k3s1"
default: "v1.29.6-k3s2"
- name: IMAGE_NAME
default: "ghcr.io/defenseunicorns/oss/uds-k3d-k3s"
default: "rancher/k3s"
- name: K3D_EXTRA_ARGS
default: ""

Expand Down Expand Up @@ -42,12 +42,12 @@ tasks:
# Test zarf init due to containerd issue - https://github.com/defenseunicorns/zarf/issues/592
uds zarf init --confirm --no-progress

- name: build-image
actions:
- description: Build the custom k3s image
cmd: docker build -t ${IMAGE_NAME}:${VERSION} --build-arg K3S_TAG=${VERSION} docker/
# - name: build-image
# actions:
# - description: Build the custom k3s image
# cmd: docker build -t ${IMAGE_NAME}:${VERSION} --build-arg K3S_TAG=${VERSION} docker/

- name: publish-image
actions:
- description: Publish the custom k3s image
cmd: docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ${IMAGE_NAME}:${VERSION} docker
# - name: publish-image
# actions:
# - description: Publish the custom k3s image
# cmd: docker buildx build --push --platform linux/arm64/v8,linux/amd64 --tag ${IMAGE_NAME}:${VERSION} docker
mjnagel marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion 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: "ghcr.io/defenseunicorns/oss/uds-k3d-k3s:v1.28.9-k3s1"
default: "rancher/k3s:v1.29.6-k3s2"

- name: K3D_EXTRA_ARGS
description: "Optionally pass k3d arguments to the default"
Expand Down
Loading