Skip to content

Commit 80665e6

Browse files
committed
build: bump golang version to 1.22
1 parent 343d47d commit 80665e6

File tree

10 files changed

+133
-96
lines changed

10 files changed

+133
-96
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Build the manager binary
2-
FROM --platform=${BUILDPLATFORM} golang:1.20-alpine3.19 AS builder
2+
FROM --platform=${BUILDPLATFORM} golang:1.22-alpine3.19 AS builder
33

44
WORKDIR /workspace
55

6-
RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.11.1
6+
RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0
77

88
# Copy the Go Modules manifests
99
COPY go.mod go.mod

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ help: ## Display this help.
4141
.PHONY: manifests
4242
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
4343
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
44+
tail -n+2 config/crd/bases/kuik.enix.io_cachedimages.yaml > helm/kube-image-keeper/crds/cachedimage-crd.yaml
45+
tail -n+2 config/crd/bases/kuik.enix.io_repositories.yaml > helm/kube-image-keeper/crds/repository-crd.yaml
4446

4547
.PHONY: generate
4648
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -132,7 +134,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
132134

133135
## Tool Versions
134136
KUSTOMIZE_VERSION ?= v3.8.7
135-
CONTROLLER_TOOLS_VERSION ?= v0.11.1
137+
CONTROLLER_TOOLS_VERSION ?= v0.15.0
136138

137139
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
138140
.PHONY: kustomize

config/crd/bases/kuik.enix.io_cachedimages.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.11.1
7-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.15.0
87
name: cachedimages.kuik.enix.io
98
spec:
109
group: kuik.enix.io
@@ -42,14 +41,19 @@ spec:
4241
description: CachedImage is the Schema for the cachedimages API
4342
properties:
4443
apiVersion:
45-
description: 'APIVersion defines the versioned schema of this representation
46-
of an object. Servers should convert recognized schemas to the latest
47-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
44+
description: |-
45+
APIVersion defines the versioned schema of this representation of an object.
46+
Servers should convert recognized schemas to the latest internal value, and
47+
may reject unrecognized values.
48+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
4849
type: string
4950
kind:
50-
description: 'Kind is a string value representing the REST resource this
51-
object represents. Servers may infer this from the endpoint the client
52-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
51+
description: |-
52+
Kind is a string value representing the REST resource this object represents.
53+
Servers may infer this from the endpoint the client submits requests to.
54+
Cannot be updated.
55+
In CamelCase.
56+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
5357
type: string
5458
metadata:
5559
type: object
@@ -93,8 +97,8 @@ spec:
9397
usedBy:
9498
properties:
9599
count:
96-
description: jsonpath function .length() is not implemented, so
97-
the count field is required to display pods count in additionalPrinterColumns
100+
description: |-
101+
jsonpath function .length() is not implemented, so the count field is required to display pods count in additionalPrinterColumns
98102
see https://github.com/kubernetes-sigs/controller-tools/issues/447
99103
type: integer
100104
pods:

config/crd/bases/kuik.enix.io_repositories.yaml

Lines changed: 42 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.11.1
7-
creationTimestamp: null
6+
controller-gen.kubebuilder.io/version: v0.15.0
87
name: repositories.kuik.enix.io
98
spec:
109
group: kuik.enix.io
@@ -33,14 +32,19 @@ spec:
3332
description: Repository is the Schema for the repositories API
3433
properties:
3534
apiVersion:
36-
description: 'APIVersion defines the versioned schema of this representation
37-
of an object. Servers should convert recognized schemas to the latest
38-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
35+
description: |-
36+
APIVersion defines the versioned schema of this representation of an object.
37+
Servers should convert recognized schemas to the latest internal value, and
38+
may reject unrecognized values.
39+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
3940
type: string
4041
kind:
41-
description: 'Kind is a string value representing the REST resource this
42-
object represents. Servers may infer this from the endpoint the client
43-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
42+
description: |-
43+
Kind is a string value representing the REST resource this object represents.
44+
Servers may infer this from the endpoint the client submits requests to.
45+
Cannot be updated.
46+
In CamelCase.
47+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
4448
type: string
4549
metadata:
4650
type: object
@@ -70,42 +74,42 @@ spec:
7074
conditions:
7175
items:
7276
description: "Condition contains details for one aspect of the current
73-
state of this API Resource. --- This struct is intended for direct
74-
use as an array at the field path .status.conditions. For example,
75-
\n type FooStatus struct{ // Represents the observations of a
76-
foo's current state. // Known .status.conditions.type are: \"Available\",
77-
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
78-
// +listType=map // +listMapKey=type Conditions []metav1.Condition
79-
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
80-
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
77+
state of this API Resource.\n---\nThis struct is intended for
78+
direct use as an array at the field path .status.conditions. For
79+
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
80+
observations of a foo's current state.\n\t // Known .status.conditions.type
81+
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
82+
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
83+
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
84+
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
85+
\ // other fields\n\t}"
8186
properties:
8287
lastTransitionTime:
83-
description: lastTransitionTime is the last time the condition
84-
transitioned from one status to another. This should be when
85-
the underlying condition changed. If that is not known, then
86-
using the time when the API field changed is acceptable.
88+
description: |-
89+
lastTransitionTime is the last time the condition transitioned from one status to another.
90+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
8791
format: date-time
8892
type: string
8993
message:
90-
description: message is a human readable message indicating
91-
details about the transition. This may be an empty string.
94+
description: |-
95+
message is a human readable message indicating details about the transition.
96+
This may be an empty string.
9297
maxLength: 32768
9398
type: string
9499
observedGeneration:
95-
description: observedGeneration represents the .metadata.generation
96-
that the condition was set based upon. For instance, if .metadata.generation
97-
is currently 12, but the .status.conditions[x].observedGeneration
98-
is 9, the condition is out of date with respect to the current
99-
state of the instance.
100+
description: |-
101+
observedGeneration represents the .metadata.generation that the condition was set based upon.
102+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
103+
with respect to the current state of the instance.
100104
format: int64
101105
minimum: 0
102106
type: integer
103107
reason:
104-
description: reason contains a programmatic identifier indicating
105-
the reason for the condition's last transition. Producers
106-
of specific condition types may define expected values and
107-
meanings for this field, and whether the values are considered
108-
a guaranteed API. The value should be a CamelCase string.
108+
description: |-
109+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
110+
Producers of specific condition types may define expected values and meanings for this field,
111+
and whether the values are considered a guaranteed API.
112+
The value should be a CamelCase string.
109113
This field may not be empty.
110114
maxLength: 1024
111115
minLength: 1
@@ -119,11 +123,12 @@ spec:
119123
- Unknown
120124
type: string
121125
type:
122-
description: type of condition in CamelCase or in foo.example.com/CamelCase.
123-
--- Many .condition.type values are consistent across resources
124-
like Available, but because arbitrary conditions can be useful
125-
(see .node.status.conditions), the ability to deconflict is
126-
important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
126+
description: |-
127+
type of condition in CamelCase or in foo.example.com/CamelCase.
128+
---
129+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
130+
useful (see .node.status.conditions), the ability to deconflict is important.
131+
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
127132
maxLength: 316
128133
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
129134
type: string

config/rbac/role.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: ClusterRole
44
metadata:
5-
creationTimestamp: null
65
name: manager-role
76
rules:
87
- apiGroups:

config/webhook/manifests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
apiVersion: admissionregistration.k8s.io/v1
33
kind: MutatingWebhookConfiguration
44
metadata:
5-
creationTimestamp: null
65
name: mutating-webhook-configuration
76
webhooks:
87
- admissionReviewVersions:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/enix/kube-image-keeper
22

3-
go 1.20
3+
go 1.22
44

55
require (
66
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20230519004202-7f2db5bd753e

0 commit comments

Comments
 (0)