New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Kubernetes v1.18.2 #207
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ VERSION_FILE ?= VERSION-DEV | |
include $(VERSION_FILE) | ||
|
||
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion) | ||
CRD_OPTIONS ?= "crd:trivialVersions=true" | ||
CRD_OPTIONS ?= "crd:trivialVersions=true,crdVersions=v1" | ||
|
||
# Releases should modify and double check these vars. | ||
VER ?= v${app_major}.${app_minor}.${app_patch} | ||
|
@@ -49,8 +49,8 @@ all: generate fix vet fmt manifests test lint license misspell tidy bin/kube-app | |
## Tooling Binaries | ||
## -------------------------------------- | ||
|
||
$(TOOLBIN)/controller-gen: | ||
GOBIN=$(TOOLBIN) GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.5 | ||
$(TOOLBIN)/controller-gen: $(TOOLBIN)/kubectl | ||
GOBIN=$(TOOLBIN) GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.3.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be updated to v0.4.0? When I originally created this commit, v0.4.0 was not out. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. controller-gen@v0.4.0 seems to be incompatible with client-go@v0.18.2. I got the following error when updating to v0.4.0:
I would keep using v0.3.0 with K8s v1.18.2 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I refreshed all the dependencies and it worked now with controller-gen |
||
|
||
$(TOOLBIN)/golangci-lint: | ||
GOBIN=$(TOOLBIN) GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.23.6 | ||
|
@@ -59,16 +59,17 @@ $(TOOLBIN)/mockgen: | |
GOBIN=$(TOOLBIN) GO111MODULE=on go get github.com/golang/mock/mockgen@v1.3.1 | ||
|
||
$(TOOLBIN)/conversion-gen: | ||
GOBIN=$(TOOLBIN) GO111MODULE=on go get k8s.io/code-generator/cmd/conversion-gen@v0.17.0 | ||
GOBIN=$(TOOLBIN) GO111MODULE=on go get k8s.io/code-generator/cmd/conversion-gen@v0.18.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May be use the latest v0.18.9 ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DONE. |
||
|
||
$(TOOLBIN)/kubebuilder $(TOOLBIN)/etcd $(TOOLBIN)/kube-apiserver $(TOOLBIN)/kubectl: | ||
cd $(TOOLS_DIR); ./install_kubebuilder.sh | ||
cp $(TOOLBIN)/kubectl $(HOME)/bin | ||
|
||
$(TOOLBIN)/kustomize: | ||
cd $(TOOLS_DIR); ./install_kustomize.sh | ||
|
||
$(TOOLBIN)/kind: | ||
GOBIN=$(TOOLBIN) GO111MODULE=on go get sigs.k8s.io/kind@v0.6.0 | ||
GOBIN=$(TOOLBIN) GO111MODULE=on go get sigs.k8s.io/kind@v0.8.1 | ||
|
||
$(TOOLBIN)/addlicense: | ||
GOBIN=$(TOOLBIN) GO111MODULE=on go get github.com/google/addlicense | ||
|
@@ -101,11 +102,10 @@ test: $(TOOLBIN)/etcd $(TOOLBIN)/kube-apiserver $(TOOLBIN)/kubectl | |
go test -v ./api/... ./controllers/... -coverprofile $(COVER_FILE) | ||
|
||
# Run e2e-tests | ||
K8S_VERSION := "v1.16.4" | ||
K8S_VERSION := "v1.18.2" | ||
|
||
.PHONY: e2e-setup | ||
e2e-setup: $(TOOLBIN)/kind | ||
KUBECONFIG=$(shell $(TOOLBIN)/kind get kubeconfig-path --name="kind") \ | ||
$(TOOLBIN)/kind create cluster \ | ||
-v 4 --retain --wait=1m \ | ||
--config e2e/kind-config.yaml \ | ||
|
@@ -116,7 +116,7 @@ e2e-cleanup: $(TOOLBIN)/kind | |
$(TOOLBIN)/kind delete cluster | ||
|
||
.PHONY: e2e-test | ||
e2e-test: generate fmt vet manifests $(TOOLBIN)/kind $(TOOLBIN)/kustomize $(TOOLBIN)/kubectl | ||
e2e-test: generate fmt vet $(TOOLBIN)/kind $(TOOLBIN)/kustomize $(TOOLBIN)/kubectl | ||
go test -v ./e2e/main_test.go | ||
|
||
.PHONY: local-e2e-test | ||
|
@@ -242,11 +242,12 @@ undeploy-wordpress: $(TOOLBIN)/kustomize $(TOOLBIN)/kubectl | |
## -------------------------------------- | ||
|
||
.PHONY: generate | ||
generate: ## Generate code | ||
generate: license ## Generate code | ||
$(MAKE) generate-go | ||
$(MAKE) manifests | ||
$(MAKE) generate-resources | ||
VERSION_FILE=VERSION $(MAKE) generate-resources | ||
$(MAKE) license | ||
|
||
# Generate manifests e.g. CRD, RBAC etc. | ||
.PHONY: manifests | ||
|
@@ -259,6 +260,10 @@ manifests: $(TOOLBIN)/controller-gen | |
output:crd:dir=$(CRD_ROOT) \ | ||
output:webhook:dir=$(WEBHOOK_ROOT) \ | ||
webhook | ||
@for f in config/crd/bases/*.yaml; do \ | ||
kubectl annotate --overwrite -f $$f --local=true -o yaml api-approved.kubernetes.io=https://github.com/kubernetes-sigs/application/pull/2 > $$f.bk; \ | ||
mv $$f.bk $$f; \ | ||
done | ||
|
||
.PHONY: generate-resources | ||
generate-resources: $(TOOLBIN)/kustomize | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How far behind, the generated CRDs should be supported? crdVersions v1beta1 is still needed for kubernetes < 1.16
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's up to the user to generate the
v1beta1
version of the application CRD.I added a comment to show how to set the CRD_OPTIONS for the
v1beta1
version.