Skip to content

Commit 41f1713

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 (v0.7 fails with Go 1.19) and regenerate manifests Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
1 parent 9fd6696 commit 41f1713

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

.github/workflows/cifuzz.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup Go
1717
uses: actions/setup-go@v3
1818
with:
19-
go-version: 1.18.x
19+
go-version: 1.19.x
2020
- name: Restore Go cache
2121
uses: actions/cache@v3
2222
with:

.github/workflows/e2e.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Setup Go
4444
uses: actions/setup-go@v3
4545
with:
46-
go-version: 1.18.x
46+
go-version: 1.19.x
4747
- name: Setup Kubernetes
4848
uses: engineerd/setup-kind@v0.5.0
4949
with:

.github/workflows/scan.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ jobs:
4848
steps:
4949
- name: Checkout repository
5050
uses: actions/checkout@v3
51+
- name: Setup Go
52+
uses: actions/setup-go@v3
53+
with:
54+
go-version: 1.19.x
5155
- name: Initialize CodeQL
5256
uses: github/codeql-action/init@v2
5357
with:

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG GO_VERSION=1.18
1+
ARG GO_VERSION=1.19
22
ARG XX_VERSION=1.1.0
33

44
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
@@ -30,7 +30,7 @@ COPY internal/ internal/
3030

3131
# build without specifing the arch
3232
ENV CGO_ENABLED=0
33-
RUN xx-go build -a -o helm-controller main.go
33+
RUN xx-go build -trimpath -a -o helm-controller main.go
3434

3535
FROM alpine:3.16
3636

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ api-docs: gen-crd-api-reference-docs
8181

8282
# Run go mod tidy
8383
tidy:
84-
cd api; rm -f go.sum; go mod tidy -compat=1.18
85-
rm -f go.sum; go mod tidy -compat=1.18
84+
cd api; rm -f go.sum; go mod tidy -compat=1.19
85+
rm -f go.sum; go mod tidy -compat=1.19
8686

8787
# Run go fmt against code
8888
fmt:
@@ -113,7 +113,7 @@ docker-push:
113113
CONTROLLER_GEN = $(GOBIN)/controller-gen
114114
.PHONY: controller-gen
115115
controller-gen: ## Download controller-gen locally if necessary.
116-
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0)
116+
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0)
117117

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

config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml

+6-9
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: helmreleases.helm.toolkit.fluxcd.io
109
spec:
@@ -736,14 +735,12 @@ spec:
736735
description: "Condition contains details for one aspect of the current
737736
state of this API Resource. --- This struct is intended for direct
738737
use as an array at the field path .status.conditions. For example,
739-
\n \ttype FooStatus struct{ \t // Represents the observations
740-
of a foo's current state. \t // Known .status.conditions.type
741-
are: \"Available\", \"Progressing\", and \"Degraded\" \t //
742-
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map
743-
\t // +listMapKey=type \t Conditions []metav1.Condition
738+
\n type FooStatus struct{ // Represents the observations of a
739+
foo's current state. // Known .status.conditions.type are: \"Available\",
740+
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
741+
// +listType=map // +listMapKey=type Conditions []metav1.Condition
744742
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
745-
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields
746-
\t}"
743+
protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
747744
properties:
748745
lastTransitionTime:
749746
description: lastTransitionTime is the last time the condition

config/rbac/role.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
---
32
apiVersion: rbac.authorization.k8s.io/v1
43
kind: ClusterRole

0 commit comments

Comments
 (0)