This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) This reverts commit 02f2ad9. Signed-off-by: Haytham Abuelfutuh <[email protected]>
- Loading branch information
Showing
16 changed files
with
61 additions
and
6,824 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ bin | |
.DS_Store | ||
_test | ||
boilerplate/lyft/end2end/tmp | ||
github.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,24 +3,6 @@ include boilerplate/flyte/docker_build/Makefile | |
include boilerplate/flyte/golang_test_targets/Makefile | ||
include boilerplate/flyte/end2end/Makefile | ||
|
||
CRD_OPTIONS ?= "crd:generateEmbeddedObjectMeta=true" | ||
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen | ||
OPENAPI_GEN = $(shell pwd)/bin/openapi-gen | ||
CRD_FILE = $(shell pwd)/manifests/base/crds/flyteworkflow.flyte.net_flyteworkflows.yaml | ||
|
||
controller-gen: ## Download controller-gen locally if necessary. | ||
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected]) | ||
|
||
openapi-gen: | ||
$(call go-get-tool,$(OPENAPI_GEN),k8s.io/kube-openapi/cmd/[email protected]) | ||
|
||
manifests: controller-gen ## Generate CustomResourceDefinition objects. | ||
$(CONTROLLER_GEN) $(CRD_OPTIONS) paths="./pkg/apis/flyteworkflow/..." output:crd:artifacts:config=manifests/base/crds || true | ||
# Kubernetes cannot allow additionalProperties value to be empty. | ||
# More detail: https://github.com/kubernetes/kubernetes/issues/90504 | ||
perl -p -i -e 's/additionalProperties: {}/additionalProperties: true/g' $(CRD_FILE) | ||
perl -p -i -e 's/flyteworkflows.flyteworkflow.flyte.net/flyteworkflows.flyte.lyft.com/g' $(CRD_FILE) | ||
perl -p -i -e 's/flyteworkflow.flyte.net/flyte.lyft.com/g' $(CRD_FILE) | ||
|
||
.PHONY: update_boilerplate | ||
update_boilerplate: | ||
|
@@ -44,12 +26,7 @@ cross_compile: | |
GOOS=linux GOARCH=amd64 go build -o bin/cross/flytepropeller ./cmd/controller/main.go | ||
GOOS=linux GOARCH=amd64 go build -o bin/cross/kubectl-flyte ./cmd/kubectl-flyte/main.go | ||
|
||
openapi_generate: openapi-gen | ||
$(OPENAPI_GEN) -i github.com/flyteorg/flytepropeller/pkg/apis/flyteworkflow/v1alpha1 \ | ||
-p github.com/flyteorg/flytepropeller/pkg/apis/flyteworkflow/v1alpha1 \ | ||
--go-header-file hack/boilerplate.go.txt 2>&1 > /dev/null | ||
|
||
op_code_generate: openapi_generate manifests | ||
op_code_generate: | ||
@RESOURCE_NAME=flyteworkflow OPERATOR_PKG=github.com/flyteorg/flytepropeller ./hack/update-codegen.sh | ||
|
||
benchmark: | ||
|
@@ -72,17 +49,3 @@ golden: | |
.PHONY: generate | ||
generate: download_tooling | ||
@go generate ./... | ||
|
||
# go-get-tool will 'go get' any package $2 and install it to $1. | ||
PROJECT_DIR := $(shell dirname $(abspath $(firstword $(MAKEFILE_LIST)))) | ||
define go-get-tool | ||
@[ -f $(1) ] || { \ | ||
set -e ;\ | ||
TMP_DIR=$$(mktemp -d) ;\ | ||
cd $$TMP_DIR ;\ | ||
go mod init tmp ;\ | ||
echo "Downloading $(2)" ;\ | ||
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\ | ||
rm -rf $$TMP_DIR ;\ | ||
} | ||
endef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.