Skip to content

Commit

Permalink
add shortcut to deploy sample shims to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
voigt committed Feb 3, 2024
1 parent 1797e97 commit 7816486
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 17 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
Expand All @@ -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 -
Expand Down
5 changes: 4 additions & 1 deletion config/samples/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 0 additions & 12 deletions config/samples/runtime_v1alpha1_shim.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions config/samples/test_shim_lunatic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions config/samples/test_shim_slight.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions config/samples/test_shim_spin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions config/samples/test_shim_wws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 7816486

Please sign in to comment.