Skip to content

Commit 6f2dc72

Browse files
pengzhoumlPeng Zhou
andauthored
MLE-24871: Update Library Versions for Operator 1.1 Release (#106)
* MLE-24871: upgrade go version and dependency version for security fix * add change for docker file * update the VERSION to 1.1.0 * MLE-24842: Fix security Vulnerability issue with The Kubernetes container requests the NET_RAW capability * MLE-24842: Fix security issue with The Kubernetes container is allowed to run as the root user * Fix linting issue * Fix test issue * Change the Kubernetes Version to 1.31.13 * change the Kubernetes version to 1.31.13 * change env_Kubernetes Version * add MINIKUBE_HOME to Jenkins Environment * Update the notice file based on go.mod --------- Co-authored-by: Peng Zhou <[email protected]>
1 parent 75246a0 commit 6f2dc72

28 files changed

+1040
-451
lines changed

.golangci.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,28 @@ issues:
1616
linters:
1717
- dupl
1818
- lll
19+
- path: "test/*"
20+
linters:
21+
- dupl
22+
- errcheck
23+
- goconst
24+
- gocyclo
25+
- lll
26+
- unused
27+
- path: "pkg/*"
28+
linters:
29+
- lll
30+
- unparam
1931
linters:
2032
disable-all: true
2133
enable:
22-
- dupl
2334
- errcheck
24-
- exportloopref
25-
- goconst
26-
- gocyclo
2735
- gofmt
2836
- goimports
2937
- gosimple
3038
- govet
3139
- ineffassign
32-
- lll
33-
- misspell
34-
- nakedret
35-
- prealloc
3640
- staticcheck
3741
- typecheck
3842
- unconvert
39-
- unparam
4043
- unused

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.23.6 AS builder
2+
FROM golang:1.24.9 AS builder
33
ARG TARGETOS
44
ARG TARGETARCH
55

Jenkinsfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,14 @@ pipeline {
202202
00 05 * * * % E2E_MARKLOGIC_IMAGE_VERSION=ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi-rootless:latest-11; PUBLISH_IMAGE=false''' : '')
203203
}
204204

205+
environment {
206+
PATH = "/space/go/bin:${env.PATH}"
207+
MINIKUBE_HOME = "/space/minikube/"
208+
KUBECONFIG = "/space/.kube-config"
209+
GOPATH = "/space/go"
210+
}
211+
212+
205213
parameters {
206214
string(name: 'E2E_MARKLOGIC_IMAGE_VERSION', defaultValue: 'ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi-rootless:latest-12', description: 'Docker image to use for tests.', trim: true)
207215
string(name: 'VERSION', defaultValue: '1.1.0', description: 'Version to tag the image with.', trim: true)

Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# To re-generate a bundle for another specific version without changing the standard setup, you can:
44
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
55
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
6-
VERSION ?= 1.0.0
6+
VERSION ?= 1.1.0
77

88
# VERIFY_HUGE_PAGES defines if hugepages test is enabled or not for e2e test
99
VERIFY_HUGE_PAGES ?= false
@@ -12,7 +12,7 @@ export E2E_DOCKER_IMAGE ?= $(IMG)
1212
export E2E_KUSTOMIZE_VERSION ?= $(KUSTOMIZE_VERSION)
1313
export E2E_CONTROLLER_TOOLS_VERSION ?= $(CONTROLLER_TOOLS_VERSION)
1414
export E2E_MARKLOGIC_IMAGE_VERSION ?= progressofficial/marklogic-db:11.3.1-ubi-rootless-2.1.3
15-
export E2E_KUBERNETES_VERSION ?= v1.31.0
15+
export E2E_KUBERNETES_VERSION ?= v1.31.13
1616

1717
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
1818
ENVTEST_K8S_VERSION = 1.31.0
@@ -65,8 +65,8 @@ OPERATOR_SDK_VERSION ?= v1.34.2
6565

6666
# Image URL to use all building/pushing image targets
6767
# Image for dev: ml-marklogic-operator-dev.bed-artifactory.bedford.progress.com/marklogic-operator-kubernetes
68-
# IMG ?= progressofficial/marklogic-operator-kubernetes:$(VERSION)
69-
IMG ?= "testrepo/marklogic-operator-image-dev:1.0.0"
68+
IMG ?= progressofficial/marklogic-operator-kubernetes:$(VERSION)
69+
# IMG ?= "testrepo/marklogic-operator-image-dev:$(VERSION)"
7070

7171

7272
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
@@ -173,11 +173,11 @@ e2e-cleanup-minikube:
173173
minikube delete
174174

175175
GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
176-
GOLANGCI_LINT_VERSION ?= v1.54.2
176+
GOLANGCI_LINT_VERSION ?= v1.62.2
177177
golangci-lint:
178178
@[ -f $(GOLANGCI_LINT) ] || { \
179179
set -e ;\
180-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) $(GOLANGCI_LINT_VERSION) ;\
180+
GOBIN=$(shell dirname $(GOLANGCI_LINT)) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION) ;\
181181
}
182182

183183
.PHONY: lint
@@ -265,7 +265,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
265265

266266
## Tool Versions
267267
KUSTOMIZE_VERSION ?= v5.5.0
268-
CONTROLLER_TOOLS_VERSION ?= v0.17.1
268+
CONTROLLER_TOOLS_VERSION ?= v0.19.0
269269

270270
.PHONY: kustomize
271271
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
@@ -368,6 +368,7 @@ $(HELMIFY): $(LOCALBIN)
368368
test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/helmify@latest
369369

370370
helm: manifests kustomize helmify
371+
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
371372
$(KUSTOMIZE) build config/default | $(HELMIFY) -image-pull-secrets -original-name charts/marklogic-operator-kubernetes
372373

373374
.PHONY: image-scan

NOTICE.txt

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ This document provides notice information for the third-party components used by
1515
Third Party Components
1616

1717

18-
api v0.32.1 (Apache-2.0)
19-
apimachinery v0.32.1 (Apache-2.0)
20-
client-go v0.32.1 (Apache-2.0)
21-
controller-runtime v0.20.1 (Apache-2.0)
18+
api v0.34.1 (Apache-2.0)
19+
apimachinery v0.34.1 (Apache-2.0)
20+
client-go v0.34.1 (Apache-2.0)
21+
controller-runtime v0.22.3 (Apache-2.0)
2222
k8s-objectmatcher v1.10.0 (Apache-2.0)
23-
logr v1.4.2 (Apache-2.0
23+
logr v1.4.3 (Apache-2.0)
2424

2525

2626
Common Licenses
@@ -31,27 +31,27 @@ logr v1.4.2 (Apache-2.0
3131

3232
The following software may be included in this project (last updated February 11, 2025):
3333

34-
Api v0.32.1 (Apache-2.0)
34+
Api v0.34.1 (Apache-2.0)
3535

36-
https://github.com/kubernetes/api/tree/v0.32.1
36+
https://github.com/kubernetes/api/tree/v0.34.1
3737

3838
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
3939

40-
Apimachinery v0.32.1 (Apache-2.0)
40+
Apimachinery v0.34.1 (Apache-2.0)
4141

42-
https://github.com/kubernetes/apimachinery/tree/v0.32.1
42+
https://github.com/kubernetes/apimachinery/tree/v0.34.1
4343

4444
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
4545

46-
client-go v0.32.1 (Apache-2.0)
46+
client-go v0.34.1 (Apache-2.0)
4747

48-
https://github.com/kubernetes/client-go/tree/v0.32.1
48+
https://github.com/kubernetes/client-go/tree/v0.34.1
4949

5050
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
5151

52-
Controller-runtime v0.20.1 (Apache-2.0)
52+
Controller-runtime v0.22.3 (Apache-2.0)
5353

54-
https://github.com/kubernetes-sigs/controller-runtime/tree/v0.20.1
54+
https://github.com/kubernetes-sigs/controller-runtime/tree/v0.22.3
5555

5656
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
5757

@@ -70,9 +70,9 @@ The source file patch/deletenull.go is based on https://github.com/kubernetes/ku
7070

7171
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
7272

73-
Logr v1.4.2 (Apache-2.0)
73+
Logr v1.4.3 (Apache-2.0)
7474

75-
https://github.com/go-logr/logr/tree/v1.4.2
75+
https://github.com/go-logr/logr/tree/v1.4.3
7676

7777
For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0)
7878

charts/marklogic-operator-kubernetes/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 1.0.0
16+
version: 1.1.0
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.
2020
# It is recommended to use it with quotes.
21-
appVersion: "1.0.0"
21+
appVersion: "1.1.0"

0 commit comments

Comments
 (0)