-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #650 from chrisdoherty4/feat/remove-workflow-data
- Loading branch information
Showing
9 changed files
with
31 additions
and
180 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
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
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 |
---|---|---|
|
@@ -2,48 +2,51 @@ | |
## Generate | ||
## -------------------------------------- | ||
|
||
CONTROLLER_GEN := go run sigs.k8s.io/controller-tools/cmd/[email protected] | ||
GOFUMPT := go run mvdan.cc/[email protected] | ||
KUSTOMIZE := go run sigs.k8s.io/kustomize/kustomize/[email protected] | ||
|
||
.PHONY: generate | ||
generate: generate-go generate-manifests # Generate code, manifests etc. | ||
|
||
.PHONY: generate-go | ||
generate-go: bin/controller-gen bin/gofumpt # Generate Go code. | ||
controller-gen object:headerFile="hack/boilerplate/boilerplate.generatego.txt" paths="./pkg/apis/..." | ||
gofumpt -w -s ./pkg/apis | ||
generate-go: # Generate Go code. | ||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate/boilerplate.generatego.txt" paths="./pkg/apis/..." | ||
$(GOFUMPT) -w ./pkg/apis | ||
|
||
.PHONY: generate-manifests | ||
generate-manifests: generate-crds generate-rbacs generate-server-rbacs # Generate manifests e.g. CRD, RBAC etc. | ||
|
||
.PHONY: generate-crds | ||
generate-crds: bin/controller-gen | ||
controller-gen \ | ||
generate-crds: | ||
$(CONTROLLER_GEN) \ | ||
paths=./pkg/apis/... \ | ||
crd:crdVersions=v1 \ | ||
rbac:roleName=manager-role \ | ||
output:crd:dir=./config/crd/bases \ | ||
output:webhook:dir=./config/webhook \ | ||
webhook | ||
prettier --write ./config/crd/bases | ||
|
||
.PHONY: generate-rbacs | ||
generate-rbacs: bin/controller-gen | ||
controller-gen \ | ||
generate-rbacs: | ||
$(CONTROLLER_GEN) \ | ||
paths=./pkg/controllers/... \ | ||
output:rbac:dir=./config/rbac/ \ | ||
rbac:roleName=manager-role | ||
prettier --write ./config/rbac | ||
|
||
.PHONY: generate-server-rbacs | ||
generate-server-rbacs: bin/controller-gen | ||
controller-gen \ | ||
generate-server-rbacs: | ||
$(CONTROLLER_GEN) \ | ||
paths=./server/... \ | ||
output:rbac:dir=./config/server-rbac \ | ||
rbac:roleName=server-role | ||
prettier --write ./config/server-rbac/ | ||
|
||
TINK_SERVER_IMAGE ?= quay.io/tinkerbell/tink-server | ||
TINK_CONTROLLER_IMAGE ?= quay.io/tinkerbell/tink-controller | ||
TINK_SERVER_TAG ?= latest | ||
TINK_CONTROLLER_TAG ?= latest | ||
TINK_SERVER_IMAGE ?= quay.io/tinkerbell/tink-server | ||
TINK_SERVER_TAG ?= latest | ||
|
||
TINK_CONTROLLER_IMAGE ?= quay.io/tinkerbell/tink-controller | ||
TINK_CONTROLLER_TAG ?= latest | ||
|
||
NAMESPACE ?= tink-system | ||
|
||
out/release/default/kustomization.yaml: config/default/kustomization.yaml | ||
|
@@ -52,11 +55,12 @@ out/release/default/kustomization.yaml: config/default/kustomization.yaml | |
cp -a config/ out/release/ | ||
|
||
out/release/tink.yaml: bin/kustomize generate-manifests out/release/default/kustomization.yaml | ||
(cd out/release/default && \ | ||
kustomize edit set image server=$(TINK_SERVER_IMAGE):$(TINK_CONTROLLER_TAG) controller=$(TINK_CONTROLLER_IMAGE):$(TINK_CONTROLLER_TAG) && \ | ||
kustomize edit set namespace $(NAMESPACE) \ | ||
( | ||
cd out/release/default && \ | ||
$(KUSTOMIZE) edit set image server=$(TINK_SERVER_IMAGE):$(TINK_CONTROLLER_TAG) controller=$(TINK_CONTROLLER_IMAGE):$(TINK_CONTROLLER_TAG) && \ | ||
$(KUSTOMIZE) edit set namespace $(NAMESPACE) \ | ||
) | ||
kustomize build out/release/default -o $@ | ||
$(KUSTOMIZE) build out/release/default -o $@ | ||
prettier --write $@ | ||
|
||
release-manifests: out/release/tink.yaml ## Builds the manifests to publish with a release. |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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