Skip to content

Commit

Permalink
bump gcsfuse version to v2.0.0_beta.1-gke.0
Browse files Browse the repository at this point in the history
  • Loading branch information
songjiaxun committed Feb 17, 2024
1 parent 028a3d7 commit 357efb0
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 123 deletions.
2 changes: 1 addition & 1 deletion cmd/sidecar_mounter/gcsfuse_binary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
gs://gke-release-staging/gcsfuse/v2.0.0_beta.0-gke.0/gcsfuse_bin
gs://gke-release-staging/gcsfuse/v2.0.0_beta.1-gke.0/gcsfuse_bin
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
driver: gcsfuse.csi.storage.gke.io
volumeAttributes:
bucketName: {{ .Values.bucketName }}
mountOptions: implicit-dirs,stat-cache-ttl={{ .Values.gcsfuse.statCacheTtl }},type-cache-ttl={{ .Values.gcsfuse.typeCacheTtl }},stat-cache-capacity={{ .Values.gcsfuse.statCacheCapacity }},file-cache:max-size-in-mb:{{ .Values.gcsfuse.fileCacheMaxSizeInMb }},file-cache:cache-file-for-range-read:{{ .Values.gcsfuse.fileCacheForRangeRead }}
mountOptions: implicit-dirs,stat-cache-ttl={{ .Values.gcsfuse.statCacheTtl }},type-cache-ttl={{ .Values.gcsfuse.typeCacheTtl }},stat-cache-capacity={{ .Values.gcsfuse.statCacheCapacity }},file-cache:max-size-mb:{{ .Values.gcsfuse.fileCacheMaxSizeInMb }},file-cache:cache-file-for-range-read:{{ .Values.gcsfuse.fileCacheForRangeRead }}
{{- else }}
csi:
driver: gcsfuse.csi.storage.gke.io
Expand Down
2 changes: 1 addition & 1 deletion examples/fio/loading-test/templates/fio-tester.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ spec:
driver: gcsfuse.csi.storage.gke.io
volumeAttributes:
bucketName: {{ .Values.bucketName }}
mountOptions: implicit-dirs,{{- if and (ne .Values.fio.fileSize "100M") (ne .Values.fio.fileSize "200G") }}only-dir={{ .Values.fio.fileSize }},{{- end }}stat-cache-capacity={{ .Values.gcsfuse.statCacheCapacity }},metadata-cache:ttl-secs:{{ .Values.gcsfuse.metadataCacheTtlSecs }},file-cache:max-size-in-mb:{{ .Values.gcsfuse.fileCacheMaxSizeInMb }},file-cache:cache-file-for-range-read:{{ .Values.gcsfuse.fileCacheForRangeRead }}
mountOptions: implicit-dirs,{{- if and (ne .Values.fio.fileSize "100M") (ne .Values.fio.fileSize "200G") }}only-dir={{ .Values.fio.fileSize }},{{- end }}stat-cache-capacity={{ .Values.gcsfuse.statCacheCapacity }},metadata-cache:ttl-secs:{{ .Values.gcsfuse.metadataCacheTtlSecs }},file-cache:max-size-mb:{{ .Values.gcsfuse.fileCacheMaxSizeInMb }},file-cache:cache-file-for-range-read:{{ .Values.gcsfuse.fileCacheForRangeRead }}
{{- else }}
csi:
driver: gcsfuse.csi.storage.gke.io
Expand Down
101 changes: 0 additions & 101 deletions examples/jupyter/jupyter-experimental-readcache.yaml

This file was deleted.

7 changes: 3 additions & 4 deletions pkg/sidecar_mounter/sidecar_mounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,12 @@ var disallowedFlags = map[string]bool{
"logging:log-rotate:max-file-size-mb": true,
"logging:log-rotate:backup-file-count": true,
"logging:log-rotate:compress": true,
"cache-location": true,
"cache-dir": true,
"experimental-local-file-cache": true,
}

// TODO: move experimental-local-file-cache flag to disallowedFlags when the file cache feature is ready.
var boolFlags = map[string]bool{
"implicit-dirs": true,
"experimental-local-file-cache": true,
"enable-nonexistent-type-cache": true,
"debug_fuse_errors": true,
"debug_fuse": true,
Expand Down Expand Up @@ -201,7 +200,7 @@ func (mc *MountConfig) prepareMountArgs() (map[string]string, map[string]string)
configFileFlagMap := map[string]string{
"logging:file-path": "/dev/fd/1", // redirect the output to cmd stdout
"logging:format": "text",
"cache-location": mc.CacheDir,
"cache-dir": mc.CacheDir,
}

invalidArgs := []string{}
Expand Down
39 changes: 24 additions & 15 deletions pkg/sidecar_mounter/sidecar_mounter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,26 @@ var (
defaultConfigFileFlagMap = map[string]string{
"logging:file-path": "/dev/fd/1",
"logging:format": "text",
"cache-location": "test-cache-dir",
"cache-dir": "test-cache-dir",
}

invalidArgs = []string{
"temp-dir",
"config-file",
"foreground",
"log-file",
"log-format",
"key-file",
"token-url",
"reuse-token-from-url",
"o",
"logging:file-path:test",
"logging:format:test",
"logging:log-rotate:max-file-size-mb:test",
"logging:log-rotate:backup-file-count:test",
"logging:log-rotate:compress:test",
"key-file",
"token-url",
"reuse-token-from-url",
"o",
"cache-dir",
"experimental-local-file-cache",
}
)

Expand Down Expand Up @@ -103,7 +106,7 @@ func TestPrepareMountArgs(t *testing.T) {
"logging:format": "text",
"logging:severity": "error",
"write:create-empty-file": "true",
"cache-location": "test-cache-dir",
"cache-dir": "test-cache-dir",
},
},
{
Expand Down Expand Up @@ -191,13 +194,15 @@ func TestPrepareConfigFile(t *testing.T) {
ConfigFile: "./test-config-file.yaml",
},
configMapArgs: map[string]string{
"logging:file-path": "/dev/fd/1",
"logging:format": "text",
"logging:severity": "error",
"write:create-empty-file": "true",
"file-cache:max-size-in-mb": "10000",
"file-cache:cache-file-for-range-read": "true",
"cache-location": "/gcsfuse-cache/.volumes/volume-name",
"logging:file-path": "/dev/fd/1",
"logging:format": "text",
"logging:severity": "error",
"write:create-empty-file": "true",
"file-cache:max-size-mb": "10000",
"file-cache:cache-file-for-range-read": "true",
"metadata-cache:stat-cache-max-size-mb": "1000",
"metadata-cache:type-cache-max-size-mb": "-1",
"cache-dir": "/gcsfuse-cache/.volumes/volume-name",
},
expectedConfig: map[string]interface{}{
"logging": map[string]interface{}{
Expand All @@ -209,10 +214,14 @@ func TestPrepareConfigFile(t *testing.T) {
"create-empty-file": true,
},
"file-cache": map[string]interface{}{
"max-size-in-mb": 10000,
"max-size-mb": 10000,
"cache-file-for-range-read": true,
},
"cache-location": "/gcsfuse-cache/.volumes/volume-name",
"metadata-cache": map[string]interface{}{
"stat-cache-max-size-mb": 1000,
"type-cache-max-size-mb": -1,
},
"cache-dir": "/gcsfuse-cache/.volumes/volume-name",
},
},
{
Expand Down

0 comments on commit 357efb0

Please sign in to comment.