diff --git a/.github/workflows/cifuzz.yaml b/.github/workflows/cifuzz.yaml index e0e35b043..5b81eb3f3 100644 --- a/.github/workflows/cifuzz.yaml +++ b/.github/workflows/cifuzz.yaml @@ -16,7 +16,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.19.x - name: Restore Go cache uses: actions/cache@v3 with: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 26f7b4ca1..80a8dd90a 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -43,7 +43,7 @@ jobs: - name: Setup Go uses: actions/setup-go@v3 with: - go-version: 1.18.x + go-version: 1.19.x - name: Setup Kubernetes uses: engineerd/setup-kind@v0.5.0 with: diff --git a/.github/workflows/scan.yaml b/.github/workflows/scan.yaml index e168586f6..96a9a9c88 100644 --- a/.github/workflows/scan.yaml +++ b/.github/workflows/scan.yaml @@ -48,6 +48,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.19.x - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: diff --git a/Dockerfile b/Dockerfile index 04080f290..c91989c82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG GO_VERSION=1.18 +ARG GO_VERSION=1.19 ARG XX_VERSION=1.1.0 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx @@ -30,7 +30,7 @@ COPY internal/ internal/ # build without specifing the arch ENV CGO_ENABLED=0 -RUN xx-go build -a -o helm-controller main.go +RUN xx-go build -trimpath -a -o helm-controller main.go FROM alpine:3.16 diff --git a/Makefile b/Makefile index 7ad51795c..ef1703c15 100644 --- a/Makefile +++ b/Makefile @@ -81,8 +81,8 @@ api-docs: gen-crd-api-reference-docs # Run go mod tidy tidy: - cd api; rm -f go.sum; go mod tidy -compat=1.18 - rm -f go.sum; go mod tidy -compat=1.18 + cd api; rm -f go.sum; go mod tidy -compat=1.19 + rm -f go.sum; go mod tidy -compat=1.19 # Run go fmt against code fmt: @@ -113,7 +113,7 @@ docker-push: CONTROLLER_GEN = $(GOBIN)/controller-gen .PHONY: controller-gen controller-gen: ## Download controller-gen locally if necessary. - $(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0) + $(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.8.0) # Find or download gen-crd-api-reference-docs GEN_CRD_API_REFERENCE_DOCS = $(GOBIN)/gen-crd-api-reference-docs diff --git a/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml b/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml index dfa9f45a4..3973f1e57 100644 --- a/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml +++ b/config/crd/bases/helm.toolkit.fluxcd.io_helmreleases.yaml @@ -1,10 +1,9 @@ - --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.7.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null name: helmreleases.helm.toolkit.fluxcd.io spec: @@ -736,14 +735,12 @@ spec: description: "Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, - \n \ttype FooStatus struct{ \t // Represents the observations - of a foo's current state. \t // Known .status.conditions.type - are: \"Available\", \"Progressing\", and \"Degraded\" \t // - +patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map - \t // +listMapKey=type \t Conditions []metav1.Condition + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" - protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields - \t}" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" properties: lastTransitionTime: description: lastTransitionTime is the last time the condition diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 9fd08d3b0..6df0c402f 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -1,4 +1,3 @@ - --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole