Skip to content

Commit ca3496e

Browse files
committed
Build with Go 1.19
- Update Go to 1.19 in CI - Use Go 1.19 in base image - Update controller-gen v0.8.0 and regenerate manifests Signed-off-by: Stefan Prodan <[email protected]>
1 parent 2833caa commit ca3496e

18 files changed

+122
-142
lines changed

.github/workflows/cifuzz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Go
2121
uses: actions/setup-go@v3
2222
with:
23-
go-version: 1.18.x
23+
go-version: 1.19.x
2424
- id: go-env
2525
run: |
2626
echo "::set-output name=go-mod-cache::$(go env GOMODCACHE)"

.github/workflows/e2e.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Go
2424
uses: actions/setup-go@v3
2525
with:
26-
go-version: 1.18.x
26+
go-version: 1.19.x
2727
- name: Restore Go cache
2828
uses: actions/cache@v3
2929
with:
@@ -60,7 +60,7 @@ jobs:
6060
- name: Setup Go
6161
uses: actions/setup-go@v3
6262
with:
63-
go-version: 1.18.x
63+
go-version: 1.19.x
6464
- name: Enable integration tests
6565
# Only run integration tests for main branch
6666
if: github.ref == 'refs/heads/main'

.github/workflows/scan.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Set up Go
3535
uses: actions/setup-go@v2
3636
with:
37-
go-version: 1.18
37+
go-version: 1.19.x
3838
- name: Initialize CodeQL
3939
uses: github/codeql-action/init@v2
4040
with:

.github/workflows/tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Go
2525
uses: actions/setup-go@v3
2626
with:
27-
go-version: 1.18.x
27+
go-version: 1.19.x
2828
- name: Restore Go cache
2929
uses: actions/cache@v3
3030
with:
@@ -48,7 +48,7 @@ jobs:
4848
- name: Setup Go
4949
uses: actions/setup-go@v3
5050
with:
51-
go-version: 1.18.x
51+
go-version: 1.19.x
5252
- name: Run tests
5353
env:
5454
TEST_AZURE_ACCOUNT_NAME: ${{ secrets.TEST_AZURE_ACCOUNT_NAME }}
@@ -77,7 +77,7 @@ jobs:
7777
- name: Setup Go
7878
uses: actions/setup-go@v3
7979
with:
80-
go-version: 1.18.x
80+
go-version: 1.19.x
8181
- name: Restore Go cache
8282
uses: actions/cache@v3
8383
with:

.github/workflows/verify.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Go
2525
uses: actions/setup-go@v3
2626
with:
27-
go-version: 1.18.x
27+
go-version: 1.19.x
2828
- name: Restore Go cache
2929
uses: actions/cache@v3
3030
with:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG BASE_VARIANT=alpine
2-
ARG GO_VERSION=1.18
2+
ARG GO_VERSION=1.19
33
ARG XX_VERSION=1.1.2
44

55
ARG LIBGIT2_IMG=ghcr.io/fluxcd/golang-with-libgit2-only

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ api-docs: gen-crd-api-reference-docs ## Generate API reference documentation
125125
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir=./api/v1beta2 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/source.md
126126

127127
tidy: ## Run go mod tidy
128-
cd api; rm -f go.sum; go mod tidy -compat=1.18
129-
rm -f go.sum; go mod tidy -compat=1.18
128+
cd api; rm -f go.sum; go mod tidy -compat=1.19
129+
rm -f go.sum; go mod tidy -compat=1.19
130130

131131
fmt: ## Run go fmt against code
132132
go fmt ./...
@@ -155,7 +155,7 @@ docker-push: ## Push Docker image
155155
CONTROLLER_GEN = $(GOBIN)/controller-gen
156156
.PHONY: controller-gen
157157
controller-gen: ## Download controller-gen locally if necessary.
158-
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0)
158+
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0)
159159

160160
# Find or download gen-crd-api-reference-docs
161161
GEN_CRD_API_REFERENCE_DOCS = $(GOBIN)/gen-crd-api-reference-docs

config/crd/bases/source.toolkit.fluxcd.io_buckets.yaml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.7.0
6+
controller-gen.kubebuilder.io/version: v0.8.0
87
creationTimestamp: null
98
name: buckets.source.toolkit.fluxcd.io
109
spec:
@@ -167,14 +166,12 @@ spec:
167166
description: "Condition contains details for one aspect of the current
168167
state of this API Resource. --- This struct is intended for direct
169168
use as an array at the field path .status.conditions. For example,
170-
\n \ttype FooStatus struct{ \t // Represents the observations
171-
of a foo's current state. \t // Known .status.conditions.type
172-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
173-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
174-
\t // +listMapKey=type \t Conditions []metav1.Condition
169+
\n type FooStatus struct{ // Represents the observations of a
170+
foo's current state. // Known .status.conditions.type are: \"Available\",
171+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
172+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
175173
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
176-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
177-
\t}"
174+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
178175
properties:
179176
lastTransitionTime:
180177
description: lastTransitionTime is the last time the condition
@@ -422,14 +419,12 @@ spec:
422419
description: "Condition contains details for one aspect of the current
423420
state of this API Resource. --- This struct is intended for direct
424421
use as an array at the field path .status.conditions. For example,
425-
\n \ttype FooStatus struct{ \t // Represents the observations
426-
of a foo's current state. \t // Known .status.conditions.type
427-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
428-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
429-
\t // +listMapKey=type \t Conditions []metav1.Condition
422+
\n type FooStatus struct{ // Represents the observations of a
423+
foo's current state. // Known .status.conditions.type are: \"Available\",
424+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
425+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
430426
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
431-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
432-
\t}"
427+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
433428
properties:
434429
lastTransitionTime:
435430
description: lastTransitionTime is the last time the condition

config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.7.0
6+
controller-gen.kubebuilder.io/version: v0.8.0
87
creationTimestamp: null
98
name: gitrepositories.source.toolkit.fluxcd.io
109
spec:
@@ -236,14 +235,12 @@ spec:
236235
description: "Condition contains details for one aspect of the current
237236
state of this API Resource. --- This struct is intended for direct
238237
use as an array at the field path .status.conditions. For example,
239-
\n \ttype FooStatus struct{ \t // Represents the observations
240-
of a foo's current state. \t // Known .status.conditions.type
241-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
242-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
243-
\t // +listMapKey=type \t Conditions []metav1.Condition
238+
\n type FooStatus struct{ // Represents the observations of a
239+
foo's current state. // Known .status.conditions.type are: \"Available\",
240+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
241+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
244242
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
245-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
246-
\t}"
243+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
247244
properties:
248245
lastTransitionTime:
249246
description: lastTransitionTime is the last time the condition
@@ -597,14 +594,12 @@ spec:
597594
description: "Condition contains details for one aspect of the current
598595
state of this API Resource. --- This struct is intended for direct
599596
use as an array at the field path .status.conditions. For example,
600-
\n \ttype FooStatus struct{ \t // Represents the observations
601-
of a foo's current state. \t // Known .status.conditions.type
602-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
603-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
604-
\t // +listMapKey=type \t Conditions []metav1.Condition
597+
\n type FooStatus struct{ // Represents the observations of a
598+
foo's current state. // Known .status.conditions.type are: \"Available\",
599+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
600+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
605601
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
606-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
607-
\t}"
602+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
608603
properties:
609604
lastTransitionTime:
610605
description: lastTransitionTime is the last time the condition
@@ -664,8 +659,8 @@ spec:
664659
type: array
665660
contentConfigChecksum:
666661
description: 'ContentConfigChecksum is a checksum of all the configurations
667-
related to the content of the source artifact: - .spec.ignore -
668-
.spec.recurseSubmodules - .spec.included and the checksum of the
662+
related to the content of the source artifact: - .spec.ignore -
663+
.spec.recurseSubmodules - .spec.included and the checksum of the
669664
included artifacts observed in .status.observedGeneration version
670665
of the object. This can be used to determine if the content of the
671666
included repository has changed. It has the format of `<algo>:<checksum>`,

config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
21
---
32
apiVersion: apiextensions.k8s.io/v1
43
kind: CustomResourceDefinition
54
metadata:
65
annotations:
7-
controller-gen.kubebuilder.io/version: v0.7.0
6+
controller-gen.kubebuilder.io/version: v0.8.0
87
creationTimestamp: null
98
name: helmcharts.source.toolkit.fluxcd.io
109
spec:
@@ -192,14 +191,12 @@ spec:
192191
description: "Condition contains details for one aspect of the current
193192
state of this API Resource. --- This struct is intended for direct
194193
use as an array at the field path .status.conditions. For example,
195-
\n \ttype FooStatus struct{ \t // Represents the observations
196-
of a foo's current state. \t // Known .status.conditions.type
197-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
198-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
199-
\t // +listMapKey=type \t Conditions []metav1.Condition
194+
\n type FooStatus struct{ // Represents the observations of a
195+
foo's current state. // Known .status.conditions.type are: \"Available\",
196+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
197+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
200198
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
201-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
202-
\t}"
199+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
203200
properties:
204201
lastTransitionTime:
205202
description: lastTransitionTime is the last time the condition
@@ -469,14 +466,12 @@ spec:
469466
description: "Condition contains details for one aspect of the current
470467
state of this API Resource. --- This struct is intended for direct
471468
use as an array at the field path .status.conditions. For example,
472-
\n \ttype FooStatus struct{ \t // Represents the observations
473-
of a foo's current state. \t // Known .status.conditions.type
474-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
475-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
476-
\t // +listMapKey=type \t Conditions []metav1.Condition
469+
\n type FooStatus struct{ // Represents the observations of a
470+
foo's current state. // Known .status.conditions.type are: \"Available\",
471+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
472+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
477473
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
478-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
479-
\t}"
474+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
480475
properties:
481476
lastTransitionTime:
482477
description: lastTransitionTime is the last time the condition

0 commit comments

Comments
 (0)