Skip to content

Commit 6a96f68

Browse files
Merge branch 'main' into addWICheckForNode
2 parents 8b18a7e + d4aaed8 commit 6a96f68

8,023 files changed

Lines changed: 1726284 additions & 53906 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Build webhook
2929
run: make webhook
3030
- name: Build e2e test binary
31-
run: go build -mod=vendor ./test/e2e
31+
run: make build-e2e-test
3232

3333
unit-test:
3434
runs-on: ubuntu-22.04
@@ -70,4 +70,4 @@ jobs:
7070
go-version-file: './go.mod'
7171
check-latest: true
7272
- name: Verify
73-
run: make verify
73+
run: make verify

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ _artifacts/
4949
_rundir/
5050

5151
# Python cache
52-
__pycache__
52+
__pycache__

Makefile

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ ifneq ("$(shell docker buildx build --help | grep 'provenance')", "")
4141
DOCKER_BUILDX_ARGS += --provenance=false
4242
endif
4343

44+
DOCKER_BUILDX_ARGS += --quiet
45+
4446
$(info PROJECT is ${PROJECT})
4547
$(info OVERLAY is ${OVERLAY})
4648
$(info STAGINGVERSION is ${STAGINGVERSION})
@@ -68,7 +70,7 @@ webhook:
6870

6971
download-gcsfuse:
7072
mkdir -p ${BINDIR}/linux/amd64 ${BINDIR}/linux/arm64
71-
73+
7274
ifeq (${BUILD_GCSFUSE_FROM_SOURCE}, true)
7375
rm -f ${BINDIR}/Dockerfile.gcsfuse
7476
curl https://raw.githubusercontent.com/GoogleCloudPlatform/gcsfuse/master/tools/package_gcsfuse_docker/Dockerfile -o ${BINDIR}/Dockerfile.gcsfuse
@@ -82,7 +84,7 @@ ifeq (${BUILD_GCSFUSE_FROM_SOURCE}, true)
8284
--build-arg BRANCH_NAME=master \
8385
--build-arg ARCHITECTURE=amd64 \
8486
--platform=linux/amd64 .
85-
87+
8688
docker run \
8789
-v ${BINDIR}/linux/amd64:/release \
8890
gcsfuse-release:${GCSFUSE_VERSION}-amd \
@@ -132,7 +134,7 @@ init-buildx:
132134

133135
build-image-and-push-multi-arch: init-buildx download-gcsfuse build-image-linux-amd64
134136
ifeq (${BUILD_ARM}, true)
135-
make build-image-linux-arm64
137+
$(MAKE) build-image-linux-arm64
136138
docker manifest create ${DRIVER_IMAGE}:${STAGINGVERSION} ${DRIVER_IMAGE}:${STAGINGVERSION}_linux_amd64 ${DRIVER_IMAGE}:${STAGINGVERSION}_linux_arm64
137139
docker manifest create ${SIDECAR_IMAGE}:${STAGINGVERSION} ${SIDECAR_IMAGE}:${STAGINGVERSION}_linux_amd64 ${SIDECAR_IMAGE}:${STAGINGVERSION}_linux_arm64
138140
docker manifest create ${PREFETCH_IMAGE}:${STAGINGVERSION} ${PREFETCH_IMAGE}:${STAGINGVERSION}_linux_amd64 ${PREFETCH_IMAGE}:${STAGINGVERSION}_linux_arm64
@@ -184,32 +186,32 @@ build-image-linux-arm64:
184186
--tag ${PREFETCH_IMAGE}:${STAGINGVERSION}_linux_arm64 \
185187
--platform linux/arm64 \
186188
--build-arg TARGETPLATFORM=linux/arm64 .
187-
189+
\
188190
docker buildx build \
189191
--file ./cmd/csi_driver/Dockerfile \
190192
--tag validation_linux_arm64 \
191193
--platform=linux/arm64 \
192194
--target validation-image .
193-
195+
\
194196
docker buildx build ${DOCKER_BUILDX_ARGS} \
195197
--file ./cmd/csi_driver/Dockerfile \
196198
--tag ${DRIVER_IMAGE}:${STAGINGVERSION}_linux_arm64 \
197199
--platform linux/arm64 .
198-
200+
\
199201
docker buildx build ${DOCKER_BUILDX_ARGS} \
200202
--file ./cmd/sidecar_mounter/Dockerfile \
201203
--tag ${SIDECAR_IMAGE}:${STAGINGVERSION}_linux_arm64 \
202204
--platform linux/arm64 \
203205
--build-arg TARGETPLATFORM=linux/arm64 .
204206

205207
install:
206-
make generate-spec-yaml OVERLAY=${OVERLAY} REGISTRY=${REGISTRY} STAGINGVERSION=${STAGINGVERSION}
208+
$(MAKE) generate-spec-yaml OVERLAY=${OVERLAY} REGISTRY=${REGISTRY} STAGINGVERSION=${STAGINGVERSION}
207209
kubectl apply -f ${BINDIR}/gcs-fuse-csi-driver-specs-generated.yaml
208210
./deploy/base/webhook/create-cert.sh --namespace gcs-fuse-csi-driver --service gcs-fuse-csi-driver-webhook --secret gcs-fuse-csi-driver-webhook-secret
209211
./deploy/base/webhook/manage-validating_admission_policy.sh --install
210212

211213
uninstall:
212-
make generate-spec-yaml OVERLAY=${OVERLAY} REGISTRY=${REGISTRY} STAGINGVERSION=${STAGINGVERSION}
214+
$(MAKE) generate-spec-yaml OVERLAY=${OVERLAY} REGISTRY=${REGISTRY} STAGINGVERSION=${STAGINGVERSION}
213215
kubectl delete -f ${BINDIR}/gcs-fuse-csi-driver-specs-generated.yaml --wait
214216
./deploy/base/webhook/manage-validating_admission_policy.sh --uninstall
215217

@@ -236,11 +238,14 @@ unit-test:
236238
go test -v -mod=vendor -timeout 30s "./pkg/..." -cover
237239

238240
sanity-test:
239-
go test -v -mod=vendor -timeout 30s "./test/sanity/" -run TestSanity
241+
cd test && go test -v -timeout 30s "./sanity/" -run TestSanity
240242
echo $${GITHUB_SHA}
241243

244+
build-e2e-test:
245+
cd test && go build -o ../bin/e2e-test-ci ./e2e
246+
242247
e2e-test:
243248
./test/e2e/run-e2e-local.sh
244249

245250
perf-test:
246-
make e2e-test E2E_TEST_USE_MANAGED_DRIVER=true E2E_TEST_GINKGO_TIMEOUT=3h E2E_TEST_SKIP= E2E_TEST_FOCUS=should.succeed.in.performance.test E2E_TEST_GINKGO_FLAKE_ATTEMPTS=1
251+
$(MAKE) e2e-test E2E_TEST_USE_MANAGED_DRIVER=true E2E_TEST_GINKGO_TIMEOUT=3h E2E_TEST_SKIP= E2E_TEST_FOCUS=should.succeed.in.performance.test E2E_TEST_GINKGO_FLAKE_ATTEMPTS=1

deploy/base/webhook/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ spec:
5959
- --cert-dir=/etc/tls-certs
6060
- --port=22030
6161
- --health-probe-bind-address=:22031
62+
- --should-inject-sa-vol=true
6263
env:
6364
- name: SIDECAR_IMAGE_PULL_POLICY
6465
value: "IfNotPresent"

go.mod

Lines changed: 31 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ module github.com/googlecloudplatform/gcs-fuse-csi-driver
22

33
go 1.23.0
44

5+
// This needs to match the version in test/go.mod
6+
require github.com/onsi/ginkgo/v2 v2.22.1 // indirect
7+
58
require (
69
cloud.google.com/go/compute/metadata v0.5.0
710
cloud.google.com/go/iam v1.1.12
811
cloud.google.com/go/storage v1.43.0
912
github.com/container-storage-interface/spec v1.10.0
13+
github.com/distribution/reference v0.6.0
1014
github.com/go-logr/logr v1.4.2
1115
github.com/google/go-cmp v0.6.0
12-
github.com/google/uuid v1.6.0
1316
github.com/kubernetes-csi/csi-lib-utils v0.18.1
14-
github.com/kubernetes-csi/csi-test/v5 v5.2.0
15-
github.com/onsi/ginkgo/v2 v2.19.1
16-
github.com/onsi/gomega v1.34.1
1717
github.com/prometheus/client_golang v1.18.0
1818
github.com/prometheus/client_model v0.6.0
1919
github.com/prometheus/common v0.46.0
@@ -29,161 +29,83 @@ require (
2929
k8s.io/apiserver v0.30.10
3030
k8s.io/client-go v0.30.10
3131
k8s.io/klog/v2 v2.130.1
32-
k8s.io/kubernetes v1.30.10
3332
k8s.io/mount-utils v0.30.3
34-
k8s.io/pod-security-admission v0.30.3
3533
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
36-
sigs.k8s.io/boskos v0.0.0-20240801013515-1221bfe2f633
3734
sigs.k8s.io/controller-runtime v0.18.4
3835
)
3936

4037
require (
4138
cloud.google.com/go v0.115.0 // indirect
4239
cloud.google.com/go/auth v0.7.3 // indirect
4340
cloud.google.com/go/auth/oauth2adapt v0.2.3 // indirect
44-
github.com/NYTimes/gziphandler v1.1.1 // indirect
4541
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
4642
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
4743
github.com/beorn7/perks v1.0.1 // indirect
4844
github.com/blang/semver/v4 v4.0.0 // indirect
49-
github.com/bombsimon/logrusr/v4 v4.1.0 // indirect
50-
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
45+
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
5146
github.com/cespare/xxhash/v2 v2.3.0 // indirect
52-
github.com/coreos/go-semver v0.3.1 // indirect
53-
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
54-
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
55-
github.com/distribution/reference v0.6.0 // indirect
56-
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
57-
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
47+
github.com/davecgh/go-spew v1.1.1 // indirect
48+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
49+
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
5850
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
5951
github.com/felixge/httpsnoop v1.0.4 // indirect
6052
github.com/fsnotify/fsnotify v1.7.0 // indirect
6153
github.com/go-logr/stdr v1.2.2 // indirect
62-
github.com/go-openapi/jsonpointer v0.21.0 // indirect
63-
github.com/go-openapi/jsonreference v0.21.0 // indirect
64-
github.com/go-openapi/swag v0.23.0 // indirect
65-
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
54+
github.com/go-openapi/jsonpointer v0.19.6 // indirect
55+
github.com/go-openapi/jsonreference v0.20.2 // indirect
56+
github.com/go-openapi/swag v0.22.3 // indirect
6657
github.com/gogo/protobuf v1.3.2 // indirect
6758
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
6859
github.com/golang/protobuf v1.5.4 // indirect
6960
github.com/google/cel-go v0.17.8 // indirect
7061
github.com/google/gnostic-models v0.6.8 // indirect
7162
github.com/google/gofuzz v1.2.1-0.20210504230335-f78f29fc09ea // indirect
72-
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
7363
github.com/google/s2a-go v0.1.8 // indirect
64+
github.com/google/uuid v1.6.0 // indirect
7465
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
7566
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
76-
github.com/gorilla/websocket v1.5.1 // indirect
77-
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
78-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect
79-
github.com/hashicorp/errwrap v1.1.0 // indirect
80-
github.com/hashicorp/go-multierror v1.1.1 // indirect
81-
github.com/hashicorp/hcl v1.0.0 // indirect
82-
github.com/imdario/mergo v0.3.16 // indirect
83-
github.com/inconshreveable/mousetrap v1.1.0 // indirect
67+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
68+
github.com/imdario/mergo v0.3.13 // indirect
8469
github.com/josharian/intern v1.0.0 // indirect
8570
github.com/json-iterator/go v1.1.12 // indirect
86-
github.com/magiconair/properties v1.8.7 // indirect
8771
github.com/mailru/easyjson v0.7.7 // indirect
88-
github.com/mitchellh/mapstructure v1.5.0 // indirect
89-
github.com/moby/spdystream v0.2.0 // indirect
90-
github.com/moby/sys/mountinfo v0.7.1 // indirect
72+
github.com/moby/sys/mountinfo v0.6.2 // indirect
9173
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
9274
github.com/modern-go/reflect2 v1.0.2 // indirect
9375
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
94-
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
76+
github.com/onsi/gomega v1.36.2 // indirect
9577
github.com/opencontainers/go-digest v1.0.0 // indirect
96-
github.com/opencontainers/selinux v1.11.0 // indirect
97-
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
9878
github.com/pkg/errors v0.9.1 // indirect
99-
github.com/prometheus/procfs v0.13.0 // indirect
100-
github.com/sagikazarmark/locafero v0.4.0 // indirect
101-
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
102-
github.com/sirupsen/logrus v1.9.3 // indirect
103-
github.com/sourcegraph/conc v0.3.0 // indirect
104-
github.com/spf13/afero v1.11.0 // indirect
105-
github.com/spf13/cast v1.6.0 // indirect
106-
github.com/spf13/cobra v1.8.0 // indirect
79+
github.com/prometheus/procfs v0.12.0 // indirect
10780
github.com/spf13/pflag v1.0.5 // indirect
108-
github.com/spf13/viper v1.18.2 // indirect
109-
github.com/stoewer/go-strcase v1.3.0 // indirect
110-
github.com/subosito/gotenv v1.6.0 // indirect
111-
go.etcd.io/etcd/api/v3 v3.5.13 // indirect
112-
go.etcd.io/etcd/client/pkg/v3 v3.5.13 // indirect
113-
go.etcd.io/etcd/client/v3 v3.5.13 // indirect
81+
github.com/stoewer/go-strcase v1.2.0 // indirect
11482
go.opencensus.io v0.24.0 // indirect
115-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.50.0 // indirect
116-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 // indirect
117-
go.opentelemetry.io/otel v1.25.0 // indirect
118-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.25.0 // indirect
119-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.25.0 // indirect
120-
go.opentelemetry.io/otel/metric v1.25.0 // indirect
121-
go.opentelemetry.io/otel/sdk v1.25.0 // indirect
122-
go.opentelemetry.io/otel/trace v1.25.0 // indirect
123-
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
124-
go.uber.org/multierr v1.11.0 // indirect
125-
go.uber.org/zap v1.27.0 // indirect
126-
go4.org v0.0.0-20230225012048-214862532bf5 // indirect
83+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
84+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
85+
go.opentelemetry.io/otel v1.24.0 // indirect
86+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect
87+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect
88+
go.opentelemetry.io/otel/metric v1.24.0 // indirect
89+
go.opentelemetry.io/otel/sdk v1.24.0 // indirect
90+
go.opentelemetry.io/otel/trace v1.24.0 // indirect
91+
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
12792
golang.org/x/crypto v0.36.0 // indirect
12893
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
12994
golang.org/x/sync v0.12.0 // indirect
13095
golang.org/x/sys v0.31.0 // indirect
13196
golang.org/x/term v0.30.0 // indirect
13297
golang.org/x/text v0.23.0 // indirect
133-
golang.org/x/tools v0.23.0 // indirect
13498
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
13599
google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf // indirect
136100
google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f // indirect
137101
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
138-
google.golang.org/protobuf v1.34.2 // indirect
102+
google.golang.org/protobuf v1.36.1 // indirect
139103
gopkg.in/inf.v0 v0.9.1 // indirect
140-
gopkg.in/ini.v1 v1.67.0 // indirect
141-
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
142104
gopkg.in/yaml.v2 v2.4.0 // indirect
143-
k8s.io/apiextensions-apiserver v0.30.3 // indirect
144-
k8s.io/cloud-provider v0.30.3 // indirect
145105
k8s.io/component-base v0.30.10 // indirect
146-
k8s.io/component-helpers v0.30.3 // indirect
147-
k8s.io/controller-manager v0.30.3 // indirect
148-
k8s.io/kms v0.30.10 // indirect
149-
k8s.io/kube-openapi v0.0.0-20240411171206-dc4e619f62f3 // indirect
150-
k8s.io/kubectl v0.30.3 // indirect
151-
k8s.io/kubelet v0.30.3 // indirect
152-
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 // indirect
106+
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
107+
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 // indirect
153108
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
154-
sigs.k8s.io/prow v0.0.0-20240619181241-cfb8754e0459 // indirect
155109
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
156-
sigs.k8s.io/yaml v1.4.0 // indirect
157-
)
158-
159-
replace (
160-
k8s.io/api => k8s.io/api v0.30.3
161-
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.3
162-
k8s.io/apimachinery => k8s.io/apimachinery v0.30.3
163-
k8s.io/apiserver => k8s.io/apiserver v0.30.10
164-
k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.3
165-
k8s.io/client-go => k8s.io/client-go v0.30.3
166-
k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.3
167-
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.3
168-
k8s.io/code-generator => k8s.io/code-generator v0.30.3
169-
k8s.io/component-base => k8s.io/component-base v0.30.3
170-
k8s.io/component-helpers => k8s.io/component-helpers v0.30.3
171-
k8s.io/controller-manager => k8s.io/controller-manager v0.30.3
172-
k8s.io/cri-api => k8s.io/cri-api v0.30.3
173-
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.3
174-
k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.3
175-
k8s.io/kms => k8s.io/kms v0.30.3
176-
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.3
177-
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.3
178-
k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.3
179-
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.3
180-
k8s.io/kubectl => k8s.io/kubectl v0.30.3
181-
k8s.io/kubelet => k8s.io/kubelet v0.30.3
182-
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.3
183-
k8s.io/metrics => k8s.io/metrics v0.30.3
184-
k8s.io/mount-utils => k8s.io/mount-utils v0.30.3
185-
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.3
186-
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.3
187-
k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.30.3
188-
k8s.io/sample-controller => k8s.io/sample-controller v0.30.3
110+
sigs.k8s.io/yaml v1.3.0 // indirect
189111
)

0 commit comments

Comments
 (0)