Add a rich example of fn framework for abstraction

This commit is contained in:
Katrina Verey
2023-04-06 20:04:55 -04:00
parent d3184da4c6
commit 85d623bc86
27 changed files with 1450 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
export KUSTOMIZE_ROOT ?= $(shell pwd | sed -E 's|(.*\/kustomize)/(.*)|\1|')
include $(KUSTOMIZE_ROOT)/Makefile-modules.mk
CONTROLLER_GEN_VERSION=v0.11.3
generate: $(MYGOBIN)/controller-gen $(MYGOBIN)/embedmd
go generate ./...
embedmd -w README.md
build: generate
go build -v -o $(MYGOBIN)/app-fn cmd/main.go
$(MYGOBIN)/controller-gen:
go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_GEN_VERSION)
$(MYGOBIN)/embedmd:
go install github.com/campoy/embedmd@v1.0.0
.PHONY: example
example: build
$(MYGOBIN)/app-fn pkg/exampleapp/testdata/success/basic/config.yaml
test: generate
go test -v -timeout 45m -cover ./...