Skip to content

Commit 5358d1e

Browse files
chore: replace deprecated gcr.io/kubebuilder/kube-rbac-proxy (#733)
Signed-off-by: Lukas Reining <[email protected]>
1 parent ee48ee4 commit 5358d1e

File tree

103 files changed

+1060
-504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1060
-504
lines changed

Diff for: .github/scripts/strip-kustomize-helm.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
echo 'Running strip-kustomize-helm.sh script'
1010
CHARTS_DIR='./chart/open-feature-operator/templates'
11+
1112
# Careful! Ordering of these expressions matter!
1213
sed_expressions=(
1314
"s/___newline___/\\n/g"
@@ -17,9 +18,16 @@ sed_expressions=(
1718
"/___delete_me___/d"
1819
"s/___//g"
1920
)
21+
2022
find $CHARTS_DIR -name "*.yaml" | while read file; do
2123
for expr in "${sed_expressions[@]}"; do
22-
sed -i "$expr" "$file"
24+
if [[ "$OSTYPE" == "darwin"* ]]; then
25+
# macOS (BSD) version
26+
sed -i '' "$expr" "$file"
27+
else
28+
# Linux (GNU) version
29+
sed -i "$expr" "$file"
30+
fi
2331
done
2432
done
2533

Diff for: .github/workflows/e2e.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464

6565
- name: Upload cluster logs
6666
if: failure()
67-
uses: actions/upload-artifact@v3
67+
uses: actions/upload-artifact@v4
6868
with:
6969
name: e2e-tests
7070
path: .github/scripts/logs

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ testbin/*
3434

3535
go.work
3636
go.work.sum
37+
38+
dist

Diff for: Dockerfile

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,23 @@ COPY go.mod go.mod
77
COPY go.sum go.sum
88

99
# Copy the go source
10-
COPY main.go main.go
11-
COPY apis/ apis/
12-
COPY webhooks/ webhooks/
13-
COPY controllers/ controllers/
14-
COPY common/ common/
10+
COPY cmd/ cmd/
11+
COPY api/ api/
12+
COPY internal/ internal/
1513

1614
# cache deps before building and copying source so that we don't need to re-download as much
1715
# and so that source changes don't invalidate our downloaded layer
18-
RUN go work init . ./apis && go mod download
16+
RUN go work init . ./api && go mod download
1917

2018
ARG TARGETOS
2119
ARG TARGETARCH
2220

2321
# Build
24-
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o manager main.go
22+
# the GOARCH has not a default value to allow the binary be built according to the host where the command
23+
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
24+
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
25+
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
26+
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go
2527

2628
# Use distroless as minimal base image to package the manager binary
2729
# Refer to https://github.com/GoogleContainerTools/distroless for more details

Diff for: Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ vet: ## Run go vet against code.
6565
go vet ./...
6666

6767
.PHONY: unit-test
68-
unit-test: manifests fmt vet generate envtest ## Run tests.
69-
cd apis && go test ./... -v -coverprofile ../cover-apis.out cover-main.out cover-pkg.out
68+
unit-test: manifests generate envtest fmt vet ## Run tests.
69+
cd api && go test ./... -v -coverprofile ../cover-apis.out cover-main.out cover-pkg.out
7070
go test ./... -v -coverprofile cover-operator.out
7171
sed -i '/mode: set/d' "cover-operator.out"
7272
sed -i '/mode: set/d' "cover-apis.out"
@@ -112,12 +112,12 @@ generate-crdocs: kustomize crdocs
112112
##@ Build
113113

114114
.PHONY: build
115-
build: generate fmt vet ## Build manager binary.
116-
go build -o bin/manager main.go
115+
build: manifests generate fmt vet ## Build manager binary.
116+
go build -o bin/manager cmd/main.go
117117

118118
.PHONY: run
119119
run: manifests generate fmt vet ## Run a controller from your host.
120-
go run ./main.go
120+
go run ./cmd/main.go
121121

122122
.PHONY: docker-build
123123
docker-build: clean ## Build docker image with the manager.

Diff for: PROJECT

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
# More info: https://book.kubebuilder.io/reference/project-config.html
55
domain: openfeature.dev
66
layout:
7-
- go.kubebuilder.io/v3
7+
- go.kubebuilder.io/v4
88
multigroup: true
9+
plugins:
10+
helm.kubebuilder.io/v1-alpha: {}
911
projectName: open-feature-operator
1012
repo: github.com/open-feature/open-feature-operator
1113
resources:

Diff for: apis/CHANGELOG.md renamed to api/CHANGELOG.md

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: apis/core/v1beta1/zz_generated.deepcopy.go renamed to api/core/v1beta1/zz_generated.deepcopy.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: apis/go.mod renamed to api/go.mod

+28-24
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,70 @@ toolchain go1.23.3
66

77
require (
88
github.com/open-feature/flagd-schemas v0.2.9-0.20240708163558-2aa89b314322
9-
github.com/stretchr/testify v1.9.0
9+
github.com/stretchr/testify v1.10.0
1010
github.com/xeipuuv/gojsonschema v1.2.0
11-
k8s.io/api v0.31.4
12-
k8s.io/apimachinery v0.31.4
13-
sigs.k8s.io/controller-runtime v0.19.3
11+
k8s.io/api v0.32.1
12+
k8s.io/apimachinery v0.32.1
13+
sigs.k8s.io/controller-runtime v0.20.1
1414
sigs.k8s.io/gateway-api v1.2.1
1515
)
1616

1717
require (
1818
github.com/beorn7/perks v1.0.1 // indirect
1919
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2020
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
21-
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
21+
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
2222
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
23+
github.com/fsnotify/fsnotify v1.8.0 // indirect
2324
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
2425
github.com/go-logr/logr v1.4.2 // indirect
2526
github.com/go-openapi/jsonpointer v0.21.0 // indirect
2627
github.com/go-openapi/jsonreference v0.21.0 // indirect
2728
github.com/go-openapi/swag v0.23.0 // indirect
2829
github.com/gogo/protobuf v1.3.2 // indirect
29-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
3030
github.com/golang/protobuf v1.5.4 // indirect
31-
github.com/google/gnostic-models v0.6.8 // indirect
31+
github.com/google/btree v1.1.3 // indirect
32+
github.com/google/gnostic-models v0.6.9 // indirect
3233
github.com/google/go-cmp v0.6.0 // indirect
3334
github.com/google/gofuzz v1.2.0 // indirect
35+
github.com/google/pprof v0.0.0-20250125003558-7fdb3d7e6fa0 // indirect
3436
github.com/google/uuid v1.6.0 // indirect
35-
github.com/imdario/mergo v0.3.16 // indirect
3637
github.com/josharian/intern v1.0.0 // indirect
3738
github.com/json-iterator/go v1.1.12 // indirect
38-
github.com/mailru/easyjson v0.7.7 // indirect
39+
github.com/klauspost/compress v1.17.11 // indirect
40+
github.com/mailru/easyjson v0.9.0 // indirect
3941
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
4042
github.com/modern-go/reflect2 v1.0.2 // indirect
4143
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4244
github.com/pkg/errors v0.9.1 // indirect
4345
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
44-
github.com/prometheus/client_golang v1.19.1 // indirect
46+
github.com/prometheus/client_golang v1.20.5 // indirect
4547
github.com/prometheus/client_model v0.6.1 // indirect
46-
github.com/prometheus/common v0.55.0 // indirect
48+
github.com/prometheus/common v0.62.0 // indirect
4749
github.com/prometheus/procfs v0.15.1 // indirect
4850
github.com/spf13/pflag v1.0.5 // indirect
4951
github.com/x448/float16 v0.8.4 // indirect
5052
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
5153
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
52-
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
53-
golang.org/x/net v0.30.0 // indirect
54-
golang.org/x/oauth2 v0.21.0 // indirect
55-
golang.org/x/sys v0.26.0 // indirect
56-
golang.org/x/term v0.25.0 // indirect
57-
golang.org/x/text v0.19.0 // indirect
58-
golang.org/x/time v0.7.0 // indirect
54+
golang.org/x/net v0.34.0 // indirect
55+
golang.org/x/oauth2 v0.25.0 // indirect
56+
golang.org/x/sync v0.10.0 // indirect
57+
golang.org/x/sys v0.29.0 // indirect
58+
golang.org/x/term v0.28.0 // indirect
59+
golang.org/x/text v0.21.0 // indirect
60+
golang.org/x/time v0.9.0 // indirect
61+
golang.org/x/tools v0.29.0 // indirect
5962
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
60-
google.golang.org/protobuf v1.35.1 // indirect
63+
google.golang.org/protobuf v1.36.4 // indirect
64+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
6165
gopkg.in/inf.v0 v0.9.1 // indirect
6266
gopkg.in/yaml.v3 v3.0.1 // indirect
63-
k8s.io/apiextensions-apiserver v0.31.1 // indirect
64-
k8s.io/client-go v0.31.1 // indirect
67+
k8s.io/apiextensions-apiserver v0.32.1 // indirect
68+
k8s.io/client-go v0.32.1 // indirect
6569
k8s.io/klog/v2 v2.130.1 // indirect
66-
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
67-
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
68-
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
70+
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect
71+
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
72+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
6973
sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect
7074
sigs.k8s.io/yaml v1.4.0 // indirect
7175
)

0 commit comments

Comments
 (0)