Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump all dependencies #477

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codequality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ jobs:
go-version-file: go.mod

- name: golangci-lint
uses: golangci/golangci-lint-action@v4.0.0
uses: golangci/golangci-lint-action@v6.1.1
with:
version: v1.57
version: v1.62
10 changes: 0 additions & 10 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,11 @@ linters:
enable-all: true
disable:
- contextcheck # too many false positives
- deadcode # deprecated (since v1.49.0) and replaced by 'unused'
- depguard # checks if package imports are whitelisted
- exhaustivestruct # deprecated (since v1.46.0) and replaced by 'exhaustruct'
- exhaustruct # TODO enable and fix, use regex to exclude certain cases
- golint # deprecated (since v1.41.0) and replaced by 'revive'
- ifshort # deprecated (since v1.48.0)
- interfacer # deprecated (since v1.38.0)
- lll
- maligned # deprecated (since v1.38.0)
- nlreturn # too strict and mostly code is not more readable
- nosnakecase # deprecated (since v1.48.1) and replaced by 'revive'
- scopelint # deprecated (since v1.39.0) and replaced by 'exportloopref'
- structcheck # deprecated (since v1.49.0) and replaced by 'unused'
- sqlclosecheck # not needed for this project
- varcheck # deprecated (since v1.49.0) and replaced by 'unused'
- wsl # too strict and mostly code is not more readable
- dupl
- forcetypeassert
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM europe-docker.pkg.dev/kyma-project/prod/external/golang:1.22.2-alpine3.19 as builder
FROM europe-docker.pkg.dev/kyma-project/prod/external/golang:1.23.4-alpine3.20 as builder
ARG TARGETOS
ARG TARGETARCH

Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IMG ?= $(IMG_REGISTRY)/$(MODULE_NAME)-manager:$(MODULE_VERSION)
## Image URL to use all building/pushing image targets
#IMG ?= controller:latest
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.27.1
ENVTEST_K8S_VERSION = 1.31.0

# VERIFY_IGNORE is a grep pattern to exclude files and directories from verification
VERIFY_IGNORE := /vendor\|/automock
Expand Down Expand Up @@ -236,9 +236,9 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
GOLANG_CI_LINT_VERSION ?= v1.57
KUSTOMIZE_VERSION ?= v5.5.0
CONTROLLER_TOOLS_VERSION ?= v0.16.4
GOLANG_CI_LINT_VERSION ?= v1.62

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
Expand Down
29 changes: 10 additions & 19 deletions config/crd/bases/operator.kyma-project.io_nats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.4
name: nats.operator.kyma-project.io
spec:
group: operator.kyma-project.io
Expand Down Expand Up @@ -194,11 +194,9 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.


This is an alpha field and requires enabling the
DynamicResourceAllocation feature gate.


This field is immutable. It can only be set for containers.
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
Expand All @@ -209,6 +207,12 @@ spec:
the Pod where this field is used. It makes that resource available
inside a container.
type: string
request:
description: |-
Request is the name chosen for a request in the referenced claim.
If empty, everything from the claim is made available, otherwise
only the result of this request.
type: string
required:
- name
type: object
Expand Down Expand Up @@ -249,16 +253,8 @@ spec:
type: integer
conditions:
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -299,12 +295,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
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])$
type: string
Expand Down
37 changes: 9 additions & 28 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- list
- watch
- apiGroups:
- ""
resourceNames:
Expand All @@ -28,29 +21,23 @@ rules:
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- ""
resources:
- nodes
- configmaps
- secrets
- services
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
- events
verbs:
- delete
- list
- watch
- create
- patch
- apiGroups:
- ""
resources:
- nodes
- pods
verbs:
- get
Expand All @@ -59,8 +46,9 @@ rules:
- apiGroups:
- ""
resources:
- secrets
- persistentvolumeclaims
verbs:
- delete
- list
- watch
- apiGroups:
Expand All @@ -77,13 +65,6 @@ rules:
- patch
- update
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- list
- watch
- apiGroups:
- ""
resourceNames:
Expand Down
20 changes: 12 additions & 8 deletions e2e/common/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,31 @@ func Retry(attempts int, interval time.Duration, fn func() error) error {
ticker := time.NewTicker(interval)
defer ticker.Stop()
var err error
for range ticker.C {

for attempts > 0 {
<-ticker.C // Wait for the ticker interval.
attempts--
err = fn()
if err == nil || attempts == 0 {
return err
if err == nil {
return nil
}
}
// Return nil if all attempts fail.
return nil
// Return the err if all attempts fail.
return err
}

func RetryGet[T any](attempts int, interval time.Duration, fn func() (*T, error)) (*T, error) {
ticker := time.NewTicker(interval)
defer ticker.Stop()
var err error
var obj *T
for range ticker.C {

for attempts > 0 {
<-ticker.C // Wait for the ticker interval.
attempts--
obj, err = fn()
if err == nil || attempts == 0 {
return obj, err
if err == nil {
return obj, nil
}
}
// Return nil object if all attempts fail.
Expand Down
Loading
Loading