Compare commits

...

17 Commits

Author SHA1 Message Date
Feng Ruohang 6133a345c8 test(heal): cover empty and interrupted CheckParts streams
Exercise the storage client across a live test grid and check both views of per-part results when drives return incomplete replies.

Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-12-03 18:55:17 +08:00
Feng Ruohang 5bb817bdf8 Merge pull request #360 from ScaleCommerce/fix/heal-checkparts-nil-response
fix(heal): do not panic when CheckParts returns no result
2026-12-03 18:55:01 +08:00
Feng Ruohang d159197c74 Merge pull request #371 from pgsty/codex/console-object-detail-filename
Embed the Console fix for long filenames in Object details
2026-12-03 17:45:17 +08:00
Feng Ruohang 0e72442427 Merge pull request #365 from lingyicute/fix/trim-aws-chunked-content-encoding
Normalize Content-Encoding tokens and strip the aws-chunked transport coding from object metadata.

Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-12-03 16:46:11 +08:00
Feng Ruohang 1203f068c8 Merge pull request #352 from jakub-zeman-scala/build/refresh-ubi-base-digests
Refresh the UBI 9 bases for the certificate stages and the classic runtime.

Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-12-03 16:44:59 +08:00
Feng Ruohang 2e4cfda3d2 build(console): embed the object details filename fix
Pin the Console commit that renders an ellipsis for long object names and exposes the full name on hover. This revision also includes the updated frontend dependencies and rebuilt embedded assets.

Refs #367

Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-12-03 16:44:39 +08:00
Feng Ruohang 5e94a48dcc Merge pull request #364 from agonizerq/fix/clean-abandoned-data-inline-persist
Persist abandoned inline data cleanup and verify live versions by reading them back from disk.

Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-12-03 16:42:52 +08:00
Feng Ruohang 35e33762cb test(storage): verify abandoned inline data cleanup on disk
Read back xl.meta after two cleanup passes and verify current, null and legacy data-directory keyed versions through ReadVersion.

Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-12-03 16:27:48 +08:00
Feng Ruohang 9acba8560c Merge branch 'main' into build/refresh-ubi-base-digests 2026-12-03 16:27:05 +08:00
Feng Ruohang 0bc486be2e Merge pull request #357 from pgsty/codex/helm-7.1-upgrade
fix(helm): preserve upgrade values and validate chart publication
2026-12-03 16:26:04 +08:00
lingyicute 840615c357 fix(s3): trim whitespace and match aws-chunked case-insensitively in Content-Encoding
Content-Encoding is a comma-separated list of content-coding tokens with
optional surrounding whitespace, and token names are case-insensitive
per RFC 9110 Section 8.4.

Previously, trimAwsChunkedContentEncoding split on commas and compared
each raw segment against "aws-chunked" with exact string equality. Inputs
such as "gzip, aws-chunked" or "AWS-Chunked" retained the transport
coding in stored object metadata, and "aws-chunked, gzip" left a leading
space in the persisted encoding.

Trim surrounding whitespace on each comma-separated coding token and
match "aws-chunked" with strings.EqualFold. Update the corresponding
whitespace cases in TestExtractReplicationMetadataPreservesNormalizedMetadata
and add unit tests in TestTrimAwsChunkedContentEncoding.

Signed-off-by: lingyicute <xlyxinglinyi@gmail.com>
2026-11-28 09:52:43 +00:00
agonizerq 5da5f0a342 fix(storage): persist inline-data cleanup in CleanAbandonedData
CleanAbandonedData removes abandoned inline data directories from the
in-memory xl.meta (xl.data.remove), serializes the modified metadata
into newBuf, but then writes the ORIGINAL buffer (buf) back to disk.
As a result the inline-data cleanup never persisted and abandoned
inline entries reappear on the next read.

Write newBuf instead of buf so the cleaned metadata is what gets
persisted to xl.meta.

Signed-off-by: agonizerq <agonizerq@users.noreply.github.com>
2026-11-25 12:57:18 -05:00
Feng Ruohang 11682b125d Merge pull request #362 from pgsty/codex/go-deps-20261125
Refresh server Go dependencies and embed the updated Console
2026-11-25 20:48:11 +08:00
Lucas Röhrs 30dcc5015c fix(heal): do not panic when CheckParts returns no result
A remote CheckParts stream that ends without a response and without an
error (e.g. the grid mux is closed during a disconnect) made
storageRESTClient.CheckParts return (nil, nil). checkObjectWithAllParts
then dereferenced the nil response and crashed the whole server process.

Return grid.ErrDisconnected from the client in that case, and treat a
nil or short per-part result as an unreachable drive in
checkObjectWithAllParts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Lucas Röhrs <lr@scale.sc>
2026-11-25 13:11:58 +01:00
Feng Ruohang a8e5cc4c13 Merge the updated #351 branch into the Helm follow-up
Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-11-25 12:06:00 +08:00
Feng Ruohang 7226aaf3fc fix(helm): preserve upgrade values and validate chart publication
Signed-off-by: Feng Ruohang <rh@vonng.com>
2026-11-25 11:35:05 +08:00
Jakub Zeman c1d0e866d9 build(docker): refresh the UBI 9 base image digests
Move the digest-pinned ubi9/ubi (certs stage of both Dockerfiles) and
ubi9/ubi-micro (runtime of Dockerfile.goreleaser) bases to the current
indexes. The runtime base pinned before ships glibc 2.34-285.el9_9 and
libgcc 11.5.0-15.el9; the current one carries the fixed packages for
CVE-2026-86805, CVE-2026-89092, CVE-2026-95818 (glibc) and
CVE-2026-95619, CVE-2026-102010, CVE-2026-114690, CVE-2026-114691,
CVE-2026-115456 (libgcc).

Grype on linux/amd64 reports 14 fixable findings (13 Medium, 1 Low) for
pgsty/silo:RELEASE.2026-11-12T00-00-00Z and none for the images built
from this commit by `make docker` and `make docker-distroless`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jakub Zeman <jakubzeman@gmail.com>
2026-11-14 22:57:40 +01:00
32 changed files with 556 additions and 183 deletions
+23 -9
View File
@@ -3,7 +3,7 @@ name: Publish Helm Chart to GHCR
on:
push:
tags:
- "chart-.*"
- "chart-*"
permissions:
contents: read
@@ -14,18 +14,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Install Helm
uses: azure/setup-helm@v4
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4
with:
version: v4.3.2
- name: Validate tag and package chart
run: |
set -euo pipefail
version="$(helm show chart helm/silo | sed -n 's/^version: //p')"
if [[ -z "$version" || "$GITHUB_REF_NAME" != "chart-$version" ]]; then
echo "Expected chart-$version for helm/silo, got $GITHUB_REF_NAME" >&2
exit 1
fi
helm lint helm/silo
helm package helm/silo --destination "$RUNNER_TEMP"
- name: Log in to GitHub Container Registry
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io \
--username ${{ github.actor }} \
--password-stdin
printf '%s' "$GH_TOKEN" | helm registry login ghcr.io \
--username "$GITHUB_ACTOR" --password-stdin
- name: Package and Push Helm Chart
- name: Push chart
run: |
helm package helm/silo
helm push silo-*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
helm push "$RUNNER_TEMP/silo-${GITHUB_REF_NAME#chart-}.tgz" \
"oci://ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/charts"
+1
View File
@@ -37,6 +37,7 @@ on:
- "buildscripts/rebrand-guard/**"
- "buildscripts/gen-ldflags.go"
- ".github/workflows/release.yml"
- ".github/workflows/release-helm.yml"
- ".github/workflows/docker-release.yml"
- ".github/workflows/finalize-release.yml"
- ".github/workflows/test-release.yml"
+1 -1
View File
@@ -14,7 +14,7 @@ RUN mkdir -p /prep/data && chmod 0777 /prep/data
# Debian's bundle in distroless still trusts the roots the classic image
# blocklists. Build the same bundle as Dockerfile.goreleaser so both variants
# trust the same roots; it is architecture-neutral, so build it natively.
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/ubi:latest@sha256:8b212f75a0e5a156ac28b1c5c030d2e8a07715254e19d522286118279399af81 AS certs
FROM --platform=$BUILDPLATFORM registry.access.redhat.com/ubi9/ubi:latest@sha256:1e9f0ed9fceafb40878bc1705ff124aa150e3fed873f18c42cdc2dded319e0a8 AS certs
# Native root blocklist mitigation: https://access.redhat.com/security/vulnerabilities/RHSB-2026-012
RUN dnf -y install ca-certificates && \
if [ -d /etc/pki/ca-trust/source/blocklist ]; then \
+2 -2
View File
@@ -69,7 +69,7 @@ RUN apk add -U --no-cache \
mkdir -p /go/share/mcli && \
cp /tmp/mcli-extract/LICENSE /tmp/mcli-extract/NOTICE /tmp/mcli-extract/CREDITS /go/share/mcli/
FROM registry.access.redhat.com/ubi9/ubi:latest@sha256:8b212f75a0e5a156ac28b1c5c030d2e8a07715254e19d522286118279399af81 AS certs
FROM registry.access.redhat.com/ubi9/ubi:latest@sha256:1e9f0ed9fceafb40878bc1705ff124aa150e3fed873f18c42cdc2dded319e0a8 AS certs
# Native root blocklist mitigation: https://access.redhat.com/security/vulnerabilities/RHSB-2026-012
RUN dnf -y install ca-certificates && \
if [ -d /etc/pki/ca-trust/source/blocklist ]; then \
@@ -88,7 +88,7 @@ RUN dnf -y install ca-certificates && \
dnf clean all && \
rm -rf /var/cache/dnf
FROM registry.access.redhat.com/ubi9/ubi-micro:latest@sha256:b59ac4f291d86027c2681f7a7b1cbf7448972fc55a6cb8e25cab5aa5eef5ce5f
FROM registry.access.redhat.com/ubi9/ubi-micro:latest@sha256:dbd325b96bcd432dd42816d31412bdf1dc0fb973b79ed310344bc23c76c068db
LABEL org.opencontainers.image.title="Silo" \
org.opencontainers.image.description="S3-Interface Libre Object Storage" \
@@ -0,0 +1,32 @@
rootUser: silo-admin
rootPassword: 'literal-{{ .Release.Name }}'
buckets:
- name: chart-test
tls:
enabled: true
certSecret: silo-tls
trustedCertsSecret: silo-trusted-ca
ingress:
enabled: true
tls:
- hosts: [s3.example.test]
consoleIngress:
enabled: true
tls:
- hosts: [console.example.test]
networkPolicy:
enabled: true
podDisruptionBudget:
enabled: true
metrics:
serviceMonitor:
enabled: true
includeNode: true
oidc:
enabled: true
existingConfigMapName: chart-oidc
existingConfigUrlKey: discovery
redirectUri: https://console.example.test/oauth_callback
imagePullSecrets:
- name: primary-pull
- name: '{{ .Release.Name }}-pull'
@@ -0,0 +1,7 @@
apiVersion: v2
name: consumer
version: 0.1.0
dependencies:
- name: silo
alias: objects
version: "*"
@@ -0,0 +1,6 @@
global:
storageClass: site-storage
bucketSuffix: archive
objects:
buckets:
- name: '{{ .Release.Name }}-{{ .Values.global.bucketSuffix }}'
+40 -24
View File
@@ -40,6 +40,17 @@ else
}
fi
expect_rendered() {
local render="$1" expected
shift
for expected in "$@"; do
grep -F -- "${expected}" "${render}" >/dev/null || {
echo "${render} is missing: ${expected}" >&2
exit 1
}
done
}
helm_run lint "${new_chart}"
helm_run template silo "${new_chart}" \
--namespace silo \
@@ -53,23 +64,23 @@ helm_run template silo "${new_chart}" \
--set rootUser=silo-admin \
--set rootPassword=test-password-123456 >/dev/null
# Exercise optional templates that the default render leaves dormant.
helm_run template silo-all "${new_chart}" \
--namespace silo \
--set rootUser=silo-admin \
--set rootPassword=test-password-123456 \
--set tls.enabled=true \
--set tls.certSecret=silo-tls \
--set trustedCertsSecret=silo-trusted-ca \
--set ingress.enabled=true \
--set consoleIngress.enabled=true \
--set networkPolicy.enabled=true \
--set podDisruptionBudget.enabled=true \
--set metrics.serviceMonitor.enabled=true \
--set metrics.serviceMonitor.includeNode=true \
--set 'buckets[0].name=chart-test' \
--set 'buckets[0].policy=none' \
--set 'buckets[0].purge=false' >/dev/null
# Exercise the persisted standalone PVC, optional legacy values, and OIDC in both workloads.
cp buildscripts/helm-migration-guard/testdata/optional-values.yaml "${work_dir}/optional-values.yaml"
for mode in standalone distributed; do
render="${work_dir}/${mode}.yaml"
helm_run template silo-all "${new_chart}" --namespace silo \
-f "${output_dir}/optional-values.yaml" --set "mode=${mode}" >"${render}"
expect_rendered "${render}" \
'createBucket chart-test "none" false "" false' \
'name: "chart-oidc"' \
'key: "discovery"' \
'value: "https://console.example.test/oauth_callback"' \
"rootPassword: \"$(printf '%s' 'literal-{{ .Release.Name }}' | base64)\""
if grep -F -- 'name: MINIO_BROWSER_REDIRECT_URL' "${render}" >/dev/null; then
echo "${mode} sets a browser redirect without a configured URL" >&2
exit 1
fi
done
# Existing values commonly address the historical myminio target. Render the
# custom-command path explicitly so both the new and compatibility aliases are
@@ -81,15 +92,10 @@ helm_run template silo-custom "${new_chart}" \
--set rootPassword=test-password-123456 \
--set-string 'customCommands[0].command=admin info myminio' \
--show-only templates/configmap.yaml >"${custom_render}"
for expected in \
expect_rendered "${custom_render}" \
'alias set mysilo' \
'alias set myminio' \
'runCommand admin info myminio'; do
grep -F -- "${expected}" "${custom_render}" >/dev/null || {
echo "rendered custom command is missing: ${expected}" >&2
exit 1
}
done
'runCommand admin info myminio'
old_render="${work_dir}/legacy.yaml"
new_render="${work_dir}/candidate.yaml"
@@ -132,4 +138,14 @@ if find "${work_dir}" -maxdepth 1 -type f -name 'minio-*.tgz' | grep -q .; then
exit 1
fi
# Render the packaged chart under an alias, with values inherited from its parent.
cp -R buildscripts/helm-migration-guard/testdata/parent "${work_dir}/parent"
mkdir "${work_dir}/parent/charts"
cp "${work_dir}/silo-${chart_version}.tgz" "${work_dir}/parent/charts/"
helm_run template consumer "${output_dir}/parent" >"${work_dir}/parent.yaml"
expect_rendered "${work_dir}/parent.yaml" \
'name: consumer-objects' \
'storageClassName: "site-storage"' \
'createBucket consumer-archive "none" false "" false'
echo "Silo Helm lint, render, legacy-upgrade, and package checks passed"
+6
View File
@@ -420,6 +420,12 @@ func checkObjectWithAllParts(ctx context.Context, onlineDisks []StorageAPI, part
default:
verifyResp, verifyErr = onlineDisk.CheckParts(ctx, bucket, object, meta)
}
if verifyErr == nil && (verifyResp == nil || len(verifyResp.Results) < len(latestMeta.Parts)) {
// A drive that returned no usable per-part result cannot vouch
// for its parts; treat it like an unreachable drive instead of
// dereferencing a nil or short response.
verifyErr = errDiskNotFound
}
for p := range latestMeta.Parts {
if verifyErr != nil {
+53
View File
@@ -23,6 +23,7 @@ import (
"fmt"
"os"
"path/filepath"
"reflect"
"runtime"
"testing"
"time"
@@ -772,3 +773,55 @@ func TestCommonParities(t *testing.T) {
}
}
}
// checkPartsResultDisk returns a programmed CheckParts/VerifyFile result.
// All other StorageAPI methods are unimplemented and panic if called.
type checkPartsResultDisk struct {
StorageAPI
resp *CheckPartsResp
err error
}
func (d *checkPartsResultDisk) CheckParts(context.Context, string, string, FileInfo) (*CheckPartsResp, error) {
return d.resp, d.err
}
func (d *checkPartsResultDisk) VerifyFile(context.Context, string, string, FileInfo) (*CheckPartsResp, error) {
return d.resp, d.err
}
// A drive whose CheckParts/VerifyFile returns no error but also no (or a
// short) per-part result, e.g. a remote stream that ended without a response,
// must be reported as unreachable instead of crashing the heal.
func TestCheckObjectWithAllPartsMissingResult(t *testing.T) {
for _, scanMode := range []madmin.HealScanMode{madmin.HealNormalScan, madmin.HealDeepScan} {
t.Run(fmt.Sprintf("scanMode=%d", scanMode), func(t *testing.T) {
meta := nativeAuditMetadata()
full := &CheckPartsResp{Results: []int{checkPartSuccess, checkPartSuccess}}
mixed := &CheckPartsResp{Results: []int{checkPartSuccess, checkPartFileNotFound}}
disks := []StorageAPI{
&checkPartsResultDisk{resp: nil}, // (nil, nil)
&checkPartsResultDisk{resp: &CheckPartsResp{Results: []int{checkPartSuccess}}}, // short result
&checkPartsResultDisk{resp: mixed},
&checkPartsResultDisk{resp: full},
}
errs := make([]error, len(disks))
byDisk, byPart := checkObjectWithAllParts(t.Context(), disks, meta, errs, meta[0],
false, "bucket", "object", scanMode)
unavailable := []int{checkPartDiskNotFound, checkPartDiskNotFound}
wantDisks := map[int][]int{0: unavailable, 1: unavailable, 2: mixed.Results, 3: full.Results}
if !reflect.DeepEqual(byDisk, wantDisks) {
t.Errorf("results by disk: got %v, want %v", byDisk, wantDisks)
}
wantParts := map[int][]int{
0: {checkPartDiskNotFound, checkPartDiskNotFound, checkPartSuccess, checkPartSuccess},
1: {checkPartDiskNotFound, checkPartDiskNotFound, checkPartFileNotFound, checkPartSuccess},
}
if !reflect.DeepEqual(byPart, wantParts) {
t.Errorf("results by part: got %v, want %v", byPart, wantParts)
}
})
}
}
+5 -1
View File
@@ -370,7 +370,11 @@ func trimAwsChunkedContentEncoding(contentEnc string) (trimmedContentEnc string)
}
var newEncs []string
for enc := range strings.SplitSeq(contentEnc, ",") {
if enc != streamingContentEncoding {
// Content-Encoding is a comma separated list with optional
// whitespace around each coding, and coding names are
// case-insensitive, e.g. "gzip, aws-chunked".
enc = strings.TrimSpace(enc)
if !strings.EqualFold(enc, streamingContentEncoding) {
newEncs = append(newEncs, enc)
}
}
+27
View File
@@ -392,3 +392,30 @@ func TestGetResource(t *testing.T) {
}
}
}
// Test trimAwsChunkedContentEncoding() removes the aws-chunked coding wherever
// it appears in the Content-Encoding list, regardless of the optional
// whitespace after the commas or the case of the coding name.
func TestTrimAwsChunkedContentEncoding(t *testing.T) {
testCases := []struct {
in string
expected string
}{
{"", ""},
{"aws-chunked", ""},
{"aws-chunked,gzip", "gzip"},
{"gzip,aws-chunked", "gzip"},
{"aws-chunked, gzip", "gzip"},
{"gzip, aws-chunked", "gzip"},
{"gzip , aws-chunked", "gzip"},
{"AWS-Chunked", ""},
{"gzip, AWS-Chunked", "gzip"},
{"gzip", "gzip"},
{"gzip, br", "gzip,br"},
}
for i, test := range testCases {
if got := trimAwsChunkedContentEncoding(test.in); got != test.expected {
t.Errorf("test %d: input %q: expected %q got %q", i+1, test.in, test.expected, got)
}
}
}
+2 -3
View File
@@ -26,9 +26,8 @@ func TestExtractReplicationMetadataPreservesNormalizedMetadata(t *testing.T) {
{name: "gzip", wire: []string{"gzip"}, want: "gzip"},
{name: "transport-last", wire: []string{"gzip,aws-chunked"}, want: "gzip"},
{name: "multiple-values", wire: []string{"aws-chunked", "gzip"}, want: "gzip"},
// Preserve the existing exact-token grammar; whitespace is not normalized here.
{name: "space-before-gzip", wire: []string{"aws-chunked, gzip"}, want: " gzip"},
{name: "space-before-transport", wire: []string{"gzip, aws-chunked"}, want: "gzip, aws-chunked"},
{name: "space-before-gzip", wire: []string{"aws-chunked, gzip"}, want: "gzip"},
{name: "space-before-transport", wire: []string{"gzip, aws-chunked"}, want: "gzip"},
} {
for _, lowercase := range []bool{false, true} {
name := tc.name + "/canonical"
+102
View File
@@ -0,0 +1,102 @@
// Copyright (c) 2026 Feng Ruohang
//
// This file is part of Silo Object Storage.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package cmd
import (
"context"
"errors"
"slices"
"testing"
"time"
"github.com/minio/minio/internal/grid"
)
func TestStorageRESTClientCheckPartsCompletion(t *testing.T) {
for _, tc := range []struct {
name string
reply []int
disconnect bool
remoteErr error
wantErr error
}{
{name: "one-response", reply: []int{checkPartSuccess, checkPartFileNotFound}},
{name: "zero-parts", reply: []int{}},
{name: "empty-completion", wantErr: errDiskNotFound},
{name: "disconnect", disconnect: true, wantErr: errDiskNotFound},
{name: "storage-error", remoteErr: errFileCorrupt, wantErr: errFileCorrupt},
} {
t.Run(tc.name, func(t *testing.T) {
g, err := grid.SetupTestGrid(2)
if err != nil {
t.Fatal(err)
}
t.Cleanup(g.Cleanup)
const route = "/disk"
handled := make(chan error, 1)
handle := func(_ context.Context, _ *CheckPartsHandlerParams, _ <-chan grid.NoPayload, out chan<- *CheckPartsResp) *grid.RemoteErr {
var closeErr error
if tc.reply != nil {
out <- &CheckPartsResp{Results: slices.Clone(tc.reply)}
}
if tc.disconnect {
closeErr = g.ClosePeerConnection(1, 0)
}
handled <- closeErr
return grid.NewRemoteErr(tc.remoteErr)
}
for _, mgr := range g.Managers {
if err := storageCheckPartsRPC.Register(mgr, handle, route); err != nil {
t.Fatal(err)
}
}
client := &storageRESTClient{gridConn: g.Managers[0].Connection(g.Hosts[1]).Subroute(route)}
client.SetDiskID("synthetic")
ctx, cancel := context.WithTimeout(t.Context(), 10*time.Second)
defer cancel()
fi := FileInfo{Parts: []ObjectPartInfo{{Number: 1}, {Number: 2}}}
if tc.reply != nil && len(tc.reply) == 0 {
fi.Parts = nil
}
resp, err := client.CheckParts(ctx, "bucket", "object", fi)
select {
case closeErr := <-handled:
if closeErr != nil {
t.Fatalf("closing peer connection: %v", closeErr)
}
case <-ctx.Done():
t.Fatalf("peer did not complete the handler: %v", ctx.Err())
}
if ctx.Err() != nil {
t.Fatalf("caller context ended: %v", ctx.Err())
}
if !errors.Is(err, tc.wantErr) {
t.Fatalf("CheckParts returned %v, want %v", err, tc.wantErr)
}
if tc.wantErr != nil {
if resp != nil {
t.Fatalf("unexpected response on error: %+v", resp)
}
return
}
if resp == nil || !slices.Equal(resp.Results, tc.reply) {
t.Fatalf("got %+v, want part results %v", resp, tc.reply)
}
})
}
}
+6
View File
@@ -480,6 +480,12 @@ func (client *storageRESTClient) CheckParts(ctx context.Context, volume string,
resp = r
return nil
})
if err == nil && resp == nil {
// The stream ended without a response and without an error,
// e.g. when the mux was closed during a disconnect. Never
// return (nil, nil): callers rely on resp being set on success.
err = grid.ErrDisconnected
}
return resp, toStorageErr(err)
}
+1 -1
View File
@@ -3366,7 +3366,7 @@ func (s *xlStorage) CleanAbandonedData(ctx context.Context, volume string, path
newBuf, err := xl.AppendTo(metaDataPoolGet())
if err == nil {
defer metaDataPoolPut(newBuf)
return s.WriteAll(ctx, volume, pathJoin(path, xlStorageFormatFile), buf)
return s.WriteAll(ctx, volume, pathJoin(path, xlStorageFormatFile), newBuf)
}
}
return nil
+75
View File
@@ -1643,6 +1643,81 @@ func TestXLStorageRenameFile(t *testing.T) {
}
}
func TestXLStorageCleanAbandonedInlineData(t *testing.T) {
disk, _, err := newXLStorageTestSetup(t)
if err != nil {
t.Fatal(err)
}
defer disk.Close()
ctx := t.Context()
const volume, object = "test-bucket", "inline-object"
if err := disk.MakeVol(ctx, volume); err != nil {
t.Fatal(err)
}
versions := []struct {
id, body string
legacy bool
}{
{nullVersionID, "null version", false},
{mustGetUUID(), "named version", false},
{mustGetUUID(), "legacy data-dir key", true},
}
var meta xlMetaV2
for _, v := range versions {
fi := newFileInfo(object, 2, 2)
fi.VersionID = v.id
fi.DataDir = mustGetUUID()
fi.Erasure.Index = 1
fi.ModTime = UTCNow()
fi.Data = []byte(v.body)
fi.Size = int64(len(fi.Data))
fi.AddObjectPart(1, "", fi.Size, fi.Size, fi.ModTime, nil, nil)
if !v.legacy {
fi.SetInlineData()
}
if err := meta.AddVersion(fi); err != nil {
t.Fatal(err)
}
if v.legacy && !meta.data.rename(v.id, fi.DataDir) {
t.Fatal("failed to store legacy inline data by data directory")
}
}
orphan := mustGetUUID()
meta.data.replace(orphan, []byte("abandoned data"))
buf, err := meta.AppendTo(nil)
if err != nil {
t.Fatal(err)
}
metaPath := pathJoin(object, xlStorageFormatFile)
if err := disk.WriteAll(ctx, volume, metaPath, buf); err != nil {
t.Fatal(err)
}
for pass := 1; pass <= 2; pass++ {
if err := disk.CleanAbandonedData(ctx, volume, object); err != nil {
t.Fatalf("cleanup %d: %v", pass, err)
}
raw, err := disk.ReadAll(ctx, volume, metaPath)
if err != nil {
t.Fatal(err)
}
var saved xlMetaV2
if err := saved.Load(raw); err != nil {
t.Fatal(err)
}
if saved.data.find(orphan) != nil {
t.Fatalf("cleanup %d left orphan %s in xl.meta", pass, orphan)
}
for _, v := range versions {
fi, err := disk.ReadVersion(ctx, "", volume, object, v.id, ReadOptions{ReadData: true})
if err != nil || string(fi.Data) != v.body {
t.Fatalf("after cleanup %d, read version %s: got %q, %v; want %q", pass, v.id, fi.Data, err, v.body)
}
}
}
}
// TestXLStorageDeleteVersion will test if version deletes and bulk deletes work as expected.
func TestXLStorageDeleteVersion(t *testing.T) {
// create xlStorage test setup
+1 -1
View File
@@ -4,7 +4,7 @@ go 1.27.4
// Console and MC retain their historical module paths for best-effort upstream
// compatibility. Pin the maintained PGSTY implementations used by SILO.
replace github.com/minio/console => github.com/pgsty/silo-console v0.0.0-20261125122625-3b2dc9756e10
replace github.com/minio/console => github.com/pgsty/silo-console v0.0.0-20261203083819-03a382cea50e
replace github.com/minio/mc => github.com/pgsty/mc v0.0.0-20261111180825-a37a9f054fba
+2 -2
View File
@@ -517,8 +517,8 @@ github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwp
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pgsty/mc v0.0.0-20261111180825-a37a9f054fba h1:KKLNRed2r86tWb/dqcjaAY7wiP6VmOaXe137l+Y/tLU=
github.com/pgsty/mc v0.0.0-20261111180825-a37a9f054fba/go.mod h1:M/s9Mioaya7h38sTw65xqyhfDYB5L3aTkgjAr1e7ZAo=
github.com/pgsty/silo-console v0.0.0-20261125122625-3b2dc9756e10 h1:RxULMBNaVwcyrZ30+9Ay9izANAQwdDu9CNBaCqsddg8=
github.com/pgsty/silo-console v0.0.0-20261125122625-3b2dc9756e10/go.mod h1:OEl+4Of8khthmPBeQZiIHnZbiTdXTF6uqxKBFghJYZY=
github.com/pgsty/silo-console v0.0.0-20261203083819-03a382cea50e h1:WzQcjNo2ozpCJPa+olrsiLTI3Q8w4+dEPa3ZqWIvYtI=
github.com/pgsty/silo-console v0.0.0-20261203083819-03a382cea50e/go.mod h1:OEl+4Of8khthmPBeQZiIHnZbiTdXTF6uqxKBFghJYZY=
github.com/pgsty/silo-pkg/v3 v3.16.1 h1:jk8clnx7Fg5ZcpdzqP137XQ4SSAQDF/Kaa/12k721Os=
github.com/pgsty/silo-pkg/v3 v3.16.1/go.mod h1:ktr9Y2OO6QAQU+9bkrS7GGqUwM9AQR5jITitySmMSEg=
github.com/philhofer/fwd v1.2.1 h1:UtpS73q8bFgy/yH3gCq8LSNvj5gv/FowNOiWZa7uKwQ=
+19 -9
View File
@@ -12,19 +12,22 @@ The chart and server are licensed under AGPL-3.0-or-later.
## Install
From GHCR:
From the source checkout:
```bash
helm install silo oci://ghcr.io/pgsty/charts/silo \
helm install silo ./helm/silo \
--namespace silo --create-namespace \
--set rootUser=silo-admin \
--set rootPassword='replace-with-a-long-random-secret'
```
For a version published on GHCR, use `oci://ghcr.io/pgsty/charts/silo` in
place of `./helm/silo` and pass `--version <chart-version>`.
For a disposable standalone installation:
```bash
helm install silo oci://ghcr.io/pgsty/charts/silo \
helm install silo ./helm/silo \
--namespace silo --create-namespace \
--set mode=standalone \
--set replicas=1 \
@@ -64,7 +67,7 @@ helm get values my-release -n my-namespace -a > values.before-silo.yaml
SILO_TAG='<published-silo-release-tag>'
MCLI_TAG='<published-mcli-release-tag>'
helm template my-release oci://ghcr.io/pgsty/charts/silo \
helm template my-release ./helm/silo \
-n my-namespace \
-f values.before-silo.yaml \
--set nameOverride=minio \
@@ -84,7 +87,7 @@ mounts. After review, upgrade the chart and image together:
```bash
SILO_TAG='<published-silo-release-tag>'
MCLI_TAG='<published-mcli-release-tag>'
helm upgrade my-release oci://ghcr.io/pgsty/charts/silo \
helm upgrade my-release ./helm/silo \
-n my-namespace \
-f values.before-silo.yaml \
--set nameOverride=minio \
@@ -122,17 +125,21 @@ When upgrading an existing Silo release to `RELEASE.2026-11-12T00-00-00Z` (chart
## Persistence and TLS
The default PersistentVolumeClaim mounts at `/export`. Use an existing claim
with:
The default PersistentVolumeClaim mounts at `/export`. New claims use
`persistence.storageClass` or inherit `global.storageClass` from a parent chart.
Helm preserves the existing storage class during a connected upgrade when only
the parent supplies a default.
Use an existing claim with:
```bash
helm install silo oci://ghcr.io/pgsty/charts/silo --set persistence.existingClaim=PVC_NAME
helm install silo ./helm/silo --set persistence.existingClaim=PVC_NAME
```
Create a TLS Secret containing `private.key` and `public.crt`, then set:
```bash
helm upgrade --install silo oci://ghcr.io/pgsty/charts/silo \
helm upgrade --install silo ./helm/silo \
--set tls.enabled=true \
--set tls.certSecret=silo-tls
```
@@ -141,6 +148,9 @@ Additional trusted CAs can be supplied through `trustedCertsSecret`.
## Existing Secrets and post-install resources
The chart treats `rootUser` and `rootPassword` as literal values. A parent chart
can opt into evaluating both as Helm templates with `tplRootCredentials: true`.
Set `existingSecret` to a Secret containing `rootUser` and `rootPassword`.
Buckets, users, policies, service accounts, and custom commands can be created
with the existing `buckets`, `users`, `policies`, `svcaccts`, and
@@ -119,5 +119,5 @@ connectToSilo $scheme
{{ $global := . }}
# Create the buckets
{{- range .Values.buckets }}
createBucket {{ tpl .name $global }} {{ tpl .policy $global | default "none" | quote }} {{ .purge | default false }} {{ .versioning | default "" }} {{ .objectlocking | default false }}{{- end }}
createBucket {{ tpl .name $global }} {{ tpl (default "none" .policy) $global | default "none" | quote }} {{ .purge | default false }} {{ ternary .versioning "" (ne .versioning nil) | quote }} {{ .objectlocking | default false }}{{- end }}
{{- end }}
+88 -20
View File
@@ -119,26 +119,34 @@ Properly format optional additional arguments to Silo binary
{{- end -}}
{{- end -}}
{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "silo.imagePullSecrets" -}}
{{/*
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
Also, we can not use a single if because lazy evaluation is not an option
*/}}
{{- if .Values.global }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{ tpl (toYaml .Values.global.imagePullSecrets) $ }}
{{- else if .Values.imagePullSecrets }}
imagePullSecrets:
{{ tpl (toYaml .Values.imagePullSecrets) $ }}
{{- with (or (.Values.global | default dict).imagePullSecrets .Values.imagePullSecrets) }}
imagePullSecrets: {{- tpl (toYaml .) $ | nindent 2 }}
{{- end }}
{{- end -}}
{{- else if .Values.imagePullSecrets }}
imagePullSecrets:
{{ tpl (toYaml .Values.imagePullSecrets) $ }}
{{/* Keep the class already chosen for an existing claim when a parent supplies a default. */}}
{{- define "silo.storageClass" -}}
{{- $class := or .Values.persistence.storageClass (.Values.global | default dict).storageClass -}}
{{- if $class -}}
{{- $spec := dict "storageClassName" (ternary "" $class (eq $class "-")) -}}
{{- if and .Release.IsUpgrade (not .Values.persistence.storageClass) -}}
{{- $name := include "silo.fullname" . -}}
{{- if eq .Values.mode "standalone" -}}
{{- with (lookup "v1" "PersistentVolumeClaim" .Release.Namespace $name) -}}
{{- $spec = .spec -}}
{{- end -}}
{{- else -}}
{{- with (lookup "apps/v1" "StatefulSet" .Release.Namespace $name) -}}
{{- with .spec.volumeClaimTemplates -}}
{{- $spec = (first .).spec -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- if hasKey $spec "storageClassName" -}}
storageClassName: {{ $spec.storageClassName | quote }}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -201,7 +209,11 @@ otherwise it generates a random value.
{{- define "silo.root.username" -}}
{{- if .Values.rootUser }}
{{- tpl .Values.rootUser . | toString }}
{{- if .Values.tplRootCredentials }}
{{- tpl (.Values.rootUser | toString) . }}
{{- else }}
{{- .Values.rootUser | toString }}
{{- end }}
{{- else }}
{{- include "silo.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "silo.fullname" .) "Length" 20 "Key" "rootUser") }}
{{- end }}
@@ -209,8 +221,64 @@ otherwise it generates a random value.
{{- define "silo.root.password" -}}
{{- if .Values.rootPassword }}
{{- tpl .Values.rootPassword . | toString }}
{{- if .Values.tplRootCredentials }}
{{- tpl (.Values.rootPassword | toString) . }}
{{- else }}
{{- .Values.rootPassword | toString }}
{{- end }}
{{- else }}
{{- include "silo.getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "silo.fullname" .) "Length" 40 "Key" "rootPassword") }}
{{- end }}
{{- end -}}
{{/* OIDC environment shared by the standalone and distributed workloads. */}}
{{- define "silo.oidcEnv" -}}
{{- $oidc := .Values.oidc -}}
{{- if $oidc.enabled -}}
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
{{- if and $oidc.existingConfigMapName $oidc.existingConfigUrlKey }}
valueFrom:
configMapKeyRef:
name: {{ $oidc.existingConfigMapName | quote }}
key: {{ $oidc.existingConfigUrlKey | quote }}
{{- else }}
value: {{ $oidc.configUrl | quote }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_ID
{{- if and $oidc.existingClientSecretName $oidc.existingClientIdKey }}
valueFrom:
secretKeyRef:
name: {{ $oidc.existingClientSecretName | quote }}
key: {{ $oidc.existingClientIdKey | quote }}
{{- else }}
value: {{ $oidc.clientId | quote }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_SECRET
{{- if and $oidc.existingClientSecretName $oidc.existingClientSecretKey }}
valueFrom:
secretKeyRef:
name: {{ $oidc.existingClientSecretName | quote }}
key: {{ $oidc.existingClientSecretKey | quote }}
{{- else }}
value: {{ $oidc.clientSecret | quote }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLAIM_NAME
value: {{ $oidc.claimName | quote }}
- name: MINIO_IDENTITY_OPENID_CLAIM_PREFIX
value: {{ $oidc.claimPrefix | quote }}
- name: MINIO_IDENTITY_OPENID_SCOPES
value: {{ tpl $oidc.scopes . | quote }}
- name: MINIO_IDENTITY_OPENID_COMMENT
value: {{ $oidc.comment | quote }}
{{- with $oidc.redirectUri }}
- name: MINIO_IDENTITY_OPENID_REDIRECT_URI
value: {{ tpl . $ | quote }}
{{- end }}
{{- if and $oidc.redirectUrl (not (hasKey (.Values.environment | default dict) "MINIO_BROWSER_REDIRECT_URL")) }}
- name: MINIO_BROWSER_REDIRECT_URL
value: {{ tpl $oidc.redirectUrl . | quote }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_DISPLAY_NAME
value: {{ $oidc.displayName | quote }}
{{- end }}
{{- end -}}
+3 -1
View File
@@ -31,7 +31,9 @@ spec:
{{- range .hosts }}
- {{ tpl . $ | quote }}
{{- end }}
secretName: {{ tpl .secretName $ }}
{{- with .secretName }}
secretName: {{ tpl . $ | quote }}
{{- end }}
{{- end }}
{{- end }}
rules:
+2 -46
View File
@@ -69,7 +69,7 @@ spec:
{{- end }}
containers:
- name: {{ include "silo.name" . }}
image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . }}"
image: "{{ tpl .Values.image.repository . }}:{{ tpl (.Values.image.tag | toString) . }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- "/bin/sh"
@@ -116,51 +116,7 @@ spec:
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public"
{{- end }}
{{- if .Values.oidc.enabled }}
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
{{- if and .Values.oidc.existingConfigMapName .Values.oidc.existingConfigUrlKey }}
valueFrom:
configMapKeyRef:
name: {{ .Values.oidc.existingConfigMapName }}
key: {{ .Values.oidc.existingConfigUrlKey }}
{{- else }}
value: {{ .Values.oidc.configUrl }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_ID
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientIdKey }}
valueFrom:
secretKeyRef:
name: {{ .Values.oidc.existingClientSecretName }}
key: {{ .Values.oidc.existingClientIdKey }}
{{- else }}
value: {{ .Values.oidc.clientId }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_SECRET
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientSecretKey }}
valueFrom:
secretKeyRef:
name: {{ .Values.oidc.existingClientSecretName }}
key: {{ .Values.oidc.existingClientSecretKey }}
{{- else }}
value: {{ .Values.oidc.clientSecret }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLAIM_NAME
value: {{ .Values.oidc.claimName }}
- name: MINIO_IDENTITY_OPENID_CLAIM_PREFIX
value: {{ .Values.oidc.claimPrefix }}
- name: MINIO_IDENTITY_OPENID_SCOPES
value: {{ tpl .Values.oidc.scopes . }}
- name: MINIO_IDENTITY_OPENID_COMMENT
value: {{ .Values.oidc.comment }}
{{- if .Values.oidc.redirectUri }}
- name: MINIO_IDENTITY_OPENID_REDIRECT_URI
value: {{ tpl .Values.oidc.redirectUri . }}
{{- end }}
- name: MINIO_BROWSER_REDIRECT_URL
value: {{ tpl .Values.oidc.redirectUrl . }}
- name: MINIO_IDENTITY_OPENID_DISPLAY_NAME
value: {{ .Values.oidc.displayName }}
{{- end }}
{{- include "silo.oidcEnv" . | nindent 12 }}
{{- if .Values.etcd.endpoints }}
- name: MINIO_ETCD_ENDPOINTS
value: {{ join "," .Values.etcd.endpoints | quote }}
+3 -1
View File
@@ -31,7 +31,9 @@ spec:
{{- range .hosts }}
- {{ tpl . $ | quote }}
{{- end }}
secretName: {{ tpl .secretName $ }}
{{- with .secretName }}
secretName: {{ tpl . $ | quote }}
{{- end }}
{{- end }}
{{- end }}
rules:
+3
View File
@@ -53,6 +53,9 @@ metadata:
chart: {{ template "silo.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.commonLabels }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
spec:
podSelector:
matchLabels:
+8 -8
View File
@@ -24,7 +24,7 @@ spec:
app: {{ template "silo.name" . }}-job
release: {{ .Release.Name }}
{{- if .Values.podLabels }}
{{- toYaml .Values.podLabels | nindent 8 }}
{{- tpl (toYaml .Values.podLabels) $ | nindent 8 }}
{{- end }}
{{- with .Values.commonLabels }}
{{- tpl (toYaml .) $ | nindent 8 }}
@@ -35,8 +35,8 @@ spec:
spec:
restartPolicy: OnFailure
{{- include "silo.imagePullSecrets" . | indent 6 }}
{{- if or .Values.nodeSelector .Values.postJob.nodeSelector }}
nodeSelector: {{- tpl (toYaml .Values.postJob.nodeSelector | default .Values.nodeSelector) . | nindent 8 }}
{{- with (.Values.postJob.nodeSelector | default .Values.nodeSelector) }}
nodeSelector: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.postJob.affinity }}
affinity: {{- toYaml . | nindent 8 }}
@@ -94,7 +94,7 @@ spec:
{{- if .Values.policies }}
initContainers:
- name: silo-make-policy
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}"
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.makePolicyJob.securityContext.enabled }}
{{- with .Values.makePolicyJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }}
@@ -128,7 +128,7 @@ spec:
containers:
{{- if .Values.buckets }}
- name: silo-make-bucket
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}"
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.makeBucketJob.securityContext.enabled }}
{{- with .Values.makeBucketJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }}
@@ -161,7 +161,7 @@ spec:
{{- end }}
{{- if .Values.users }}
- name: silo-make-user
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}"
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.makeUserJob.securityContext.enabled }}
{{- with .Values.makeUserJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }}
@@ -194,7 +194,7 @@ spec:
{{- end }}
{{- if .Values.customCommands }}
- name: silo-custom-command
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}"
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.customCommandJob.securityContext.enabled }}
{{- with .Values.customCommandJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }}
@@ -230,7 +230,7 @@ spec:
{{- end }}
{{- if .Values.svcaccts }}
- name: silo-make-svcacct
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl .Values.mcImage.tag . }}"
image: "{{ tpl .Values.mcImage.repository . }}:{{ tpl (.Values.mcImage.tag | toString) . }}"
{{- if .Values.makeServiceAccountJob.securityContext.enabled }}
{{- with .Values.makeServiceAccountJob.containerSecurityContext | default .Values.postJob.containerSecurityContext }}
securityContext: {{ toYaml . | nindent 12 }}
+2 -6
View File
@@ -22,12 +22,8 @@ spec:
resources:
requests:
storage: {{ .Values.persistence.size | quote }}
{{- if or .Values.persistence.storageClass .Values.global.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass | default .Values.global.storageClass }}"
{{- end }}
{{- with (include "silo.storageClass" .) }}
{{- . | nindent 2 }}
{{- end }}
{{- if .Values.persistence.volumeName }}
volumeName: "{{ .Values.persistence.volumeName }}"
+3
View File
@@ -80,6 +80,9 @@ metadata:
{{- with .Values.metrics.serviceMonitor.additionalLabels }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
{{- with .Values.commonLabels }}
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
spec:
jobName: {{ template "silo.fullname" . }}
{{- if .Values.tls.enabled }}
+8 -41
View File
@@ -9,7 +9,6 @@
{{ $subPath := .Values.persistence.subPath }}
{{ $penabled := .Values.persistence.enabled }}
{{ $accessMode := .Values.persistence.accessMode }}
{{ $storageClass := .Values.persistence.storageClass }}
{{ $psize := .Values.persistence.size }}
apiVersion: v1
kind: Service
@@ -100,7 +99,7 @@ spec:
{{- end }}
containers:
- name: {{ include "silo.name" . }}
image: {{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . }}
image: {{ tpl .Values.image.repository . }}:{{ tpl (.Values.image.tag | toString) . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
command: [
"/bin/sh",
@@ -157,40 +156,7 @@ spec:
- name: MINIO_PROMETHEUS_AUTH_TYPE
value: "public"
{{- end }}
{{- if .Values.oidc.enabled }}
- name: MINIO_IDENTITY_OPENID_CONFIG_URL
value: {{ .Values.oidc.configUrl }}
- name: MINIO_IDENTITY_OPENID_CLIENT_ID
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientIdKey }}
valueFrom:
secretKeyRef:
name: {{ .Values.oidc.existingClientSecretName }}
key: {{ .Values.oidc.existingClientIdKey }}
{{- else }}
value: {{ .Values.oidc.clientId }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLIENT_SECRET
{{- if and .Values.oidc.existingClientSecretName .Values.oidc.existingClientSecretKey }}
valueFrom:
secretKeyRef:
name: {{ .Values.oidc.existingClientSecretName }}
key: {{ .Values.oidc.existingClientSecretKey }}
{{- else }}
value: {{ .Values.oidc.clientSecret }}
{{- end }}
- name: MINIO_IDENTITY_OPENID_CLAIM_NAME
value: {{ .Values.oidc.claimName }}
- name: MINIO_IDENTITY_OPENID_CLAIM_PREFIX
value: {{ .Values.oidc.claimPrefix }}
- name: MINIO_IDENTITY_OPENID_SCOPES
value: {{ .Values.oidc.scopes }}
- name: MINIO_IDENTITY_OPENID_COMMENT
value: {{ .Values.oidc.comment }}
- name: MINIO_IDENTITY_OPENID_REDIRECT_URI
value: {{ .Values.oidc.redirectUri }}
- name: MINIO_IDENTITY_OPENID_DISPLAY_NAME
value: {{ .Values.oidc.displayName }}
{{- end }}
{{- include "silo.oidcEnv" . | nindent 12 }}
{{- range $key, $val := .Values.environment }}
- name: {{ $key }}
value: {{ tpl $val $ | quote }}
@@ -209,7 +175,7 @@ spec:
{{- end }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector: {{- toYaml . | nindent 8 }}
nodeSelector: {{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- include "silo.imagePullSecrets" . | indent 6 }}
{{- with .Values.affinity }}
@@ -237,6 +203,7 @@ spec:
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- end }}
{{- if .Values.persistence.enabled }}
{{- $storageClass := include "silo.storageClass" . }}
volumeClaimTemplates:
{{- if gt $drivesPerNode 1 }}
{{- range $diskId := until $drivesPerNode}}
@@ -249,8 +216,8 @@ spec:
{{- end }}
spec:
accessModes: [ {{ $accessMode | quote }} ]
{{- if $storageClass }}
storageClassName: {{ $storageClass }}
{{- with $storageClass }}
{{- . | nindent 8 }}
{{- end }}
resources:
requests:
@@ -266,8 +233,8 @@ spec:
{{- end }}
spec:
accessModes: [ {{ $accessMode | quote }} ]
{{- if $storageClass }}
storageClassName: {{ $storageClass }}
{{- with $storageClass }}
{{- . | nindent 8 }}
{{- end }}
resources:
requests:
+8 -6
View File
@@ -95,6 +95,8 @@ runtimeClassName: ""
##
rootUser: ""
rootPassword: ""
## Evaluate rootUser and rootPassword as Helm templates when explicitly enabled.
tplRootCredentials: false
## Use existing Secret that store following variables:
##
@@ -160,8 +162,8 @@ persistence:
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
## Storage class of PV to bind. By default it looks for standard storage class.
## If the PV uses a different storage class, specify that here.
## An unset value inherits global.storageClass for new claims. During upgrade,
## existing claims retain their provisioned class.
storageClass: ""
volumeName: ""
accessMode: ReadWriteOnce
@@ -552,10 +554,10 @@ oidc:
existingClientSecretKey: ""
claimName: "policy"
scopes: "openid,profile,email"
# Deprecated: Use redirectUrl and set this to `false` or an empty string
redirectUri: "https://console-endpoint-url/oauth_callback"
# Use in favor of `redirectUri` to set `MINIO_BROWSER_REDIRECT_URL`
redirectUrl: "https://console-endpoint-url"
# Legacy callback URL, including /oauth_callback, for existing installations.
redirectUri: ""
# Public Console base URL. An explicit environment.MINIO_BROWSER_REDIRECT_URL takes priority.
redirectUrl: ""
# Can leave empty
claimPrefix: ""
comment: ""
+16
View File
@@ -128,6 +128,22 @@ func (t *TestGrid) Cleanup() {
})
}
// ClosePeerConnection closes the live transport at one end of a test grid link.
// Both managers stay running, so callers observe a peer disconnect and may reconnect.
func (t *TestGrid) ClosePeerConnection(from, to int) error {
c := t.Managers[from].Connection(t.Hosts[to])
c.connMu.Lock()
defer c.connMu.Unlock()
peer := c.debugInConn
if c.shouldConnect() {
peer = c.debugOutConn
}
if peer == nil {
return ErrDisconnected
}
return peer.Close()
}
// WaitAllConnect will wait for all connections to be established.
func (t *TestGrid) WaitAllConnect(ctx context.Context) {
for _, manager := range t.Managers {