Skip to content

Commit af16ee0

Browse files
committed
Upgrade Go and controller-runtime dependencies (#185)
* Checkpoint `make build` ok; `make docker-build` * Checkpoint: Go 1.18-> 1.21; controller-runtime v0.15.0->v0.15.3. `make build`, `make docker-build` work. * update go version in CI * update license file * Update tests * Generate CRDs * Remove unnecessary comments
1 parent 14ca65c commit af16ee0

28 files changed

+4316
-2734
lines changed

Diff for: .github/workflows/build.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: build
22

33
env:
4-
GO_VERSION: 1.19
4+
GO_VERSION: 1.21
55

66
on:
77
push:

Diff for: .github/workflows/codeql-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "CodeQL"
22

33
env:
4-
GO_VERSION: 1.19
4+
GO_VERSION: 1.21
55

66
on:
77
push:

Diff for: .github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Release
22

33
env:
4-
GO_VERSION: 1.19
4+
GO_VERSION: 1.21
55

66
on:
77
push:

Diff for: .github/workflows/validation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on: [push, pull_request]
33
env:
44
GO111MODULE: "on"
55
PROJECTNAME: "extendeddaemonset"
6-
GO_VERSION: 1.19
6+
GO_VERSION: 1.21
77
jobs:
88
build:
99
runs-on: ubuntu-latest

Diff for: .gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: registry.ddbuild.io/images/mirror/golang:1.18
1+
image: registry.ddbuild.io/images/mirror/golang:1.21
22
variables:
33
GO111MODULE: "on"
44
PROJECTNAME: "extendeddaemonset"

Diff for: Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.18 as builder
2+
FROM golang:1.21 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests

Diff for: LICENSE-3rdparty.csv

+62-40
Large diffs are not rendered by default.

Diff for: check-eds.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.18 as builder
2+
FROM golang:1.21 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests

Diff for: cmd/check-eds/upgrade/upgrade.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func (o *Options) Validate() error {
149149
func (o *Options) Run() error {
150150
o.printOutf("start checking deployment state")
151151

152-
checkUpgradeDown := func() (bool, error) {
152+
checkUpgradeDown := func(ctx context.Context) (bool, error) {
153153
eds := &v1alpha1.ExtendedDaemonSet{}
154154
err := o.client.Get(context.TODO(), client.ObjectKey{Namespace: o.userNamespace, Name: o.userExtendedDaemonSetName}, eds)
155155
if err != nil && errors.IsNotFound(err) {
@@ -201,7 +201,7 @@ func (o *Options) Run() error {
201201
return false, nil
202202
}
203203

204-
return wait.Poll(o.checkPeriod, o.checkTimeout, checkUpgradeDown)
204+
return wait.PollUntilContextTimeout(context.TODO(), o.checkPeriod, o.checkTimeout, false, checkUpgradeDown)
205205
}
206206

207207
func (o *Options) printOutf(format string, a ...interface{}) {

Diff for: config/crd/bases/v1/datadoghq.com_extendeddaemonsetreplicasets.yaml

+982-575
Large diffs are not rendered by default.

Diff for: config/crd/bases/v1/datadoghq.com_extendeddaemonsets.yaml

+982-575
Large diffs are not rendered by default.

Diff for: config/crd/bases/v1/datadoghq.com_extendeddaemonsetsettings.yaml

+27-5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,28 @@ spec:
6363
description: ResourceRequirements describes the compute resource
6464
requirements.
6565
properties:
66+
claims:
67+
description: "Claims lists the names of resources, defined
68+
in spec.resourceClaims, that are used by this container.
69+
\n This is an alpha field and requires enabling the DynamicResourceAllocation
70+
feature gate. \n This field is immutable. It can only
71+
be set for containers."
72+
items:
73+
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
74+
properties:
75+
name:
76+
description: Name must match the name of one entry
77+
in pod.spec.resourceClaims of the Pod where this
78+
field is used. It makes that resource available
79+
inside a container.
80+
type: string
81+
required:
82+
- name
83+
type: object
84+
type: array
85+
x-kubernetes-list-map-keys:
86+
- name
87+
x-kubernetes-list-type: map
6688
limits:
6789
additionalProperties:
6890
anyOf:
@@ -83,8 +105,8 @@ spec:
83105
description: 'Requests describes the minimum amount of compute
84106
resources required. If Requests is omitted for a container,
85107
it defaults to Limits if that is explicitly specified,
86-
otherwise to an implementation-defined value. More info:
87-
https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
108+
otherwise to an implementation-defined value. Requests
109+
cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
88110
type: object
89111
type: object
90112
required:
@@ -145,13 +167,13 @@ spec:
145167
the referred resource.
146168
properties:
147169
apiVersion:
148-
description: API version of the referent
170+
description: apiVersion is the API version of the referent
149171
type: string
150172
kind:
151-
description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"'
173+
description: 'kind is the kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
152174
type: string
153175
name:
154-
description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
176+
description: 'name is the name of the referent; More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names'
155177
type: string
156178
required:
157179
- kind

0 commit comments

Comments
 (0)