From 4dcf89751cfd1d3efd19646668f4ce67c33ca6f2 Mon Sep 17 00:00:00 2001 From: Sven Pfennig Date: Sat, 1 Mar 2025 21:43:05 +0100 Subject: [PATCH 1/2] refactor(github-org-name): replace github.com/spinkube with github.com/spinframework Signed-off-by: Sven Pfennig --- .github/workflows/helm-chart-smoketest.yml | 2 +- PROJECT | 4 ++-- README.md | 24 +++++++++++----------- cmd/node-installer/detect.go | 2 +- cmd/node-installer/detect_test.go | 6 +++--- cmd/node-installer/install.go | 6 +++--- cmd/node-installer/install_test.go | 4 ++-- cmd/node-installer/uninstall.go | 4 ++-- cmd/rcm/main.go | 4 ++-- config/samples/test_shim_spin.yaml | 4 ++-- deploy/helm/templates/NOTES.txt | 6 +++--- deploy/helm/values.yaml | 6 +++--- go.mod | 2 +- internal/containerd/configure.go | 2 +- internal/containerd/configure_test.go | 2 +- internal/controller/node_controller.go | 2 +- internal/controller/shim_controller.go | 2 +- internal/controller/suite_test.go | 2 +- internal/preset/preset.go | 2 +- internal/preset/preset_test.go | 4 ++-- internal/shim/install.go | 2 +- internal/shim/install_test.go | 2 +- internal/shim/uninstall.go | 2 +- internal/shim/uninstall_test.go | 2 +- internal/state/state_test.go | 4 ++-- testdata/apps/spin-app.yaml | 4 ++-- 26 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/helm-chart-smoketest.yml b/.github/workflows/helm-chart-smoketest.yml index fe61ef67..01cdf36f 100644 --- a/.github/workflows/helm-chart-smoketest.yml +++ b/.github/workflows/helm-chart-smoketest.yml @@ -87,7 +87,7 @@ jobs: - name: apply Spin shim run: | # Ensure shim binary is compatible with runner arch - yq -i '.spec.fetchStrategy.anonHttp.location = "https://github.com/spinkube/containerd-shim-spin/releases/download/${{ env.SHIM_SPIN_VERSION }}/containerd-shim-spin-v2-linux-x86_64.tar.gz"' \ + yq -i '.spec.fetchStrategy.anonHttp.location = "https://github.com/spinframework/containerd-shim-spin/releases/download/${{ env.SHIM_SPIN_VERSION }}/containerd-shim-spin-v2-linux-x86_64.tar.gz"' \ config/samples/test_shim_spin.yaml kubectl apply -f config/samples/test_shim_spin.yaml diff --git a/PROJECT b/PROJECT index e7221601..e9aa63d5 100644 --- a/PROJECT +++ b/PROJECT @@ -6,7 +6,7 @@ domain: kwasm.sh layout: - go.kubebuilder.io/v4 projectName: runtime-class-manager -repo: github.com/spinkube/runtime-class-manager +repo: github.com/spinframework/runtime-class-manager resources: - api: crdVersion: v1 @@ -15,7 +15,7 @@ resources: domain: kwasm.sh group: runtime kind: Shim - path: github.com/spinkube/runtime-class-manager/api/v1alpha1 + path: github.com/spinframework/runtime-class-manager/api/v1alpha1 version: v1alpha1 - controller: true domain: kwasm.sh diff --git a/README.md b/README.md index 734941c9..669b5017 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # runtime-class-manager -[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/spinkube/runtime-class-manager/badge)](https://securityscorecards.dev/viewer/?uri=github.com/spinkube/runtime-class-manager) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/spinframework/runtime-class-manager/badge)](https://securityscorecards.dev/viewer/?uri=github.com/spinframework/runtime-class-manager) The runtime-class-manager is the spiritual successor to the kwasm-operator. kwasm has been developed as an experimental, simple way to install Wasm runtimes. This experiment has been relatively successful, as more and more users utilized it to fiddle around with Wasm on Kubernetes. However, the kwasm-operator has some limitations that make it difficult to use in production. The runtime-class-manager is an attempt to address these limitations to make it a reliable and secure way to deploy arbitrary containerd shims. @@ -12,16 +12,16 @@ The name should be treated as a working title and is hopefully subject to change For the 1.0 release of runtime-class-manager, we consider three milestones: -- **M1: [RCM MVP for Spinkube](https://github.com/spinkube/runtime-class-manager/milestone/1)** -This milestone is about getting RCM to a state where Spinkube can rely on RCM and use it as a dependency instead of Kwasm. This means, that the focus is on managing lifecycle of [containerd-shim-spin](https://github.com/spinkube/containerd-shim-spin) on nodes. -- **M2: [Kwasm Feature Parity](https://github.com/spinkube/runtime-class-manager/milestone/2)** +- **M1: [RCM MVP for Spinkube](https://github.com/spinframework/runtime-class-manager/milestone/1)** +This milestone is about getting RCM to a state where Spinkube can rely on RCM and use it as a dependency instead of Kwasm. This means, that the focus is on managing lifecycle of [containerd-shim-spin](https://github.com/spinframework/containerd-shim-spin) on nodes. +- **M2: [Kwasm Feature Parity](https://github.com/spinframework/runtime-class-manager/milestone/2)** All shims that kwasm can install, should be installable via rcm. Automated tests are in place to ensure installation of RCM and shims that are supported by Kwasm. -- **M3: [Full implementation of the initial spec](https://github.com/spinkube/runtime-class-manager/milestone/3)** +- **M3: [Full implementation of the initial spec](https://github.com/spinframework/runtime-class-manager/milestone/3)** Stable spec of the Shim CRD based on the [initial proposal](https://hackmd.io/TwC8Fc8wTCKdoWlgNOqTgA). After 1.0 we assume no breaking changes of the Shim CRD. Arbitrary shims can be installed via RCM and prominent shims are tested automatically, on various Kubernetes distributions. - Future (ideas): - - support for additional container runtimes, like CRI-O to enable RCM on OpenShift - - alternative shim installation via Daemonset instead of Jobs - - treating node-installer as a daemon process, to enable better conflict resolution + - support for additional container runtimes, like CRI-O to enable RCM on OpenShift + - alternative shim installation via Daemonset instead of Jobs + - treating node-installer as a daemon process, to enable better conflict resolution ## Usage @@ -33,8 +33,8 @@ Stable spec of the Shim CRD based on the [initial proposal](https://hackmd.io/Tw make docker-build docker-push IMG=/runtime-class-manager:tag ``` -**NOTE:** This image ought to be published in the personal registry you specified. -And it is required to have access to pull the image from the working environment. +**NOTE:** This image ought to be published in the personal registry you specified. +And it is required to have access to pull the image from the working environment. Make sure you have the proper permission to the registry if the above commands don’t work. **Install the CRDs into the cluster:** @@ -49,7 +49,7 @@ make install make deploy IMG=/runtime-class-manager:tag ``` -> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin +> **NOTE**: If you encounter RBAC errors, you may need to grant yourself cluster-admin privileges or be logged in as admin. **Create instances of your solution** @@ -62,6 +62,7 @@ kubectl apply -k config/samples/ >**NOTE**: Ensure that the samples has default values to test it out. ### To Uninstall + **Delete the instances (CRs) from the cluster:** ```sh @@ -95,4 +96,3 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - diff --git a/cmd/node-installer/detect.go b/cmd/node-installer/detect.go index 5643d68a..6189acf9 100644 --- a/cmd/node-installer/detect.go +++ b/cmd/node-installer/detect.go @@ -22,7 +22,7 @@ import ( "log/slog" "github.com/spf13/afero" - "github.com/spinkube/runtime-class-manager/internal/preset" + "github.com/spinframework/runtime-class-manager/internal/preset" ) var containerdConfigLocations = map[string]preset.Settings{ diff --git a/cmd/node-installer/detect_test.go b/cmd/node-installer/detect_test.go index e86195e6..32152dda 100644 --- a/cmd/node-installer/detect_test.go +++ b/cmd/node-installer/detect_test.go @@ -21,9 +21,9 @@ import ( "testing" "github.com/spf13/afero" - main "github.com/spinkube/runtime-class-manager/cmd/node-installer" - "github.com/spinkube/runtime-class-manager/internal/preset" - tests "github.com/spinkube/runtime-class-manager/tests/node-installer" + main "github.com/spinframework/runtime-class-manager/cmd/node-installer" + "github.com/spinframework/runtime-class-manager/internal/preset" + tests "github.com/spinframework/runtime-class-manager/tests/node-installer" "github.com/stretchr/testify/require" ) diff --git a/cmd/node-installer/install.go b/cmd/node-installer/install.go index 0aaa3405..adb1717f 100644 --- a/cmd/node-installer/install.go +++ b/cmd/node-installer/install.go @@ -25,9 +25,9 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/spinkube/runtime-class-manager/internal/containerd" - "github.com/spinkube/runtime-class-manager/internal/preset" - "github.com/spinkube/runtime-class-manager/internal/shim" + "github.com/spinframework/runtime-class-manager/internal/containerd" + "github.com/spinframework/runtime-class-manager/internal/preset" + "github.com/spinframework/runtime-class-manager/internal/shim" ) // installCmd represents the install command. diff --git a/cmd/node-installer/install_test.go b/cmd/node-installer/install_test.go index 8dc8fa78..8982b2cd 100644 --- a/cmd/node-installer/install_test.go +++ b/cmd/node-installer/install_test.go @@ -20,8 +20,8 @@ import ( "testing" "github.com/spf13/afero" - main "github.com/spinkube/runtime-class-manager/cmd/node-installer" - tests "github.com/spinkube/runtime-class-manager/tests/node-installer" + main "github.com/spinframework/runtime-class-manager/cmd/node-installer" + tests "github.com/spinframework/runtime-class-manager/tests/node-installer" "github.com/stretchr/testify/require" ) diff --git a/cmd/node-installer/uninstall.go b/cmd/node-installer/uninstall.go index ec076532..7030a748 100644 --- a/cmd/node-installer/uninstall.go +++ b/cmd/node-installer/uninstall.go @@ -25,8 +25,8 @@ import ( "github.com/spf13/afero" "github.com/spf13/cobra" - "github.com/spinkube/runtime-class-manager/internal/containerd" - "github.com/spinkube/runtime-class-manager/internal/shim" + "github.com/spinframework/runtime-class-manager/internal/containerd" + "github.com/spinframework/runtime-class-manager/internal/shim" ) // uninstallCmd represents the uninstall command. diff --git a/cmd/rcm/main.go b/cmd/rcm/main.go index ca5dcca9..c76805ef 100644 --- a/cmd/rcm/main.go +++ b/cmd/rcm/main.go @@ -33,8 +33,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" - runtimev1alpha1 "github.com/spinkube/runtime-class-manager/api/v1alpha1" - "github.com/spinkube/runtime-class-manager/internal/controller" + runtimev1alpha1 "github.com/spinframework/runtime-class-manager/api/v1alpha1" + "github.com/spinframework/runtime-class-manager/internal/controller" //+kubebuilder:scaffold:imports ) diff --git a/config/samples/test_shim_spin.yaml b/config/samples/test_shim_spin.yaml index c709e5fa..12d7dae5 100644 --- a/config/samples/test_shim_spin.yaml +++ b/config/samples/test_shim_spin.yaml @@ -15,11 +15,11 @@ spec: fetchStrategy: type: anonymousHttp anonHttp: - location: "https://github.com/spinkube/containerd-shim-spin/releases/download/v0.15.1/containerd-shim-spin-v2-linux-aarch64.tar.gz" + location: "https://github.com/spinframework/containerd-shim-spin/releases/download/v0.15.1/containerd-shim-spin-v2-linux-aarch64.tar.gz" runtimeClass: # Note: this name is used by the Spin Operator project as its default: - # https://github.com/spinkube/spin-operator/blob/main/config/samples/spin-shim-executor.yaml + # https://github.com/spinframework/spin-operator/blob/main/config/samples/spin-shim-executor.yaml name: wasmtime-spin-v2 handler: spin-v2 diff --git a/deploy/helm/templates/NOTES.txt b/deploy/helm/templates/NOTES.txt index cb30c337..102bb99d 100644 --- a/deploy/helm/templates/NOTES.txt +++ b/deploy/helm/templates/NOTES.txt @@ -2,14 +2,14 @@ Welcome to Runtime-Class-Manager. Next steps: -Create one or more Wasm Shim custom resources. See the samples in https://github.com/spinkube/runtime-class-manager/tree/main/config/samples. +Create one or more Wasm Shim custom resources. See the samples in https://github.com/spinframework/runtime-class-manager/tree/main/config/samples. > Note: Ensure that the `location` for the specified shim binary points to the correct architecture for your Node(s) For example, install the Spin shim: ```shell -kubectl apply -f https://raw.githubusercontent.com/spinkube/runtime-class-manager/refs/heads/main/config/samples/test_shim_spin.yaml +kubectl apply -f https://raw.githubusercontent.com/spinframework/runtime-class-manager/refs/heads/main/config/samples/test_shim_spin.yaml ``` Next, annotate one or more nodes with a label corresponding to the `nodeSelector` declared in the Shim, runtime-class-manager will install the shim as well as create the corresponding RuntimeClass: @@ -18,4 +18,4 @@ Next, annotate one or more nodes with a label corresponding to the `nodeSelector kubectl label node --all spin=true ``` -You are now ready to deploy your Wasm workloads. \ No newline at end of file +You are now ready to deploy your Wasm workloads. diff --git a/deploy/helm/values.yaml b/deploy/helm/values.yaml index 960a24de..3df1ad28 100644 --- a/deploy/helm/values.yaml +++ b/deploy/helm/values.yaml @@ -5,17 +5,17 @@ replicaCount: 1 image: - repository: "ghcr.io/spinkube/runtime-class-manager" + repository: "ghcr.io/spinframework/runtime-class-manager" pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "latest" rcm: shimDownloaderImage: - repository: "ghcr.io/spinkube/shim-downloader" + repository: "ghcr.io/spinframework/shim-downloader" tag: "latest" nodeInstallerImage: - repository: "ghcr.io/spinkube/node-installer" + repository: "ghcr.io/spinframework/node-installer" tag: "latest" nodeInstallerJob: ttl: 0 diff --git a/go.mod b/go.mod index 217a65f7..91832709 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/spinkube/runtime-class-manager +module github.com/spinframework/runtime-class-manager go 1.23.0 diff --git a/internal/containerd/configure.go b/internal/containerd/configure.go index 9aedad7e..09c8b02b 100644 --- a/internal/containerd/configure.go +++ b/internal/containerd/configure.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/spf13/afero" - "github.com/spinkube/runtime-class-manager/internal/shim" + "github.com/spinframework/runtime-class-manager/internal/shim" ) type Restarter interface { diff --git a/internal/containerd/configure_test.go b/internal/containerd/configure_test.go index 0f1625df..72896cf1 100644 --- a/internal/containerd/configure_test.go +++ b/internal/containerd/configure_test.go @@ -20,7 +20,7 @@ import ( "testing" "github.com/spf13/afero" - tests "github.com/spinkube/runtime-class-manager/tests/node-installer" + tests "github.com/spinframework/runtime-class-manager/tests/node-installer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/controller/node_controller.go b/internal/controller/node_controller.go index c66932aa..b921bef7 100644 --- a/internal/controller/node_controller.go +++ b/internal/controller/node_controller.go @@ -23,7 +23,7 @@ package controller // "os" // "strings" -// kwasmv1 "github.com/spinkube/runtime-class-manager/api/v1alpha1" +// kwasmv1 "github.com/spinframework/runtime-class-manager/api/v1alpha1" // "github.com/rs/zerolog/log" // batchv1 "k8s.io/api/batch/v1" // corev1 "k8s.io/api/core/v1" diff --git a/internal/controller/shim_controller.go b/internal/controller/shim_controller.go index 36beff75..1c838fb4 100644 --- a/internal/controller/shim_controller.go +++ b/internal/controller/shim_controller.go @@ -40,7 +40,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/predicate" "sigs.k8s.io/controller-runtime/pkg/reconcile" - rcmv1 "github.com/spinkube/runtime-class-manager/api/v1alpha1" + rcmv1 "github.com/spinframework/runtime-class-manager/api/v1alpha1" ) const ( diff --git a/internal/controller/suite_test.go b/internal/controller/suite_test.go index 54434f1d..3a94e5d4 100644 --- a/internal/controller/suite_test.go +++ b/internal/controller/suite_test.go @@ -32,7 +32,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - runtimev1alpha1 "github.com/spinkube/runtime-class-manager/api/v1alpha1" + runtimev1alpha1 "github.com/spinframework/runtime-class-manager/api/v1alpha1" //+kubebuilder:scaffold:imports ) diff --git a/internal/preset/preset.go b/internal/preset/preset.go index c357a610..7ab9b454 100644 --- a/internal/preset/preset.go +++ b/internal/preset/preset.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/spf13/afero" - "github.com/spinkube/runtime-class-manager/internal/containerd" + "github.com/spinframework/runtime-class-manager/internal/containerd" ) type Settings struct { diff --git a/internal/preset/preset_test.go b/internal/preset/preset_test.go index a540129c..b4befbf8 100644 --- a/internal/preset/preset_test.go +++ b/internal/preset/preset_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/spf13/afero" - "github.com/spinkube/runtime-class-manager/internal/preset" - tests "github.com/spinkube/runtime-class-manager/tests/node-installer" + "github.com/spinframework/runtime-class-manager/internal/preset" + tests "github.com/spinframework/runtime-class-manager/tests/node-installer" "github.com/stretchr/testify/require" ) diff --git a/internal/shim/install.go b/internal/shim/install.go index 965f6840..4bd11a5a 100644 --- a/internal/shim/install.go +++ b/internal/shim/install.go @@ -23,7 +23,7 @@ import ( "path" "path/filepath" - "github.com/spinkube/runtime-class-manager/internal/state" + "github.com/spinframework/runtime-class-manager/internal/state" ) func (c *Config) Install(shimName string) (filePath string, changed bool, err error) { diff --git a/internal/shim/install_test.go b/internal/shim/install_test.go index fc363f42..be00c768 100644 --- a/internal/shim/install_test.go +++ b/internal/shim/install_test.go @@ -20,7 +20,7 @@ import ( "testing" "github.com/spf13/afero" - tests "github.com/spinkube/runtime-class-manager/tests/node-installer" + tests "github.com/spinframework/runtime-class-manager/tests/node-installer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/shim/uninstall.go b/internal/shim/uninstall.go index cc98ee75..fc4f51c9 100644 --- a/internal/shim/uninstall.go +++ b/internal/shim/uninstall.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/spinkube/runtime-class-manager/internal/state" + "github.com/spinframework/runtime-class-manager/internal/state" ) func (c *Config) Uninstall(shimName string) (string, error) { diff --git a/internal/shim/uninstall_test.go b/internal/shim/uninstall_test.go index 94b861b8..dae66736 100644 --- a/internal/shim/uninstall_test.go +++ b/internal/shim/uninstall_test.go @@ -20,7 +20,7 @@ import ( "testing" "github.com/spf13/afero" - tests "github.com/spinkube/runtime-class-manager/tests/node-installer" + tests "github.com/spinframework/runtime-class-manager/tests/node-installer" ) func TestConfig_Uninstall(t *testing.T) { diff --git a/internal/state/state_test.go b/internal/state/state_test.go index ee7cfa89..f8147458 100644 --- a/internal/state/state_test.go +++ b/internal/state/state_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/spf13/afero" - "github.com/spinkube/runtime-class-manager/internal/state" - tests "github.com/spinkube/runtime-class-manager/tests/node-installer" + "github.com/spinframework/runtime-class-manager/internal/state" + tests "github.com/spinframework/runtime-class-manager/tests/node-installer" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/testdata/apps/spin-app.yaml b/testdata/apps/spin-app.yaml index ad601e80..5d0d6c3a 100644 --- a/testdata/apps/spin-app.yaml +++ b/testdata/apps/spin-app.yaml @@ -16,7 +16,7 @@ spec: runtimeClassName: wasmtime-spin-v2 containers: - name: spin-hello - image: ghcr.io/spinkube/spin-operator/hello-world:20240909-145818-g30def7d + image: ghcr.io/spinframework/spin-operator/hello-world:20240909-145818-g30def7d command: ["/"] --- apiVersion: v1 @@ -29,4 +29,4 @@ spec: port: 80 targetPort: 80 selector: - app: wasm-spin \ No newline at end of file + app: wasm-spin From 2adb032d39d67adbce79e33dde0ddf0f48683ef7 Mon Sep 17 00:00:00 2001 From: Sven Pfennig Date: Wed, 5 Mar 2025 17:00:57 +0100 Subject: [PATCH 2/2] chore(test): update hello-world app Co-authored-by: Vaughn Dice --- testdata/apps/spin-app.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testdata/apps/spin-app.yaml b/testdata/apps/spin-app.yaml index 5d0d6c3a..5f9f0b72 100644 --- a/testdata/apps/spin-app.yaml +++ b/testdata/apps/spin-app.yaml @@ -16,7 +16,7 @@ spec: runtimeClassName: wasmtime-spin-v2 containers: - name: spin-hello - image: ghcr.io/spinframework/spin-operator/hello-world:20240909-145818-g30def7d + image: ghcr.io/spinframework/spin-operator/hello-world:20250206-205102-gf007281 command: ["/"] --- apiVersion: v1