Compare commits

..
1 Commits
Author SHA1 Message Date
chrislu 4f15a52044 temp disable locking 2022-12-05 20:20:44 -08:00
546 changed files with 11552 additions and 30828 deletions

No files matched your search

+10 -10
View File
@@ -38,13 +38,13 @@ jobs:
steps: steps:
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- name: Set BUILD_TIME env - name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV} run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
- name: Go Release Binaries Large Disk - name: Go Release Binaries Large Disk
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -53,14 +53,14 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
build_flags: -tags 5BytesOffset # optional, default is build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed-large-disk binary_name: weed-large-disk
asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
- name: Go Release Binaries Normal Volume Size - name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -68,7 +68,7 @@ jobs:
release_tag: dev release_tag: dev
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed-normal-disk binary_name: weed-normal-disk
@@ -87,13 +87,13 @@ jobs:
steps: steps:
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- name: Set BUILD_TIME env - name: Set BUILD_TIME env
run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV} run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV}
- name: Go Release Binaries Large Disk - name: Go Release Binaries Large Disk
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -102,14 +102,14 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
build_flags: -tags 5BytesOffset # optional, default is build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed-large-disk binary_name: weed-large-disk
asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}"
- name: Go Release Binaries Normal Volume Size - name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -117,7 +117,7 @@ jobs:
release_tag: dev release_tag: dev
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed-normal-disk binary_name: weed-normal-disk
+5 -5
View File
@@ -28,9 +28,9 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- name: Go Release Binaries Normal Volume Size - name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -38,13 +38,13 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
# build_flags: -tags 5BytesOffset # optional, default is # build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}" asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
- name: Go Release Large Disk Binaries - name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -52,7 +52,7 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
build_flags: -tags 5BytesOffset # optional, default is build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
+5 -5
View File
@@ -28,9 +28,9 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- name: Go Release Binaries Normal Volume Size - name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -38,13 +38,13 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
# build_flags: -tags 5BytesOffset # optional, default is # build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}" asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
- name: Go Release Large Disk Binaries - name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -52,7 +52,7 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
build_flags: -tags 5BytesOffset # optional, default is build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
+5 -5
View File
@@ -28,9 +28,9 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- name: Go Release Binaries Normal Volume Size - name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -38,13 +38,13 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
# build_flags: -tags 5BytesOffset # optional, default is # build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}" asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
- name: Go Release Large Disk Binaries - name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -52,7 +52,7 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
build_flags: -tags 5BytesOffset # optional, default is build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
+5 -5
View File
@@ -28,9 +28,9 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- name: Go Release Binaries Normal Volume Size - name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -38,13 +38,13 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
# build_flags: -tags 5BytesOffset # optional, default is # build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}" asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}"
- name: Go Release Large Disk Binaries - name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
@@ -52,7 +52,7 @@ jobs:
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
build_flags: -tags 5BytesOffset # optional, default is build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
+7 -7
View File
@@ -28,32 +28,32 @@ jobs:
# Steps represent a sequence of tasks that will be executed as part of the job # Steps represent a sequence of tasks that will be executed as part of the job
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- name: Go Release Binaries Normal Volume Size - name: Go Release Binaries Normal Volume Size
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }} goarch: ${{ matrix.goarch }}
overwrite: true overwrite: true
build_flags: -tags elastic,gocdk,sqlite,ydb,tikv,rclone build_flags: -tags elastic,ydb,gocdk,tikv
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
# build_flags: -tags 5BytesOffset # optional, default is # build_flags: -tags 5BytesOffset # optional, default is
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_full" asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}_full"
- name: Go Release Large Disk Binaries - name: Go Release Large Disk Binaries
uses: wangyoucao577/go-release-action@b173bce0484dc9f34c585181e5db16bd8756a21e # v1.22 uses: wangyoucao577/go-release-action@90da8ebfdc010a0e7d378419a76fd90230a05228 # v1.22
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }} goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }} goarch: ${{ matrix.goarch }}
overwrite: true overwrite: true
pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0 pre_command: export CGO_ENABLED=0 && export GODEBUG=http2client=0
build_flags: -tags 5BytesOffset,elastic,gocdk,sqlite,ydb,tikv,rclone build_flags: -tags 5BytesOffset,elastic,ydb,gocdk,tikv
ldflags: -s -w -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}} ldflags: -extldflags -static -X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=${{github.sha}}
# Where to run `go build .` # Where to run `go build .`
project_path: weed project_path: weed
binary_name: weed binary_name: weed
+4 -4
View File
@@ -18,11 +18,11 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v3 uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages # Override language selection by uncommenting this and choosing your languages
with: with:
languages: go languages: go
@@ -30,7 +30,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below). # If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v3 uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell. # ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -44,4 +44,4 @@ jobs:
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3 uses: github/codeql-action/analyze@v2
+7 -7
View File
@@ -16,11 +16,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v3 uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
with: with:
images: | images: |
chrislusf/seaweedfs chrislusf/seaweedfs
@@ -33,30 +33,30 @@ jobs:
org.opencontainers.image.vendor=Chris Lu org.opencontainers.image.vendor=Chris Lu
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v1 uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v1 uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
with: with:
buildkitd-flags: "--debug" buildkitd-flags: "--debug"
- -
name: Login to Docker Hub name: Login to Docker Hub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v1 uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- -
name: Login to GHCR name: Login to GHCR
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v1 uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }} username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }} password: ${{ secrets.GHCR_TOKEN }}
- -
name: Build name: Build
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v2 uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
with: with:
context: ./docker context: ./docker
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
+7 -7
View File
@@ -17,11 +17,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v3 uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
with: with:
images: | images: |
chrislusf/seaweedfs chrislusf/seaweedfs
@@ -34,30 +34,30 @@ jobs:
org.opencontainers.image.vendor=Chris Lu org.opencontainers.image.vendor=Chris Lu
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v1 uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v1 uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
with: with:
buildkitd-flags: "--debug" buildkitd-flags: "--debug"
- -
name: Login to Docker Hub name: Login to Docker Hub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v1 uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- -
name: Login to GHCR name: Login to GHCR
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v1 uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }} username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }} password: ${{ secrets.GHCR_TOKEN }}
- -
name: Build name: Build
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v2 uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
with: with:
context: ./docker context: ./docker
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
+6 -6
View File
@@ -16,11 +16,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v3 uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
with: with:
images: | images: |
chrislusf/seaweedfs chrislusf/seaweedfs
@@ -34,20 +34,20 @@ jobs:
org.opencontainers.image.vendor=Chris Lu org.opencontainers.image.vendor=Chris Lu
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v1 uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v1 uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
- -
name: Login to Docker Hub name: Login to Docker Hub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v1 uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- -
name: Build name: Build
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v2 uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
with: with:
context: ./docker context: ./docker
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
+6 -6
View File
@@ -17,11 +17,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v3 uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
with: with:
images: | images: |
chrislusf/seaweedfs chrislusf/seaweedfs
@@ -35,20 +35,20 @@ jobs:
org.opencontainers.image.vendor=Chris Lu org.opencontainers.image.vendor=Chris Lu
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v1 uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v1 uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
- -
name: Login to Docker Hub name: Login to Docker Hub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v1 uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- -
name: Build name: Build
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v2 uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
with: with:
context: ./docker context: ./docker
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
+6 -6
View File
@@ -17,11 +17,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v3 uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
with: with:
images: | images: |
chrislusf/seaweedfs chrislusf/seaweedfs
@@ -35,20 +35,20 @@ jobs:
org.opencontainers.image.vendor=Chris Lu org.opencontainers.image.vendor=Chris Lu
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v1 uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v1 uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
- -
name: Login to Docker Hub name: Login to Docker Hub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v1 uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- -
name: Build name: Build
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v2 uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
with: with:
context: ./docker context: ./docker
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
+7 -7
View File
@@ -16,11 +16,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v3 uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
with: with:
images: | images: |
chrislusf/seaweedfs chrislusf/seaweedfs
@@ -34,25 +34,25 @@ jobs:
org.opencontainers.image.vendor=Chris Lu org.opencontainers.image.vendor=Chris Lu
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v1 uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v1 uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
- -
name: Login to Docker Hub name: Login to Docker Hub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v1 uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- -
name: Build name: Build
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v2 uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
with: with:
context: ./docker context: ./docker
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
file: ./docker/Dockerfile.go_build file: ./docker/Dockerfile.go_build
build-args: TAGS=elastic,ydb,gocdk,tikv,rclone build-args: TAGS=elastic,ydb,gocdk,tikv
platforms: linux/amd64 platforms: linux/amd64
tags: ${{ steps.docker_meta.outputs.tags }} tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }} labels: ${{ steps.docker_meta.outputs.labels }}
+7 -7
View File
@@ -16,11 +16,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v3 uses: docker/metadata-action@57396166ad8aefe6098280995947635806a0e6ea # v3
with: with:
images: | images: |
chrislusf/seaweedfs chrislusf/seaweedfs
@@ -34,25 +34,25 @@ jobs:
org.opencontainers.image.vendor=Chris Lu org.opencontainers.image.vendor=Chris Lu
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v1 uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v1
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v1 uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v1
- -
name: Login to Docker Hub name: Login to Docker Hub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v1 uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v1
with: with:
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- -
name: Build name: Build
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v2 uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # v2
with: with:
context: ./docker context: ./docker
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
file: ./docker/Dockerfile.go_build file: ./docker/Dockerfile.go_build
build-args: TAGS=5BytesOffset,elastic,ydb,gocdk,tikv,rclone build-args: TAGS=5BytesOffset,elastic,ydb,gocdk,tikv
platforms: linux/amd64 platforms: linux/amd64
tags: ${{ steps.docker_meta.outputs.tags }} tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }} labels: ${{ steps.docker_meta.outputs.labels }}
+2 -2
View File
@@ -9,6 +9,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 'Checkout Repository' - name: 'Checkout Repository'
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: 'Dependency Review' - name: 'Dependency Review'
uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b uses: actions/dependency-review-action@11310527b429536e263dc6cc47873e608189ba21
+18 -33
View File
@@ -21,16 +21,16 @@ jobs:
e2e: e2e:
name: FUSE Mount name: FUSE Mount
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
timeout-minutes: 30 timeout-minutes: 15
steps: steps:
- name: Set up Go 1.x - name: Set up Go 1.x
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v2 uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v2
with: with:
go-version: ^1.13 go-version: ^1.13
id: go id: go
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- name: Install dependencies - name: Install dependencies
run: | run: |
@@ -41,44 +41,29 @@ jobs:
timeout-minutes: 5 timeout-minutes: 5
run: make build_e2e && docker compose -f ./compose/e2e-mount.yml up --wait run: make build_e2e && docker compose -f ./compose/e2e-mount.yml up --wait
- name: Run FIO 4k - name: Run FIO
timeout-minutes: 15 timeout-minutes: 5
run: | run: |
echo "Starting FIO at: $(date)" echo "Starting FIO at: $(date)"
# Concurrent r/w # Concurrent r/w
echo 'Run randrw with size=16M bs=4k' echo 'Run randrw with size=16M bs=4k'
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 60 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randrw --bs=4k --direct=1 --numjobs=8 --ioengine=libaio --group_reporting --runtime=30 --time_based=1 docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randrw --bs=4k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1
echo "Verify FIO at: $(date)" echo 'Run randrw with size=16M bs=128k'
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randrw --bs=128k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1
echo 'Run randrw with size=16M bs=1m'
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randrw --bs=1m --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1
# Verified write # Verified write
echo 'Run randwrite with size=16M bs=4k' echo 'Run randwrite with size=16M bs=4k'
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 60 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randwrite --bs=4k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1 --do_verify=0 --verify=crc32c --verify_backlog=1 docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randwrite --bs=4k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1 --do_verify=0 --verify=crc32c --verify_backlog=1
- name: Run FIO 128k
timeout-minutes: 15
run: |
echo "Starting FIO at: $(date)"
# Concurrent r/w
echo 'Run randrw with size=16M bs=128k'
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 60 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randrw --bs=128k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1
echo "Verify FIO at: $(date)"
# Verified write
echo 'Run randwrite with size=16M bs=128k' echo 'Run randwrite with size=16M bs=128k'
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 60 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randwrite --bs=128k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1 --do_verify=0 --verify=crc32c --verify_backlog=1 docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randwrite --bs=128k --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1 --do_verify=0 --verify=crc32c --verify_backlog=1
- name: Run FIO 1MB
timeout-minutes: 15
run: |
echo "Starting FIO at: $(date)"
# Concurrent r/w
echo 'Run randrw with size=16M bs=1m'
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 60 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randrw --bs=1m --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1
echo "Verify FIO at: $(date)"
# Verified write
echo 'Run randwrite with size=16M bs=1m' echo 'Run randwrite with size=16M bs=1m'
docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 60 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randwrite --bs=1m --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1 --do_verify=0 --verify=crc32c --verify_backlog=1 docker compose -f ./compose/e2e-mount.yml exec mount timeout -k5 40 fio --name=fiotest --filename=/mnt/seaweedfs/fiotest --size=16M --rw=randwrite --bs=1m --direct=1 --numjobs=8 --ioengine=libaio --iodepth=32 --group_reporting --runtime=30 --time_based=1 --do_verify=0 --verify=crc32c --verify_backlog=1
- name: Save logs - name: Save logs
if: always() if: always()
@@ -94,7 +79,7 @@ jobs:
- name: Archive logs - name: Archive logs
if: always() if: always()
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v3
with: with:
name: output-logs name: output-logs
path: docker/output.log path: docker/output.log
+4 -4
View File
@@ -21,20 +21,20 @@ jobs:
steps: steps:
- name: Set up Go 1.x - name: Set up Go 1.x
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v2 uses: actions/setup-go@d0a58c1c4d2b25278816e339b944508c875f3613 # v2
with: with:
go-version: ^1.13 go-version: ^1.13
id: go id: go
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v2 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v2
- name: Get dependencies - name: Get dependencies
run: | run: |
cd weed; go get -v -t -d ./... cd weed; go get -v -t -d ./...
- name: Build - name: Build
run: cd weed; go build -tags "elastic gocdk sqlite ydb tikv rclone" -v . run: cd weed; go build -tags "elastic gocdk sqlite ydb tikv" -v .
- name: Test - name: Test
run: cd weed; go test -tags "elastic gocdk sqlite ydb tikv rclone" -v ./... run: cd weed; go test -tags "elastic gocdk sqlite ydb tikv" -v ./...
-22
View File
@@ -1,22 +0,0 @@
name: "helm: publish charts"
on:
push:
tags:
- '*'
permissions:
contents: write
pages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
- name: Publish Helm charts
uses: stefanprodan/helm-gh-pages@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
charts_dir: k8s/charts
target_dir: helm
branch: gh-pages
-51
View File
@@ -1,51 +0,0 @@
name: "helm: lint and test charts"
on:
push:
branches: [ master ]
paths: ['k8s/**']
pull_request:
branches: [ master ]
paths: ['k8s/**']
permissions:
contents: read
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.10.0
- uses: actions/setup-python@v5
with:
python-version: '3.9'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --chart-dirs k8s/charts)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --target-branch ${{ github.event.repository.default_branch }} --all --validate-maintainers=false --chart-dirs k8s/charts
- name: Create kind cluster
uses: helm/kind-action@v1.9.0
- name: Run chart-testing (install)
run: ct install --target-branch ${{ github.event.repository.default_branch }} --all --chart-dirs k8s/charts
-197
View File
@@ -1,197 +0,0 @@
name: "Ceph S3 tests"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.head_ref }}/s3tests
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
working-directory: docker
jobs:
s3tests:
name: Ceph S3 tests
runs-on: ubuntu-22.04
container:
image: docker.io/kmlebedev/ceph-s3-tests:0.0.2
timeout-minutes: 30
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
id: go
- name: Run Ceph S3 tests
timeout-minutes: 15
env:
S3TEST_CONF: /__w/seaweedfs/seaweedfs/docker/compose/s3tests.conf
shell: bash
run: |
cd /__w/seaweedfs/seaweedfs/weed
go install -buildvcs=false
set -x
nohup weed -v 0 server -filer -filer.maxMB=64 -s3 -ip.bind 0.0.0.0 \
-master.raftHashicorp -master.electionTimeout 1s -master.volumeSizeLimitMB=1024 \
-volume.max=100 -volume.preStopSeconds=1 -s3.port=8000 -metricsPort=9324 \
-s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=true -s3.config=../docker/compose/s3.json &
sleep 10
cd /s3-tests
tox -- \
s3tests_boto3/functional/test_s3.py::test_bucket_list_empty \
s3tests_boto3/functional/test_s3.py::test_bucket_list_distinct \
s3tests_boto3/functional/test_s3.py::test_bucket_list_many \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_many \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_prefix \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_prefix_ends_with_delimiter \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_alt \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_prefix_underscore \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_percentage \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_whitespace \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_dot \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_unreadable \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_empty \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_none \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_delimiter_not_exist \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_delimiter_basic \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_basic \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_delimiter_alt \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_alt \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_delimiter_prefix_not_exist \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_prefix_not_exist \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_delimiter_delimiter_not_exist \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_delimiter_not_exist \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_delimiter_prefix_delimiter_not_exist \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_delimiter_prefix_delimiter_not_exist \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_fetchowner_notempty \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_basic \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_basic \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_alt \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_alt \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_empty \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_empty \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_none \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_none \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_not_exist \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_not_exist \
s3tests_boto3/functional/test_s3.py::test_bucket_list_prefix_unreadable \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_prefix_unreadable \
s3tests_boto3/functional/test_s3.py::test_bucket_list_maxkeys_one \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_maxkeys_one \
s3tests_boto3/functional/test_s3.py::test_bucket_list_maxkeys_zero \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_maxkeys_zero \
s3tests_boto3/functional/test_s3.py::test_bucket_list_marker_none \
s3tests_boto3/functional/test_s3.py::test_bucket_list_marker_empty \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_continuationtoken \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_both_continuationtoken_startafter \
s3tests_boto3/functional/test_s3.py::test_bucket_list_marker_unreadable \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_startafter_unreadable \
s3tests_boto3/functional/test_s3.py::test_bucket_list_marker_not_in_list \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_startafter_not_in_list \
s3tests_boto3/functional/test_s3.py::test_bucket_list_marker_after_list \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_startafter_after_list \
s3tests_boto3/functional/test_s3.py::test_bucket_list_objects_anonymous_fail \
s3tests_boto3/functional/test_s3.py::test_bucket_listv2_objects_anonymous_fail \
s3tests_boto3/functional/test_s3.py::test_bucket_list_long_name \
s3tests_boto3/functional/test_s3.py::test_bucket_list_special_prefix \
s3tests_boto3/functional/test_s3.py::test_bucket_delete_notexist \
s3tests_boto3/functional/test_s3.py::test_bucket_create_delete \
s3tests_boto3/functional/test_s3.py::test_object_read_not_exist \
s3tests_boto3/functional/test_s3.py::test_multi_object_delete \
s3tests_boto3/functional/test_s3.py::test_multi_objectv2_delete \
s3tests_boto3/functional/test_s3.py::test_object_head_zero_bytes \
s3tests_boto3/functional/test_s3.py::test_object_write_check_etag \
s3tests_boto3/functional/test_s3.py::test_object_write_cache_control \
s3tests_boto3/functional/test_s3.py::test_object_write_expires \
s3tests_boto3/functional/test_s3.py::test_object_write_read_update_read_delete \
s3tests_boto3/functional/test_s3.py::test_object_metadata_replaced_on_put \
s3tests_boto3/functional/test_s3.py::test_object_write_file \
s3tests_boto3/functional/test_s3.py::test_post_object_invalid_date_format \
s3tests_boto3/functional/test_s3.py::test_post_object_no_key_specified \
s3tests_boto3/functional/test_s3.py::test_post_object_missing_signature \
s3tests_boto3/functional/test_s3.py::test_post_object_condition_is_case_sensitive \
s3tests_boto3/functional/test_s3.py::test_post_object_expires_is_case_sensitive \
s3tests_boto3/functional/test_s3.py::test_post_object_missing_expires_condition \
s3tests_boto3/functional/test_s3.py::test_post_object_missing_conditions_list \
s3tests_boto3/functional/test_s3.py::test_post_object_upload_size_limit_exceeded \
s3tests_boto3/functional/test_s3.py::test_post_object_missing_content_length_argument \
s3tests_boto3/functional/test_s3.py::test_post_object_invalid_content_length_argument \
s3tests_boto3/functional/test_s3.py::test_post_object_upload_size_below_minimum \
s3tests_boto3/functional/test_s3.py::test_post_object_empty_conditions \
s3tests_boto3/functional/test_s3.py::test_get_object_ifmatch_good \
s3tests_boto3/functional/test_s3.py::test_get_object_ifnonematch_good \
s3tests_boto3/functional/test_s3.py::test_get_object_ifmatch_failed \
s3tests_boto3/functional/test_s3.py::test_get_object_ifnonematch_failed \
s3tests_boto3/functional/test_s3.py::test_get_object_ifmodifiedsince_good \
s3tests_boto3/functional/test_s3.py::test_get_object_ifmodifiedsince_failed \
s3tests_boto3/functional/test_s3.py::test_get_object_ifunmodifiedsince_failed \
s3tests_boto3/functional/test_s3.py::test_bucket_head \
s3tests_boto3/functional/test_s3.py::test_bucket_head_notexist \
s3tests_boto3/functional/test_s3.py::test_object_raw_authenticated \
s3tests_boto3/functional/test_s3.py::test_object_raw_authenticated_bucket_acl \
s3tests_boto3/functional/test_s3.py::test_object_raw_authenticated_object_acl \
s3tests_boto3/functional/test_s3.py::test_object_raw_authenticated_object_gone \
s3tests_boto3/functional/test_s3.py::test_object_raw_get_x_amz_expires_out_range_zero \
s3tests_boto3/functional/test_s3.py::test_object_anon_put \
s3tests_boto3/functional/test_s3.py::test_object_put_authenticated \
s3tests_boto3/functional/test_s3.py::test_bucket_recreate_overwrite_acl \
s3tests_boto3/functional/test_s3.py::test_bucket_recreate_new_acl \
s3tests_boto3/functional/test_s3.py::test_buckets_create_then_list \
s3tests_boto3/functional/test_s3.py::test_buckets_list_ctime \
s3tests_boto3/functional/test_s3.py::test_list_buckets_invalid_auth \
s3tests_boto3/functional/test_s3.py::test_list_buckets_bad_auth \
s3tests_boto3/functional/test_s3.py::test_bucket_create_naming_good_contains_period \
s3tests_boto3/functional/test_s3.py::test_bucket_create_naming_good_contains_hyphen \
s3tests_boto3/functional/test_s3.py::test_bucket_list_special_prefix \
s3tests_boto3/functional/test_s3.py::test_object_copy_zero_size \
s3tests_boto3/functional/test_s3.py::test_object_copy_same_bucket \
s3tests_boto3/functional/test_s3.py::test_object_copy_to_itself \
s3tests_boto3/functional/test_s3.py::test_object_copy_diff_bucket \
s3tests_boto3/functional/test_s3.py::test_object_copy_canned_acl \
s3tests_boto3/functional/test_s3.py::test_object_copy_bucket_not_found \
s3tests_boto3/functional/test_s3.py::test_object_copy_key_not_found \
s3tests_boto3/functional/test_s3.py::test_multipart_copy_small \
s3tests_boto3/functional/test_s3.py::test_multipart_copy_without_range \
s3tests_boto3/functional/test_s3.py::test_multipart_copy_special_names \
s3tests_boto3/functional/test_s3.py::test_multipart_copy_multiple_sizes \
s3tests_boto3/functional/test_s3.py::test_multipart_get_part \
s3tests_boto3/functional/test_s3.py::test_multipart_upload \
s3tests_boto3/functional/test_s3.py::test_multipart_upload_empty \
s3tests_boto3/functional/test_s3.py::test_multipart_upload_multiple_sizes \
s3tests_boto3/functional/test_s3.py::test_multipart_upload_contents \
s3tests_boto3/functional/test_s3.py::test_multipart_upload_overwrite_existing_object \
s3tests_boto3/functional/test_s3.py::test_multipart_upload_size_too_small \
s3tests_boto3/functional/test_s3.py::test_multipart_resend_first_finishes_last \
s3tests_boto3/functional/test_s3.py::test_multipart_upload_resend_part \
s3tests_boto3/functional/test_s3.py::test_multipart_upload_missing_part \
s3tests_boto3/functional/test_s3.py::test_multipart_upload_incorrect_etag \
s3tests_boto3/functional/test_s3.py::test_abort_multipart_upload \
s3tests_boto3/functional/test_s3.py::test_list_multipart_upload \
s3tests_boto3/functional/test_s3.py::test_atomic_read_1mb \
s3tests_boto3/functional/test_s3.py::test_atomic_read_4mb \
s3tests_boto3/functional/test_s3.py::test_atomic_read_8mb \
s3tests_boto3/functional/test_s3.py::test_atomic_write_1mb \
s3tests_boto3/functional/test_s3.py::test_atomic_write_4mb \
s3tests_boto3/functional/test_s3.py::test_atomic_write_8mb \
s3tests_boto3/functional/test_s3.py::test_atomic_dual_write_1mb \
s3tests_boto3/functional/test_s3.py::test_atomic_dual_write_4mb \
s3tests_boto3/functional/test_s3.py::test_atomic_dual_write_8mb \
s3tests_boto3/functional/test_s3.py::test_atomic_multipart_upload_write \
s3tests_boto3/functional/test_s3.py::test_ranged_request_response_code \
s3tests_boto3/functional/test_s3.py::test_ranged_big_request_response_code \
s3tests_boto3/functional/test_s3.py::test_ranged_request_skip_leading_bytes_response_code \
s3tests_boto3/functional/test_s3.py::test_ranged_request_return_trailing_bytes_response_code \
s3tests_boto3/functional/test_s3.py::test_copy_object_ifmatch_good \
s3tests_boto3/functional/test_s3.py::test_copy_object_ifnonematch_failed
-7
View File
@@ -87,10 +87,3 @@ other/java/hdfs/dependency-reduced-pom.xml
# binary file # binary file
weed/weed weed/weed
weed/mq/client/cmd/weed_pub/weed_pub
docker/weed
# test generated files
weed/*/*.jpg
docker/weed_sub
docker/weed_pub
-74
View File
@@ -1,74 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at <enteremailhere>. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
+3 -24
View File
@@ -1,35 +1,14 @@
BINARY = weed BINARY = weed
SOURCE_DIR = . SOURCE_DIR = .
debug ?= 0
all: install all: install
install: install:
cd weed; go install cd weed; go install
warp_install:
go install github.com/minio/warp@v0.7.6
full_install: full_install:
cd weed; go install -tags "elastic gocdk sqlite ydb tikv rclone" cd weed; go install -tags "elastic gocdk sqlite ydb tikv"
server: install tests:
weed -v 0 server -s3 -filer -filer.maxMB=64 -volume.max=0 -master.volumeSizeLimitMB=1024 -volume.preStopSeconds=1 -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=true -s3.config=./docker/compose/s3.json -metricsPort=9324 cd weed; go test -tags "elastic gocdk sqlite ydb tikv" -v ./...
benchmark: install warp_install
pkill weed || true
pkill warp || true
weed server -debug=$(debug) -s3 -filer -volume.max=0 -master.volumeSizeLimitMB=1024 -volume.preStopSeconds=1 -s3.port=8000 -s3.allowEmptyFolder=false -s3.allowDeleteBucketNotEmpty=false -s3.config=./docker/compose/s3.json &
warp client &
while ! nc -z localhost 8000 ; do sleep 1 ; done
warp mixed --host=127.0.0.1:8000 --access-key=some_access_key1 --secret-key=some_secret_key1 --autoterm
pkill warp
pkill weed
# curl -o profile "http://127.0.0.1:6060/debug/pprof/profile?debug=1"
benchmark_with_pprof: debug = 1
benchmark_with_pprof: benchmark
test:
cd weed; go test -tags "elastic gocdk sqlite ydb tikv rclone" -v ./...
+8 -74
View File
@@ -3,12 +3,12 @@
[![Slack](https://img.shields.io/badge/slack-purple)](https://join.slack.com/t/seaweedfs/shared_invite/enQtMzI4MTMwMjU2MzA3LTEyYzZmZWYzOGQ3MDJlZWMzYmI0OTE4OTJiZjJjODBmMzUxNmYwODg0YjY3MTNlMjBmZDQ1NzQ5NDJhZWI2ZmY) [![Slack](https://img.shields.io/badge/slack-purple)](https://join.slack.com/t/seaweedfs/shared_invite/enQtMzI4MTMwMjU2MzA3LTEyYzZmZWYzOGQ3MDJlZWMzYmI0OTE4OTJiZjJjODBmMzUxNmYwODg0YjY3MTNlMjBmZDQ1NzQ5NDJhZWI2ZmY)
[![Twitter](https://img.shields.io/twitter/follow/seaweedfs.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=seaweedfs) [![Twitter](https://img.shields.io/twitter/follow/seaweedfs.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=seaweedfs)
[![Build Status](https://img.shields.io/github/actions/workflow/status/seaweedfs/seaweedfs/go.yml)](https://github.com/seaweedfs/seaweedfs/actions/workflows/go.yml) [![Build Status](https://img.shields.io/github/workflow/status/chrislusf/seaweedfs/Go)](https://github.com/seaweedfs/seaweedfs/actions/workflows/go.yml)
[![GoDoc](https://godoc.org/github.com/seaweedfs/seaweedfs/weed?status.svg)](https://godoc.org/github.com/seaweedfs/seaweedfs/weed) [![GoDoc](https://godoc.org/github.com/seaweedfs/seaweedfs/weed?status.svg)](https://godoc.org/github.com/seaweedfs/seaweedfs/weed)
[![Wiki](https://img.shields.io/badge/docs-wiki-blue.svg)](https://github.com/seaweedfs/seaweedfs/wiki) [![Wiki](https://img.shields.io/badge/docs-wiki-blue.svg)](https://github.com/seaweedfs/seaweedfs/wiki)
[![Docker Pulls](https://img.shields.io/docker/pulls/chrislusf/seaweedfs?maxAge=4800)](https://hub.docker.com/r/chrislusf/seaweedfs/) [![Docker Pulls](https://img.shields.io/docker/pulls/chrislusf/seaweedfs?maxAge=4800)](https://hub.docker.com/r/chrislusf/seaweedfs/)
[![SeaweedFS on Maven Central](https://img.shields.io/maven-central/v/com.github.chrislusf/seaweedfs-client)](https://search.maven.org/search?q=g:com.github.chrislusf) [![SeaweedFS on Maven Central](https://img.shields.io/maven-central/v/com.github.chrislusf/seaweedfs-client)](https://search.maven.org/search?q=g:com.github.chrislusf)
[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/seaweedfs)](https://artifacthub.io/packages/search?repo=seaweedfs)
![SeaweedFS Logo](https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/note/seaweedfs.png) ![SeaweedFS Logo](https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/note/seaweedfs.png)
@@ -32,7 +32,7 @@ Your support will be really appreciated by me and other supporters!
--> -->
### Gold Sponsors ### Gold Sponsors
[![nodion](https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/note/sponsor_nodion.png)](https://www.nodion.com) [![nodion](https://www.nodion.com/img/logo.svg)](https://www.nodion.com)
[![piknik](https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/note/piknik.png)](https://www.piknik.com) [![piknik](https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/note/piknik.png)](https://www.piknik.com)
--- ---
@@ -66,7 +66,6 @@ Table of Contents
* [Compared to GlusterFS, Ceph](#compared-to-glusterfs-ceph) * [Compared to GlusterFS, Ceph](#compared-to-glusterfs-ceph)
* [Compared to GlusterFS](#compared-to-glusterfs) * [Compared to GlusterFS](#compared-to-glusterfs)
* [Compared to Ceph](#compared-to-ceph) * [Compared to Ceph](#compared-to-ceph)
* [Compared to Minio](#compared-to-minio)
* [Dev Plan](#dev-plan) * [Dev Plan](#dev-plan)
* [Installation Guide](#installation-guide) * [Installation Guide](#installation-guide)
* [Disk Related Topics](#disk-related-topics) * [Disk Related Topics](#disk-related-topics)
@@ -80,7 +79,7 @@ Table of Contents
`docker run -p 8333:8333 chrislusf/seaweedfs server -s3` `docker run -p 8333:8333 chrislusf/seaweedfs server -s3`
## Quick Start with Single Binary ## ## Quick Start with Single Binary ##
* Download the latest binary from https://github.com/seaweedfs/seaweedfs/releases and unzip a single binary file `weed` or `weed.exe`. Or run `go install github.com/seaweedfs/seaweedfs/weed@latest`. * Download the latest binary from https://github.com/seaweedfs/seaweedfs/releases and unzip a single binary file `weed` or `weed.exe`
* Run `weed server -dir=/some/data/dir -s3` to start one master, one volume server, one filer, and one S3 gateway. * Run `weed server -dir=/some/data/dir -s3` to start one master, one volume server, one filer, and one S3 gateway.
Also, to increase capacity, just add more volume servers by running `weed volume -dir="/some/data/dir2" -mserver="<master_host>:9333" -port=8081` locally, or on a different machine, or on thousands of machines. That is it! Also, to increase capacity, just add more volume servers by running `weed volume -dir="/some/data/dir2" -mserver="<master_host>:9333" -port=8081` locally, or on a different machine, or on thousands of machines. That is it!
@@ -121,7 +120,7 @@ SeaweedFS can transparently integrate with the cloud.
With hot data on local cluster, and warm data on the cloud with O(1) access time, With hot data on local cluster, and warm data on the cloud with O(1) access time,
SeaweedFS can achieve both fast local access time and elastic cloud storage capacity. SeaweedFS can achieve both fast local access time and elastic cloud storage capacity.
What's more, the cloud storage access API cost is minimized. What's more, the cloud storage access API cost is minimized.
Faster and cheaper than direct cloud storage! Faster and Cheaper than direct cloud storage!
[Back to TOC](#table-of-contents) [Back to TOC](#table-of-contents)
@@ -132,7 +131,7 @@ Faster and cheaper than direct cloud storage!
* Automatic Gzip compression depending on file MIME type. * Automatic Gzip compression depending on file MIME type.
* Automatic compaction to reclaim disk space after deletion or update. * Automatic compaction to reclaim disk space after deletion or update.
* [Automatic entry TTL expiration][VolumeServerTTL]. * [Automatic entry TTL expiration][VolumeServerTTL].
* Any server with some disk space can add to the total storage space. * Any server with some disk spaces can add to the total storage space.
* Adding/Removing servers does **not** cause any data re-balancing unless triggered by admin commands. * Adding/Removing servers does **not** cause any data re-balancing unless triggered by admin commands.
* Optional picture resizing. * Optional picture resizing.
* Support ETag, Accept-Range, Last-Modified, etc. * Support ETag, Accept-Range, Last-Modified, etc.
@@ -145,7 +144,7 @@ Faster and cheaper than direct cloud storage!
[Back to TOC](#table-of-contents) [Back to TOC](#table-of-contents)
## Filer Features ## ## Filer Features ##
* [Filer server][Filer] provides "normal" directories and files via HTTP. * [Filer server][Filer] provides "normal" directories and files via http.
* [File TTL][FilerTTL] automatically expires file metadata and actual file data. * [File TTL][FilerTTL] automatically expires file metadata and actual file data.
* [Mount filer][Mount] reads and writes files directly as a local directory via FUSE. * [Mount filer][Mount] reads and writes files directly as a local directory via FUSE.
* [Filer Store Replication][FilerStoreReplication] enables HA for filer meta data stores. * [Filer Store Replication][FilerStoreReplication] enables HA for filer meta data stores.
@@ -374,7 +373,7 @@ Each individual file size is limited to the volume size.
### Saving memory ### ### Saving memory ###
All file meta information stored on a volume server is readable from memory without disk access. Each file takes just a 16-byte map entry of <64bit key, 32bit offset, 32bit size>. Of course, each map entry has its own space cost for the map. But usually the disk space runs out before the memory does. All file meta information stored on an volume server is readable from memory without disk access. Each file takes just a 16-byte map entry of <64bit key, 32bit offset, 32bit size>. Of course, each map entry has its own space cost for the map. But usually the disk space runs out before the memory does.
### Tiered Storage to the cloud ### ### Tiered Storage to the cloud ###
@@ -582,71 +581,6 @@ Percentage of the requests served within a certain time (ms)
100% 54.1 ms 100% 54.1 ms
``` ```
### Run WARP and launch a mixed benchmark. ###
```
make benchmark
warp: Benchmark data written to "warp-mixed-2023-10-16[102354]-l70a.csv.zst"
Mixed operations.
Operation: DELETE, 10%, Concurrency: 20, Ran 4m59s.
* Throughput: 6.19 obj/s
Operation: GET, 45%, Concurrency: 20, Ran 5m0s.
* Throughput: 279.85 MiB/s, 27.99 obj/s
Operation: PUT, 15%, Concurrency: 20, Ran 5m0s.
* Throughput: 89.86 MiB/s, 8.99 obj/s
Operation: STAT, 30%, Concurrency: 20, Ran 5m0s.
* Throughput: 18.63 obj/s
Cluster Total: 369.74 MiB/s, 61.79 obj/s, 0 errors over 5m0s.
```
To see segmented request statistics, use the --analyze.v parameter.
```
warp analyze --analyze.v warp-mixed-2023-10-16[102354]-l70a.csv.zst
18642 operations loaded... Done!
Mixed operations.
----------------------------------------
Operation: DELETE - total: 1854, 10.0%, Concurrency: 20, Ran 5m0s, starting 2023-10-16 10:23:57.115 +0500 +05
* Throughput: 6.19 obj/s
Requests considered: 1855:
* Avg: 104ms, 50%: 30ms, 90%: 207ms, 99%: 1.355s, Fastest: 1ms, Slowest: 4.613s, StdDev: 320ms
----------------------------------------
Operation: GET - total: 8388, 45.3%, Size: 10485760 bytes. Concurrency: 20, Ran 5m0s, starting 2023-10-16 10:23:57.12 +0500 +05
* Throughput: 279.77 MiB/s, 27.98 obj/s
Requests considered: 8389:
* Avg: 221ms, 50%: 106ms, 90%: 492ms, 99%: 1.739s, Fastest: 8ms, Slowest: 8.633s, StdDev: 383ms
* TTFB: Avg: 81ms, Best: 2ms, 25th: 24ms, Median: 39ms, 75th: 65ms, 90th: 171ms, 99th: 669ms, Worst: 4.783s StdDev: 163ms
* First Access: Avg: 240ms, 50%: 105ms, 90%: 511ms, 99%: 2.08s, Fastest: 12ms, Slowest: 8.633s, StdDev: 480ms
* First Access TTFB: Avg: 88ms, Best: 2ms, 25th: 24ms, Median: 38ms, 75th: 64ms, 90th: 179ms, 99th: 919ms, Worst: 4.783s StdDev: 199ms
* Last Access: Avg: 219ms, 50%: 106ms, 90%: 463ms, 99%: 1.782s, Fastest: 9ms, Slowest: 8.633s, StdDev: 416ms
* Last Access TTFB: Avg: 81ms, Best: 2ms, 25th: 24ms, Median: 39ms, 75th: 65ms, 90th: 161ms, 99th: 657ms, Worst: 4.783s StdDev: 176ms
----------------------------------------
Operation: PUT - total: 2688, 14.5%, Size: 10485760 bytes. Concurrency: 20, Ran 5m0s, starting 2023-10-16 10:23:57.115 +0500 +05
* Throughput: 89.83 MiB/s, 8.98 obj/s
Requests considered: 2689:
* Avg: 1.165s, 50%: 878ms, 90%: 2.015s, 99%: 5.74s, Fastest: 99ms, Slowest: 8.264s, StdDev: 968ms
----------------------------------------
Operation: STAT - total: 5586, 30.2%, Concurrency: 20, Ran 5m0s, starting 2023-10-16 10:23:57.113 +0500 +05
* Throughput: 18.63 obj/s
Requests considered: 5587:
* Avg: 15ms, 50%: 11ms, 90%: 34ms, 99%: 80ms, Fastest: 0s, Slowest: 245ms, StdDev: 17ms
* First Access: Avg: 14ms, 50%: 10ms, 90%: 33ms, 99%: 69ms, Fastest: 0s, Slowest: 203ms, StdDev: 16ms
* Last Access: Avg: 15ms, 50%: 11ms, 90%: 34ms, 99%: 74ms, Fastest: 0s, Slowest: 203ms, StdDev: 17ms
Cluster Total: 369.64 MiB/s, 61.77 obj/s, 0 errors over 5m0s.
Total Errors:0.
```
[Back to TOC](#table-of-contents) [Back to TOC](#table-of-contents)
## License ## ## License ##
-2
View File
@@ -7,8 +7,6 @@
- [Evercam Camera Management Software](https://evercam.io/) - [Evercam Camera Management Software](https://evercam.io/)
- [Spherical Elephant GmbH](https://www.sphericalelephant.com) - [Spherical Elephant GmbH](https://www.sphericalelephant.com)
- [WizardTales GmbH](https://www.wizardtales.com)
- [Nimbus Web Services](https://nimbusws.com)
- <h2 align="center">Backers</h2> - <h2 align="center">Backers</h2>
+44
View File
@@ -0,0 +1,44 @@
FROM gcc:11 as builder
RUN mkdir -p /go/src/github.com/seaweedfs/
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
ARG BRANCH=${BRANCH:-master}
RUN cd /go/src/github.com/seaweedfs/seaweedfs && git checkout $BRANCH
RUN cd /go/src/github.com/seaweedfs/seaweedfs/weed \
&& apt-get update \
&& apt-get install -y golang-src \
&& export LDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \
&& CGO_ENABLED=0 go install -ldflags "-extldflags -static ${LDFLAGS}" -compiler=gccgo -tags gccgo,noasm
FROM alpine AS final
LABEL author="Chris Lu"
COPY --from=builder /go/bin/weed /usr/bin/
RUN mkdir -p /etc/seaweedfs
COPY --from=builder /go/src/github.com/seaweedfs/seaweedfs/docker/filer.toml /etc/seaweedfs/filer.toml
COPY --from=builder /go/src/github.com/seaweedfs/seaweedfs/docker/entrypoint.sh /entrypoint.sh
RUN apk add fuse # for weed mount
# volume server gprc port
EXPOSE 18080
# volume server http port
EXPOSE 8080
# filer server gprc port
EXPOSE 18888
# filer server http port
EXPOSE 8888
# master server shared gprc port
EXPOSE 19333
# master server shared http port
EXPOSE 9333
# s3 server http port
EXPOSE 8333
# webdav server http port
EXPOSE 7333
RUN mkdir -p /data/filerldb2
VOLUME /data
WORKDIR /data
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+1 -1
View File
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine as builder FROM golang:1.19-alpine as builder
RUN apk add git g++ fuse RUN apk add git g++ fuse
RUN mkdir -p /go/src/github.com/seaweedfs/ RUN mkdir -p /go/src/github.com/seaweedfs/
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
-2
View File
@@ -1,8 +1,6 @@
FROM alpine AS final FROM alpine AS final
LABEL author="Chris Lu" LABEL author="Chris Lu"
COPY ./weed /usr/bin/ COPY ./weed /usr/bin/
COPY ./weed_pub /usr/bin/
COPY ./weed_sub /usr/bin/
RUN mkdir -p /etc/seaweedfs RUN mkdir -p /etc/seaweedfs
COPY ./filer.toml /etc/seaweedfs/filer.toml COPY ./filer.toml /etc/seaweedfs/filer.toml
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
+2 -2
View File
@@ -1,9 +1,9 @@
FROM golang:1.22 as builder FROM golang:1.19-buster as builder
RUN apt-get update RUN apt-get update
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
ENV ROCKSDB_VERSION v8.10.0 ENV ROCKSDB_VERSION v7.5.3
# build RocksDB # build RocksDB
RUN cd /tmp && \ RUN cd /tmp && \
+2 -2
View File
@@ -1,9 +1,9 @@
FROM golang:1.22 as builder FROM golang:1.19-buster as builder
RUN apt-get update RUN apt-get update
RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev RUN apt-get install -y build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev libzstd-dev
ENV ROCKSDB_VERSION v8.10.0 ENV ROCKSDB_VERSION v7.5.3
# build RocksDB # build RocksDB
RUN cd /tmp && \ RUN cd /tmp && \
+9 -18
View File
@@ -8,9 +8,7 @@ cgo ?= 0
binary: binary:
export SWCOMMIT=$(shell git rev-parse --short HEAD) export SWCOMMIT=$(shell git rev-parse --short HEAD)
export SWLDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)" export SWLDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)"
cd ../weed && CGO_ENABLED=$(cgo) GOOS=linux go build $(options) -tags "$(tags)" -ldflags "-s -w -extldflags -static $(SWLDFLAGS)" && mv weed ../docker/ cd ../weed && CGO_ENABLED=$(cgo) GOOS=linux go build $(options) -tags "$(tags)" -ldflags "-extldflags -static $(SWLDFLAGS)" && mv weed ../docker/
cd ../weed/mq/client/cmd/weed_pub && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_pub ../../../../../docker/
cd ../weed/mq/client/cmd/weed_sub && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_sub ../../../../../docker/
binary_race: options = -race binary_race: options = -race
binary_race: cgo = 1 binary_race: cgo = 1
@@ -31,7 +29,7 @@ go_build_large_disk:
build_rocksdb_dev_env: build_rocksdb_dev_env:
docker build --no-cache -t chrislusf/rocksdb_dev_env -f Dockerfile.rocksdb_dev_env . docker build --no-cache -t chrislusf/rocksdb_dev_env -f Dockerfile.rocksdb_dev_env .
build_rocksdb_local: build_rocksdb_dev_env build_rocksdb_local:
cd .. ; docker build --no-cache -t chrislusf/seaweedfs:rocksdb_local -f docker/Dockerfile.rocksdb_large_local . cd .. ; docker build --no-cache -t chrislusf/seaweedfs:rocksdb_local -f docker/Dockerfile.rocksdb_large_local .
build_rocksdb: build_rocksdb:
@@ -64,8 +62,7 @@ k8s: build
dev_registry: build dev_registry: build
docker compose -f compose/local-registry-compose.yml -p seaweedfs up docker compose -f compose/local-registry-compose.yml -p seaweedfs up
dev_replicate: dev_replicate: build
docker build --build-arg TAGS=gocdk --no-cache -t chrislusf/seaweedfs:local -f Dockerfile.go_build .
docker compose -f compose/local-replicate-compose.yml -p seaweedfs up docker compose -f compose/local-replicate-compose.yml -p seaweedfs up
dev_auditlog: build dev_auditlog: build
@@ -83,18 +80,12 @@ cluster: build
2mount: build 2mount: build
docker compose -f compose/local-sync-mount-compose.yml -p seaweedfs up docker compose -f compose/local-sync-mount-compose.yml -p seaweedfs up
filer_backup: build
docker compose -f compose/local-filer-backup-compose.yml -p seaweedfs up
hashicorp_raft: build hashicorp_raft: build
docker compose -f compose/local-hashicorp-raft-compose.yml -p seaweedfs up docker compose -f compose/local-hashicorp-raft-compose.yml -p seaweedfs up
s3tests: build s3tests_build s3tests: build s3tests_build
docker compose -f compose/local-s3tests-compose.yml -p seaweedfs up docker compose -f compose/local-s3tests-compose.yml -p seaweedfs up
brokers: build
docker compose -f compose/local-brokers-compose.yml -p seaweedfs up
filer_etcd: build filer_etcd: build
docker stack deploy -c compose/swarm-etcd.yml fs docker stack deploy -c compose/swarm-etcd.yml fs
@@ -110,12 +101,12 @@ clean:
rm ./weed rm ./weed
certstrap: certstrap:
go install -v github.com/square/certstrap@latest go get github.com/square/certstrap
certstrap --depot-path compose/tls init --curve P-256 --passphrase "" --common-name "SeaweedFS CA" || true certstrap --depot-path compose/tls init --passphrase "" --common-name "SeaweedFS CA" || true
certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --domain localhost --common-name volume01.dev || true certstrap --depot-path compose/tls request-cert --passphrase "" --common-name volume01.dev || true
certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --common-name master01.dev || true certstrap --depot-path compose/tls request-cert --passphrase "" --common-name master01.dev || true
certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --common-name filer01.dev || true certstrap --depot-path compose/tls request-cert --passphrase "" --common-name filer01.dev || true
certstrap --depot-path compose/tls request-cert --ou "SeaweedFS" --curve P-256 --passphrase "" --common-name client01.dev || true certstrap --depot-path compose/tls request-cert --passphrase "" --common-name client01.dev || true
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" volume01.dev || true certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" volume01.dev || true
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" master01.dev || true certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" master01.dev || true
certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" filer01.dev || true certstrap --depot-path compose/tls sign --CA "SeaweedFS CA" filer01.dev || true
-126
View File
@@ -1,126 +0,0 @@
version: '3.9'
services:
master0:
image: chrislusf/seaweedfs:local
ports:
- 9333:9333
- 19333:19333
command: "-v=1 master -volumeSizeLimitMB 100 -resumeState=false -ip=master0 -port=9333 -peers=master0:9333,master1:9334,master2:9335 -mdir=/tmp"
environment:
WEED_MASTER_VOLUME_GROWTH_COPY_1: 1
WEED_MASTER_VOLUME_GROWTH_COPY_2: 2
WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1
master1:
image: chrislusf/seaweedfs:local
ports:
- 9334:9334
- 19334:19334
command: "-v=1 master -volumeSizeLimitMB 100 -resumeState=false -ip=master1 -port=9334 -peers=master0:9333,master1:9334,master2:9335 -mdir=/tmp"
environment:
WEED_MASTER_VOLUME_GROWTH_COPY_1: 1
WEED_MASTER_VOLUME_GROWTH_COPY_2: 2
WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1
master2:
image: chrislusf/seaweedfs:local
ports:
- 9335:9335
- 19335:19335
command: "-v=1 master -volumeSizeLimitMB 100 -resumeState=false -ip=master2 -port=9335 -peers=master0:9333,master1:9334,master2:9335 -mdir=/tmp"
environment:
WEED_MASTER_VOLUME_GROWTH_COPY_1: 1
WEED_MASTER_VOLUME_GROWTH_COPY_2: 2
WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1
volume1:
image: chrislusf/seaweedfs:local
ports:
- 8080:8080
- 18080:18080
command: 'volume -dataCenter=dc1 -rack=v1 -mserver="master0:9333,master1:9334,master2:9335" -port=8080 -ip=volume1 -publicUrl=localhost:8080 -preStopSeconds=1'
depends_on:
- master0
- master1
- master2
volume2:
image: chrislusf/seaweedfs:local
ports:
- 8082:8082
- 18082:18082
command: 'volume -dataCenter=dc2 -rack=v2 -mserver="master0:9333,master1:9334,master2:9335" -port=8082 -ip=volume2 -publicUrl=localhost:8082 -preStopSeconds=1'
depends_on:
- master0
- master1
- master2
volume3:
image: chrislusf/seaweedfs:local
ports:
- 8083:8083
- 18083:18083
command: 'volume -dataCenter=dc3 -rack=v3 -mserver="master0:9333,master1:9334,master2:9335" -port=8083 -ip=volume3 -publicUrl=localhost:8083 -preStopSeconds=1'
depends_on:
- master0
- master1
- master2
filer1:
image: chrislusf/seaweedfs:local
ports:
- 8888:8888
- 18888:18888
command: 'filer -defaultReplicaPlacement=100 -iam -master="master0:9333,master1:9334,master2:9335" -port=8888 -ip=filer1'
depends_on:
- master0
- master1
- master2
- volume1
- volume2
filer2:
image: chrislusf/seaweedfs:local
ports:
- 8889:8889
- 18889:18889
command: 'filer -defaultReplicaPlacement=100 -iam -master="master0:9333,master1:9334,master2:9335" -port=8889 -ip=filer2'
depends_on:
- master0
- master1
- master2
- volume1
- volume2
broker1:
image: chrislusf/seaweedfs:local
ports:
- 17777:17777
command: 'mq.broker -master="master0:9333,master1:9334,master2:9335" -port=17777 -ip=broker1'
depends_on:
- master0
- master1
- master2
- volume1
- volume2
- filer1
- filer2
broker2:
image: chrislusf/seaweedfs:local
ports:
- 17778:17778
command: 'mq.broker -master="master0:9333,master1:9334,master2:9335" -port=17778 -ip=broker2'
depends_on:
- master0
- master1
- master2
- volume1
- volume2
- filer1
- filer2
broker3:
image: chrislusf/seaweedfs:local
ports:
- 17779:17779
command: 'mq.broker -master="master0:9333,master1:9334,master2:9335" -port=17779 -ip=broker3'
depends_on:
- master0
- master1
- master2
- volume1
- volume2
- filer1
- filer2
@@ -1,54 +0,0 @@
version: '3.9'
services:
server-left:
image: chrislusf/seaweedfs:local
command: "-v=0 server -ip=server-left -filer -filer.maxMB 5 -s3 -s3.config=/etc/seaweedfs/s3.json -volume.max=0 -master.volumeSizeLimitMB=1024 -volume.preStopSeconds=1"
volumes:
- ./s3.json:/etc/seaweedfs/s3.json
healthcheck:
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:9333/cluster/healthz" ]
interval: 3s
start_period: 15s
timeout: 30s
server-right:
image: chrislusf/seaweedfs:local
command: "-v=0 server -ip=server-right -filer -filer.maxMB 64 -s3 -s3.config=/etc/seaweedfs/s3.json -volume.max=0 -master.volumeSizeLimitMB=1024 -volume.preStopSeconds=1"
volumes:
- ./s3.json:/etc/seaweedfs/s3.json
healthcheck:
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:9333/cluster/healthz" ]
interval: 3s
start_period: 15s
timeout: 30s
filer-backup:
image: chrislusf/seaweedfs:local
command: "-v=0 filer.backup -debug -doDeleteFiles=False -filer server-left:8888"
volumes:
- ./replication.toml:/etc/seaweedfs/replication.toml
environment:
WEED_SINK_LOCAL_INCREMENTAL_ENABLED: "false"
WEED_SINK_S3_ENABLED: "true"
WEED_SINK_S3_BUCKET: "backup"
WEED_SINK_S3_ENDPOINT: "http://server-right:8333"
WEED_SINK_S3_DIRECTORY: "/"
WEED_SINK_S3_AWS_ACCESS_KEY_ID: "some_access_key1"
WEED_SINK_S3_AWS_SECRET_ACCESS_KEY: "some_secret_key1"
WEED_SINK_S3_S3_DISABLE_CONTENT_MD5_VALIDATION: "false"
WEED_SINK_S3_UPLOADER_PART_SIZE_MB: "5"
WEED_SINK_S3_KEEP_PART_SIZE: "false"
depends_on:
server-left:
condition: service_healthy
server-right:
condition: service_healthy
minio-warp:
image: minio/warp
command: 'mixed --duration 5s --obj.size=6mb --md5 --objects 10 --concurrent 2'
restart: on-failure
environment:
WARP_HOST: "server-left:8333"
WARP_ACCESS_KEY: "some_access_key1"
WARP_SECRET_KEY: "some_secret_key1"
depends_on:
- filer-backup
-27
View File
@@ -1,27 +0,0 @@
version: '3.9'
services:
server:
image: chrislusf/seaweedfs:local
ports:
- 9333:9333
- 19333:19333
- 8888:8888
- 18888:18888
command: "server -ip=server -filer -volume.max=0 -master.volumeSizeLimitMB=8 -volume.preStopSeconds=1"
healthcheck:
test: curl -f http://localhost:8888/healthz
mq_broker:
image: chrislusf/seaweedfs:local
ports:
- 17777:17777
command: "mq.broker -master=server:9333 -ip=mq_broker"
depends_on:
server:
condition: service_healthy
mq_client:
image: chrislusf/seaweedfs:local
# run a custom command instead of entrypoint
command: "ls -al"
depends_on:
- mq_broker
@@ -3,54 +3,19 @@ services:
node1: node1:
image: chrislusf/seaweedfs:local image: chrislusf/seaweedfs:local
command: "server -master -volume -filer" command: "server -master -volume -filer"
ports:
- 8888:8888
- 18888:18888
healthcheck:
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:9333/cluster/healthz" ]
interval: 1s
start_period: 10s
timeout: 30s
mount1: mount1:
image: chrislusf/seaweedfs:local image: chrislusf/seaweedfs:local
privileged: true privileged: true
command: "mount -filer=node1:8888 -dir=/mnt -dirAutoCreate" command: "mount -filer=node1:8888 -dir=/mnt -dirAutoCreate"
healthcheck:
test: [ "CMD", "curl", "--fail", "-I", "http://node1:8888/" ]
interval: 1s
start_period: 10s
timeout: 30s
depends_on:
node1:
condition: service_healthy
node2: node2:
image: chrislusf/seaweedfs:local image: chrislusf/seaweedfs:local
ports: ports:
- 7888:8888 - 7888:8888
- 17888:18888
command: "server -master -volume -filer" command: "server -master -volume -filer"
healthcheck:
test: [ "CMD", "curl", "--fail", "-I", "http://localhost:9333/cluster/healthz" ]
interval: 1s
start_period: 10s
timeout: 30s
mount2: mount2:
image: chrislusf/seaweedfs:local image: chrislusf/seaweedfs:local
privileged: true privileged: true
command: "mount -filer=node2:8888 -dir=/mnt -dirAutoCreate" command: "mount -filer=node2:8888 -dir=/mnt -dirAutoCreate"
healthcheck:
test: [ "CMD", "curl", "--fail", "-I", "http://node2:8888/" ]
interval: 1s
start_period: 10s
timeout: 30s
depends_on:
node2:
condition: service_healthy
sync: sync:
image: chrislusf/seaweedfs:local image: chrislusf/seaweedfs:local
command: "-v=4 filer.sync -a=node1:8888 -b=node2:8888 -a.debug -b.debug" command: "-v=4 filer.sync -a=node1:8888 -b=node2:8888 -a.debug -b.debug"
depends_on:
mount1:
condition: service_healthy
mount2:
condition: service_healthy
+2 -12
View File
@@ -40,10 +40,7 @@
"List", "List",
"Tagging", "Tagging",
"Write" "Write"
], ]
"account": {
"id": "testid"
}
}, },
{ {
"name": "s3_tests_alt", "name": "s3_tests_alt",
@@ -104,12 +101,5 @@
"Write" "Write"
] ]
} }
], ]
"accounts": [
{
"id" : "testid",
"displayName": "M. Tester",
"emailAddress": "tester@ceph.com"
}
]
} }
+1 -1
View File
@@ -2,7 +2,7 @@
## this section is just used for host, port and bucket_prefix ## this section is just used for host, port and bucket_prefix
# host set for rgw in vstart.sh # host set for rgw in vstart.sh
host = 127.0.0.1 host = s3
# port set for rgw in vstart.sh # port set for rgw in vstart.sh
port = 8000 port = 8000
-1
View File
@@ -30,7 +30,6 @@ services:
environment: environment:
WEED_LEVELDB2_ENABLED: 'false' WEED_LEVELDB2_ENABLED: 'false'
WEED_ETCD_ENABLED: 'true' WEED_ETCD_ENABLED: 'true'
WEED_ETCD_KEY_PREFIX: 'seaweedfs.'
WEED_ETCD_SERVERS: "http://etcd:2379" WEED_ETCD_SERVERS: "http://etcd:2379"
volumes: volumes:
- ./s3.json:/etc/seaweedfs/s3.json - ./s3.json:/etc/seaweedfs/s3.json
-4
View File
@@ -12,9 +12,5 @@ WEED_GRPC_MASTER_ALLOWED_COMMONNAMES="volume01.dev,master01.dev,filer01.dev,clie
WEED_GRPC_VOLUME_ALLOWED_COMMONNAMES="volume01.dev,master01.dev,filer01.dev,client01.dev" WEED_GRPC_VOLUME_ALLOWED_COMMONNAMES="volume01.dev,master01.dev,filer01.dev,client01.dev"
WEED_GRPC_FILER_ALLOWED_COMMONNAMES="volume01.dev,master01.dev,filer01.dev,client01.dev" WEED_GRPC_FILER_ALLOWED_COMMONNAMES="volume01.dev,master01.dev,filer01.dev,client01.dev"
WEED_GRPC_CLIENT_ALLOWED_COMMONNAMES="volume01.dev,master01.dev,filer01.dev,client01.dev" WEED_GRPC_CLIENT_ALLOWED_COMMONNAMES="volume01.dev,master01.dev,filer01.dev,client01.dev"
WEED_HTTPS_CLIENT_ENABLE=true
WEED_HTTPS_VOLUME_CERT=/etc/seaweedfs/tls/volume01.dev.crt
WEED_HTTPS_VOLUME_KEY=/etc/seaweedfs/tls/volume01.dev.key
WEED_HTTPS_VOLUME_CA=/etc/seaweedfs/tls/SeaweedFS_CA.crt
#GRPC_GO_LOG_SEVERITY_LEVEL=info #GRPC_GO_LOG_SEVERITY_LEVEL=info
#GRPC_GO_LOG_VERBOSITY_LEVEL=2 #GRPC_GO_LOG_VERBOSITY_LEVEL=2
+7 -7
View File
@@ -3,10 +3,10 @@ CREATE USER IF NOT EXISTS 'seaweedfs'@'%' IDENTIFIED BY 'secret';
GRANT ALL PRIVILEGES ON seaweedfs.* TO 'seaweedfs'@'%'; GRANT ALL PRIVILEGES ON seaweedfs.* TO 'seaweedfs'@'%';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
USE seaweedfs; USE seaweedfs;
CREATE TABLE IF NOT EXISTS `filemeta` ( CREATE TABLE IF NOT EXISTS filemeta (
`dirhash` BIGINT NOT NULL COMMENT 'first 64 bits of MD5 hash value of directory field', dirhash BIGINT COMMENT 'first 64 bits of MD5 hash value of directory field',
`name` VARCHAR(766) NOT NULL COMMENT 'directory or file name', name VARCHAR(1000) COMMENT 'directory or file name',
`directory` TEXT NOT NULL COMMENT 'full path to parent directory', directory TEXT COMMENT 'full path to parent directory',
`meta` LONGBLOB, meta LONGBLOB,
PRIMARY KEY (`dirhash`, `name`) PRIMARY KEY (dirhash, name)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; ) DEFAULT CHARSET=utf8;
+144 -253
View File
@@ -1,347 +1,238 @@
module github.com/seaweedfs/seaweedfs module github.com/seaweedfs/seaweedfs
go 1.22.0 go 1.19
require ( require (
cloud.google.com/go v0.112.1 // indirect cloud.google.com/go v0.105.0 // indirect
cloud.google.com/go/pubsub v1.37.0 cloud.google.com/go/pubsub v1.27.1
cloud.google.com/go/storage v1.39.1 cloud.google.com/go/storage v1.28.1
github.com/Azure/azure-pipeline-go v0.2.3 github.com/Azure/azure-pipeline-go v0.2.3
github.com/Azure/azure-storage-blob-go v0.15.0 github.com/Azure/azure-storage-blob-go v0.15.0
github.com/Shopify/sarama v1.38.1 github.com/Shopify/sarama v1.37.2
github.com/aws/aws-sdk-go v1.50.36 github.com/aws/aws-sdk-go v1.44.146
github.com/beorn7/perks v1.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect
github.com/bwmarrin/snowflake v0.3.0 github.com/bwmarrin/snowflake v0.3.0
github.com/cenkalti/backoff/v4 v4.3.0 github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/disintegration/imaging v1.6.2 github.com/disintegration/imaging v1.6.2
github.com/dustin/go-humanize v1.0.1 github.com/dustin/go-humanize v1.0.0
github.com/eapache/go-resiliency v1.3.0 // indirect github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect github.com/eapache/queue v1.1.0 // indirect
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a
github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c // indirect
github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 // indirect
github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4 github.com/facebookgo/stats v0.0.0-20151006221625-1b76add642e4
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
github.com/fclairamb/ftpserverlib v0.24.0 github.com/fclairamb/ftpserverlib v0.20.0
github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-errors/errors v1.5.1 // indirect github.com/go-errors/errors v1.1.1 // indirect
github.com/go-redis/redis/v8 v8.11.5 github.com/go-redis/redis/v8 v8.11.5
github.com/go-redsync/redsync/v4 v4.11.0 github.com/go-redsync/redsync/v4 v4.6.0
github.com/go-sql-driver/mysql v1.8.1 github.com/go-sql-driver/mysql v1.7.0
github.com/go-zookeeper/zk v1.0.3 // indirect github.com/go-zookeeper/zk v1.0.2 // indirect
github.com/gocql/gocql v1.6.0 github.com/gocql/gocql v0.0.0-20210707082121-9a3953d1826d
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 github.com/golang/protobuf v1.5.2
github.com/golang/snappy v0.0.4 // indirect github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 github.com/google/btree v1.1.2
github.com/google/uuid v1.6.0 github.com/google/go-cmp v0.5.9 // indirect
github.com/google/wire v0.6.0 // indirect github.com/google/uuid v1.3.0
github.com/googleapis/gax-go/v2 v2.12.3 // indirect github.com/google/wire v0.5.0 // indirect
github.com/gorilla/mux v1.8.1 github.com/googleapis/gax-go/v2 v2.7.0 // indirect
github.com/gorilla/mux v1.8.0
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
github.com/jinzhu/copier v0.4.0 github.com/jinzhu/copier v0.3.5
github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 github.com/json-iterator/go v1.1.12
github.com/karlseguin/ccache/v2 v2.0.8 github.com/karlseguin/ccache/v2 v2.0.8
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/klauspost/compress v1.17.7 // indirect github.com/klauspost/compress v1.15.11 // indirect
github.com/klauspost/reedsolomon v1.12.1 github.com/klauspost/reedsolomon v1.11.3
github.com/kurin/blazer v0.5.3 github.com/kurin/blazer v0.5.3
github.com/lib/pq v1.10.9 github.com/lib/pq v1.10.7
github.com/linxGnu/grocksdb v1.8.14 github.com/linxGnu/grocksdb v1.7.10
github.com/magiconair/properties v1.8.7 // indirect github.com/magiconair/properties v1.8.6 // indirect
github.com/mailru/easyjson v0.7.7 // indirect github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-ieproxy v0.0.11 // indirect github.com/mattn/go-ieproxy v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-isatty v0.0.16 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/olivere/elastic/v7 v7.0.32 github.com/olivere/elastic/v7 v7.0.32
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/peterh/liner v1.2.2 github.com/peterh/liner v1.2.2
github.com/pkg/errors v0.9.1 // indirect github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.3 github.com/posener/complete v1.2.3
github.com/pquerna/cachecontrol v0.2.0 github.com/pquerna/cachecontrol v0.1.0
github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.48.0 // indirect github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.13.0 github.com/prometheus/procfs v0.8.0
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 // indirect
github.com/seaweedfs/goexif v1.0.3 github.com/seaweedfs/goexif v2.0.0+incompatible
github.com/seaweedfs/raft v1.1.3 github.com/seaweedfs/raft v1.1.0
github.com/sirupsen/logrus v1.9.3 // indirect github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/afero v1.11.0 // indirect github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/viper v1.18.2 github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/stretchr/testify v1.9.0 github.com/spf13/viper v1.14.0
github.com/stretchr/testify v1.8.1
github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203 github.com/stvp/tempredis v0.0.0-20181119212430-b82af8480203
github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965 github.com/syndtr/goleveldb v1.0.1-0.20190318030020-c3a204f8e965
github.com/tidwall/gjson v1.17.1 github.com/tidwall/gjson v1.14.4
github.com/tidwall/match v1.1.1 github.com/tidwall/match v1.1.1
github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/pretty v1.2.0 // indirect
github.com/tsuna/gohbase v0.0.0-20201125011725-348991136365 github.com/tsuna/gohbase v0.0.0-20201125011725-348991136365
github.com/tylertreat/BoomFilters v0.0.0-20210315201527-1a82519a3e43 github.com/tylertreat/BoomFilters v0.0.0-20210315201527-1a82519a3e43
github.com/valyala/bytebufferpool v1.0.0 github.com/valyala/bytebufferpool v1.0.0
github.com/viant/ptrie v0.3.1 github.com/viant/assertly v0.5.4 // indirect
github.com/viant/toolbox v0.34.5 // indirect github.com/viant/ptrie v0.3.0
github.com/viant/toolbox v0.33.2 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.4 // indirect github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
go.etcd.io/etcd/client/v3 v3.5.12 go.etcd.io/etcd/client/v3 v3.5.6
go.mongodb.org/mongo-driver v1.14.0 go.mongodb.org/mongo-driver v1.11.0
go.opencensus.io v0.24.0 // indirect go.opencensus.io v0.24.0 // indirect
gocloud.dev v0.37.0 gocloud.dev v0.27.0
gocloud.dev/pubsub/natspubsub v0.37.0 gocloud.dev/pubsub/natspubsub v0.27.0
gocloud.dev/pubsub/rabbitpubsub v0.36.0 gocloud.dev/pubsub/rabbitpubsub v0.27.0
golang.org/x/crypto v0.21.0 // indirect golang.org/x/crypto v0.1.0 // indirect
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 golang.org/x/exp v0.0.0-20220414153411-bcd21879b8fd
golang.org/x/image v0.15.0 golang.org/x/image v0.0.0-20200119044424-58c23975cae1
golang.org/x/net v0.22.0 golang.org/x/net v0.2.0
golang.org/x/oauth2 v0.18.0 // indirect golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
golang.org/x/sys v0.19.0 golang.org/x/sys v0.3.0
golang.org/x/text v0.14.0 // indirect golang.org/x/text v0.4.0 // indirect
golang.org/x/tools v0.17.0 golang.org/x/tools v0.3.0
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.172.0 google.golang.org/api v0.103.0
google.golang.org/appengine v1.6.8 // indirect google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7 // indirect google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c // indirect
google.golang.org/grpc v1.62.1 google.golang.org/grpc v1.51.0
google.golang.org/protobuf v1.33.0 google.golang.org/protobuf v1.28.1
gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect
modernc.org/b v1.0.0 // indirect modernc.org/b v1.0.0 // indirect
modernc.org/cc/v3 v3.40.0 // indirect modernc.org/cc/v3 v3.40.0 // indirect
modernc.org/ccgo/v3 v3.16.13 // indirect modernc.org/ccgo/v3 v3.16.13 // indirect
modernc.org/libc v1.29.0 // indirect modernc.org/libc v1.21.5 // indirect
modernc.org/mathutil v1.6.0 modernc.org/mathutil v1.5.0 // indirect
modernc.org/memory v1.7.2 // indirect modernc.org/memory v1.4.0 // indirect
modernc.org/opt v0.1.3 // indirect modernc.org/opt v0.1.3 // indirect
modernc.org/sqlite v1.28.0 modernc.org/sqlite v1.20.0
modernc.org/strutil v1.2.0 modernc.org/strutil v1.1.3
modernc.org/token v1.0.1 // indirect modernc.org/token v1.0.1 // indirect
) )
require ( require (
github.com/Jille/raft-grpc-transport v1.5.0 github.com/Jille/raft-grpc-transport v1.3.0
github.com/arangodb/go-driver v1.6.1 github.com/arangodb/go-driver v1.4.0
github.com/armon/go-metrics v0.4.1 github.com/armon/go-metrics v0.4.1
github.com/aws/aws-sdk-go-v2 v1.26.1
github.com/aws/aws-sdk-go-v2/config v1.27.11
github.com/aws/aws-sdk-go-v2/credentials v1.17.11
github.com/aws/aws-sdk-go-v2/service/s3 v1.51.4
github.com/fluent/fluent-logger-golang v1.9.0 github.com/fluent/fluent-logger-golang v1.9.0
github.com/getsentry/sentry-go v0.27.0 github.com/google/flatbuffers v22.11.23+incompatible
github.com/golang-jwt/jwt/v5 v5.2.1 github.com/hanwen/go-fuse/v2 v2.1.1-0.20220627082937-d01fda7edf17
github.com/google/flatbuffers/go v0.0.0-20230108230133-3b8644d32c50 github.com/hashicorp/raft v1.3.11
github.com/hanwen/go-fuse/v2 v2.5.0 github.com/hashicorp/raft-boltdb/v2 v2.2.2
github.com/hashicorp/raft v1.6.1 github.com/rabbitmq/amqp091-go v1.5.0
github.com/hashicorp/raft-boltdb/v2 v2.3.0 github.com/tikv/client-go/v2 v2.0.2
github.com/orcaman/concurrent-map/v2 v2.0.1 github.com/ydb-platform/ydb-go-sdk-auth-environ v0.1.2
github.com/rabbitmq/amqp091-go v1.9.0 github.com/ydb-platform/ydb-go-sdk/v3 v3.40.1
github.com/rclone/rclone v1.66.0 golang.org/x/sync v0.1.0
github.com/rdleal/intervalst v1.3.0
github.com/schollz/progressbar/v3 v3.14.2
github.com/shirou/gopsutil/v3 v3.24.3
github.com/tikv/client-go/v2 v2.0.7
github.com/ydb-platform/ydb-go-sdk-auth-environ v0.2.0
github.com/ydb-platform/ydb-go-sdk/v3 v3.63.0
go.etcd.io/etcd/client/pkg/v3 v3.5.13
go.uber.org/atomic v1.11.0
google.golang.org/grpc/security/advancedtls v0.0.0-20220622233350-5cdb09fa29c1 google.golang.org/grpc/security/advancedtls v0.0.0-20220622233350-5cdb09fa29c1
) )
require ( require (
cloud.google.com/go/compute v1.25.0 // indirect cloud.google.com/go/compute v1.12.1 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect cloud.google.com/go/compute/metadata v0.2.1 // indirect
cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/iam v0.7.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azfile v1.1.1 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect
github.com/Max-Sum/base32768 v0.0.0-20230304063302-18e6ce5945fd // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/bcrypt v0.0.0-20211005172633-e235017c1baf // indirect
github.com/ProtonMail/gluon v0.17.1-0.20230724134000-308be39be96e // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230923063757-afb1ddc0824c // indirect
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect
github.com/ProtonMail/go-srp v0.0.7 // indirect
github.com/ProtonMail/gopenpgp/v2 v2.7.4 // indirect
github.com/PuerkitoBio/goquery v1.8.1 // indirect
github.com/Unknwon/goconfig v1.0.0 // indirect
github.com/abbot/go-http-auth v0.4.0 // indirect
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect github.com/aws/aws-sdk-go-v2 v1.16.8 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect github.com/aws/aws-sdk-go-v2/config v1.15.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.12.10 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.9 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.15 // indirect
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.3 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.16 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.5 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.9 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect github.com/aws/aws-sdk-go-v2/service/sns v1.17.10 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.3 // indirect github.com/aws/aws-sdk-go-v2/service/sqs v1.19.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sns v1.29.2 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.11.13 // indirect
github.com/aws/aws-sdk-go-v2/service/sqs v1.31.2 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.16.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect github.com/aws/smithy-go v1.12.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect github.com/benbjohnson/clock v1.1.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect
github.com/aws/smithy-go v1.20.2 // indirect
github.com/boltdb/bolt v1.3.1 // indirect github.com/boltdb/bolt v1.3.1 // indirect
github.com/bradenaw/juniper v0.15.2 // indirect
github.com/buengese/sgzip v0.1.1 // indirect
github.com/calebcase/tmpfile v1.0.3 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cloudsoda/go-smb2 v0.0.0-20231124195312-f3ec8ae2c891 // indirect
github.com/colinmarc/hdfs/v2 v2.4.0 // indirect
github.com/cronokirby/saferith v0.33.0 // indirect
github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 // indirect
github.com/d4l3k/messagediff v1.2.1 // indirect github.com/d4l3k/messagediff v1.2.1 // indirect
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect
github.com/dropbox/dropbox-sdk-go-unofficial/v6 v6.0.5 // indirect github.com/fatih/color v1.13.0 // indirect
github.com/elastic/gosigar v0.14.2 // indirect github.com/fclairamb/go-log v0.4.1 // indirect
github.com/emersion/go-message v0.18.0 // indirect
github.com/emersion/go-textwrapper v0.0.0-20200911093747-65d896831594 // indirect
github.com/emersion/go-vcard v0.0.0-20230815062825-8fda7d206ec9 // indirect
github.com/fatih/color v1.14.1 // indirect
github.com/fclairamb/go-log v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/flynn/noise v1.0.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/geoffgarside/ber v1.1.0 // indirect
github.com/go-chi/chi/v5 v5.0.11 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-resty/resty/v2 v2.11.0 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
github.com/google/s2a-go v0.1.7 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/hashicorp/go-hclog v1.6.2 // indirect github.com/hashicorp/go-hclog v1.2.0 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-msgpack/v2 v2.1.1 // indirect github.com/hashicorp/go-msgpack v1.1.5 // indirect
github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/henrybear327/Proton-API-Bridge v1.0.0 // indirect
github.com/henrybear327/go-proton-api v1.0.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/goidentity/v6 v6.0.1 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jlaffaye/ftp v0.2.0 // indirect github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/jonboulle/clockwork v0.3.0 // indirect
github.com/josharian/intern v1.0.0 // indirect github.com/josharian/intern v1.0.0 // indirect
github.com/jtolio/eventkit v0.0.0-20231019094657-5d77ebb407d9 // indirect github.com/klauspost/cpuid/v2 v2.1.1 // indirect
github.com/jtolio/noiseconn v0.0.0-20231127013910-f6d9ecbf1de7 // indirect
github.com/jzelinskie/whirlpool v0.0.0-20201016144138-0675e54bb004 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/koofr/go-httpclient v0.0.0-20230225102643-5d51a2e9dea6 // indirect
github.com/koofr/go-koofrclient v0.0.0-20221207135200-cbd7fc9ad6a6 // indirect
github.com/kr/fs v0.1.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed // indirect
github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mattn/go-runewidth v0.0.7 // indirect
github.com/mattn/go-sqlite3 v2.0.1+incompatible // indirect github.com/mattn/go-sqlite3 v2.0.1+incompatible // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/montanaflynn/stats v0.6.6 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/nats-io/nats.go v1.16.0 // indirect
github.com/montanaflynn/stats v0.7.0 // indirect github.com/nats-io/nkeys v0.3.0 // indirect
github.com/nats-io/nats.go v1.33.1 // indirect
github.com/nats-io/nkeys v0.4.7 // indirect
github.com/nats-io/nuid v1.0.1 // indirect github.com/nats-io/nuid v1.0.1 // indirect
github.com/ncw/swift/v2 v2.0.2 // indirect
github.com/onsi/gomega v1.27.10 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/oracle/oci-go-sdk/v65 v65.55.1 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/philhofer/fwd v1.1.1 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c // indirect github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c // indirect
github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect github.com/pingcap/failpoint v0.0.0-20210918120811-547c13e3eb00 // indirect
github.com/pingcap/kvproto v0.0.0-20230403051650-e166ae588106 // indirect github.com/pingcap/kvproto v0.0.0-20221026112947-f8d61344b172 // indirect
github.com/pingcap/log v1.1.1-0.20221110025148-ca232912c9f3 // indirect github.com/pingcap/log v1.1.1-0.20221015072633-39906604fb81 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd // indirect
github.com/pkg/sftp v1.13.6 // indirect
github.com/pkg/xattr v0.4.9 // indirect
github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b // indirect
github.com/putdotio/go-putio/putio v0.0.0-20200123120452-16d982cac2b8 // indirect
github.com/relvacode/iso8601 v1.3.0 // indirect
github.com/rfjakob/eme v1.1.2 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect
github.com/smartystreets/goconvey v1.8.1 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spacemonkeygo/monkit/v3 v3.0.22 // indirect
github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect github.com/stathat/consistent v1.0.0 // indirect
github.com/t3rm1n4l/go-mega v0.0.0-20240219080617-d494b6a8ace7 // indirect github.com/subosito/gotenv v1.4.1 // indirect
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a // indirect github.com/tikv/pd/client v0.0.0-20221031025758-80f0d8ca4d07 // indirect
github.com/tikv/pd/client v0.0.0-20230329114254-1948c247c2b1 // indirect github.com/tinylib/msgp v1.1.6 // indirect
github.com/tinylib/msgp v1.1.8 // indirect
github.com/tklauser/go-sysconf v0.3.13 // indirect
github.com/tklauser/numcpus v0.7.0 // indirect
github.com/twmb/murmur3 v1.1.3 // indirect github.com/twmb/murmur3 v1.1.3 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/yandex-cloud/go-genproto v0.0.0-20211115083454-9ca41db5ed9e // indirect github.com/yandex-cloud/go-genproto v0.0.0-20211115083454-9ca41db5ed9e // indirect
github.com/ydb-platform/ydb-go-genproto v0.0.0-20240126124512-dbb0e1720dbf // indirect github.com/ydb-platform/ydb-go-genproto v0.0.0-20220922065549-66df47a830ba // indirect
github.com/ydb-platform/ydb-go-yc v0.10.2 // indirect github.com/ydb-platform/ydb-go-yc v0.8.3 // indirect
github.com/ydb-platform/ydb-go-yc-metadata v0.5.2 // indirect github.com/ydb-platform/ydb-go-yc-metadata v0.5.2 // indirect
github.com/yunify/qingstor-sdk-go/v3 v3.2.0 // indirect go.etcd.io/bbolt v1.3.6 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect go.etcd.io/etcd/api/v3 v3.5.6 // indirect
github.com/zeebo/blake3 v0.2.3 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.6 // indirect
github.com/zeebo/errs v1.3.0 // indirect go.uber.org/atomic v1.9.0 // indirect
go.etcd.io/bbolt v1.3.8 // indirect go.uber.org/multierr v1.8.0 // indirect
go.etcd.io/etcd/api/v3 v3.5.12 // indirect go.uber.org/zap v1.22.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect golang.org/x/mod v0.7.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/validator.v2 v2.0.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
lukechampine.com/uint128 v1.2.0 // indirect lukechampine.com/uint128 v1.2.0 // indirect
storj.io/common v0.0.0-20240111121419-ecae1362576c // indirect
storj.io/drpc v0.0.33 // indirect
storj.io/infectious v0.0.2 // indirect
storj.io/picobuf v0.0.2-0.20230906122608-c4ba17033c6c // indirect
storj.io/uplink v1.12.2 // indirect
) )
// replace github.com/seaweedfs/raft => /Users/chrislu/go/src/github.com/seaweedfs/raft // replace github.com/seaweedfs/raft => /Users/chrislu/go/src/github.com/seaweedfs/raft
+1858 -685
View File
File diff suppressed because it is too large. Load diff
-16
View File
@@ -1,16 +0,0 @@
# Artifact Hub repository metadata file
#
# Some settings like the verified publisher flag or the ignored packages won't
# be applied until the next time the repository is processed. Please keep in
# mind that the repository won't be processed if it has not changed since the
# last time it was processed. Depending on the repository kind, this is checked
# in a different way. For Helm http based repositories, we consider it has
# changed if the `index.yaml` file changes. For git based repositories, it does
# when the hash of the last commit in the branch you set up changes. This does
# NOT apply to ownership claim operations, which are processed immediately.
#
repositoryID: 5b2f1fe2-20e5-486e-9746-183484642aa2
# owners: # (optional, used to claim repository ownership)
# - name: username
# email: email
-146
View File
@@ -1,146 +0,0 @@
# SEAWEEDFS - helm chart (2.x+)
## Getting Started
### Add the helm repo
```bash
helm repo add seaweedfs https://seaweedfs.github.io/seaweedfs/helm
```
### Install the helm chart
```bash
helm install seaweedfs seaweedfs/seaweedfs
```
### (Recommended) Provide `values.yaml`
```bash
helm install --values=values.yaml seaweedfs seaweedfs/seaweedfs
```
## Info:
* master/filer/volume are stateful sets with anti-affinity on the hostname,
so your deployment will be spread/HA.
* chart is using memsql(mysql) as the filer backend to enable HA (multiple filer instances) and backup/HA memsql can provide.
* mysql user/password are created in a k8s secret (secret-seaweedfs-db.yaml) and injected to the filer with ENV.
* cert config exists and can be enabled, but not been tested, requires cert-manager to be installed.
## Prerequisites
### Database
leveldb is the default database, this supports multiple filer replicas that will [sync automatically](https://github.com/seaweedfs/seaweedfs/wiki/Filer-Store-Replication), with some [limitations](https://github.com/seaweedfs/seaweedfs/wiki/Filer-Store-Replication#limitation).
When the [limitations](https://github.com/seaweedfs/seaweedfs/wiki/Filer-Store-Replication#limitation) apply, or for a large number of filer replicas, an external datastore is recommended.
Such as MySQL-compatible database, as specified in the `values.yaml` at `filer.extraEnvironmentVars`.
This database should be pre-configured and initialized by running:
```sql
CREATE TABLE IF NOT EXISTS `filemeta` (
`dirhash` BIGINT NOT NULL COMMENT 'first 64 bits of MD5 hash value of directory field',
`name` VARCHAR(766) NOT NULL COMMENT 'directory or file name',
`directory` TEXT NOT NULL COMMENT 'full path to parent directory',
`meta` LONGBLOB,
PRIMARY KEY (`dirhash`, `name`)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
```
Alternative database can also be configured (e.g. leveldb, postgres) following the instructions at `filer.extraEnvironmentVars`.
### Node Labels
Kubernetes nodes can have labels which help to define which node(Host) will run which pod:
Here is an example:
* s3/filer/master needs the label **sw-backend=true**
* volume need the label **sw-volume=true**
to label a node to be able to run all pod types in k8s:
```
kubectl label node YOUR_NODE_NAME sw-volume=true,sw-backend=true
```
on production k8s deployment you will want each pod to have a different host,
especially the volume server and the masters, all pods (master/volume/filer)
should have anti-affinity rules to disallow running multiple component pods on the same host.
If you still want to run multiple pods of the same component (master/volume/filer) on the same host please set/update the corresponding affinity rule in values.yaml to an empty one:
```affinity: ""```
## PVC - storage class ###
On the volume stateful set added support for k8s PVC, currently example
with the simple local-path-provisioner from Rancher (comes included with k3d / k3s)
https://github.com/rancher/local-path-provisioner
you can use ANY storage class you like, just update the correct storage-class
for your deployment.
## current instances config (AIO):
1 instance for each type (master/filer+s3/volume)
You can update the replicas count for each node type in values.yaml,
need to add more nodes with the corresponding labels if applicable.
Most of the configuration are available through values.yaml any pull requests to expand functionality or usability are greatly appreciated. Any pull request must pass [chart-testing](https://github.com/helm/chart-testing).
## S3 configuration
To enable an s3 endpoint for your filer with a default install add the following to your values.yaml:
```yaml
filer:
s3:
enabled: true
```
### Enabling Authentication to S3
To enable authentication for S3, you have two options:
- let the helm chart create an admin user as well as a read only user
- provide your own s3 config.json file via an existing Kubernetes Secret
#### Use the default credentials for S3
Example parameters for your values.yaml:
```yaml
filer:
s3:
enabled: true
enableAuth: true
```
#### Provide your own credentials for S3
Example parameters for your values.yaml:
```yaml
filer:
s3:
enabled: true
enableAuth: true
existingConfigSecret: my-s3-secret
```
Example existing secret with your s3 config to create an admin user and readonly user, both with credentials:
```yaml
---
# Source: seaweedfs/templates/seaweedfs-s3-secret.yaml
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: my-s3-secret
namespace: seaweedfs
labels:
app.kubernetes.io/name: seaweedfs
app.kubernetes.io/component: s3
stringData:
# this key must be an inline json config file
seaweedfs_s3_config: '{"identities":[{"name":"anvAdmin","credentials":[{"accessKey":"snu8yoP6QAlY0ne4","secretKey":"PNzBcmeLNEdR0oviwm04NQAicOrDH1Km"}],"actions":["Admin","Read","Write"]},{"name":"anvReadOnly","credentials":[{"accessKey":"SCigFee6c5lbi04A","secretKey":"kgFhbT38R8WUYVtiFQ1OiSVOrYr3NKku"}],"actions":["Read"]}]}'
```
File diff suppressed because it is too large. Load diff
@@ -1,19 +0,0 @@
{{- if and .Values.global.enableSecurity (not .Values.certificates.externalCertificates.enabled)}}
apiVersion: cert-manager.io/v1{{ if .Values.global.certificates.alphacrds }}alpha1{{ end }}
kind: Certificate
metadata:
name: {{ template "seaweedfs.name" . }}-ca-cert
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
secretName: {{ template "seaweedfs.name" . }}-ca-cert
commonName: "{{ template "seaweedfs.name" . }}-root-ca"
isCA: true
issuerRef:
name: {{ template "seaweedfs.name" . }}-clusterissuer
kind: ClusterIssuer
{{- end }}
@@ -1,15 +0,0 @@
{{- if and .Values.global.enableSecurity (not .Values.certificates.externalCertificates.enabled)}}
apiVersion: cert-manager.io/v1{{ if .Values.global.certificates.alphacrds }}alpha1{{ end }}
kind: Issuer
metadata:
name: {{ template "seaweedfs.name" . }}-ca-issuer
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
ca:
secretName: {{ template "seaweedfs.name" . }}-ca-cert
{{- end }}
@@ -1,13 +0,0 @@
{{- if and .Values.global.enableSecurity (not .Values.certificates.externalCertificates.enabled)}}
apiVersion: cert-manager.io/v1{{ if .Values.global.certificates.alphacrds }}alpha1{{ end }}
kind: ClusterIssuer
metadata:
name: {{ template "seaweedfs.name" . }}-clusterissuer
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
selfSigned: {}
{{- end }}
@@ -1,48 +0,0 @@
{{- if .Values.filer.enabled }}
apiVersion: v1
kind: Service
metadata:
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
name: {{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec:
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: "swfs-filer"
port: {{ .Values.filer.port }}
targetPort: {{ .Values.filer.port }}
protocol: TCP
- name: "swfs-filer-grpc"
port: {{ .Values.filer.grpcPort }}
targetPort: {{ .Values.filer.grpcPort }}
protocol: TCP
{{- if .Values.filer.s3.enabled }}
- name: "swfs-s3"
port: {{ .Values.filer.s3.port }}
targetPort: {{ .Values.filer.s3.port }}
protocol: TCP
{{- if .Values.filer.s3.httpsPort }}
- name: "swfs-s3-tls"
port: {{ .Values.filer.s3.httpsPort }}
targetPort: {{ .Values.filer.s3.httpsPort }}
protocol: TCP
{{- end }}
{{- end }}
{{- if .Values.filer.metricsPort }}
- name: "metrics"
port: {{ .Values.filer.metricsPort }}
targetPort: {{ .Values.filer.metricsPort }}
protocol: TCP
{{- end }}
selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: filer
{{- end }}
@@ -1,26 +0,0 @@
{{- if .Values.filer.enabled }}
{{- if .Values.filer.metricsPort }}
{{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec:
endpoints:
- interval: 30s
port: metrics
scrapeTimeout: 5s
selector:
matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: filer
{{- end }}
{{- end }}
{{- end }}
@@ -1,48 +0,0 @@
{{- if .Values.filer.enabled }}
{{- if .Values.filer.ingress.enabled }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: ingress-{{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }}
{{- if .Values.filer.ingress.annotations }}
annotations:
{{ tpl .Values.filer.ingress.annotations . | nindent 4 | trim }}
{{- end }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec:
ingressClassName: {{ .Values.filer.ingress.className | quote }}
tls:
{{ .Values.filer.ingress.tls | default list | toYaml | nindent 6}}
rules:
- http:
paths:
- path: /sw-filer/?(.*)
pathType: ImplementationSpecific
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ template "seaweedfs.name" . }}-filer
port:
number: {{ .Values.filer.port }}
#name:
{{- else }}
serviceName: {{ template "seaweedfs.name" . }}-filer
servicePort: {{ .Values.filer.port }}
{{- end }}
{{- if .Values.filer.ingress.host }}
host: {{ .Values.filer.ingress.host }}
{{- end }}
{{- end }}
{{- end }}
@@ -1,15 +0,0 @@
{{- if .Values.master.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "seaweedfs.name" . }}-master-config
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
data:
master.toml: |-
{{ .Values.master.config | nindent 4 }}
{{- end }}
@@ -1,48 +0,0 @@
{{- if .Values.master.enabled }}
{{- if .Values.master.ingress.enabled }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: ingress-{{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }}
{{- if .Values.master.ingress.annotations }}
annotations:
{{ tpl .Values.master.ingress.annotations . | nindent 4 | trim }}
{{- end }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: master
spec:
ingressClassName: {{ .Values.master.ingress.className | quote }}
tls:
{{ .Values.master.ingress.tls | default list | toYaml | nindent 6 }}
rules:
- http:
paths:
- path: /sw-master/?(.*)
pathType: ImplementationSpecific
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ template "seaweedfs.name" . }}-master
port:
number: {{ .Values.master.port }}
#name:
{{- else }}
serviceName: {{ template "seaweedfs.name" . }}-master
servicePort: {{ .Values.master.port }}
{{- end }}
{{- if .Values.filer.ingress.host }}
host: {{ .Values.master.ingress.host }}
{{- end }}
{{- end }}
{{- end }}
@@ -1,26 +0,0 @@
{{- if .Values.master.enabled }}
{{- if .Values.master.metricsPort }}
{{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: master
spec:
endpoints:
- interval: 30s
port: metrics
scrapeTimeout: 5s
selector:
matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: master
{{- end }}
{{- end }}
{{- end }}
@@ -1,96 +0,0 @@
{{- if .Values.master.enabled }}
{{- if .Values.filer.s3.enabled }}
{{- if .Values.filer.s3.createBuckets }}
---
apiVersion: batch/v1
kind: Job
metadata:
name: "{{ $.Release.Name }}-bucket-hook"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
annotations:
"helm.sh/hook": post-install
"helm.sh/hook-weight": "-5"
"helm.sh/hook-delete-policy": hook-succeeded
spec:
template:
metadata:
name: "{{ .Release.Name }}"
labels:
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/instance: {{ .Release.Name | quote }}
spec:
restartPolicy: Never
containers:
- name: post-install-job
image: {{ template "master.image" . }}
env:
- name: WEED_CLUSTER_DEFAULT
value: "sw"
- name: WEED_CLUSTER_SW_MASTER
value: "{{ template "seaweedfs.name" . }}-master.{{ .Release.Namespace }}:9333"
- name: WEED_CLUSTER_SW_FILER
value: "{{ template "seaweedfs.name" . }}-filer-client.{{ .Release.Namespace }}:8888"
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: SEAWEEDFS_FULLNAME
value: "{{ template "seaweedfs.name" . }}"
command:
- "/bin/sh"
- "-ec"
- |
{{- range $reg, $props := $.Values.filer.s3.createBuckets }}
exec /bin/echo \
"s3.bucket.create --name {{ $props.name }}" |\
/usr/bin/weed shell
{{- end }}
{{- range $reg, $props := $.Values.filer.s3.createBuckets }}
{{- if $props.anonymousRead }}
exec /bin/echo \
"s3.configure --user anonymous \
--buckets {{ $props.name }} \
--actions Read \
--apply true" |\
/usr/bin/weed shell
{{- end }}
{{- end }}
{{- if .Values.filer.s3.enableAuth }}
volumeMounts:
- name: config-users
mountPath: /etc/sw
readOnly: true
{{- end }}
ports:
- containerPort: {{ .Values.master.port }}
name: swfs-master
{{- if and .Values.global.monitoring.enabled .Values.master.metricsPort }}
- containerPort: {{ .Values.master.metricsPort }}
name: metrics
{{- end }}
- containerPort: {{ .Values.master.grpcPort }}
#name: swfs-master-grpc
{{- if .Values.filer.s3.enableAuth }}
volumes:
- name: config-users
secret:
defaultMode: 420
{{- if not (empty .Values.filer.s3.existingConfigSecret) }}
secretName: {{ .Values.filer.s3.existingConfigSecret }}
{{- else }}
secretName: seaweedfs-s3-secret
{{- end }}
{{- end }}{{/** if .Values.filer.s3.enableAuth **/}}
{{- end }}{{/** if .Values.master.enabled **/}}
{{- end }}{{/** if .Values.filer.s3.enabled **/}}
{{- end }}{{/** if .Values.filer.s3.createBuckets **/}}
@@ -1,46 +0,0 @@
{{- if .Values.s3.ingress.enabled }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: ingress-{{ template "seaweedfs.name" . }}-s3
namespace: {{ .Release.Namespace }}
{{- if .Values.s3.ingress.annotations }}
annotations:
{{- tpl .Values.s3.ingress.annotations . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: s3
spec:
ingressClassName: {{ .Values.s3.ingress.className | quote }}
tls:
{{ .Values.s3.ingress.tls | default list | toYaml | nindent 6}}
rules:
- http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ template "seaweedfs.name" . }}-s3
port:
number: {{ .Values.s3.port }}
#name:
{{- else }}
serviceName: {{ template "seaweedfs.name" . }}-s3
servicePort: {{ .Values.s3.port }}
{{- end }}
{{- if .Values.s3.ingress.host }}
host: {{ .Values.s3.ingress.host }}
{{- end }}
{{- end }}
@@ -1,34 +0,0 @@
{{- if or .Values.s3.enabled .Values.filer.s3.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ template "seaweedfs.name" . }}-s3
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: s3
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
internalTrafficPolicy: {{ .Values.s3.internalTrafficPolicy | default "Cluster" }}
ports:
- name: "swfs-s3"
port: {{ if .Values.s3.enabled }}{{ .Values.s3.port }}{{ else }}{{ .Values.filer.s3.port }}{{ end }}
targetPort: {{ if .Values.s3.enabled }}{{ .Values.s3.port }}{{ else }}{{ .Values.filer.s3.port }}{{ end }}
protocol: TCP
{{- if and .Values.s3.enabled .Values.s3.httpsPort }}
- name: "swfs-s3-tls"
port: {{ .Values.s3.httpsPort }}
targetPort: {{ .Values.s3.httpsPort }}
protocol: TCP
{{- end }}
{{- if and .Values.s3.enabled .Values.s3.metricsPort }}
- name: "metrics"
port: {{ .Values.s3.metricsPort }}
targetPort: {{ .Values.s3.metricsPort }}
protocol: TCP
{{- end }}
selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: {{ if .Values.s3.enabled }}s3{{ else }}filer{{ end }}
{{- end }}
@@ -1,46 +0,0 @@
{{- if .Values.global.createClusterRole }}
#hack for delete pod master after migration
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Values.global.serviceAccountName }}-rw-cr
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.global.serviceAccountName }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: system:serviceaccount:{{ .Values.global.serviceAccountName }}:default
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
subjects:
- kind: ServiceAccount
name: {{ .Values.global.serviceAccountName }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Values.global.serviceAccountName }}-rw-cr
{{- end }}
@@ -1,26 +0,0 @@
{{- if .Values.volume.enabled }}
{{- if .Values.volume.metricsPort }}
{{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "seaweedfs.name" . }}-volume
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: volume
spec:
endpoints:
- interval: 30s
port: metrics
scrapeTimeout: 5s
selector:
matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: volume
{{- end }}
{{- end }}
{{- end }}
File renamed without changes.
@@ -1,5 +1,5 @@
apiVersion: v1 apiVersion: v1
description: SeaweedFS description: SeaweedFS
name: seaweedfs name: seaweedfs
appVersion: "3.65" appVersion: "3.36"
version: 3.65.0 version: "3.36"
+62
View File
@@ -0,0 +1,62 @@
# SEAWEEDFS - helm chart (2.x)
## Info:
* master/filer/volume are stateful sets with anti-affinity on the hostname,
so your deployment will be spread/HA.
* chart is using memsql(mysql) as the filer backend to enable HA (multiple filer instances)
and backup/HA memsql can provide.
* mysql user/password are created in a k8s secret (secret-seaweedfs-db.yaml) and injected to the filer
with ENV.
* cert config exists and can be enabled, but not been tested.
## Prerequisites
### Database
A running MySQL-compatible database is expected by default, as specified in the `values.yaml` at `filer.extraEnvironmentVars`.
This database should be pre-configured and initialized by running:
```sql
CREATE TABLE IF NOT EXISTS filemeta (
dirhash BIGINT COMMENT 'first 64 bits of MD5 hash value of directory field',
name VARCHAR(1000) BINARY COMMENT 'directory or file name',
directory TEXT BINARY COMMENT 'full path to parent directory',
meta LONGBLOB,
PRIMARY KEY (dirhash, name)
) DEFAULT CHARSET=utf8;
```
Alternative database can also be configured (e.g. leveldb) following the instructions at `filer.extraEnvironmentVars`.
### Node Labels
Kubernetes node have labels which help to define which node(Host) will run which pod:
* s3/filer/master needs the label **sw-backend=true**
* volume need the label **sw-volume=true**
to label a node to be able to run all pod types in k8s:
```
kubectl label node YOUR_NODE_NAME sw-volume=true,sw-backend=true
```
on production k8s deployment you will want each pod to have a different host,
especially the volume server & the masters, currently all pods (master/volume/filer)
have anti-affinity rule to disallow running multiple pod type on the same host.
if you still want to run multiple pods of the same type (master/volume/filer) on the same host
please set/update the corresponding affinity rule in values.yaml to an empty one:
```affinity: ""```
## PVC - storage class ###
on the volume stateful set added support for K8S PVC, currently example
with the simple local-path-provisioner from Rancher (comes included with k3d / k3s)
https://github.com/rancher/local-path-provisioner
you can use ANY storage class you like, just update the correct storage-class
for your deployment.
## current instances config (AIO):
1 instance for each type (master/filer+s3/volume)
you can update the replicas count for each node type in values.yaml,
need to add more nodes with the corresponding labels.
most of the configuration are available through values.yaml
File diff suppressed because it is too large. Load diff
@@ -118,7 +118,20 @@ Inject extra environment vars in the format key:value, if populated
{{- if or (or (eq .Values.volume.data.type "persistentVolumeClaim") (and (eq .Values.volume.idx.type "persistentVolumeClaim") .Values.volume.dir_idx )) (eq .Values.volume.logs.type "persistentVolumeClaim") -}} {{- if or (or (eq .Values.volume.data.type "persistentVolumeClaim") (and (eq .Values.volume.idx.type "persistentVolumeClaim") .Values.volume.dir_idx )) (eq .Values.volume.logs.type "persistentVolumeClaim") -}}
{{- printf "true" -}} {{- printf "true" -}}
{{- else -}} {{- else -}}
{{- printf "" -}} {{- printf "false" -}}
{{- end -}}
{{- end -}}
{{/* check if any Volume HostPath exists */}}
{{- define "volume.hostpath_exists" -}}
{{- if or (or (eq .Values.volume.data.type "hostPath") (and (eq .Values.volume.idx.type "hostPath") .Values.volume.dir_idx )) (eq .Values.volume.logs.type "hostPath") -}}
{{- printf "true" -}}
{{- else -}}
{{- if or .Values.global.enableSecurity .Values.volume.extraVolumes -}}
{{- printf "true" -}}
{{- else -}}
{{- printf "false" -}}
{{- end -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -127,7 +140,16 @@ Inject extra environment vars in the format key:value, if populated
{{- if or (eq .Values.filer.data.type "persistentVolumeClaim") (eq .Values.filer.logs.type "persistentVolumeClaim") -}} {{- if or (eq .Values.filer.data.type "persistentVolumeClaim") (eq .Values.filer.logs.type "persistentVolumeClaim") -}}
{{- printf "true" -}} {{- printf "true" -}}
{{- else -}} {{- else -}}
{{- printf "" -}} {{- printf "false" -}}
{{- end -}}
{{- end -}}
{{/* check if any Filer HostPath exists */}}
{{- define "filer.hostpath_exists" -}}
{{- if or (eq .Values.filer.data.type "hostPath") (eq .Values.filer.logs.type "hostPath") -}}
{{- printf "true" -}}
{{- else -}}
{{- printf "false" -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@@ -136,49 +158,28 @@ Inject extra environment vars in the format key:value, if populated
{{- if or (eq .Values.master.data.type "persistentVolumeClaim") (eq .Values.master.logs.type "persistentVolumeClaim") -}} {{- if or (eq .Values.master.data.type "persistentVolumeClaim") (eq .Values.master.logs.type "persistentVolumeClaim") -}}
{{- printf "true" -}} {{- printf "true" -}}
{{- else -}} {{- else -}}
{{- printf "" -}} {{- printf "false" -}}
{{- end -}}
{{- end -}}
{{/* check if any Master HostPath exists */}}
{{- define "master.hostpath_exists" -}}
{{- if or (eq .Values.master.data.type "hostPath") (eq .Values.master.logs.type "hostPath") -}}
{{- printf "true" -}}
{{- else -}}
{{- if or .Values.global.enableSecurity .Values.volume.extraVolumes -}}
{{- printf "true" -}}
{{- else -}}
{{- printf "false" -}}
{{- end -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/* check if any InitContainers exist for Volumes */}} {{/* check if any InitContainers exist for Volumes */}}
{{- define "volume.initContainers_exists" -}} {{- define "volume.initContainers_exists" -}}
{{- if or (not (empty .Values.volume.idx )) (not (empty .Values.volume.initContainers )) -}} {{- if or (not (empty .Values.volume.dir_idx )) (not (empty .Values.volume.initContainers )) -}}
{{- printf "true" -}} {{- printf "true" -}}
{{- else -}} {{- else -}}
{{- printf "" -}} {{- printf "false" -}}
{{- end -}}
{{- end -}}
{{/* Return the proper imagePullSecrets */}}
{{- define "seaweedfs.imagePullSecrets" -}}
{{- if .Values.global.imagePullSecrets }}
{{- if kindIs "string" .Values.global.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.global.imagePullSecrets }}
{{- else }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
{{- end }}
{{- end -}}
{{/*
Renders a value that contains template perhaps with scope if the scope is present.
Usage:
{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ ) }}
{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $ "scope" $app ) }}
*/}}
{{- define "common.tplvalues.render" -}}
{{- $value := typeIs "string" .value | ternary .value (.value | toYaml) }}
{{- if contains "{{" (toJson .value) }}
{{- if .scope }}
{{- tpl (cat "{{- with $.RelativeScope -}}" $value "{{- end }}") (merge (dict "RelativeScope" .scope) .context) }}
{{- else }}
{{- tpl $value .context }}
{{- end }}
{{- else }}
{{- $value }}
{{- end }}
{{- end -}} {{- end -}}
{{- end -}}
+14
View File
@@ -0,0 +1,14 @@
{{- if .Values.global.enableSecurity }}
apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
name: {{ template "seaweedfs.name" . }}-ca-cert
namespace: {{ .Release.Namespace }}
spec:
secretName: {{ template "seaweedfs.name" . }}-ca-cert
commonName: "{{ template "seaweedfs.name" . }}-root-ca"
isCA: true
issuerRef:
name: {{ template "seaweedfs.name" . }}-clusterissuer
kind: ClusterIssuer
{{- end }}
@@ -0,0 +1,8 @@
{{- if .Values.global.enableSecurity }}
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
name: {{ template "seaweedfs.name" . }}-clusterissuer
spec:
selfSigned: {}
{{- end }}
@@ -1,22 +1,16 @@
{{- if and .Values.global.enableSecurity (not .Values.certificates.externalCertificates.enabled)}} {{- if .Values.global.enableSecurity }}
apiVersion: cert-manager.io/v1{{ if .Values.global.certificates.alphacrds }}alpha1{{ end }} apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate kind: Certificate
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-client-cert name: {{ template "seaweedfs.name" . }}-client-cert
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec: spec:
secretName: {{ template "seaweedfs.name" . }}-client-cert secretName: {{ template "seaweedfs.name" . }}-client-cert
issuerRef: issuerRef:
name: {{ template "seaweedfs.name" . }}-ca-issuer name: {{ template "seaweedfs.name" . }}-clusterissuer
kind: Issuer kind: ClusterIssuer
commonName: {{ .Values.certificates.commonName }} commonName: {{ .Values.certificates.commonName }}
subject: organization:
organizations:
- "SeaweedFS CA" - "SeaweedFS CA"
dnsNames: dnsNames:
- '*.{{ .Release.Namespace }}' - '*.{{ .Release.Namespace }}'
@@ -32,9 +26,8 @@ spec:
- {{ . }} - {{ . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
privateKey: keyAlgorithm: {{ .Values.certificates.keyAlgorithm }}
algorithm: {{ .Values.certificates.keyAlgorithm }} keySize: {{ .Values.certificates.keySize }}
size: {{ .Values.certificates.keySize }}
duration: {{ .Values.certificates.duration }} duration: {{ .Values.certificates.duration }}
renewBefore: {{ .Values.certificates.renewBefore }} renewBefore: {{ .Values.certificates.renewBefore }}
{{- end }} {{- end }}
@@ -1,23 +1,16 @@
{{- if and .Values.global.enableSecurity (not .Values.certificates.externalCertificates.enabled)}} {{- if .Values.global.enableSecurity }}
apiVersion: cert-manager.io/v1{{ if .Values.global.certificates.alphacrds }}alpha1{{ end }} apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate kind: Certificate
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-filer-cert name: {{ template "seaweedfs.name" . }}-filer-cert
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec: spec:
secretName: {{ template "seaweedfs.name" . }}-filer-cert secretName: {{ template "seaweedfs.name" . }}-filer-cert
issuerRef: issuerRef:
name: {{ template "seaweedfs.name" . }}-ca-issuer name: {{ template "seaweedfs.name" . }}-clusterissuer
kind: Issuer kind: ClusterIssuer
commonName: {{ .Values.certificates.commonName }} commonName: {{ .Values.certificates.commonName }}
subject: organization:
organizations:
- "SeaweedFS CA" - "SeaweedFS CA"
dnsNames: dnsNames:
- '*.{{ .Release.Namespace }}' - '*.{{ .Release.Namespace }}'
@@ -33,9 +26,8 @@ spec:
- {{ . }} - {{ . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
privateKey: keyAlgorithm: {{ .Values.certificates.keyAlgorithm }}
algorithm: {{ .Values.certificates.keyAlgorithm }} keySize: {{ .Values.certificates.keySize }}
size: {{ .Values.certificates.keySize }}
duration: {{ .Values.certificates.duration }} duration: {{ .Values.certificates.duration }}
renewBefore: {{ .Values.certificates.renewBefore }} renewBefore: {{ .Values.certificates.renewBefore }}
{{- end }} {{- end }}
@@ -1,15 +1,11 @@
{{- if .Values.filer.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-filer-client name: {{ template "seaweedfs.name" . }}-filer-client
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} component: filer
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: filer
{{- if .Values.filer.metricsPort }} {{- if .Values.filer.metricsPort }}
monitoring: "true" monitoring: "true"
{{- end }} {{- end }}
@@ -31,6 +27,5 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
selector: selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: filer component: filer
{{- end }}
@@ -0,0 +1,31 @@
apiVersion: v1
kind: Service
metadata:
annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
name: {{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "seaweedfs.name" . }}
component: filer
spec:
clusterIP: None
publishNotReadyAddresses: true
ports:
- name: "swfs-filer"
port: {{ .Values.filer.port }}
targetPort: {{ .Values.filer.port }}
protocol: TCP
- name: "swfs-filer-grpc"
port: {{ .Values.filer.grpcPort }}
targetPort: {{ .Values.filer.grpcPort }}
protocol: TCP
{{- if .Values.filer.metricsPort }}
- name: "metrics"
port: {{ .Values.filer.metricsPort }}
targetPort: {{ .Values.filer.metricsPort }}
protocol: TCP
{{- end }}
selector:
app: {{ template "seaweedfs.name" . }}
component: filer
@@ -0,0 +1,21 @@
{{- if .Values.filer.metricsPort }}
{{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "seaweedfs.name" . }}
component: filer
spec:
endpoints:
- interval: 30s
port: metrics
scrapeTimeout: 5s
selector:
matchLabels:
app: {{ template "seaweedfs.name" . }}
component: filer
{{- end }}
{{- end }}
@@ -5,14 +5,13 @@ metadata:
name: {{ template "seaweedfs.name" . }}-filer name: {{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }} heritage: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
app.kubernetes.io/component: filer
spec: spec:
serviceName: {{ template "seaweedfs.name" . }}-filer serviceName: {{ template "seaweedfs.name" . }}-filer
podManagementPolicy: {{ .Values.filer.podManagementPolicy }} podManagementPolicy: Parallel
replicas: {{ .Values.filer.replicas }} replicas: {{ .Values.filer.replicas }}
{{- if (gt (int .Values.filer.updatePartition) 0) }} {{- if (gt (int .Values.filer.updatePartition) 0) }}
updateStrategy: updateStrategy:
@@ -22,23 +21,17 @@ spec:
{{- end }} {{- end }}
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/component: filer release: {{ .Release.Name }}
component: filer
template: template:
metadata: metadata:
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
app.kubernetes.io/component: filer component: filer
{{ with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{ with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec: spec:
restartPolicy: {{ default .Values.global.restartPolicy .Values.filer.restartPolicy }} restartPolicy: {{ default .Values.global.restartPolicy .Values.filer.restartPolicy }}
{{- if .Values.filer.affinity }} {{- if .Values.filer.affinity }}
@@ -49,10 +42,11 @@ spec:
tolerations: tolerations:
{{ tpl .Values.filer.tolerations . | nindent 8 | trim }} {{ tpl .Values.filer.tolerations . | nindent 8 | trim }}
{{- end }} {{- end }}
{{- include "seaweedfs.imagePullSecrets" . | nindent 6 }} {{- if .Values.global.imagePullSecrets }}
{{- if .Values.global.createClusterRole }} imagePullSecrets:
serviceAccountName: {{ .Values.filer.serviceAccountName | default .Values.global.serviceAccountName | quote }} # for deleting statefulset pods after migration - name: {{ .Values.global.imagePullSecrets }}
{{- end }} {{- end }}
serviceAccountName: seaweedfs-rw-sa #hack for delete pod master after migration
terminationGracePeriodSeconds: 60 terminationGracePeriodSeconds: 60
{{- if .Values.filer.priorityClassName }} {{- if .Values.filer.priorityClassName }}
priorityClassName: {{ .Values.filer.priorityClassName | quote }} priorityClassName: {{ .Values.filer.priorityClassName | quote }}
@@ -94,41 +88,20 @@ spec:
{{- if .Values.filer.extraEnvironmentVars }} {{- if .Values.filer.extraEnvironmentVars }}
{{- range $key, $value := .Values.filer.extraEnvironmentVars }} {{- range $key, $value := .Values.filer.extraEnvironmentVars }}
- name: {{ $key }} - name: {{ $key }}
{{- if kindIs "string" $value }}
value: {{ $value | quote }} value: {{ $value | quote }}
{{- else }}
valueFrom:
{{ toYaml $value | nindent 16 | trim }}
{{- end -}}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.global.extraEnvironmentVars }} {{- if .Values.global.extraEnvironmentVars }}
{{- range $key, $value := .Values.global.extraEnvironmentVars }} {{- range $key, $value := .Values.global.extraEnvironmentVars }}
- name: {{ $key }} - name: {{ $key }}
{{- if kindIs "string" $value }}
value: {{ $value | quote }} value: {{ $value | quote }}
{{- else }}
valueFrom:
{{ toYaml $value | nindent 16 | trim }}
{{- end -}}
{{- end }}
{{- end }}
{{- if .Values.filer.secretExtraEnvironmentVars }}
{{- range $key, $value := .Values.filer.secretExtraEnvironmentVars }}
- name: {{ $key }}
valueFrom: {{ toYaml $value | nindent 16 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
command: command:
- "/bin/sh" - "/bin/sh"
- "-ec" - "-ec"
- | - |
exec /usr/bin/weed \ exec /usr/bin/weed -logdir=/logs \
{{- if eq .Values.filer.logs.type "hostPath" }}
-logdir=/logs \
{{- else }}
-logtostderr=true \
{{- end }}
{{- if .Values.filer.loggingOverrideLevel }} {{- if .Values.filer.loggingOverrideLevel }}
-v={{ .Values.filer.loggingOverrideLevel }} \ -v={{ .Values.filer.loggingOverrideLevel }} \
{{- else }} {{- else }}
@@ -164,9 +137,6 @@ spec:
-encryptVolumeData \ -encryptVolumeData \
{{- end }} {{- end }}
-ip=${POD_IP} \ -ip=${POD_IP} \
{{- if .Values.filer.filerGroup}}
-filerGroup={{ .Values.filer.filerGroup}} \
{{- end }}
{{- if .Values.filer.s3.enabled }} {{- if .Values.filer.s3.enabled }}
-s3 \ -s3 \
-s3.port={{ .Values.filer.s3.port }} \ -s3.port={{ .Values.filer.s3.port }} \
@@ -174,9 +144,6 @@ spec:
-s3.domainName={{ .Values.filer.s3.domainName }} \ -s3.domainName={{ .Values.filer.s3.domainName }} \
{{- end }} {{- end }}
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
{{- if .Values.filer.s3.httpsPort }}
-s3.port.https={{ .Values.filer.s3.httpsPort }} \
{{- end }}
-s3.cert.file=/usr/local/share/ca-certificates/client/tls.crt \ -s3.cert.file=/usr/local/share/ca-certificates/client/tls.crt \
-s3.key.file=/usr/local/share/ca-certificates/client/tls.key \ -s3.key.file=/usr/local/share/ca-certificates/client/tls.key \
{{- end }} {{- end }}
@@ -190,18 +157,14 @@ spec:
-s3.auditLogConfig=/etc/sw/filer_s3_auditLogConfig.json \ -s3.auditLogConfig=/etc/sw/filer_s3_auditLogConfig.json \
{{- end }} {{- end }}
{{- end }} {{- end }}
-master={{ if .Values.global.masterServer }}{{.Values.global.masterServer}}{{ else }}{{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ $.Release.Namespace }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }}{{ end }} -master={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }}
volumeMounts: volumeMounts:
{{- if eq .Values.filer.logs.type "hostPath" }}
- name: seaweedfs-filer-log-volume - name: seaweedfs-filer-log-volume
mountPath: "/logs/" mountPath: "/logs/"
{{- end }} - mountPath: /etc/sw
{{- if .Values.filer.s3.enableAuth }} name: config-users
- name: config-users
mountPath: /etc/sw
readOnly: true readOnly: true
{{- end }} {{- if .Values.filer.enablePVC }}
{{- if (or .Values.filer.enablePVC (or (eq .Values.filer.data.type "hostPath") (eq .Values.filer.data.type "persistentVolumeClaim"))) }}
- name: data-filer - name: data-filer
mountPath: /data mountPath: /data
{{- end }} {{- end }}
@@ -234,73 +197,50 @@ spec:
name: metrics name: metrics
- containerPort: {{ .Values.filer.grpcPort }} - containerPort: {{ .Values.filer.grpcPort }}
#name: swfs-filer-grpc #name: swfs-filer-grpc
{{- if .Values.filer.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: {{ .Values.filer.readinessProbe.httpGet.path }} path: /
port: {{ .Values.filer.port }} port: {{ .Values.filer.port }}
scheme: {{ .Values.filer.readinessProbe.scheme }} scheme: HTTP
initialDelaySeconds: {{ .Values.filer.readinessProbe.initialDelaySeconds }} initialDelaySeconds: 10
periodSeconds: {{ .Values.filer.readinessProbe.periodSeconds }} periodSeconds: 15
successThreshold: {{ .Values.filer.readinessProbe.successThreshold }} successThreshold: 1
failureThreshold: {{ .Values.filer.readinessProbe.failureThreshold }} failureThreshold: 100
timeoutSeconds: {{ .Values.filer.readinessProbe.timeoutSeconds }} timeoutSeconds: 10
{{- end }}
{{- if .Values.filer.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: {{ .Values.filer.livenessProbe.httpGet.path }} path: /
port: {{ .Values.filer.port }} port: {{ .Values.filer.port }}
scheme: {{ .Values.filer.livenessProbe.scheme }} scheme: HTTP
initialDelaySeconds: {{ .Values.filer.livenessProbe.initialDelaySeconds }} initialDelaySeconds: 20
periodSeconds: {{ .Values.filer.livenessProbe.periodSeconds }} periodSeconds: 30
successThreshold: {{ .Values.filer.livenessProbe.successThreshold }} successThreshold: 1
failureThreshold: {{ .Values.filer.livenessProbe.failureThreshold }} failureThreshold: 5
timeoutSeconds: {{ .Values.filer.livenessProbe.timeoutSeconds }} timeoutSeconds: 10
{{- end }}
{{- if .Values.filer.resources }} {{- if .Values.filer.resources }}
resources: resources:
{{ tpl .Values.filer.resources . | nindent 12 | trim }} {{ tpl .Values.filer.resources . | nindent 12 | trim }}
{{- end }} {{- end }}
{{- if .Values.filer.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.filer.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes: volumes:
{{- if eq .Values.filer.logs.type "hostPath" }} {{- if eq .Values.filer.logs.type "hostPath" }}
- name: seaweedfs-filer-log-volume - name: seaweedfs-filer-log-volume
hostPath: hostPath:
path: {{ .Values.filer.logs.hostPathPrefix }}/logs/seaweedfs/filer path: /storage/logs/seaweedfs/filer
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq .Values.filer.logs.type "existingClaim" }}
- name: seaweedfs-filer-log-volume
persistentVolumeClaim:
claimName: {{ .Values.filer.logs.claimName }}
{{- end }}
{{- if eq .Values.filer.data.type "hostPath" }} {{- if eq .Values.filer.data.type "hostPath" }}
- name: data-filer - name: data-filer
hostPath: hostPath:
path: {{ .Values.filer.data.hostPathPrefix }}/filer_store path: /storage/filer_store
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq .Values.filer.data.type "existingClaim" }}
- name: data-filer
persistentVolumeClaim:
claimName: {{ .Values.filer.data.claimName }}
{{- end }}
- name: db-schema-config-volume - name: db-schema-config-volume
configMap: configMap:
name: seaweedfs-db-init-config name: seaweedfs-db-init-config
{{- if and .Values.filer.s3.enabled .Values.filer.s3.enableAuth }}
- name: config-users - name: config-users
secret: secret:
defaultMode: 420 defaultMode: 420
{{- if .Values.filer.s3.existingConfigSecret }}
secretName: {{ .Values.filer.s3.existingConfigSecret }}
{{- else }}
secretName: seaweedfs-s3-secret secretName: seaweedfs-s3-secret
{{- end }}
{{- end }}
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
- name: security-config - name: security-config
configMap: configMap:
@@ -326,7 +266,7 @@ spec:
nodeSelector: nodeSelector:
{{ tpl .Values.filer.nodeSelector . | indent 8 | trim }} {{ tpl .Values.filer.nodeSelector . | indent 8 | trim }}
{{- end }} {{- end }}
{{- if and (.Values.filer.enablePVC) (eq .Values.filer.data.type "persistentVolumeClaim") }} {{- if .Values.filer.enablePVC }}
# DEPRECATION: Deprecate in favor of filer.data section below # DEPRECATION: Deprecate in favor of filer.data section below
volumeClaimTemplates: volumeClaimTemplates:
- metadata: - metadata:
@@ -344,13 +284,9 @@ spec:
{{- $pvc_exists := include "filer.pvc_exists" . -}} {{- $pvc_exists := include "filer.pvc_exists" . -}}
{{- if $pvc_exists }} {{- if $pvc_exists }}
volumeClaimTemplates: volumeClaimTemplates:
{{- if eq .Values.filer.data.type "persistentVolumeClaim" }} {{- if eq .Values.filer.data.type "persistentVolumeClaim"}}
- metadata: - metadata:
name: data-filer name: data-filer
{{- with .Values.filer.data.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.data.storageClass }} storageClassName: {{ .Values.filer.data.storageClass }}
@@ -358,13 +294,9 @@ spec:
requests: requests:
storage: {{ .Values.filer.data.size }} storage: {{ .Values.filer.data.size }}
{{- end }} {{- end }}
{{- if eq .Values.filer.logs.type "persistentVolumeClaim" }} {{- if eq .Values.filer.logs.type "persistentVolumeClaim"}}
- metadata: - metadata:
name: seaweedfs-filer-log-volume name: seaweedfs-filer-log-volume
{{- with .Values.filer.logs.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.logs.storageClass }} storageClassName: {{ .Values.filer.logs.storageClass }}
+67
View File
@@ -0,0 +1,67 @@
{{- if .Values.filer.ingress.enabled }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: ingress-{{ template "seaweedfs.name" . }}-filer
namespace: {{ .Release.Namespace }}
annotations:
{{ omit .Values.filer.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
spec:
ingressClassName: {{ .Values.filer.ingress.className | quote }}
rules:
- http:
paths:
- path: /sw-filer/?(.*)
pathType: ImplementationSpecific
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ template "seaweedfs.name" . }}-filer
port:
number: {{ .Values.filer.port }}
#name:
{{- else }}
serviceName: {{ template "seaweedfs.name" . }}-filer
servicePort: {{ .Values.filer.port }}
{{- end }}
{{- end }}
---
{{- if .Values.master.ingress.enabled }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: networking.k8s.io/v1beta1
{{- else }}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: ingress-{{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }}
annotations:
{{ omit .Values.master.ingress.annotations "kubernetes.io/ingress.class" | toYaml | nindent 4 }}
spec:
ingressClassName: {{ .Values.master.ingress.className | quote }}
rules:
- http:
paths:
- path: /sw-master/?(.*)
pathType: ImplementationSpecific
backend:
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
service:
name: {{ template "seaweedfs.name" . }}-master
port:
number: {{ .Values.master.port }}
#name:
{{- else }}
serviceName: {{ template "seaweedfs.name" . }}-master
servicePort: {{ .Values.master.port }}
{{- end }}
{{- end }}
@@ -1,23 +1,16 @@
{{- if and .Values.global.enableSecurity (not .Values.certificates.externalCertificates.enabled)}} {{- if .Values.global.enableSecurity }}
apiVersion: cert-manager.io/v1{{ if .Values.global.certificates.alphacrds }}alpha1{{ end }} apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate kind: Certificate
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-master-cert name: {{ template "seaweedfs.name" . }}-master-cert
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: master
spec: spec:
secretName: {{ template "seaweedfs.name" . }}-master-cert secretName: {{ template "seaweedfs.name" . }}-master-cert
issuerRef: issuerRef:
name: {{ template "seaweedfs.name" . }}-ca-issuer name: {{ template "seaweedfs.name" . }}-clusterissuer
kind: Issuer kind: ClusterIssuer
commonName: {{ .Values.certificates.commonName }} commonName: {{ .Values.certificates.commonName }}
subject: organization:
organizations:
- "SeaweedFS CA" - "SeaweedFS CA"
dnsNames: dnsNames:
- '*.{{ .Release.Namespace }}' - '*.{{ .Release.Namespace }}'
@@ -33,9 +26,8 @@ spec:
- {{ . }} - {{ . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
privateKey: keyAlgorithm: {{ .Values.certificates.keyAlgorithm }}
algorithm: {{ .Values.certificates.keyAlgorithm }} keySize: {{ .Values.certificates.keySize }}
size: {{ .Values.certificates.keySize }}
duration: {{ .Values.certificates.duration }} duration: {{ .Values.certificates.duration }}
renewBefore: {{ .Values.certificates.renewBefore }} renewBefore: {{ .Values.certificates.renewBefore }}
{{- end }} {{- end }}
@@ -1,16 +1,13 @@
{{- if .Values.master.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-master name: {{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: master component: master
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
annotations: annotations:
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
spec: spec:
clusterIP: None clusterIP: None
publishNotReadyAddresses: true publishNotReadyAddresses: true
@@ -30,6 +27,5 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
selector: selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: master component: master
{{- end }}
@@ -0,0 +1,21 @@
{{- if .Values.master.metricsPort }}
{{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "seaweedfs.name" . }}
component: master
spec:
endpoints:
- interval: 30s
port: metrics
scrapeTimeout: 5s
selector:
matchLabels:
app: {{ template "seaweedfs.name" . }}
component: master
{{- end }}
{{- end }}
@@ -5,13 +5,13 @@ metadata:
name: {{ template "seaweedfs.name" . }}-master name: {{ template "seaweedfs.name" . }}-master
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }} heritage: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
spec: spec:
serviceName: {{ template "seaweedfs.name" . }}-master serviceName: {{ template "seaweedfs.name" . }}-master
podManagementPolicy: {{ .Values.master.podManagementPolicy }} podManagementPolicy: Parallel
replicas: {{ .Values.master.replicas }} replicas: {{ .Values.master.replicas }}
{{- if (gt (int .Values.master.updatePartition) 0) }} {{- if (gt (int .Values.master.updatePartition) 0) }}
updateStrategy: updateStrategy:
@@ -21,23 +21,17 @@ spec:
{{- end }} {{- end }}
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/component: master release: {{ .Release.Name }}
component: master
template: template:
metadata: metadata:
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
app.kubernetes.io/component: master component: master
{{ with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{ with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec: spec:
restartPolicy: {{ default .Values.global.restartPolicy .Values.master.restartPolicy }} restartPolicy: {{ default .Values.global.restartPolicy .Values.master.restartPolicy }}
{{- if .Values.master.affinity }} {{- if .Values.master.affinity }}
@@ -48,15 +42,15 @@ spec:
tolerations: tolerations:
{{ tpl .Values.master.tolerations . | nindent 8 | trim }} {{ tpl .Values.master.tolerations . | nindent 8 | trim }}
{{- end }} {{- end }}
{{- include "seaweedfs.imagePullSecrets" . | nindent 6 }} {{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.global.imagePullSecrets }}
{{- end }}
terminationGracePeriodSeconds: 60 terminationGracePeriodSeconds: 60
{{- if .Values.master.priorityClassName }} {{- if .Values.master.priorityClassName }}
priorityClassName: {{ .Values.master.priorityClassName | quote }} priorityClassName: {{ .Values.master.priorityClassName | quote }}
{{- end }} {{- end }}
enableServiceLinks: false enableServiceLinks: false
{{- if .Values.global.createClusterRole }}
serviceAccountName: {{ .Values.master.serviceAccountName | default .Values.global.serviceAccountName | quote }} # for deleting statefulset pods after migration
{{- end }}
{{- if .Values.master.initContainers }} {{- if .Values.master.initContainers }}
initContainers: initContainers:
{{ tpl .Values.master.initContainers . | nindent 8 | trim }} {{ tpl .Values.master.initContainers . | nindent 8 | trim }}
@@ -83,35 +77,20 @@ spec:
{{- if .Values.master.extraEnvironmentVars }} {{- if .Values.master.extraEnvironmentVars }}
{{- range $key, $value := .Values.master.extraEnvironmentVars }} {{- range $key, $value := .Values.master.extraEnvironmentVars }}
- name: {{ $key }} - name: {{ $key }}
{{- if kindIs "string" $value }}
value: {{ $value | quote }} value: {{ $value | quote }}
{{- else }}
valueFrom:
{{ toYaml $value | nindent 16 | trim }}
{{- end -}}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.global.extraEnvironmentVars }} {{- if .Values.global.extraEnvironmentVars }}
{{- range $key, $value := .Values.global.extraEnvironmentVars }} {{- range $key, $value := .Values.global.extraEnvironmentVars }}
- name: {{ $key }} - name: {{ $key }}
{{- if kindIs "string" $value }}
value: {{ $value | quote }} value: {{ $value | quote }}
{{- else }}
valueFrom:
{{ toYaml $value | nindent 16 | trim }}
{{- end -}}
{{- end }} {{- end }}
{{- end }} {{- end }}
command: command:
- "/bin/sh" - "/bin/sh"
- "-ec" - "-ec"
- | - |
exec /usr/bin/weed \ exec /usr/bin/weed -logdir=/logs \
{{- if eq .Values.master.logs.type "hostPath" }}
-logdir=/logs \
{{- else }}
-logtostderr=true \
{{- end }}
{{- if .Values.master.loggingOverrideLevel }} {{- if .Values.master.loggingOverrideLevel }}
-v={{ .Values.master.loggingOverrideLevel }} \ -v={{ .Values.master.loggingOverrideLevel }} \
{{- else }} {{- else }}
@@ -135,11 +114,10 @@ spec:
{{- if .Values.master.metricsIntervalSec }} {{- if .Values.master.metricsIntervalSec }}
-metrics.intervalSeconds={{ .Values.master.metricsIntervalSec }} \ -metrics.intervalSeconds={{ .Values.master.metricsIntervalSec }} \
{{- end }} {{- end }}
{{- end }} {{- else if .Values.master.metricsPort }}
{{- end }}
{{- if .Values.master.metricsPort }}
-metricsPort={{ .Values.master.metricsPort }} \ -metricsPort={{ .Values.master.metricsPort }} \
{{- end }} {{- end }}
{{- end }}
-volumeSizeLimitMB={{ .Values.master.volumeSizeLimitMB }} \ -volumeSizeLimitMB={{ .Values.master.volumeSizeLimitMB }} \
{{- if .Values.master.disableHttp }} {{- if .Values.master.disableHttp }}
-disableHttp \ -disableHttp \
@@ -150,19 +128,13 @@ spec:
{{- if .Values.master.garbageThreshold }} {{- if .Values.master.garbageThreshold }}
-garbageThreshold={{ .Values.master.garbageThreshold }} \ -garbageThreshold={{ .Values.master.garbageThreshold }} \
{{- end }} {{- end }}
-ip=${POD_NAME}.${SEAWEEDFS_FULLNAME}-master.{{ .Release.Namespace }} \ -ip=${POD_NAME}.${SEAWEEDFS_FULLNAME}-master \
-peers={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ $.Release.Namespace }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }} -peers={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }}
volumeMounts: volumeMounts:
- name : data-{{ .Release.Namespace }} - name : data-{{ .Release.Namespace }}
mountPath: /data mountPath: /data
{{- if eq .Values.master.logs.type "hostPath" }}
- name: seaweedfs-master-log-volume - name: seaweedfs-master-log-volume
mountPath: "/logs/" mountPath: "/logs/"
{{- end }}
- name: master-config
readOnly: true
mountPath: /etc/seaweedfs/master.toml
subPath: master.toml
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
- name: security-config - name: security-config
readOnly: true readOnly: true
@@ -194,63 +166,45 @@ spec:
{{- end }} {{- end }}
- containerPort: {{ .Values.master.grpcPort }} - containerPort: {{ .Values.master.grpcPort }}
#name: swfs-master-grpc #name: swfs-master-grpc
{{- if .Values.master.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: {{ .Values.master.readinessProbe.httpGet.path }} path: /cluster/status
port: {{ .Values.master.port }} port: {{ .Values.master.port }}
scheme: {{ .Values.master.readinessProbe.scheme }} scheme: HTTP
initialDelaySeconds: {{ .Values.master.readinessProbe.initialDelaySeconds }} initialDelaySeconds: 10
periodSeconds: {{ .Values.master.readinessProbe.periodSeconds }} periodSeconds: 45
successThreshold: {{ .Values.master.readinessProbe.successThreshold }} successThreshold: 2
failureThreshold: {{ .Values.master.readinessProbe.failureThreshold }} failureThreshold: 100
timeoutSeconds: {{ .Values.master.readinessProbe.timeoutSeconds }} timeoutSeconds: 10
{{- end }}
{{- if .Values.master.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: {{ .Values.master.livenessProbe.httpGet.path }} path: /cluster/status
port: {{ .Values.master.port }} port: {{ .Values.master.port }}
scheme: {{ .Values.master.livenessProbe.scheme }} scheme: HTTP
initialDelaySeconds: {{ .Values.master.livenessProbe.initialDelaySeconds }} initialDelaySeconds: 20
periodSeconds: {{ .Values.master.livenessProbe.periodSeconds }} periodSeconds: 30
successThreshold: {{ .Values.master.livenessProbe.successThreshold }} successThreshold: 1
failureThreshold: {{ .Values.master.livenessProbe.failureThreshold }} failureThreshold: 4
timeoutSeconds: {{ .Values.master.livenessProbe.timeoutSeconds }} timeoutSeconds: 10
{{- end }}
{{- if .Values.master.resources }} {{- if .Values.master.resources }}
resources: resources:
{{ tpl .Values.master.resources . | nindent 12 | trim }} {{ tpl .Values.master.resources . | nindent 12 | trim }}
{{- end }} {{- end }}
{{- if .Values.master.sidecars }} {{- $hostpath_exists := include "master.hostpath_exists" . -}}
{{- include "common.tplvalues.render" (dict "value" .Values.master.sidecars "context" $) | nindent 8 }} {{- if $hostpath_exists }}
{{- end }}
volumes: volumes:
{{- if eq .Values.master.logs.type "hostPath" }} {{- if eq .Values.master.logs.type "hostPath" }}
- name: seaweedfs-master-log-volume - name: seaweedfs-master-log-volume
hostPath: hostPath:
path: {{ .Values.master.logs.hostPathPrefix }}/logs/seaweedfs/master path: /storage/logs/seaweedfs/master
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq .Values.master.logs.type "existingClaim" }}
- name: seaweedfs-master-log-volume
persistentVolumeClaim:
claimName: {{ .Values.master.logs.claimName }}
{{- end }}
{{- if eq .Values.master.data.type "hostPath" }} {{- if eq .Values.master.data.type "hostPath" }}
- name: data-{{ .Release.Namespace }} - name: data-{{ .Release.Namespace }}
hostPath: hostPath:
path: {{ .Values.master.data.hostPathPrefix }}/seaweed-master/ path: /ssd/seaweed-master/
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq .Values.master.data.type "existingClaim" }}
- name: data-{{ .Release.Namespace }}
persistentVolumeClaim:
claimName: {{ .Values.master.data.claimName }}
{{- end }}
- name: master-config
configMap:
name: {{ template "seaweedfs.name" . }}-master-config
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
- name: security-config - name: security-config
configMap: configMap:
@@ -272,20 +226,17 @@ spec:
secretName: {{ template "seaweedfs.name" . }}-client-cert secretName: {{ template "seaweedfs.name" . }}-client-cert
{{- end }} {{- end }}
{{ tpl .Values.master.extraVolumes . | indent 8 | trim }} {{ tpl .Values.master.extraVolumes . | indent 8 | trim }}
{{- end }}
{{- if .Values.master.nodeSelector }} {{- if .Values.master.nodeSelector }}
nodeSelector: nodeSelector:
{{ tpl .Values.master.nodeSelector . | indent 8 | trim }} {{ tpl .Values.master.nodeSelector . | indent 8 | trim }}
{{- end }} {{- end }}
{{- $pvc_exists := include "master.pvc_exists" . -}} {{- $pvc_exists := include "volume.pvc_exists" . -}}
{{- if $pvc_exists }} {{- if $pvc_exists }}
volumeClaimTemplates: volumeClaimTemplates:
{{- if eq .Values.master.data.type "persistentVolumeClaim"}} {{- if eq .Values.master.data.type "persistentVolumeClaim"}}
- metadata: - metadata:
name: data-{{ .Release.Namespace }} name: data-{{ .Release.Namespace }}
{{- with .Values.master.data.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.data.storageClass }} storageClassName: {{ .Values.master.data.storageClass }}
@@ -296,10 +247,6 @@ spec:
{{- if eq .Values.master.logs.type "persistentVolumeClaim"}} {{- if eq .Values.master.logs.type "persistentVolumeClaim"}}
- metadata: - metadata:
name: seaweedfs-master-log-volume name: seaweedfs-master-log-volume
{{- with .Values.master.logs.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.logs.storageClass }} storageClassName: {{ .Values.master.logs.storageClass }}
@@ -5,47 +5,40 @@ metadata:
name: {{ template "seaweedfs.name" . }}-s3 name: {{ template "seaweedfs.name" . }}-s3
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }} heritage: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
spec: spec:
replicas: {{ .Values.s3.replicas }} replicas: {{ .Values.s3.replicas }}
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
app.kubernetes.io/component: s3 component: s3
template: template:
metadata: metadata:
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
app.kubernetes.io/component: s3 component: s3
{{ with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{ with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec: spec:
restartPolicy: {{ default .Values.global.restartPolicy .Values.s3.restartPolicy }} restartPolicy: {{ default .Values.global.restartPolicy .Values.s3.restartPolicy }}
{{- if .Values.s3.tolerations }} {{- if .Values.s3.tolerations }}
tolerations: tolerations:
{{ tpl .Values.s3.tolerations . | nindent 8 | trim }} {{ tpl .Values.s3.tolerations . | nindent 8 | trim }}
{{- end }} {{- end }}
{{- include "seaweedfs.imagePullSecrets" . | nindent 6 }} {{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.global.imagePullSecrets }}
{{- end }}
terminationGracePeriodSeconds: 10 terminationGracePeriodSeconds: 10
{{- if .Values.s3.priorityClassName }} {{- if .Values.s3.priorityClassName }}
priorityClassName: {{ .Values.s3.priorityClassName | quote }} priorityClassName: {{ .Values.s3.priorityClassName | quote }}
{{- end }} {{- end }}
enableServiceLinks: false enableServiceLinks: false
{{- if .Values.s3.serviceAccountName }}
serviceAccountName: {{ .Values.s3.serviceAccountName | quote }}
{{- end }}
{{- if .Values.s3.initContainers }} {{- if .Values.s3.initContainers }}
initContainers: initContainers:
{{ tpl .Values.s3.initContainers . | nindent 8 | trim }} {{ tpl .Values.s3.initContainers . | nindent 8 | trim }}
@@ -69,53 +62,28 @@ spec:
fieldPath: metadata.namespace fieldPath: metadata.namespace
- name: SEAWEEDFS_FULLNAME - name: SEAWEEDFS_FULLNAME
value: "{{ template "seaweedfs.name" . }}" value: "{{ template "seaweedfs.name" . }}"
{{- if .Values.s3.extraEnvironmentVars }}
{{- range $key, $value := .Values.s3.extraEnvironmentVars }}
- name: {{ $key }}
{{- if kindIs "string" $value }}
value: {{ $value | quote }}
{{- else }}
valueFrom:
{{ toYaml $value | nindent 16 | trim }}
{{- end -}}
{{- end }}
{{- end }}
{{- if .Values.global.extraEnvironmentVars }} {{- if .Values.global.extraEnvironmentVars }}
{{- range $key, $value := .Values.global.extraEnvironmentVars }} {{- range $key, $value := .Values.global.extraEnvironmentVars }}
- name: {{ $key }} - name: {{ $key }}
{{- if kindIs "string" $value }}
value: {{ $value | quote }} value: {{ $value | quote }}
{{- else }}
valueFrom:
{{ toYaml $value | nindent 16 | trim }}
{{- end -}}
{{- end }} {{- end }}
{{- end }} {{- end }}
command: command:
- "/bin/sh" - "/bin/sh"
- "-ec" - "-ec"
- | - |
exec /usr/bin/weed \ exec /usr/bin/weed -logdir=/logs \
{{- if eq .Values.s3.logs.type "hostPath" }}
-logdir=/logs \
{{- else }}
-logtostderr=true \
{{- end }}
{{- if .Values.s3.loggingOverrideLevel }} {{- if .Values.s3.loggingOverrideLevel }}
-v={{ .Values.s3.loggingOverrideLevel }} \ -v={{ .Values.s3.loggingOverrideLevel }} \
{{- else }} {{- else }}
-v={{ .Values.global.loggingLevel }} \ -v={{ .Values.global.loggingLevel }} \
{{- end }} {{- end }}
s3 \ s3 \
-ip.bind={{ .Values.s3.bindAddress }} \
-port={{ .Values.s3.port }} \ -port={{ .Values.s3.port }} \
{{- if .Values.s3.metricsPort }} {{- if .Values.s3.metricsPort }}
-metricsPort {{ .Values.s3.metricsPort }} \ -metricsPort {{ .Values.s3.metricsPort }} \
{{- end }} {{- end }}
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
{{- if .Values.s3.httpsPort }}
-port.https={{ .Values.s3.httpsPort }} \
{{- end }}
-cert.file=/usr/local/share/ca-certificates/client/tls.crt \ -cert.file=/usr/local/share/ca-certificates/client/tls.crt \
-key.file=/usr/local/share/ca-certificates/client/tls.key \ -key.file=/usr/local/share/ca-certificates/client/tls.key \
{{- end }} {{- end }}
@@ -131,17 +99,13 @@ spec:
{{- if .Values.s3.auditLogConfig }} {{- if .Values.s3.auditLogConfig }}
-auditLogConfig=/etc/sw/s3_auditLogConfig.json \ -auditLogConfig=/etc/sw/s3_auditLogConfig.json \
{{- end }} {{- end }}
-filer={{ template "seaweedfs.name" . }}-filer-client.{{ .Release.Namespace }}:{{ .Values.filer.port }} -filer={{ template "seaweedfs.name" . }}-filer-client:{{ .Values.filer.port }}
volumeMounts: volumeMounts:
{{- if eq .Values.s3.logs.type "hostPath" }}
- name: logs - name: logs
mountPath: "/logs/" mountPath: "/logs/"
{{- end }}
{{- if .Values.s3.enableAuth }}
- mountPath: /etc/sw - mountPath: /etc/sw
name: config-users name: config-users
readOnly: true readOnly: true
{{- end }}
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
- name: security-config - name: security-config
readOnly: true readOnly: true
@@ -171,52 +135,39 @@ spec:
- containerPort: {{ .Values.s3.metricsPort }} - containerPort: {{ .Values.s3.metricsPort }}
name: "metrics" name: "metrics"
{{- end }} {{- end }}
{{- if .Values.s3.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: {{ .Values.s3.readinessProbe.httpGet.path }} path: /status
port: {{ .Values.s3.port }} port: {{ .Values.s3.port }}
scheme: {{ .Values.s3.readinessProbe.scheme }} scheme: HTTP
initialDelaySeconds: {{ .Values.s3.readinessProbe.initialDelaySeconds }} initialDelaySeconds: 15
periodSeconds: {{ .Values.s3.readinessProbe.periodSeconds }} periodSeconds: 15
successThreshold: {{ .Values.s3.readinessProbe.successThreshold }} successThreshold: 1
failureThreshold: {{ .Values.s3.readinessProbe.failureThreshold }} failureThreshold: 100
timeoutSeconds: {{ .Values.s3.readinessProbe.timeoutSeconds }} timeoutSeconds: 10
{{- end }}
{{- if .Values.s3.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: {{ .Values.s3.livenessProbe.httpGet.path }} path: /status
port: {{ .Values.s3.port }} port: {{ .Values.s3.port }}
scheme: {{ .Values.s3.livenessProbe.scheme }} scheme: HTTP
initialDelaySeconds: {{ .Values.s3.livenessProbe.initialDelaySeconds }} initialDelaySeconds: 20
periodSeconds: {{ .Values.s3.livenessProbe.periodSeconds }} periodSeconds: 60
successThreshold: {{ .Values.s3.livenessProbe.successThreshold }} successThreshold: 1
failureThreshold: {{ .Values.s3.livenessProbe.failureThreshold }} failureThreshold: 20
timeoutSeconds: {{ .Values.s3.livenessProbe.timeoutSeconds }} timeoutSeconds: 10
{{- end }}
{{- if .Values.s3.resources }} {{- if .Values.s3.resources }}
resources: resources:
{{ tpl .Values.s3.resources . | nindent 12 | trim }} {{ tpl .Values.s3.resources . | nindent 12 | trim }}
{{- end }} {{- end }}
{{- if .Values.s3.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.s3.sidecars "context" $) | nindent 8 }}
{{- end }}
volumes: volumes:
{{- if .Values.s3.enableAuth }}
- name: config-users - name: config-users
secret: secret:
defaultMode: 420 defaultMode: 420
{{- if .Values.s3.existingConfigSecret }}
secretName: {{ .Values.s3.existingConfigSecret }}
{{- else }}
secretName: seaweedfs-s3-secret secretName: seaweedfs-s3-secret
{{- end }}
{{- end }}
{{- if eq .Values.s3.logs.type "hostPath" }} {{- if eq .Values.s3.logs.type "hostPath" }}
- name: logs - name: logs
hostPath: hostPath:
path: {{ .Values.s3.logs.hostPathPrefix }}/logs/seaweedfs/s3 path: /storage/logs/seaweedfs/s3
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
@@ -0,0 +1,23 @@
apiVersion: v1
kind: Service
metadata:
name: {{ template "seaweedfs.name" . }}-s3
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "seaweedfs.name" . }}
component: s3
spec:
ports:
- name: "swfs-s3"
port: {{ if .Values.s3.enabled }}{{ .Values.s3.port }}{{ else }}{{ .Values.filer.s3.port }}{{ end }}
targetPort: {{ if .Values.s3.enabled }}{{ .Values.s3.port }}{{ else }}{{ .Values.filer.s3.port }}{{ end }}
protocol: TCP
{{- if and .Values.s3.enabled .Values.s3.metricsPort }}
- name: "metrics"
port: {{ .Values.s3.metricsPort }}
targetPort: {{ .Values.s3.metricsPort }}
protocol: TCP
{{- end }}
selector:
app: {{ template "seaweedfs.name" . }}
component: {{ if .Values.s3.enabled }}s3{{ else }}filer{{ end }}
@@ -1,4 +1,3 @@
{{- if or .Values.s3.enabled .Values.filer.s3.enabled }}
{{- if .Values.s3.metricsPort }} {{- if .Values.s3.metricsPort }}
{{- if .Values.global.monitoring.enabled }} {{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1 apiVersion: monitoring.coreos.com/v1
@@ -7,11 +6,8 @@ metadata:
name: {{ template "seaweedfs.name" . }}-s3 name: {{ template "seaweedfs.name" . }}-s3
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} component: s3
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: s3
spec: spec:
endpoints: endpoints:
- interval: 30s - interval: 30s
@@ -22,5 +18,4 @@ spec:
app: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
component: s3 component: s3
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }}
@@ -1,4 +1,4 @@
{{- if or (and .Values.filer.s3.enabled .Values.filer.s3.enableAuth (not .Values.filer.s3.existingConfigSecret)) (and .Values.s3.enabled .Values.s3.enableAuth (not .Values.s3.existingConfigSecret)) }} {{- if not (or .Values.filer.s3.skipAuthSecretCreation .Values.s3.skipAuthSecretCreation) }}
{{- $access_key_admin := randAlphaNum 16 -}} {{- $access_key_admin := randAlphaNum 16 -}}
{{- $secret_key_admin := randAlphaNum 32 -}} {{- $secret_key_admin := randAlphaNum 32 -}}
{{- $access_key_read := randAlphaNum 16 -}} {{- $access_key_read := randAlphaNum 16 -}}
@@ -12,12 +12,6 @@ metadata:
annotations: annotations:
"helm.sh/resource-policy": keep "helm.sh/resource-policy": keep
"helm.sh/hook": "pre-install" "helm.sh/hook": "pre-install"
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: s3
stringData: stringData:
admin_access_key_id: {{ $access_key_admin }} admin_access_key_id: {{ $access_key_admin }}
admin_secret_access_key: {{ $secret_key_admin }} admin_secret_access_key: {{ $secret_key_admin }}
@@ -32,4 +26,4 @@ stringData:
s3_auditLogConfig.json: | s3_auditLogConfig.json: |
{{ toJson .Values.s3.auditLogConfig | nindent 4 }} {{ toJson .Values.s3.auditLogConfig | nindent 4 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
@@ -1,4 +1,3 @@
{{- if .Values.filer.enabled }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
type: Opaque type: Opaque
@@ -8,14 +7,8 @@ metadata:
annotations: annotations:
"helm.sh/resource-policy": keep "helm.sh/resource-policy": keep
"helm.sh/hook": "pre-install" "helm.sh/hook": "pre-install"
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
stringData: stringData:
user: "YourSWUser" user: "YourSWUser"
password: "HardCodedPassword" password: "HardCodedPassword"
# better to random generate and create in DB # better to random generate and create in DB
# password: {{ randAlphaNum 10 | sha256sum | b64enc | trunc 32 }} # password: {{ randAlphaNum 10 | sha256sum | b64enc | trunc 32 }}
{{- end }}
@@ -5,46 +5,18 @@ metadata:
name: {{ template "seaweedfs.name" . }}-security-config name: {{ template "seaweedfs.name" . }}-security-config
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }} heritage: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
data: data:
security.toml: |- security.toml: |-
# this file is read by master, volume server, and filer # this file is read by master, volume server, and filer
{{- if .Values.global.securityConfig.jwtSigning.volumeWrite }}
# the jwt signing key is read by master and volume server # the jwt signing key is read by master and volume server
# a jwt expires in 10 seconds # a jwt expires in 10 seconds
[jwt.signing] [jwt.signing]
key = "{{ randAlphaNum 10 | b64enc }}" key = "{{ randAlphaNum 10 | b64enc }}"
{{- end }}
{{- if .Values.global.securityConfig.jwtSigning.volumeRead }}
# this jwt signing key is read by master and volume server, and it is used for read operations:
# - the Master server generates the JWT, which can be used to read a certain file on a volume server
# - the Volume server validates the JWT on reading
[jwt.signing.read]
key = "{{ randAlphaNum 10 | b64enc }}"
{{- end }}
{{- if .Values.global.securityConfig.jwtSigning.filerWrite }}
# If this JWT key is configured, Filer only accepts writes over HTTP if they are signed with this JWT:
# - f.e. the S3 API Shim generates the JWT
# - the Filer server validates the JWT on writing
# the jwt defaults to expire after 10 seconds.
[jwt.filer_signing]
key = "{{ randAlphaNum 10 | b64enc }}"
{{- end }}
{{- if .Values.global.securityConfig.jwtSigning.filerRead }}
# If this JWT key is configured, Filer only accepts reads over HTTP if they are signed with this JWT:
# - f.e. the S3 API Shim generates the JWT
# - the Filer server validates the JWT on writing
# the jwt defaults to expire after 10 seconds.
[jwt.filer_signing.read]
key = "{{ randAlphaNum 10 | b64enc }}"
{{- end }}
# all grpc tls authentications are mutual # all grpc tls authentications are mutual
# the values for the following ca, cert, and key are paths to the PERM files. # the values for the following ca, cert, and key are paths to the PERM files.
@@ -0,0 +1,29 @@
#hack for delete pod master after migration
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: seaweedfs-rw-cr
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: seaweedfs-rw-sa
namespace: {{ .Release.Namespace }}
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: system:serviceaccount:seaweedfs-rw-sa:default
subjects:
- kind: ServiceAccount
name: seaweedfs-rw-sa
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: seaweedfs-rw-cr
@@ -1,23 +1,16 @@
{{- if and .Values.global.enableSecurity (not .Values.certificates.externalCertificates.enabled)}} {{- if .Values.global.enableSecurity }}
apiVersion: cert-manager.io/v1{{ if .Values.global.certificates.alphacrds }}alpha1{{ end }} apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate kind: Certificate
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-volume-cert name: {{ template "seaweedfs.name" . }}-volume-cert
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: volume
spec: spec:
secretName: {{ template "seaweedfs.name" . }}-volume-cert secretName: {{ template "seaweedfs.name" . }}-volume-cert
issuerRef: issuerRef:
name: {{ template "seaweedfs.name" . }}-ca-issuer name: {{ template "seaweedfs.name" . }}-clusterissuer
kind: Issuer kind: ClusterIssuer
commonName: {{ .Values.certificates.commonName }} commonName: {{ .Values.certificates.commonName }}
subject: organization:
organizations:
- "SeaweedFS CA" - "SeaweedFS CA"
dnsNames: dnsNames:
- '*.{{ .Release.Namespace }}' - '*.{{ .Release.Namespace }}'
@@ -33,9 +26,8 @@ spec:
- {{ . }} - {{ . }}
{{- end }} {{- end }}
{{- end }} {{- end }}
privateKey: keyAlgorithm: {{ .Values.certificates.keyAlgorithm }}
algorithm: {{ .Values.certificates.keyAlgorithm }} keySize: {{ .Values.certificates.keySize }}
size: {{ .Values.certificates.keySize }}
duration: {{ .Values.certificates.duration }} duration: {{ .Values.certificates.duration }}
renewBefore: {{ .Values.certificates.renewBefore }} renewBefore: {{ .Values.certificates.renewBefore }}
{{- end }} {{- end }}
@@ -1,17 +1,13 @@
{{- if .Values.volume.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ template "seaweedfs.name" . }}-volume name: {{ template "seaweedfs.name" . }}-volume
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: volume component: volume
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec: spec:
clusterIP: None clusterIP: None
internalTrafficPolicy: {{ .Values.volume.internalTrafficPolicy | default "Cluster" }}
ports: ports:
- name: "swfs-volume" - name: "swfs-volume"
port: {{ .Values.volume.port }} port: {{ .Values.volume.port }}
@@ -28,6 +24,5 @@ spec:
protocol: TCP protocol: TCP
{{- end }} {{- end }}
selector: selector:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/component: volume component: volume
{{- end }}
@@ -0,0 +1,21 @@
{{- if .Values.volume.metricsPort }}
{{- if .Values.global.monitoring.enabled }}
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "seaweedfs.name" . }}-volume
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "seaweedfs.name" . }}
component: volume
spec:
endpoints:
- interval: 30s
port: metrics
scrapeTimeout: 5s
selector:
matchLabels:
app: {{ template "seaweedfs.name" . }}
component: volume
{{- end }}
{{- end }}
@@ -5,33 +5,27 @@ metadata:
name: {{ template "seaweedfs.name" . }}-volume name: {{ template "seaweedfs.name" . }}-volume
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }} heritage: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
spec: spec:
serviceName: {{ template "seaweedfs.name" . }}-volume serviceName: {{ template "seaweedfs.name" . }}-volume
replicas: {{ .Values.volume.replicas }} replicas: {{ .Values.volume.replicas }}
podManagementPolicy: {{ .Values.volume.podManagementPolicy }} podManagementPolicy: Parallel
selector: selector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/component: volume release: {{ .Release.Name }}
component: volume
template: template:
metadata: metadata:
labels: labels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} chart: {{ template "seaweedfs.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }} release: {{ .Release.Name }}
app.kubernetes.io/component: volume component: volume
{{ with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{ with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec: spec:
{{- if .Values.volume.affinity }} {{- if .Values.volume.affinity }}
affinity: affinity:
@@ -42,31 +36,29 @@ spec:
tolerations: tolerations:
{{ tpl .Values.volume.tolerations . | nindent 8 | trim }} {{ tpl .Values.volume.tolerations . | nindent 8 | trim }}
{{- end }} {{- end }}
{{- include "seaweedfs.imagePullSecrets" . | nindent 6 }} {{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
- name: {{ .Values.global.imagePullSecrets }}
{{- end }}
terminationGracePeriodSeconds: 150 terminationGracePeriodSeconds: 150
{{- if .Values.volume.priorityClassName }} {{- if .Values.volume.priorityClassName }}
priorityClassName: {{ .Values.volume.priorityClassName | quote }} priorityClassName: {{ .Values.volume.priorityClassName | quote }}
{{- end }} {{- end }}
enableServiceLinks: false enableServiceLinks: false
{{- if .Values.global.createClusterRole }}
serviceAccountName: {{ .Values.volume.serviceAccountName | default .Values.global.serviceAccountName | quote }} # for deleting statefulset pods after migration
{{- end }}
{{- $initContainers_exists := include "volume.initContainers_exists" . -}} {{- $initContainers_exists := include "volume.initContainers_exists" . -}}
{{- if $initContainers_exists }} {{- if $initContainers_exists }}
initContainers: initContainers:
{{- if .Values.volume.idx }} {{- if .Values.volume.dir_idx }}
- name: seaweedfs-vol-move-idx - name: seaweedfs-vol-move-idx
image: {{ template "volume.image" . }} image: {{ template "volume.image" . }}
imagePullPolicy: {{ .Values.global.imagePullPolicy | default "IfNotPresent" }} imagePullPolicy: {{ .Values.global.imagePullPolicy | default "IfNotPresent" }}
command: [ '/bin/sh', '-c' ] command: [ '/bin/sh', '-c' ]
args: [ '{{range $dir := .Values.volume.dataDirs }}if ls /{{$dir.name}}/*.idx >/dev/null 2>&1; then mv /{{$dir.name}}/*.idx /idx/ ; fi; {{end}}' ] args: [ 'if ls {{ .Values.volume.dir }}/*.idx >/dev/null 2>&1; then mv {{ .Values.volume.dir }}/*.idx {{ .Values.volume.dir_idx }}/; fi;' ]
volumeMounts: volumeMounts:
- name: idx - name: idx
mountPath: /idx mountPath: {{ .Values.volume.dir_idx }}
{{- range $dir := .Values.volume.dataDirs }} - name: data
- name: {{ $dir.name }} mountPath: {{ .Values.volume.dir }}
mountPath: /{{ $dir.name }}
{{- end }}
{{- end }} {{- end }}
{{- if .Values.volume.initContainers }} {{- if .Values.volume.initContainers }}
{{ tpl .Values.volume.initContainers . | nindent 8 | trim }} {{ tpl .Values.volume.initContainers . | nindent 8 | trim }}
@@ -91,38 +83,17 @@ spec:
fieldPath: status.hostIP fieldPath: status.hostIP
- name: SEAWEEDFS_FULLNAME - name: SEAWEEDFS_FULLNAME
value: "{{ template "seaweedfs.name" . }}" value: "{{ template "seaweedfs.name" . }}"
{{- if .Values.volume.extraEnvironmentVars }}
{{- range $key, $value := .Values.volume.extraEnvironmentVars }}
- name: {{ $key }}
{{- if kindIs "string" $value }}
value: {{ $value | quote }}
{{- else }}
valueFrom:
{{ toYaml $value | nindent 16 | trim }}
{{- end -}}
{{- end }}
{{- end }}
{{- if .Values.global.extraEnvironmentVars }} {{- if .Values.global.extraEnvironmentVars }}
{{- range $key, $value := .Values.global.extraEnvironmentVars }} {{- range $key, $value := .Values.global.extraEnvironmentVars }}
- name: {{ $key }} - name: {{ $key }}
{{- if kindIs "string" $value }}
value: {{ $value | quote }} value: {{ $value | quote }}
{{- else }}
valueFrom:
{{ toYaml $value | nindent 16 | trim }}
{{- end -}}
{{- end }} {{- end }}
{{- end }} {{- end }}
command: command:
- "/bin/sh" - "/bin/sh"
- "-ec" - "-ec"
- | - |
exec /usr/bin/weed \ exec /usr/bin/weed -logdir=/logs \
{{- if .Values.volume.logs }}
-logdir=/logs \
{{- else }}
-logtostderr=true \
{{- end }}
{{- if .Values.volume.loggingOverrideLevel }} {{- if .Values.volume.loggingOverrideLevel }}
-v={{ .Values.volume.loggingOverrideLevel }} \ -v={{ .Values.volume.loggingOverrideLevel }} \
{{- else }} {{- else }}
@@ -133,11 +104,11 @@ spec:
{{- if .Values.volume.metricsPort }} {{- if .Values.volume.metricsPort }}
-metricsPort={{ .Values.volume.metricsPort }} \ -metricsPort={{ .Values.volume.metricsPort }} \
{{- end }} {{- end }}
-dir {{range $index, $dir := .Values.volume.dataDirs }}{{if ne $index 0}},{{end}}/{{$dir.name}}{{end}} \ -dir={{ .Values.volume.dir }} \
{{- if .Values.volume.idx }} {{- if .Values.volume.dir_idx }}
-dir.idx=/idx \ -dir.idx={{ .Values.volume.dir_idx }} \
{{- end }} {{- end }}
-max {{range $index, $dir := .Values.volume.dataDirs }}{{if ne $index 0}},{{end}}{{$dir.maxVolumes}}{{end}} \ -max={{ .Values.volume.maxVolumes }} \
{{- if .Values.volume.rack }} {{- if .Values.volume.rack }}
-rack={{ .Values.volume.rack }} \ -rack={{ .Values.volume.rack }} \
{{- end }} {{- end }}
@@ -162,22 +133,18 @@ spec:
-fileSizeLimitMB={{ .Values.volume.fileSizeLimitMB }} \ -fileSizeLimitMB={{ .Values.volume.fileSizeLimitMB }} \
{{- end }} {{- end }}
-minFreeSpacePercent={{ .Values.volume.minFreeSpacePercent }} \ -minFreeSpacePercent={{ .Values.volume.minFreeSpacePercent }} \
-ip=${POD_NAME}.${SEAWEEDFS_FULLNAME}-volume.{{ .Release.Namespace }} \ -ip=${POD_NAME}.${SEAWEEDFS_FULLNAME}-volume \
-compactionMBps={{ .Values.volume.compactionMBps }} \ -compactionMBps={{ .Values.volume.compactionMBps }} \
-mserver={{ if .Values.global.masterServer }}{{.Values.global.masterServer}}{{ else }}{{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master.{{ $.Release.Namespace }}:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }}{{ end }} -mserver={{ range $index := until (.Values.master.replicas | int) }}${SEAWEEDFS_FULLNAME}-master-{{ $index }}.${SEAWEEDFS_FULLNAME}-master:{{ $.Values.master.port }}{{ if lt $index (sub ($.Values.master.replicas | int) 1) }},{{ end }}{{ end }}
volumeMounts: volumeMounts:
{{- range $dir := .Values.volume.dataDirs }} - name: data
- name: {{ $dir.name }} mountPath: "{{ .Values.volume.dir }}/"
mountPath: "/{{ $dir.name }}/" {{- if .Values.volume.dir_idx }}
- name: idx
mountPath: "{{ .Values.volume.dir_idx }}/"
{{- end }} {{- end }}
{{- if .Values.volume.logs }}
- name: logs - name: logs
mountPath: "/logs/" mountPath: "/logs/"
{{- end }}
{{- if .Values.volume.idx }}
- name: idx
mountPath: "/idx/"
{{- end }}
{{- if .Values.global.enableSecurity }} {{- if .Values.global.enableSecurity }}
- name: security-config - name: security-config
readOnly: true readOnly: true
@@ -204,88 +171,57 @@ spec:
- containerPort: {{ .Values.volume.port }} - containerPort: {{ .Values.volume.port }}
name: swfs-vol name: swfs-vol
{{- if .Values.volume.metricsPort }} {{- if .Values.volume.metricsPort }}
- containerPort: {{ .Values.volume.metricsPort }} - containerPort: {{ .Values.filer.metricsPort }}
name: metrics name: metrics
{{- end }} {{- end }}
- containerPort: {{ .Values.volume.grpcPort }} - containerPort: {{ .Values.volume.grpcPort }}
name: swfs-vol-grpc name: swfs-vol-grpc
{{- if .Values.volume.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: {{ .Values.volume.readinessProbe.httpGet.path }} path: /status
port: {{ .Values.volume.port }} port: {{ .Values.volume.port }}
scheme: {{ .Values.volume.readinessProbe.scheme }} scheme: HTTP
initialDelaySeconds: {{ .Values.volume.readinessProbe.initialDelaySeconds }} initialDelaySeconds: 15
periodSeconds: {{ .Values.volume.readinessProbe.periodSeconds }} periodSeconds: 90
successThreshold: {{ .Values.volume.readinessProbe.successThreshold }} successThreshold: 1
failureThreshold: {{ .Values.volume.readinessProbe.failureThreshold }} failureThreshold: 100
timeoutSeconds: {{ .Values.volume.readinessProbe.timeoutSeconds }} timeoutSeconds: 30
{{- end }}
{{- if .Values.volume.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: {{ .Values.volume.livenessProbe.httpGet.path }} path: /status
port: {{ .Values.volume.port }} port: {{ .Values.volume.port }}
scheme: {{ .Values.volume.livenessProbe.scheme }} scheme: HTTP
initialDelaySeconds: {{ .Values.volume.livenessProbe.initialDelaySeconds }} initialDelaySeconds: 20
periodSeconds: {{ .Values.volume.livenessProbe.periodSeconds }} periodSeconds: 90
successThreshold: {{ .Values.volume.livenessProbe.successThreshold }} successThreshold: 1
failureThreshold: {{ .Values.volume.livenessProbe.failureThreshold }} failureThreshold: 4
timeoutSeconds: {{ .Values.volume.livenessProbe.timeoutSeconds }} timeoutSeconds: 30
{{- end }}
{{- if .Values.volume.resources }} {{- if .Values.volume.resources }}
resources: resources:
{{ tpl .Values.volume.resources . | nindent 12 | trim }} {{ tpl .Values.volume.resources . | nindent 12 | trim }}
{{- end }} {{- end }}
{{- if .Values.volume.sidecars }} {{- $hostpath_exists := include "volume.hostpath_exists" . -}}
{{- include "common.tplvalues.render" (dict "value" .Values.volume.sidecars "context" $) | nindent 8 }} {{- if $hostpath_exists }}
{{- end }}
volumes: volumes:
{{- if eq .Values.volume.data.type "hostPath" }}
{{- range $dir := .Values.volume.dataDirs }} - name: data
{{- if eq $dir.type "hostPath" }}
- name: {{ $dir.name }}
hostPath: hostPath:
path: {{ $dir.hostPathPrefix }}/object_store/ path: /storage/object_store/
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq $dir.type "existingClaim" }} {{- if and (eq .Values.volume.idx.type "hostPath") .Values.volume.dir_idx }}
- name: {{ $dir.name }}
persistentVolumeClaim:
claimName: {{ $dir.claimName }}
{{- end }}
{{- end }}
{{- if .Values.volume.idx }}
{{- if eq .Values.volume.idx.type "hostPath" }}
- name: idx - name: idx
hostPath: hostPath:
path: {{ .Values.volume.idx.hostPathPrefix }}/seaweedfs-volume-idx/ path: /ssd/seaweedfs-volume-idx/
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq .Values.volume.idx.type "existingClaim" }} {{- if eq .Values.volume.logs.type "hostPath" }}
- name: idx
persistentVolumeClaim:
claimName: {{ .Values.volume.idx.claimName }}
{{- end }}
{{- end }}
{{- if .Values.volume.logs }}
{{- if eq .Values.volume.logs.type "hostPath" }}
- name: logs - name: logs
hostPath: hostPath:
path: {{ .Values.volume.logs.hostPathPrefix }}/logs/seaweedfs/volume path: /storage/logs/seaweedfs/volume
type: DirectoryOrCreate type: DirectoryOrCreate
{{- end }} {{- end }}
{{- if eq .Values.volume.logs.type "existingClaim" }} {{- if .Values.global.enableSecurity }}
- name: logs
persistentVolumeClaim:
claimName: {{ .Values.volume.logs.claimName }}
{{- end }}
{{- end }}
{{- if .Values.global.enableSecurity }}
- name: security-config - name: security-config
configMap: configMap:
name: {{ template "seaweedfs.name" . }}-security-config name: {{ template "seaweedfs.name" . }}-security-config
@@ -304,39 +240,31 @@ spec:
- name: client-cert - name: client-cert
secret: secret:
secretName: {{ template "seaweedfs.name" . }}-client-cert secretName: {{ template "seaweedfs.name" . }}-client-cert
{{- end }} {{- end }}
{{- if .Values.volume.extraVolumes }} {{- if .Values.volume.extraVolumes }}
{{ tpl .Values.volume.extraVolumes . | indent 8 | trim }} {{ tpl .Values.volume.extraVolumes . | indent 8 | trim }}
{{- end }} {{- end }}
{{- end }}
{{- if .Values.volume.nodeSelector }} {{- if .Values.volume.nodeSelector }}
nodeSelector: nodeSelector:
{{ tpl .Values.volume.nodeSelector . | indent 8 | trim }} {{ tpl .Values.volume.nodeSelector . | indent 8 | trim }}
{{- end }} {{- end }}
{{- $pvc_exists := include "volume.pvc_exists" . -}}
{{- if $pvc_exists }}
volumeClaimTemplates: volumeClaimTemplates:
{{- range $dir := .Values.volume.dataDirs }} {{- if eq .Values.volume.data.type "persistentVolumeClaim"}}
{{- if eq $dir.type "persistentVolumeClaim" }}
- metadata: - metadata:
name: {{ $dir.name }} name: data
{{- with $dir.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ $dir.storageClass }} storageClassName: {{ .Values.volume.data.storageClass }}
resources: resources:
requests: requests:
storage: {{ $dir.size }} storage: {{ .Values.volume.data.size }}
{{- end }} {{- end }}
{{- end }} {{- if and (eq .Values.volume.idx.type "persistentVolumeClaim") .Values.volume.dir_idx }}
{{- if and .Values.volume.idx (eq .Values.volume.idx.type "persistentVolumeClaim") }}
- metadata: - metadata:
name: idx name: idx
{{- with .Values.volume.idx.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.volume.idx.storageClass }} storageClassName: {{ .Values.volume.idx.storageClass }}
@@ -344,13 +272,9 @@ spec:
requests: requests:
storage: {{ .Values.volume.idx.size }} storage: {{ .Values.volume.idx.size }}
{{- end }} {{- end }}
{{- if and .Values.volume.logs (eq .Values.volume.logs.type "persistentVolumeClaim") }} {{- if eq .Values.volume.logs.type "persistentVolumeClaim" }}
- metadata: - metadata:
name: logs name: logs
{{- with .Values.volume.logs.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.volume.logs.storageClass }} storageClassName: {{ .Values.volume.logs.storageClass }}
@@ -358,4 +282,5 @@ spec:
requests: requests:
storage: {{ .Values.volume.logs.size }} storage: {{ .Values.volume.logs.size }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }}
@@ -1,26 +1,14 @@
# Available parameters and their default values for the SeaweedFS chart. # Available parameters and their default values for the SeaweedFS chart.
global: global:
createClusterRole: true
registry: "" registry: ""
repository: "" repository: ""
imageName: chrislusf/seaweedfs imageName: chrislusf/seaweedfs
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
imagePullSecrets: "" imagePullSecrets: imagepullsecret
restartPolicy: Always restartPolicy: Always
loggingLevel: 1 loggingLevel: 1
enableSecurity: false enableSecurity: false
masterServer: null
securityConfig:
jwtSigning:
volumeWrite: true
volumeRead: false
filerWrite: false
filerRead: false
# we will use this serviceAccountName for all ClusterRoles/ClusterRoleBindings
serviceAccountName: "seaweedfs"
certificates:
alphacrds: false
monitoring: monitoring:
enabled: false enabled: false
gatewayHost: null gatewayHost: null
@@ -34,12 +22,8 @@ global:
replicationPlacment: "001" replicationPlacment: "001"
extraEnvironmentVars: extraEnvironmentVars:
WEED_CLUSTER_DEFAULT: "sw" WEED_CLUSTER_DEFAULT: "sw"
WEED_CLUSTER_SW_MASTER: "seaweedfs-master.seaweedfs:9333" WEED_CLUSTER_SW_MASTER: "seaweedfs-master:9333"
WEED_CLUSTER_SW_FILER: "seaweedfs-filer-client.seaweedfs:8888" WEED_CLUSTER_SW_FILER: "seaweedfs-filer-client:8888"
# WEED_JWT_SIGNING_KEY:
# secretKeyRef:
# name: seaweedfs-signing-key
# key: signingKey
image: image:
registry: "" registry: ""
@@ -60,11 +44,11 @@ master:
volumePreallocate: false volumePreallocate: false
volumeSizeLimitMB: 1000 volumeSizeLimitMB: 1000
loggingOverrideLevel: null loggingOverrideLevel: null
# number of seconds between heartbeats, default 5 #number of seconds between heartbeats, default 5
pulseSeconds: null pulseSeconds: null
# threshold to vacuum and reclaim spaces, default 0.3 (30%) #threshold to vacuum and reclaim spaces, default 0.3 (30%)
garbageThreshold: null garbageThreshold: null
# Prometheus push interval in seconds, default 15 #Prometheus push interval in seconds, default 15
metricsIntervalSec: 15 metricsIntervalSec: 15
# replication type is XYZ: # replication type is XYZ:
# X number of replica in other data centers # X number of replica in other data centers
@@ -75,53 +59,26 @@ master:
# Disable http request, only gRpc operations are allowed # Disable http request, only gRpc operations are allowed
disableHttp: false disableHttp: false
config: |- # can use ANY storage-class , example with local-path-provisioner
# Enter any extra configuration for master.toml here.
# It may be a multi-line string.
# You may use ANY storage-class, example with local-path-provisioner
# Annotations are optional.
# data: # data:
# type: "persistentVolumeClaim" # type: "persistentVolumeClaim"
# size: "24Ti" # size: "24Ti"
# storageClass: "local-path-provisioner" # storageClass: "local-path-provisioner"
# annotations:
# "key": "value"
#
# You may also spacify an existing claim:
# data:
# type: "existingClaim"
# claimName: "my-pvc"
data: data:
type: "hostPath" type: "hostPath"
size: ""
storageClass: "" storageClass: ""
hostPathPrefix: /ssd
logs: logs:
type: "hostPath" type: "hostPath"
size: "" size: ""
storageClass: "" storageClass: ""
hostPathPrefix: /storage
## @param master.sidecars Add additional sidecar containers to the master pod(s)
## e.g:
## sidecars:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
sidecars: []
initContainers: "" initContainers: ""
extraVolumes: "" extraVolumes: ""
extraVolumeMounts: "" extraVolumeMounts: ""
## Set podManagementPolicy
podManagementPolicy: Parallel
# Resource requests, limits, etc. for the master cluster placement. This # Resource requests, limits, etc. for the master cluster placement. This
# should map directly to the value of the resources field for a PodSpec, # should map directly to the value of the resources field for a PodSpec,
# formatted as a multi-line string. By default no direct resource request # formatted as a multi-line string. By default no direct resource request
@@ -140,9 +97,9 @@ master:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector: - labelSelector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} release: "{{ .Release.Name }}"
app.kubernetes.io/component: master component: master
topologyKey: kubernetes.io/hostname topologyKey: kubernetes.io/hostname
# Toleration Settings for master pods # Toleration Settings for master pods
@@ -153,25 +110,19 @@ master:
# nodeSelector labels for master pod assignment, formatted as a muli-line string. # nodeSelector labels for master pod assignment, formatted as a muli-line string.
# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
# Example: # Example:
nodeSelector: |
kubernetes.io/arch: amd64
# nodeSelector: | # nodeSelector: |
# sw-backend: "true" # beta.kubernetes.io/arch: amd64
nodeSelector: |
sw-backend: "true"
# used to assign priority to master pods # used to assign priority to master pods
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ # ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: "" priorityClassName: ""
# used to assign a service account.
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
serviceAccountName: ""
ingress: ingress:
enabled: false enabled: false
className: "nginx" className: "nginx"
# host: false for "*" hostname annotations:
host: "master.seaweedfs.local"
annotations: |
nginx.ingress.kubernetes.io/auth-type: "basic" nginx.ingress.kubernetes.io/auth-type: "basic"
nginx.ingress.kubernetes.io/auth-secret: "default/ingress-basic-auth-secret" nginx.ingress.kubernetes.io/auth-secret: "default/ingress-basic-auth-secret"
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - SW-Master' nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - SW-Master'
@@ -187,39 +138,12 @@ master:
sub_filter '=/' '=./'; sub_filter '=/' '=./';
sub_filter '/seaweedfsstatic' './seaweedfsstatic'; sub_filter '/seaweedfsstatic' './seaweedfsstatic';
sub_filter_once off; sub_filter_once off;
tls: []
extraEnvironmentVars: extraEnvironmentVars:
WEED_MASTER_VOLUME_GROWTH_COPY_1: '7' WEED_MASTER_VOLUME_GROWTH_COPY_1: 7
WEED_MASTER_VOLUME_GROWTH_COPY_2: '6' WEED_MASTER_VOLUME_GROWTH_COPY_2: 6
WEED_MASTER_VOLUME_GROWTH_COPY_3: '3' WEED_MASTER_VOLUME_GROWTH_COPY_3: 3
WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: '1' WEED_MASTER_VOLUME_GROWTH_COPY_OTHER: 1
# used to configure livenessProbe on master-server containers
#
livenessProbe:
enabled: true
httpGet:
path: /cluster/status
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 30
successThreshold: 1
failureThreshold: 4
timeoutSeconds: 10
# used to configure readinessProbe on master-server containers
#
readinessProbe:
enabled: true
httpGet:
path: /cluster/status
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 45
successThreshold: 2
failureThreshold: 100
timeoutSeconds: 10
volume: volume:
enabled: true enabled: true
@@ -243,63 +167,36 @@ volume:
# minimum free disk space(in percents). If free disk space lower this value - all volumes marks as ReadOnly # minimum free disk space(in percents). If free disk space lower this value - all volumes marks as ReadOnly
minFreeSpacePercent: 7 minFreeSpacePercent: 7
# For each data disk you may use ANY storage-class, example with local-path-provisioner # can use ANY storage-class , example with local-path-provisioner
# Annotations are optional. # data:
# dataDirs: # type: "persistentVolumeClaim"
# - name: data: # size: "24Ti"
# type: "persistentVolumeClaim" # storageClass: "local-path-provisioner"
# size: "24Ti" data:
# storageClass: "local-path-provisioner"
# annotations:
# "key": "value"
# maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7")
#
# You may also spacify an existing claim:
# - name: data
# type: "existingClaim"
# claimName: "my-pvc"
# maxVolumes: 0 # If set to zero on non-windows OS, the limit will be auto configured. (default "7")
dataDirs:
- name: data1
type: "hostPath" type: "hostPath"
hostPathPrefix: /ssd size: ""
maxVolumes: 0 storageClass: ""
idx:
type: "hostPath"
size: ""
storageClass: ""
# - name: data2 logs:
# type: "persistentVolumeClaim" type: "hostPath"
# storageClass: "yourClassNameOfChoice" size: ""
# size: "800Gi" storageClass: ""
# maxVolumes: 0
# idx can be defined by:
#
# idx:
# type: "hostPath"
# hostPathPrefix: /ssd
#
# or
#
# idx:
# type: "persistentVolumeClaim"
# size: "20Gi"
# storageClass: "local-path-provisioner"
#
# or
#
# idx:
# type: "existingClaim"
# claimName: "myClaim"
# same applies to "logs"
idx: {}
logs: {}
# limit background compaction or copying speed in mega bytes per second # limit background compaction or copying speed in mega bytes per second
compactionMBps: "50" compactionMBps: "50"
# Directories to store data files. dir[,dir]... (default "/tmp")
dir: "/data"
# Directories to store index files. dir[,dir]... (default is the same as "dir")
dir_idx: null
# Maximum numbers of volumes, count[,count]...
# If set to zero on non-windows OS, the limit will be auto configured. (default "7")
maxVolumes: "0"
# Volume server's rack name # Volume server's rack name
rack: null rack: null
@@ -316,25 +213,11 @@ volume:
# Adjust jpg orientation when uploading. # Adjust jpg orientation when uploading.
imagesFixOrientation: false imagesFixOrientation: false
## @param volume.sidecars Add additional sidecar containers to the volume pod(s)
## e.g:
## sidecars:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
sidecars: []
initContainers: "" initContainers: ""
extraVolumes: "" extraVolumes: ""
extraVolumeMounts: "" extraVolumeMounts: ""
## Set podManagementPolicy
podManagementPolicy: Parallel
# Affinity Settings # Affinity Settings
# Commenting out or setting as empty the affinity variable, will allow # Commenting out or setting as empty the affinity variable, will allow
# deployment to single node services such as Minikube # deployment to single node services such as Minikube
@@ -343,9 +226,9 @@ volume:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector: - labelSelector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} release: "{{ .Release.Name }}"
app.kubernetes.io/component: volume component: volume
topologyKey: kubernetes.io/hostname topologyKey: kubernetes.io/hostname
# Resource requests, limits, etc. for the server cluster placement. This # Resource requests, limits, etc. for the server cluster placement. This
@@ -362,46 +245,15 @@ volume:
# nodeSelector labels for server pod assignment, formatted as a muli-line string. # nodeSelector labels for server pod assignment, formatted as a muli-line string.
# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
# Example: # Example:
nodeSelector: |
kubernetes.io/arch: amd64
# nodeSelector: | # nodeSelector: |
# sw-volume: "true" # beta.kubernetes.io/arch: amd64
nodeSelector: |
sw-volume: "true"
# used to assign priority to server pods # used to assign priority to server pods
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ # ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: "" priorityClassName: ""
# used to assign a service account.
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
serviceAccountName: ""
extraEnvironmentVars:
# used to configure livenessProbe on volume-server containers
#
livenessProbe:
enabled: true
httpGet:
path: /status
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 90
successThreshold: 1
failureThreshold: 4
timeoutSeconds: 30
# used to configure readinessProbe on volume-server containers
#
readinessProbe:
enabled: true
httpGet:
path: /status
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
timeoutSeconds: 30
filer: filer:
enabled: true enabled: true
@@ -415,7 +267,6 @@ filer:
grpcPort: 18888 grpcPort: 18888
metricsPort: 9327 metricsPort: 9327
loggingOverrideLevel: null loggingOverrideLevel: null
filerGroup: ""
# replication type is XYZ: # replication type is XYZ:
# X number of replica in other data centers # X number of replica in other data centers
# Y number of replica in other racks in the same data center # Y number of replica in other racks in the same data center
@@ -447,50 +298,27 @@ filer:
storage: 25Gi storage: 25Gi
# storageClass is the class of storage which defaults to null (the Kube cluster will pick the default). # storageClass is the class of storage which defaults to null (the Kube cluster will pick the default).
storageClass: null storageClass: null
# You may use ANY storage-class, example with local-path-provisioner
# Annotations are optional. # can use ANY storage-class , example with local-path-provisioner
# data: # data:
# type: "persistentVolumeClaim" # type: "persistentVolumeClaim"
# size: "24Ti" # size: "24Ti"
# storageClass: "local-path-provisioner" # storageClass: "local-path-provisioner"
# annotations:
# "key": "value"
#
# You may also specify an existing claim:
# data:
# type: "existingClaim"
# claimName: "my-pvc"
data: data:
type: "hostPath" type: "hostPath"
size: "" size: ""
storageClass: "" storageClass: ""
hostPathPrefix: /storage
logs: logs:
type: "hostPath" type: "hostPath"
size: "" size: ""
storageClass: "" storageClass: ""
hostPathPrefix: /storage
## @param filer.sidecars Add additional sidecar containers to the filer pod(s)
## e.g:
## sidecars:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
sidecars: []
initContainers: "" initContainers: ""
extraVolumes: "" extraVolumes: ""
extraVolumeMounts: "" extraVolumeMounts: ""
## Set podManagementPolicy
podManagementPolicy: Parallel
# Affinity Settings # Affinity Settings
# Commenting out or setting as empty the affinity variable, will allow # Commenting out or setting as empty the affinity variable, will allow
# deployment to single node services such as Minikube # deployment to single node services such as Minikube
@@ -499,9 +327,9 @@ filer:
requiredDuringSchedulingIgnoredDuringExecution: requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector: - labelSelector:
matchLabels: matchLabels:
app.kubernetes.io/name: {{ template "seaweedfs.name" . }} app: {{ template "seaweedfs.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} release: "{{ .Release.Name }}"
app.kubernetes.io/component: filer component: filer
topologyKey: kubernetes.io/hostname topologyKey: kubernetes.io/hostname
# updatePartition is used to control a careful rolling update of SeaweedFS # updatePartition is used to control a careful rolling update of SeaweedFS
@@ -522,26 +350,19 @@ filer:
# nodeSelector labels for server pod assignment, formatted as a muli-line string. # nodeSelector labels for server pod assignment, formatted as a muli-line string.
# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
# Example: # Example:
nodeSelector: |
kubernetes.io/arch: amd64
# nodeSelector: | # nodeSelector: |
# sw-backend: "true" # beta.kubernetes.io/arch: amd64
nodeSelector: |
sw-backend: "true"
# used to assign priority to server pods # used to assign priority to server pods
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ # ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: "" priorityClassName: ""
# used to assign a service account.
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
serviceAccountName: ""
ingress: ingress:
enabled: false enabled: false
className: "nginx" className: "nginx"
# host: false for "*" hostname annotations:
host: "seaweedfs.cluster.local"
annotations: |
nginx.ingress.kubernetes.io/backend-protocol: GRPC
nginx.ingress.kubernetes.io/auth-type: "basic" nginx.ingress.kubernetes.io/auth-type: "basic"
nginx.ingress.kubernetes.io/auth-secret: "default/ingress-basic-auth-secret" nginx.ingress.kubernetes.io/auth-secret: "default/ingress-basic-auth-secret"
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - SW-Filer' nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - SW-Filer'
@@ -560,7 +381,7 @@ filer:
# extraEnvVars is a list of extra enviroment variables to set with the stateful set. # extraEnvVars is a list of extra enviroment variables to set with the stateful set.
extraEnvironmentVars: extraEnvironmentVars:
WEED_MYSQL_ENABLED: "false" WEED_MYSQL_ENABLED: "true"
WEED_MYSQL_HOSTNAME: "mysql-db-host" WEED_MYSQL_HOSTNAME: "mysql-db-host"
WEED_MYSQL_PORT: "3306" WEED_MYSQL_PORT: "3306"
WEED_MYSQL_DATABASE: "sw_database" WEED_MYSQL_DATABASE: "sw_database"
@@ -571,72 +392,24 @@ filer:
# enable usage of memsql as filer backend # enable usage of memsql as filer backend
WEED_MYSQL_INTERPOLATEPARAMS: "true" WEED_MYSQL_INTERPOLATEPARAMS: "true"
# if you want to use leveldb2, then should enable "enablePVC". or you may lose your data. # if you want to use leveldb2, then should enable "enablePVC". or you may lose your data.
WEED_LEVELDB2_ENABLED: "true" WEED_LEVELDB2_ENABLED: "false"
# with http DELETE, by default the filer would check whether a folder is empty. # with http DELETE, by default the filer would check whether a folder is empty.
# recursive_delete will delete all sub folders and files, similar to "rm -Rf" # recursive_delete will delete all sub folders and files, similar to "rm -Rf"
WEED_FILER_OPTIONS_RECURSIVE_DELETE: "false" WEED_FILER_OPTIONS_RECURSIVE_DELETE: "false"
# directories under this folder will be automatically creating a separate bucket # directories under this folder will be automatically creating a separate bucket
WEED_FILER_BUCKETS_FOLDER: "/buckets" WEED_FILER_BUCKETS_FOLDER: "/buckets"
# used to configure livenessProbe on filer containers
#
livenessProbe:
enabled: true
httpGet:
path: /
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 30
successThreshold: 1
failureThreshold: 5
timeoutSeconds: 10
# used to configure readinessProbe on filer containers
#
readinessProbe:
enabled: true
httpGet:
path: /
scheme: HTTP
initialDelaySeconds: 10
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
timeoutSeconds: 10
# secret env variables
secretExtraEnvironmentVars: []
# WEED_POSTGRES_USERNAME:
# secretKeyRef:
# name: postgres-credentials
# key: username
# WEED_POSTGRES_PASSWORD:
# secretKeyRef:
# name: postgres-credentials
# key: password
s3: s3:
enabled: false enabled: true
port: 8333 port: 8333
# add additional https port #allow empty folders
httpsPort: 0
# allow empty folders
allowEmptyFolder: false allowEmptyFolder: false
# Suffix of the host name, {bucket}.{domainName} # Suffix of the host name, {bucket}.{domainName}
domainName: "" domainName: ""
# enable user & permission to s3 (need to inject to all services) # enable user & permission to s3 (need to inject to all services)
enableAuth: false enableAuth: false
# set to the name of an existing kubernetes Secret with the s3 json config file skipAuthSecretCreation: false
# should have a secret key called seaweedfs_s3_config with an inline json configure
existingConfigSecret: null
auditLogConfig: {} auditLogConfig: {}
# You may specify buckets to be created during the install process.
# Buckets may be exposed publicly by setting `anonymousRead` to `true`
# createBuckets:
# - name: bucket-a
# anonymousRead: true
# - name: bucket-b
# anonymousRead: false
s3: s3:
enabled: false enabled: false
@@ -645,35 +418,19 @@ s3:
imageTag: null imageTag: null
restartPolicy: null restartPolicy: null
replicas: 1 replicas: 1
bindAddress: 0.0.0.0
port: 8333 port: 8333
# add additional https port
httpsPort: 0
metricsPort: 9327 metricsPort: 9327
loggingOverrideLevel: null loggingOverrideLevel: null
# allow empty folders #allow empty folders
allowEmptyFolder: true allowEmptyFolder: true
# enable user & permission to s3 (need to inject to all services) # enable user & permission to s3 (need to inject to all services)
enableAuth: false enableAuth: false
# set to the name of an existing kubernetes Secret with the s3 json config file skipAuthSecretCreation: false
# should have a secret key called seaweedfs_s3_config with an inline json config
existingConfigSecret: null
auditLogConfig: {} auditLogConfig: {}
# Suffix of the host name, {bucket}.{domainName} # Suffix of the host name, {bucket}.{domainName}
domainName: "" domainName: ""
## @param s3.sidecars Add additional sidecar containers to the s3 pod(s)
## e.g:
## sidecars:
## - name: your-image-name
## image: your-image
## imagePullPolicy: Always
## ports:
## - name: portname
## containerPort: 1234
##
sidecars: []
initContainers: "" initContainers: ""
extraVolumes: "" extraVolumes: ""
@@ -683,7 +440,7 @@ s3:
# should map directly to the value of the resources field for a PodSpec, # should map directly to the value of the resources field for a PodSpec,
# formatted as a multi-line string. By default no direct resource request # formatted as a multi-line string. By default no direct resource request
# is made. # is made.
resources: {} resources: null
# Toleration Settings for server pods # Toleration Settings for server pods
# This should be a multi-line string matching the Toleration array # This should be a multi-line string matching the Toleration array
@@ -693,76 +450,25 @@ s3:
# nodeSelector labels for server pod assignment, formatted as a muli-line string. # nodeSelector labels for server pod assignment, formatted as a muli-line string.
# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#nodeselector
# Example: # Example:
nodeSelector: |
kubernetes.io/arch: amd64
# nodeSelector: | # nodeSelector: |
# sw-backend: "true" # beta.kubernetes.io/arch: amd64
nodeSelector: |
sw-backend: "true"
# used to assign priority to server pods # used to assign priority to server pods
# ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ # ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
priorityClassName: "" priorityClassName: ""
# used to assign a service account.
# ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
serviceAccountName: ""
logs: logs:
type: "hostPath" type: "hostPath"
size: "" size: ""
storageClass: "" storageClass: ""
hostPathPrefix: /storage
extraEnvironmentVars:
# used to configure livenessProbe on s3 containers
#
livenessProbe:
enabled: true
httpGet:
path: /status
scheme: HTTP
initialDelaySeconds: 20
periodSeconds: 60
successThreshold: 1
failureThreshold: 20
timeoutSeconds: 10
# used to configure readinessProbe on s3 containers
#
readinessProbe:
enabled: true
httpGet:
path: /status
scheme: HTTP
initialDelaySeconds: 15
periodSeconds: 15
successThreshold: 1
failureThreshold: 100
timeoutSeconds: 10
ingress:
enabled: false
className: "nginx"
# host: false for "*" hostname
host: "seaweedfs.cluster.local"
# additional ingress annotations for the s3 endpoint
annotations: ""
tls: []
certificates: certificates:
commonName: "SeaweedFS CA" commonName: "SeaweedFS CA"
ipAddresses: [] ipAddresses: []
keyAlgorithm: rsa keyAlgorithm: rsa
keySize: 2048 keySize: 2048
duration: 2160h # 90d duration: 2160h # 90d
renewBefore: 360h # 15d renewBefore: 360h # 15d
externalCertificates:
# This will avoid the need to use cert-manager and will rely on providing your own external certificates and CA
# you will need to store your provided certificates in the secret read by the different services:
# seaweedfs-master-cert, seaweedfs-filer-cert, etc. Can see any statefulset definition to see secret names
enabled: false
# Labels to be added to all the created pods
podLabels: {}
# Annotations to be added to all the created pods
podAnnotations: {}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

+3 -4
View File
@@ -5,7 +5,7 @@
<groupId>com.github.chrislusf</groupId> <groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId> <artifactId>seaweedfs-client</artifactId>
<version>3.59</version> <version>3.33</version>
<parent> <parent>
<groupId>org.sonatype.oss</groupId> <groupId>org.sonatype.oss</groupId>
@@ -16,8 +16,8 @@
<properties> <properties>
<protobuf.version>3.16.3</protobuf.version> <protobuf.version>3.16.3</protobuf.version>
<!-- follow https://github.com/grpc/grpc-java --> <!-- follow https://github.com/grpc/grpc-java -->
<grpc.version>1.53.0</grpc.version> <grpc.version>1.23.0</grpc.version>
<guava.version>32.0.0-jre</guava.version> <guava.version>30.0-jre</guava.version>
</properties> </properties>
<dependencies> <dependencies>
@@ -96,7 +96,6 @@
<configuration> <configuration>
<source>8</source> <source>8</source>
<target>8</target> <target>8</target>
<release>8</release>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
+1 -2
View File
@@ -5,7 +5,7 @@
<groupId>com.github.chrislusf</groupId> <groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId> <artifactId>seaweedfs-client</artifactId>
<version>3.59</version> <version>3.33</version>
<parent> <parent>
<groupId>org.sonatype.oss</groupId> <groupId>org.sonatype.oss</groupId>
@@ -91,7 +91,6 @@
<configuration> <configuration>
<source>8</source> <source>8</source>
<target>8</target> <target>8</target>
<release>8</release>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
+1 -2
View File
@@ -5,7 +5,7 @@
<groupId>com.github.chrislusf</groupId> <groupId>com.github.chrislusf</groupId>
<artifactId>seaweedfs-client</artifactId> <artifactId>seaweedfs-client</artifactId>
<version>3.59</version> <version>3.33</version>
<parent> <parent>
<groupId>org.sonatype.oss</groupId> <groupId>org.sonatype.oss</groupId>
@@ -90,7 +90,6 @@
<configuration> <configuration>
<source>8</source> <source>8</source>
<target>8</target> <target>8</target>
<release>8</release>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@@ -128,7 +128,6 @@ public class FileChunkManifest {
FilerProto.FileChunk.Builder manifestChunk = SeaweedWrite.writeChunk( FilerProto.FileChunk.Builder manifestChunk = SeaweedWrite.writeChunk(
filerClient.getReplication(), filerClient.getReplication(),
filerClient.getCollection(),
filerClient, filerClient,
minOffset, minOffset,
data, 0, data.length, parentDirectory); data, 0, data.length, parentDirectory);
@@ -13,12 +13,12 @@ public class FilerClient extends FilerGrpcClient {
private static final Logger LOG = LoggerFactory.getLogger(FilerClient.class); private static final Logger LOG = LoggerFactory.getLogger(FilerClient.class);
public FilerClient(String filerHost, int filerGrpcPort) { public FilerClient(String host, int grpcPort) {
super(filerHost, filerGrpcPort-10000, filerGrpcPort); super(host, grpcPort-10000, grpcPort);
} }
public FilerClient(String filerHost, int filerPort, int filerGrpcPort) { public FilerClient(String host, int port, int grpcPort) {
super(filerHost, filerPort, filerGrpcPort); super(host, port, grpcPort);
} }
public static String toFileId(FilerProto.FileId fid) { public static String toFileId(FilerProto.FileId fid) {
@@ -21,7 +21,7 @@ public class FilerSslContext {
String home = System.getProperty("user.home"); String home = System.getProperty("user.home");
File f1 = new File("./"+securityFileName); File f1 = new File("./"+securityFileName);
File f2 = new File(home + "/.seaweedfs/"+securityFileName); File f2 = new File(home + "/.seaweedfs/"+securityFileName);
File f3 = new File("/etc/seaweedfs/"+securityFileName); File f3 = new File(home + "/etc/seaweedfs/"+securityFileName);
File securityFile = f1.exists()? f1 : f2.exists() ? f2 : f3.exists()? f3 : null; File securityFile = f1.exists()? f1 : f2.exists() ? f2 : f3.exists()? f3 : null;
@@ -33,7 +33,6 @@ public class SeaweedOutputStream extends OutputStream {
private ByteBuffer buffer; private ByteBuffer buffer;
private long outputIndex; private long outputIndex;
private String replication = ""; private String replication = "";
private String collection = "";
public SeaweedOutputStream(FilerClient filerClient, final String fullpath) { public SeaweedOutputStream(FilerClient filerClient, final String fullpath) {
this(filerClient, fullpath, ""); this(filerClient, fullpath, "");
@@ -54,6 +53,7 @@ public class SeaweedOutputStream extends OutputStream {
this.lastFlushOffset = 0; this.lastFlushOffset = 0;
this.bufferSize = bufferSize; this.bufferSize = bufferSize;
this.buffer = ByteBufferPool.request(bufferSize); this.buffer = ByteBufferPool.request(bufferSize);
this.outputIndex = 0;
this.writeOperations = new ConcurrentLinkedDeque<>(); this.writeOperations = new ConcurrentLinkedDeque<>();
this.maxConcurrentRequestCount = Runtime.getRuntime().availableProcessors(); this.maxConcurrentRequestCount = Runtime.getRuntime().availableProcessors();
@@ -83,13 +83,6 @@ public class SeaweedOutputStream extends OutputStream {
} }
public void setReplication(String replication) {
this.replication = replication;
}
public void setCollection(String collection) {
this.collection = collection;
}
public static String getParentDirectory(String path) { public static String getParentDirectory(String path) {
int protoIndex = path.indexOf("://"); int protoIndex = path.indexOf("://");
if (protoIndex >= 0) { if (protoIndex >= 0) {
@@ -151,11 +144,13 @@ public class SeaweedOutputStream extends OutputStream {
if (numberOfBytesToWrite < writableBytes) { if (numberOfBytesToWrite < writableBytes) {
buffer.put(data, currentOffset, numberOfBytesToWrite); buffer.put(data, currentOffset, numberOfBytesToWrite);
outputIndex += numberOfBytesToWrite;
break; break;
} }
// System.out.println(path + " [" + (outputIndex + currentOffset) + "," + ((outputIndex + currentOffset) + writableBytes) + ") " + buffer.capacity()); // System.out.println(path + " [" + (outputIndex + currentOffset) + "," + ((outputIndex + currentOffset) + writableBytes) + ") " + buffer.capacity());
buffer.put(data, currentOffset, writableBytes); buffer.put(data, currentOffset, writableBytes);
outputIndex += writableBytes;
currentOffset += writableBytes; currentOffset += writableBytes;
writeCurrentBufferToService(); writeCurrentBufferToService();
numberOfBytesToWrite = numberOfBytesToWrite - writableBytes; numberOfBytesToWrite = numberOfBytesToWrite - writableBytes;
@@ -199,6 +194,7 @@ public class SeaweedOutputStream extends OutputStream {
lastError = new IOException("Stream is closed!"); lastError = new IOException("Stream is closed!");
ByteBufferPool.release(buffer); ByteBufferPool.release(buffer);
buffer = null; buffer = null;
outputIndex = 0;
closed = true; closed = true;
writeOperations.clear(); writeOperations.clear();
if (!threadExecutor.isShutdown()) { if (!threadExecutor.isShutdown()) {
@@ -229,7 +225,7 @@ public class SeaweedOutputStream extends OutputStream {
} }
final Future<Void> job = completionService.submit(() -> { final Future<Void> job = completionService.submit(() -> {
// System.out.println(path + " is going to save [" + (writePosition) + "," + ((writePosition) + bytesLength) + ")"); // System.out.println(path + " is going to save [" + (writePosition) + "," + ((writePosition) + bytesLength) + ")");
SeaweedWrite.writeData(entry, replication, collection, filerClient, writePosition, bufferToWrite.array(), bufferToWrite.position(), bufferToWrite.limit(), path); SeaweedWrite.writeData(entry, replication, filerClient, writePosition, bufferToWrite.array(), bufferToWrite.position(), bufferToWrite.limit(), path);
// System.out.println(path + " saved [" + (writePosition) + "," + ((writePosition) + bytesLength) + ")"); // System.out.println(path + " saved [" + (writePosition) + "," + ((writePosition) + bytesLength) + ")");
ByteBufferPool.release(bufferToWrite); ByteBufferPool.release(bufferToWrite);
return null; return null;
@@ -69,7 +69,7 @@ public class SeaweedRead {
if (locations == null || locations.getLocationsCount() == 0) { if (locations == null || locations.getLocationsCount() == 0) {
LOG.error("failed to locate {}", chunkView.fileId); LOG.error("failed to locate {}", chunkView.fileId);
volumeIdCache.clearLocations(volumeId); volumeIdCache.clearLocations(volumeId);
throw new IOException("failed to locate fileId " + chunkView.fileId); return 0;
} }
int len = readChunkView(filerClient, startOffset, buf, chunkView, locations); int len = readChunkView(filerClient, startOffset, buf, chunkView, locations);
@@ -26,7 +26,6 @@ public class SeaweedWrite {
public static void writeData(FilerProto.Entry.Builder entry, public static void writeData(FilerProto.Entry.Builder entry,
final String replication, final String replication,
String collection,
final FilerClient filerClient, final FilerClient filerClient,
final long offset, final long offset,
final byte[] bytes, final byte[] bytes,
@@ -37,7 +36,7 @@ public class SeaweedWrite {
for (long waitTime = 1000L; waitTime < 10 * 1000; waitTime += waitTime / 2) { for (long waitTime = 1000L; waitTime < 10 * 1000; waitTime += waitTime / 2) {
try { try {
FilerProto.FileChunk.Builder chunkBuilder = writeChunk( FilerProto.FileChunk.Builder chunkBuilder = writeChunk(
replication, collection, filerClient, offset, bytes, bytesOffset, bytesLength, path); replication, filerClient, offset, bytes, bytesOffset, bytesLength, path);
lastException = null; lastException = null;
synchronized (entry) { synchronized (entry) {
entry.addChunks(chunkBuilder); entry.addChunks(chunkBuilder);
@@ -60,7 +59,6 @@ public class SeaweedWrite {
} }
public static FilerProto.FileChunk.Builder writeChunk(final String replication, public static FilerProto.FileChunk.Builder writeChunk(final String replication,
final String collection,
final FilerClient filerClient, final FilerClient filerClient,
final long offset, final long offset,
final byte[] bytes, final byte[] bytes,
@@ -69,7 +67,7 @@ public class SeaweedWrite {
final String path) throws IOException { final String path) throws IOException {
FilerProto.AssignVolumeResponse response = filerClient.getBlockingStub().assignVolume( FilerProto.AssignVolumeResponse response = filerClient.getBlockingStub().assignVolume(
FilerProto.AssignVolumeRequest.newBuilder() FilerProto.AssignVolumeRequest.newBuilder()
.setCollection(Strings.isNullOrEmpty(collection) ? filerClient.getCollection() : collection) .setCollection(filerClient.getCollection())
.setReplication(Strings.isNullOrEmpty(replication) ? filerClient.getReplication() : replication) .setReplication(Strings.isNullOrEmpty(replication) ? filerClient.getReplication() : replication)
.setDataCenter("") .setDataCenter("")
.setTtlSec(0) .setTtlSec(0)
Loaded 100 of 546 files, more files were not shown because too many files have changed in this diff. Show more