-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathbump-kb.yaml
171 lines (154 loc) · 7.92 KB
/
bump-kb.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# entries is a list of entries to include in
# release notes and/or the migration guide
entries:
- description: >
(go/v3): For Golang-based operators, fix suite test using global cfg ([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/2602))
kind: "bugfix"
breaking: false
migration:
header: (go/v3):For golang-language based operators, fis suite test using global cfg
body: |
In the suite test files, replace `cfg, err := testEnv.Start()` with:
```go
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
```
Note: You can find suite test files scaffold for the APIs created for your project
such as `api/webhook_suitetest.go` directory as for your controllers in `controllers/suite_test.go`.
- description: >
(go/v3): For Golang-based operators, ensure that the plugin can only be used with its go supported version >= 1.17 (IMPORTANT:
Golang projects still not supporting versions >= 1.18. To know more about what needs to be done
in order to support Golang 1.18, see [here](https://github.com/kubernetes-sigs/kubebuilder/issues/2559) )
kind: "bugfix"
breaking: false
- description: >
(kustomize/v1): For Golang-based operators, fix the issue to scaffold the same Kind for different groups with
multi-group support by using group name in crd/patches and rbac editor/viewer manifests ([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/2500))
kind: "bugfix"
breaking: false
- description: >
(kustomize/v1): For Golang-based operators, fix the issue to scaffold the same Kind for different groups with
multi-group support by using group name in crd/patches and rbac editor/viewer manifests ([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/2500))
kind: "bugfix"
breaking: false
- description: >
(go/v3): For Golang-based operators, avoid adding duplicated code fragments ([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/2619))
kind: "bugfix"
breaking: false
- description: >
(declarative/v1): For Golang-based operators, copy the channels directory in the Dockerfile ([More info](https://github.com/kubernetes-sigs/kubebuilder/pull/2507/files))
kind: "addition"
breaking: false
migration:
header: For Golang-based operators, update Dockerfile if you are using the [declarative/v1 plugin](https://book.kubebuilder.io/plugins/declarative-v1.html)
body: |
If you are using the declarative/v1 plugin for your scaffolds, then following the steps to update the Dockerfile.
a) After `COPY controllers/ controllers/` add:
```sh
# https://github.com/kubernetes-sigs/kubebuilder-declarative-pattern/blob/master/docs/addon/walkthrough/README.md#adding-a-manifest
# Stage channels and make readable
COPY channels/ /channels/
RUN chmod -R a+rx /channels/
```
b) After the `COPY --from=builder /workspace/manager .`" add:
```sh
# copy channels
COPY --from=builder /channels /channels
```
- description: >
(go/v3):For Golang-based operators, upgrade controller-runtime and Kubernetes deps
kind: "change"
breaking: false
migration:
header: (go/v3):For Golang-based operators, upgrade controller-runtime from v0.11.0 to v0.11.2 and Kubernetes deps from 1.23.0 to 1.23.5
body: |
Update your go.mod by replacing `sigs.k8s.io/controller-runtime v0.11.0` with `sigs.k8s.io/controller-runtime v0.11.2` and run `go mod tidy`
to update the K8s dependencies.
- description: >
(kustomize/v1):For Golang/Helm/Ansible-based operators, upgrade kube-rbac-proxy image from v0.8.0 to v0.11.0
kind: "change"
breaking: false
migration:
header: For Golang/Helm/Ansible-based operators, upgrade kube-rbac-proxy image from v0.8.0 to v0.11.0. (For further information see the kube-rbac-proxy [release notes](https://github.com/brancz/kube-rbac-proxy/releases))
body: |
Update the tag version used for the image `gcr.io/kubebuilder/kube-rbac-proxy` in the file config/default/manager_auth_proxy_patch.yaml.
Replace `gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0` with `gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0`
- description: >
(go/v3):For Golang-based operators, new README.md will begin to be scaffolded
kind: "addition"
breaking: false
- description: >
(config-gen alpha command): Updated the image `gcr.io/kubebuilder/kube-rbac-proxy` from v0.5.0 to v0.11.0
kind: "change"
breaking: false
- description: >
(config-gen alpha command): upgrade sigs.k8s.io/controller-tools from v0.7.0 to v0.8.0
kind: "change"
breaking: false
- description: >
For Golang-based operators, change Makefile targets to replace go get with go install in order to remove deprecation
and begin to be prepared to support go 1.18 in the future releases (IMPORTANT:
Golang projects still not supporting versions >= 1.18. To know more about what needs to be done
in order to support Golang 1.18, see [here](https://github.com/kubernetes-sigs/kubebuilder/issues/2559) )
kind: "change"
breaking: false
migration:
header: For Golang-based operators, change Makefile targets to replace go get with go install
body: |
The targets kustomize, controller-gen and envtest were changed. Update the Makefile replacing:
```sh
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
.PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected])
KUSTOMIZE = $(shell pwd)/bin/kustomize
.PHONY: kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
ENVTEST = $(shell pwd)/bin/setup-envtest
.PHONY: envtest
envtest: ## Download envtest-setup locally if necessary.
$(call go-get-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest)
# go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(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
```
With:
```sh
##@ Build Dependencies
## Location to install dependencies to
LOCALBIN ?= $(shell pwd)/bin
$(LOCALBIN):
mkdir -p $(LOCALBIN)
## Tool Binaries
KUSTOMIZE ?= $(LOCALBIN)/kustomize
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest
## Tool Versions
KUSTOMIZE_VERSION ?= v3.8.7
CONTROLLER_TOOLS_VERSION ?= v0.8.0
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary.
$(KUSTOMIZE): $(LOCALBIN)
curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
```