Skip to content

Commit 7b1b3f5

Browse files
authored
Merge pull request #218 from gianlucam76/prep
(chore) Prepare for release v1.11.0
2 parents 2959437 + 4b06420 commit 7b1b3f5

21 files changed

Lines changed: 100 additions & 51 deletions

.github/workflows/main.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: checkout
17-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
1818
- name: Set up Go
1919
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
2020
with:
21-
go-version: 1.26.3
21+
go-version: 1.26.4
2222
- name: Build
2323
run: make build
2424
- name: FMT
@@ -33,11 +33,11 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- name: checkout
36-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
3737
- name: Set up Go
3838
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
3939
with:
40-
go-version: 1.26.3
40+
go-version: 1.26.4
4141
- name: ut
4242
run: make test
4343
env:
@@ -46,11 +46,11 @@ jobs:
4646
runs-on: ubuntu-latest
4747
steps:
4848
- name: checkout
49-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
49+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
5050
- name: Set up Go
5151
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
5252
with:
53-
go-version: 1.26.3
53+
go-version: 1.26.4
5454
- name: fv
5555
run: make create-cluster fv
5656
env:
@@ -59,11 +59,11 @@ jobs:
5959
runs-on: ubuntu-latest
6060
steps:
6161
- name: checkout
62-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
62+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
6363
- name: Set up Go
6464
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
6565
with:
66-
go-version: 1.26.3
66+
go-version: 1.26.4
6767
- name: fv
6868
run: make create-cluster-infra fv-namespace
6969
env:

.golangci.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ linters:
2020
- goconst
2121
- gocritic
2222
- gocyclo
23-
- gomodguard
23+
- gomodguard_v2
2424
- goprintffuncname
2525
- gosec
2626
- govet
@@ -72,12 +72,10 @@ linters:
7272
- style
7373
gocyclo:
7474
min-complexity: 20
75-
gomodguard:
75+
gomodguard_v2:
7676
blocked:
77-
modules:
78-
- k8s.io/kubernetes:
79-
reason: There is no good, avoidable reason to use this package and often leads to issues such as https://bit.ly/3dlKScY. However, if you disagree please include @ravchama in code review highlighting the reason.
80-
local-replace-directives: true
77+
- module: k8s.io/kubernetes
78+
local-replace-directives: true
8179
govet:
8280
settings:
8381
printf:
@@ -132,6 +130,7 @@ linters:
132130
- third_party$
133131
- builtin$
134132
- examples$
133+
- internal/test/helpers
135134
issues:
136135
max-issues-per-linter: 0
137136
max-same-issues: 0
@@ -149,3 +148,4 @@ formatters:
149148
- third_party$
150149
- builtin$
151150
- examples$
151+
- internal/test/helpers

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.26.3 AS builder
2+
FROM golang:1.26.4 AS builder
33

44
ARG BUILDOS
55
ARG TARGETARCH

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Image URL to use all building/pushing image targets
33
IMG ?= controller:latest
44
# KUBEBUILDER_ENVTEST_KUBERNETES_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
5-
KUBEBUILDER_ENVTEST_KUBERNETES_VERSION = 1.35.0
5+
KUBEBUILDER_ENVTEST_KUBERNETES_VERSION = 1.36.0
66

77
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
88
ifeq (,$(shell go env GOBIN))
@@ -36,7 +36,7 @@ ARCH ?= amd64
3636
OS ?= $(shell uname -s | tr A-Z a-z)
3737
K8S_LATEST_VER ?= $(shell curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
3838
export CONTROLLER_IMG ?= $(REGISTRY)/$(IMAGE_NAME)
39-
TAG ?= main
39+
TAG ?= v1.11.0
4040

4141
## Tool Binaries
4242
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
@@ -49,7 +49,7 @@ KIND := $(TOOLS_BIN_DIR)/kind
4949
KUBECTL := $(TOOLS_BIN_DIR)/kubectl
5050
CLUSTERCTL := $(TOOLS_BIN_DIR)/clusterctl
5151

52-
GOLANGCI_LINT_VERSION := "v2.11.4"
52+
GOLANGCI_LINT_VERSION := "v2.12.1"
5353
CLUSTERCTL_VERSION := v1.13.2
5454

5555
KUSTOMIZE_VER := v5.8.0

config/default/manager_image_patch.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ spec:
88
spec:
99
containers:
1010
# Change the value of image field below to your controller image URL
11-
- image: docker.io/projectsveltos/shard-controller:main
11+
- image: docker.io/projectsveltos/shard-controller:v1.11.0
1212
name: manager

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/projectsveltos/shard-controller
22

3-
go 1.26.3
3+
go 1.26.4
44

55
require (
66
github.com/TwiN/go-color v1.4.1

hack/tools/get-golangci-lint.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,23 @@
22

33
set -euo pipefail
44

5-
# Define the URL for downloading the golangci-lint archive
6-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(pwd)/bin "$1"
5+
VERSION="$1"
6+
BINARY="$(pwd)/bin/golangci-lint"
7+
8+
# Skip download if the binary already exists at the requested version.
9+
if [[ -x "$BINARY" ]] && "$BINARY" --version 2>/dev/null | grep -qF "${VERSION#v}"; then
10+
echo "golangci-lint ${VERSION} already installed, skipping download"
11+
exit 0
12+
fi
13+
14+
# Retry up to 3 times — the GitHub CDN occasionally returns 504.
15+
for attempt in 1 2 3; do
16+
if curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b "$(pwd)/bin" "$VERSION"; then
17+
exit 0
18+
fi
19+
echo "golangci-lint download attempt ${attempt} failed, retrying..." >&2
20+
sleep $((attempt * 5))
21+
done
22+
23+
echo "golangci-lint download failed after 3 attempts" >&2
24+
exit 1

hack/tools/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/projectsveltos/addon-controller/hack/tools
22

3-
go 1.26.3
3+
go 1.26.4
44

55
require (
66
github.com/a8m/envsubst v1.4.3

internal/controller/utils_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,10 @@ var _ = Describe("Utils", func() {
684684
})
685685

686686
Context("applyShardPatches", func() {
687+
const (
688+
patchValue = `[{"op":"add","path":"/metadata/labels/injected","value":"yes"}]`
689+
)
690+
687691
It("returns original bytes unchanged when patches is empty", func() {
688692
original := []byte(fmt.Sprintf(nginxDeploymentTemplate, sveltosNamespace))
689693
result, err := controller.ApplyShardPatches(original, nil, logger)
@@ -695,7 +699,7 @@ var _ = Describe("Utils", func() {
695699
deployYAML := []byte(fmt.Sprintf(nginxDeploymentTemplate, sveltosNamespace))
696700
patches := []libsveltosv1beta1.Patch{
697701
{
698-
Patch: `[{"op":"add","path":"/metadata/labels/injected","value":"yes"}]`,
702+
Patch: patchValue,
699703
Target: &libsveltosv1beta1.PatchSelector{Group: "apps", Kind: "Deployment"},
700704
},
701705
}
@@ -710,7 +714,7 @@ var _ = Describe("Utils", func() {
710714
deployYAML := []byte(fmt.Sprintf(nginxDeploymentTemplate, sveltosNamespace))
711715
patches := []libsveltosv1beta1.Patch{
712716
{
713-
Patch: `[{"op":"add","path":"/metadata/labels/injected","value":"yes"}]`,
717+
Patch: patchValue,
714718
Target: &libsveltosv1beta1.PatchSelector{Group: "", Kind: "ConfigMap"},
715719
},
716720
}

manifest/manifest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ spec:
166166
valueFrom:
167167
fieldRef:
168168
fieldPath: metadata.namespace
169-
image: docker.io/projectsveltos/shard-controller:main
169+
image: docker.io/projectsveltos/shard-controller:v1.11.0
170170
livenessProbe:
171171
failureThreshold: 3
172172
httpGet:

0 commit comments

Comments
 (0)