Update Go to 1.19

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan 2022-09-26 18:05:15 +03:00
parent a0fe94c590
commit 2e212b4699
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF
9 changed files with 25 additions and 35 deletions

View File

@ -16,7 +16,7 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.18.x go-version: 1.19.x
- id: go-env - id: go-env
run: | run: |
echo "::set-output name=go-mod-cache::$(go env GOMODCACHE)" echo "::set-output name=go-mod-cache::$(go env GOMODCACHE)"

View File

@ -41,7 +41,7 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.18.x go-version: 1.19.x
- name: Setup Kubernetes - name: Setup Kubernetes
uses: engineerd/setup-kind@v0.5.0 uses: engineerd/setup-kind@v0.5.0
with: with:

View File

@ -33,7 +33,7 @@ jobs:
- name: Setup Go - name: Setup Go
uses: actions/setup-go@v3 uses: actions/setup-go@v3
with: with:
go-version: 1.18.x go-version: 1.19.x
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v2
with: with:

View File

@ -80,8 +80,8 @@ api-docs: gen-crd-api-reference-docs
# Run go mod tidy # Run go mod tidy
tidy: tidy:
cd api; 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.18 rm -f go.sum; go mod tidy -compat=1.19
# Run go fmt against code # Run go fmt against code
fmt: fmt:
@ -144,7 +144,7 @@ fuzz-native:
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
.PHONY: controller-gen .PHONY: controller-gen
controller-gen: ## Download controller-gen locally if necessary. 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 # Find or download gen-crd-api-reference-docs
GEN_CRD_API_REFERENCE_DOCS = $(shell pwd)/bin/gen-crd-api-reference-docs GEN_CRD_API_REFERENCE_DOCS = $(shell pwd)/bin/gen-crd-api-reference-docs

View File

@ -1,10 +1,9 @@
--- ---
apiVersion: apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.7.0 controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null creationTimestamp: null
name: alerts.notification.toolkit.fluxcd.io name: alerts.notification.toolkit.fluxcd.io
spec: spec:
@ -137,14 +136,12 @@ spec:
description: "Condition contains details for one aspect of the current description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example, use as an array at the field path .status.conditions. For example,
\n \ttype FooStatus struct{ \t // Represents the observations \n type FooStatus struct{ // Represents the observations of a
of a foo's current state. \t // Known .status.conditions.type foo's current state. // Known .status.conditions.type are: \"Available\",
are: \"Available\", \"Progressing\", and \"Degraded\" \t // \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map // +listType=map // +listMapKey=type Conditions []metav1.Condition
\t // +listMapKey=type \t Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
\t}"
properties: properties:
lastTransitionTime: lastTransitionTime:
description: lastTransitionTime is the last time the condition description: lastTransitionTime is the last time the condition

View File

@ -1,10 +1,9 @@
--- ---
apiVersion: apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.7.0 controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null creationTimestamp: null
name: providers.notification.toolkit.fluxcd.io name: providers.notification.toolkit.fluxcd.io
spec: spec:
@ -125,14 +124,12 @@ spec:
description: "Condition contains details for one aspect of the current description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example, use as an array at the field path .status.conditions. For example,
\n \ttype FooStatus struct{ \t // Represents the observations \n type FooStatus struct{ // Represents the observations of a
of a foo's current state. \t // Known .status.conditions.type foo's current state. // Known .status.conditions.type are: \"Available\",
are: \"Available\", \"Progressing\", and \"Degraded\" \t // \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map // +listType=map // +listMapKey=type Conditions []metav1.Condition
\t // +listMapKey=type \t Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
\t}"
properties: properties:
lastTransitionTime: lastTransitionTime:
description: lastTransitionTime is the last time the condition description: lastTransitionTime is the last time the condition

View File

@ -1,10 +1,9 @@
--- ---
apiVersion: apiextensions.k8s.io/v1 apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
metadata: metadata:
annotations: annotations:
controller-gen.kubebuilder.io/version: v0.7.0 controller-gen.kubebuilder.io/version: v0.8.0
creationTimestamp: null creationTimestamp: null
name: receivers.notification.toolkit.fluxcd.io name: receivers.notification.toolkit.fluxcd.io
spec: spec:
@ -142,14 +141,12 @@ spec:
description: "Condition contains details for one aspect of the current description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example, use as an array at the field path .status.conditions. For example,
\n \ttype FooStatus struct{ \t // Represents the observations \n type FooStatus struct{ // Represents the observations of a
of a foo's current state. \t // Known .status.conditions.type foo's current state. // Known .status.conditions.type are: \"Available\",
are: \"Available\", \"Progressing\", and \"Degraded\" \t // \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
+patchMergeKey=type \t // +patchStrategy=merge \t // +listType=map // +listType=map // +listMapKey=type Conditions []metav1.Condition
\t // +listMapKey=type \t Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
protobuf:\"bytes,1,rep,name=conditions\"` \n \t // other fields protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
\t}"
properties: properties:
lastTransitionTime: lastTransitionTime:
description: lastTransitionTime is the last time the condition description: lastTransitionTime is the last time the condition

View File

@ -1,4 +1,3 @@
--- ---
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole kind: ClusterRole

View File

@ -159,7 +159,7 @@ func (r *ReceiverReconciler) SetupWithManagerAndOptions(mgr ctrl.Manager, opts R
Complete(r) Complete(r)
} }
/// reconcile steps through the actual reconciliation tasks for the object, it returns early on the first step that // reconcile steps through the actual reconciliation tasks for the object, it returns early on the first step that
// produces an error. // produces an error.
func (r *ReceiverReconciler) reconcile(ctx context.Context, obj *v1beta1.Receiver) (ctrl.Result, error) { func (r *ReceiverReconciler) reconcile(ctx context.Context, obj *v1beta1.Receiver) (ctrl.Result, error) {
// Mark the resource as under reconciliation // Mark the resource as under reconciliation