Skip to content
This repository was archived by the owner on Oct 6, 2023. It is now read-only.

Commit c299a59

Browse files
authored
Merge pull request #46 from everpeace/upgrade-v1.24.3
Upgrade Kubernetes v1.24.3 (go 1.18)
2 parents 4d4f278 + ad9c1e8 commit c299a59

File tree

18 files changed

+347
-293
lines changed

18 files changed

+347
-293
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Go 1.x
1919
uses: actions/setup-go@v2
2020
with:
21-
go-version: ^1.16
21+
go-version: ~1.18
2222
id: go
2323
- name: Check out code into the Go module directory
2424
uses: actions/checkout@v2
@@ -52,7 +52,7 @@ jobs:
5252
- name: Set up Go 1.x
5353
uses: actions/setup-go@v2
5454
with:
55-
go-version: ^1.16
55+
go-version: ~1.18
5656
id: go
5757
- name: Check out
5858
uses: actions/checkout@v2

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Set up Go 1.x
4747
uses: actions/setup-go@v2
4848
with:
49-
go-version: ^1.16
49+
go-version: ~1.18
5050
id: go
5151
- name: Check out
5252
uses: actions/checkout@v2

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.17 as builder
1+
FROM golang:1.18 as builder
22
ARG RELEASE
33
ARG VERSION
44
WORKDIR /workspace

Makefile

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ generate: codegen crd
3535

3636
.PHONY: codegen
3737
codegen:
38-
./hack/update-codegen.sh
38+
CODEGEN_PKG=$(CODEGEN_PKG) ./hack/update-codegen.sh
3939
$(GO_LICENSER) --licensor "Shingo Omura"
4040

4141
.PHONY: crd
@@ -97,29 +97,24 @@ GOLANGCI_LINT = $(DEV_TOOL_PREFIX)/bin/golangci-lint
9797
GO_LICENSER = $(DEV_TOOL_PREFIX)/bin/go-licenser
9898
GO_IMPORTS = $(DEV_TOOL_PREFIX)/bin/goimports
9999
CONTROLLER_GEN = $(DEV_TOOL_PREFIX)/bin/controller-gen
100+
CODEGEN_PKG=$(CODEGEN_PKG_NAME)@$(CODEGEN_PKG_VERSION)
101+
CODEGEN_PKG_NAME=k8s.io/code-generator
102+
CODEGEN_PKG_VERSION=v0.24.3
100103
KIND = $(DEV_TOOL_PREFIX)/bin/kind
101104
KIND_KUBECNOFIG = $(DEV_TOOL_PREFIX)/.kubeconfig
102105
setup:
103-
$(call go-get-tool,$(GO_IMPORTS),golang.org/x/tools/cmd/goimports)
104-
$(call go-get-tool,$(GO_LICENSER),github.com/elastic/go-licenser)
105-
$(call go-get-tool,$(GIT_SEMV),github.com/linyows/git-semv/cmd/git-semv)
106-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected])
107-
$(call go-get-tool,$(KIND),sigs.k8s.io/kind)
108-
cd $(shell go env GOPATH) && \
109-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(DEV_TOOL_PREFIX)/bin v1.43.0
110-
111-
# go-get-tool will 'go get' any package $2 and install it to $1.
112-
define go-get-tool
113-
@[ -f $(1) ] || { \
114-
set -e ;\
115-
TMP_DIR=$$(mktemp -d) ;\
116-
cd $$TMP_DIR ;\
117-
go mod init tmp ;\
118-
echo "Downloading $(2)" ;\
119-
GOBIN=$(DEV_TOOL_PREFIX)/bin go get $(2) ;\
120-
rm -rf $$TMP_DIR ;\
121-
}
122-
endef
106+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install golang.org/x/tools/cmd/goimports@latest
107+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install github.com/elastic/go-licenser@latest
108+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install github.com/linyows/git-semv/cmd/git-semv@latest
109+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install sigs.k8s.io/controller-tools/cmd/[email protected]
110+
go mod download $(CODEGEN_PKG)
111+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install $(CODEGEN_PKG_NAME)/cmd/defaulter-gen@$(CODEGEN_PKG_VERSION)
112+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install $(CODEGEN_PKG_NAME)/cmd/client-gen@$(CODEGEN_PKG_VERSION)
113+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install $(CODEGEN_PKG_NAME)/cmd/lister-gen@$(CODEGEN_PKG_VERSION)
114+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install $(CODEGEN_PKG_NAME)/cmd/informer-gen@$(CODEGEN_PKG_VERSION)
115+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install $(CODEGEN_PKG_NAME)/cmd/deepcopy-gen@$(CODEGEN_PKG_VERSION)
116+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install sigs.k8s.io/kind@latest
117+
GOBIN=$(DEV_TOOL_PREFIX)/bin go install github.com/golangci/golangci-lint/cmd/[email protected]
123118

124119
#
125120
# local development
@@ -158,7 +153,7 @@ export E2E_GOMEGA_DEFAULT_CONSISTENTLY_DURATION=2s
158153
E2E_PAUSE_IMAGE=k8s.gcr.io/pause:3.2
159154
E2E_KIND_KUBECNOFIG = $(DEV_TOOL_PREFIX)/.kubeconfig
160155
E2E_KIND_CONF=./hack/e2e/kind.conf
161-
E2E_NODE_IMAGE ?= kindest/node:v1.23.4
156+
E2E_NODE_IMAGE ?= kindest/node:v1.24.3
162157
e2e-setup:
163158
$(KIND) get clusters | grep kube-throttler-e2e 2>&1 >/dev/null \
164159
|| $(KIND) create cluster --name=kube-throttler-e2e \

deploy/crd.yaml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ metadata:
66
annotations:
77
controller-gen.kubebuilder.io/version: v0.6.1
88
creationTimestamp: null
9-
name: throttles.schedule.k8s.everpeace.github.com
9+
name: clusterthrottles.schedule.k8s.everpeace.github.com
1010
spec:
1111
group: schedule.k8s.everpeace.github.com
1212
names:
1313
categories:
1414
- kube-throttler
15-
kind: Throttle
16-
listKind: ThrottleList
17-
plural: throttles
15+
kind: ClusterThrottle
16+
listKind: ClusterThrottleList
17+
plural: clusterthrottles
1818
shortNames:
19-
- thr
20-
- thrs
21-
singular: throttle
22-
scope: Namespaced
19+
- clthr
20+
- clthrs
21+
singular: clusterthrottle
22+
scope: Cluster
2323
versions:
2424
- additionalPrinterColumns:
2525
- format: byte
@@ -59,6 +59,54 @@ spec:
5959
selectorTerms:
6060
items:
6161
properties:
62+
namespaceSelector:
63+
description: A label selector is a label query over a set
64+
of resources. The result of matchLabels and matchExpressions
65+
are ANDed. An empty label selector matches all objects.
66+
A null label selector matches no objects.
67+
properties:
68+
matchExpressions:
69+
description: matchExpressions is a list of label selector
70+
requirements. The requirements are ANDed.
71+
items:
72+
description: A label selector requirement is a selector
73+
that contains values, a key, and an operator that
74+
relates the key and values.
75+
properties:
76+
key:
77+
description: key is the label key that the selector
78+
applies to.
79+
type: string
80+
operator:
81+
description: operator represents a key's relationship
82+
to a set of values. Valid operators are In,
83+
NotIn, Exists and DoesNotExist.
84+
type: string
85+
values:
86+
description: values is an array of string values.
87+
If the operator is In or NotIn, the values array
88+
must be non-empty. If the operator is Exists
89+
or DoesNotExist, the values array must be empty.
90+
This array is replaced during a strategic merge
91+
patch.
92+
items:
93+
type: string
94+
type: array
95+
required:
96+
- key
97+
- operator
98+
type: object
99+
type: array
100+
matchLabels:
101+
additionalProperties:
102+
type: string
103+
description: matchLabels is a map of {key,value} pairs.
104+
A single {key,value} in the matchLabels map is equivalent
105+
to an element of matchExpressions, whose key field
106+
is "key", the operator is "In", and the values array
107+
contains only "value". The requirements are ANDed.
108+
type: object
109+
type: object
62110
podSelector:
63111
description: A label selector is a label query over a set
64112
of resources. The result of matchLabels and matchExpressions
@@ -251,20 +299,20 @@ metadata:
251299
annotations:
252300
controller-gen.kubebuilder.io/version: v0.6.1
253301
creationTimestamp: null
254-
name: clusterthrottles.schedule.k8s.everpeace.github.com
302+
name: throttles.schedule.k8s.everpeace.github.com
255303
spec:
256304
group: schedule.k8s.everpeace.github.com
257305
names:
258306
categories:
259307
- kube-throttler
260-
kind: ClusterThrottle
261-
listKind: ClusterThrottleList
262-
plural: clusterthrottles
308+
kind: Throttle
309+
listKind: ThrottleList
310+
plural: throttles
263311
shortNames:
264-
- clthr
265-
- clthrs
266-
singular: clusterthrottle
267-
scope: Cluster
312+
- thr
313+
- thrs
314+
singular: throttle
315+
scope: Namespaced
268316
versions:
269317
- additionalPrinterColumns:
270318
- format: byte
@@ -304,54 +352,6 @@ spec:
304352
selectorTerms:
305353
items:
306354
properties:
307-
namespaceSelector:
308-
description: A label selector is a label query over a set
309-
of resources. The result of matchLabels and matchExpressions
310-
are ANDed. An empty label selector matches all objects.
311-
A null label selector matches no objects.
312-
properties:
313-
matchExpressions:
314-
description: matchExpressions is a list of label selector
315-
requirements. The requirements are ANDed.
316-
items:
317-
description: A label selector requirement is a selector
318-
that contains values, a key, and an operator that
319-
relates the key and values.
320-
properties:
321-
key:
322-
description: key is the label key that the selector
323-
applies to.
324-
type: string
325-
operator:
326-
description: operator represents a key's relationship
327-
to a set of values. Valid operators are In,
328-
NotIn, Exists and DoesNotExist.
329-
type: string
330-
values:
331-
description: values is an array of string values.
332-
If the operator is In or NotIn, the values array
333-
must be non-empty. If the operator is Exists
334-
or DoesNotExist, the values array must be empty.
335-
This array is replaced during a strategic merge
336-
patch.
337-
items:
338-
type: string
339-
type: array
340-
required:
341-
- key
342-
- operator
343-
type: object
344-
type: array
345-
matchLabels:
346-
additionalProperties:
347-
type: string
348-
description: matchLabels is a map of {key,value} pairs.
349-
A single {key,value} in the matchLabels map is equivalent
350-
to an element of matchExpressions, whose key field
351-
is "key", the operator is "In", and the values array
352-
contains only "value". The requirements are ANDed.
353-
type: object
354-
type: object
355355
podSelector:
356356
description: A label selector is a label query over a set
357357
of resources. The result of matchLabels and matchExpressions

0 commit comments

Comments
 (0)