-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to cert-manager v1.13.1 (#32)
- Loading branch information
Showing
8 changed files
with
396 additions
and
796 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 |
---|---|---|
@@ -1,41 +1,45 @@ | ||
OS ?= $(shell go env GOOS) | ||
ARCH ?= $(shell go env GOARCH) | ||
GO ?= $(shell which go) | ||
OS ?= $(shell $(GO) env GOOS) | ||
ARCH ?= $(shell $(GO) env GOARCH) | ||
|
||
IMAGE_NAME := "webhook" | ||
IMAGE_TAG := "latest" | ||
|
||
OUT := $(shell pwd)/_out | ||
|
||
KUBE_VERSION=1.24.1 | ||
KUBEBUILDER_VERSION=1.28.0 | ||
|
||
$(shell mkdir -p "$(OUT)") | ||
export TEST_ASSET_ETCD=_test/kubebuilder/bin/etcd | ||
export TEST_ASSET_KUBE_APISERVER=_test/kubebuilder/bin/kube-apiserver | ||
export TEST_ASSET_KUBECTL=_test/kubebuilder/bin/kubectl | ||
HELM_FILES := $(shell find deploy/dynu-webhook) | ||
|
||
test: _test/kubebuilder | ||
go test -v . | ||
test: _test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH)/etcd _test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH)/kube-apiserver _test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH)/kubectl | ||
TEST_ASSET_ETCD=_test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH)/etcd \ | ||
TEST_ASSET_KUBE_APISERVER=_test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH)/kube-apiserver \ | ||
TEST_ASSET_KUBECTL=_test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH)/kubectl \ | ||
$(GO) test -v . | ||
|
||
_test/kubebuilder: | ||
curl -fsSL https://go.kubebuilder.io/test-tools/$(KUBE_VERSION)/$(OS)/$(ARCH) -o kubebuilder-tools.tar.gz | ||
mkdir -p _test/kubebuilder | ||
tar -xvf kubebuilder-tools.tar.gz | ||
mv kubebuilder/bin _test/kubebuilder/ | ||
rm kubebuilder-tools.tar.gz | ||
rm -R kubebuilder | ||
_test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH).tar.gz: | _test | ||
curl -fsSL https://go.kubebuilder.io/test-tools/$(KUBEBUILDER_VERSION)/$(OS)/$(ARCH) -o $@ | ||
|
||
clean: clean-kubebuilder | ||
_test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH)/etcd _test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH)/kube-apiserver _test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH)/kubectl: _test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH).tar.gz | _test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH) | ||
tar xfO $< kubebuilder/bin/$(notdir $@) > $@ && chmod +x $@ | ||
|
||
clean-kubebuilder: | ||
rm -Rf _test/kubebuilder | ||
.PHONY: clean | ||
clean: | ||
rm -r _test $(OUT) | ||
|
||
.PHONY: build | ||
build: | ||
docker build -t "$(IMAGE_NAME):$(IMAGE_TAG)" . | ||
|
||
.PHONY: rendered-manifest.yaml | ||
rendered-manifest.yaml: | ||
rendered-manifest.yaml: $(OUT)/rendered-manifest.yaml | ||
|
||
$(OUT)/rendered-manifest.yaml: $(HELM_FILES) | $(OUT) | ||
helm template \ | ||
--name example-webhook \ | ||
--set image.repository=$(IMAGE_NAME) \ | ||
--set image.tag=$(IMAGE_TAG) \ | ||
deploy/example-webhook > "$(OUT)/rendered-manifest.yaml" | ||
--set image.repository=$(IMAGE_NAME) \ | ||
--set image.tag=$(IMAGE_TAG) \ | ||
deploy/example-webhook > $@ | ||
|
||
_test $(OUT) _test/kubebuilder-$(KUBEBUILDER_VERSION)-$(OS)-$(ARCH): | ||
mkdir -p $@ |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
OS ?= $(shell go env GOOS) | ||
ARCH ?= $(shell go env GOARCH) | ||
|
||
IMAGE_NAME := "webhook" | ||
IMAGE_TAG := "latest" | ||
|
||
OUT := $(shell pwd)/_out | ||
|
||
KUBE_VERSION=1.24.1 | ||
|
||
$(shell mkdir -p "$(OUT)") | ||
export TEST_ASSET_ETCD=_test/kubebuilder/bin/etcd | ||
export TEST_ASSET_KUBE_APISERVER=_test/kubebuilder/bin/kube-apiserver | ||
export TEST_ASSET_KUBECTL=_test/kubebuilder/bin/kubectl | ||
|
||
test: _test/kubebuilder | ||
go test -v . | ||
|
||
_test/kubebuilder: | ||
curl -fsSL https://go.kubebuilder.io/test-tools/$(KUBE_VERSION)/$(OS)/$(ARCH) -o kubebuilder-tools.tar.gz | ||
mkdir -p _test/kubebuilder | ||
tar -xvf kubebuilder-tools.tar.gz | ||
mv kubebuilder/bin _test/kubebuilder/ | ||
rm kubebuilder-tools.tar.gz | ||
rm -R kubebuilder | ||
|
||
clean: clean-kubebuilder | ||
|
||
clean-kubebuilder: | ||
rm -Rf _test/kubebuilder | ||
|
||
build: | ||
docker build -t "$(IMAGE_NAME):$(IMAGE_TAG)" . | ||
|
||
.PHONY: rendered-manifest.yaml | ||
rendered-manifest.yaml: | ||
helm template \ | ||
--name example-webhook \ | ||
--set image.repository=$(IMAGE_NAME) \ | ||
--set image.tag=$(IMAGE_TAG) \ | ||
deploy/example-webhook > "$(OUT)/rendered-manifest.yaml" |
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.