diff --git a/Makefile b/Makefile index 6e7bc5a..516c713 100644 --- a/Makefile +++ b/Makefile @@ -138,10 +138,6 @@ endif install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/crd | $(KUBECTL) apply -f - -.PHONY: install-test-shims -install-test-shims: ## Install test shims from ./hack/. - kubectl apply -f ./hack/*.yaml - .PHONY: uninstall uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/crd | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f - @@ -151,6 +147,14 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} $(KUSTOMIZE) build config/default | $(KUBECTL) apply -f - +.PHONY: deploy-samples +deploy-samples: ## Install test shims from ./hack/. + $(KUSTOMIZE) build config/samples | $(KUBECTL) apply -f - + +.PHONY: undeploy-samples +undeploy-samples: ## Install test shims from ./hack/. + $(KUSTOMIZE) build config/samples | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f - + .PHONY: undeploy undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion. $(KUSTOMIZE) build config/default | $(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f - diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index f38bc69..d82d2f6 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,4 +1,7 @@ ## Append samples of your project ## resources: -- runtime_v1alpha1_shim.yaml +- test_shim_lunatic.yaml +- test_shim_slight.yaml +- test_shim_spin.yaml +- test_shim_wws.yaml #+kubebuilder:scaffold:manifestskustomizesamples diff --git a/config/samples/runtime_v1alpha1_shim.yaml b/config/samples/runtime_v1alpha1_shim.yaml deleted file mode 100644 index 5e0d1ff..0000000 --- a/config/samples/runtime_v1alpha1_shim.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: runtime.kwasm.sh/v1alpha1 -kind: Shim -metadata: - labels: - app.kubernetes.io/name: shim - app.kubernetes.io/instance: shim-sample - app.kubernetes.io/part-of: kwasm-operator - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: kwasm-operator - name: shim-sample -spec: - # TODO(user): Add fields here diff --git a/config/samples/test_shim_lunatic.yaml b/config/samples/test_shim_lunatic.yaml index 0bcedfe..7d75142 100644 --- a/config/samples/test_shim_lunatic.yaml +++ b/config/samples/test_shim_lunatic.yaml @@ -2,6 +2,12 @@ apiVersion: runtime.kwasm.sh/v1alpha1 kind: Shim metadata: name: lunatic-v1 + labels: + app.kubernetes.io/name: lunatic-v1 + app.kubernetes.io/instance: lunatic-v1 + app.kubernetes.io/part-of: kwasm-operator + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: kwasm-operator spec: nodeSelector: lunatic: "true" diff --git a/config/samples/test_shim_slight.yaml b/config/samples/test_shim_slight.yaml index 6b87511..7cb031f 100644 --- a/config/samples/test_shim_slight.yaml +++ b/config/samples/test_shim_slight.yaml @@ -2,6 +2,12 @@ apiVersion: runtime.kwasm.sh/v1alpha1 kind: Shim metadata: name: slight-v1 + labels: + app.kubernetes.io/name: slight-v1 + app.kubernetes.io/instance: slight-v1 + app.kubernetes.io/part-of: kwasm-operator + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: kwasm-operator spec: nodeSelector: slight: "true" diff --git a/config/samples/test_shim_spin.yaml b/config/samples/test_shim_spin.yaml index 62443a8..d4c5771 100644 --- a/config/samples/test_shim_spin.yaml +++ b/config/samples/test_shim_spin.yaml @@ -2,6 +2,12 @@ apiVersion: runtime.kwasm.sh/v1alpha1 kind: Shim metadata: name: wasmtime-spin-v2 + labels: + app.kubernetes.io/name: wasmtime-spin-v2 + app.kubernetes.io/instance: wasmtime-spin-v2 + app.kubernetes.io/part-of: kwasm-operator + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: kwasm-operator spec: nodeSelector: spin: "true" diff --git a/config/samples/test_shim_wws.yaml b/config/samples/test_shim_wws.yaml index f7a8eed..135d95d 100644 --- a/config/samples/test_shim_wws.yaml +++ b/config/samples/test_shim_wws.yaml @@ -2,6 +2,12 @@ apiVersion: runtime.kwasm.sh/v1alpha1 kind: Shim metadata: name: wws-v1 + labels: + app.kubernetes.io/name: wws-v1 + app.kubernetes.io/instance: wws-v1 + app.kubernetes.io/part-of: kwasm-operator + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: kwasm-operator spec: nodeSelector: wws: "true"