commit 5db3d83c79278a0a4033d96bb60b9936a0c5c895 Author: kjuulh Date: Tue Jan 23 20:46:28 2024 +0100 feat: with fermyon basic Signed-off-by: kjuulh diff --git a/generate-k8s.sh b/generate-k8s.sh new file mode 100755 index 0000000..e0771e3 --- /dev/null +++ b/generate-k8s.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +set -e +set -o pipefail + +name="spin-containerd-shim-installer" +chart="oci://ghcr.io/fermyon/charts/spin-containerd-shim-installer" +version="0.10.0" +values_file="spin.values.yaml" + +output=k8s/spin.yaml + +rm -rf "$(dirname $output)" +mkdir -p "$(dirname $output)" + +helm template "$name" "$chart" --version "$version" --include-crds -f "$values_file" > $output diff --git a/k8s/spin.yaml b/k8s/spin.yaml new file mode 100644 index 0000000..338392d --- /dev/null +++ b/k8s/spin.yaml @@ -0,0 +1,62 @@ +--- +# Source: spin-containerd-shim-installer/templates/daemonset.yaml +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: spin-containerd-shim-installer + labels: + helm.sh/chart: spin-containerd-shim-installer-0.10.0 + app.kubernetes.io/name: spin-containerd-shim-installer + app.kubernetes.io/instance: spin-containerd-shim-installer + app.kubernetes.io/version: "0.10.0" + app.kubernetes.io/managed-by: Helm +spec: + selector: + matchLabels: + app.kubernetes.io/name: spin-containerd-shim-installer + app.kubernetes.io/instance: spin-containerd-shim-installer + updateStrategy: + type: OnDelete + template: + metadata: + labels: + app.kubernetes.io/name: spin-containerd-shim-installer + app.kubernetes.io/instance: spin-containerd-shim-installer + spec: + hostPID: true + volumes: + - name: host-etc-containerd + hostPath: + path: /var/lib/rancher/k3s/agent/etc/containerd + - name: host-bin + hostPath: + path: /usr/local/bin + initContainers: + - name: installer + image: "ghcr.io/fermyon/spin-containerd-shim-installer:0.10.0" + imagePullPolicy: IfNotPresent + resources: + {} + securityContext: + privileged: true + env: + - name: HOST_CONTAINERD_CONFIG + value: /host/etc/containerd/config.toml + - name: HOST_BIN + value: /host/bin + volumeMounts: + - name: host-etc-containerd + mountPath: /host/etc/containerd + - name: host-bin + mountPath: /host/bin + containers: + - name: pause + image: k8s.gcr.io/pause:3.1 + imagePullPolicy: IfNotPresent +--- +# Source: spin-containerd-shim-installer/templates/runtimeclass.yaml +apiVersion: node.k8s.io/v1 +kind: RuntimeClass +metadata: + name: wasmtime-spin-v1 +handler: spin diff --git a/spin.values.yaml b/spin.values.yaml new file mode 100644 index 0000000..29b7b96 --- /dev/null +++ b/spin.values.yaml @@ -0,0 +1,35 @@ +# Default values for chart. + +image: + pullPolicy: IfNotPresent + registry: ghcr.io + repository: fermyon/spin-containerd-shim-installer + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +installer: + hostEtcContainerdPath: /var/lib/rancher/k3s/agent/etc/containerd + hostBinPath: /usr/local/bin + +podAnnotations: {} + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: {} + +affinity: {}