Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: logs container using tmp dir #5708

Merged
merged 4 commits into from
Jul 31, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/logs/adapter/minio_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ var _ Adapter = &MinioV2Adapter{}

// NewMinioV2Adapter creates new MinioV2Adapter which will send data to local MinIO bucket
func NewMinioV2Adapter(endpoint, accessKeyID, secretAccessKey, region, token, bucket string, ssl, skipVerify bool, certFile, keyFile, caFile string) (*MinioV2Adapter, error) {
dir, err := os.MkdirTemp("", "minio")
if err != nil {
return nil, err
}
ctx := context.Background()
opts := minioconnecter.GetTLSOptions(ssl, skipVerify, certFile, keyFile, caFile)
c := &MinioV2Adapter{
Expand All @@ -30,7 +34,7 @@ func NewMinioV2Adapter(endpoint, accessKeyID, secretAccessKey, region, token, bu
bucket: bucket,
region: region,
files: make(map[string]*os.File),
path: DefaultDataDir,
path: dir,
}
minioClient, err := c.minioConnecter.GetClient()
if err != nil {
Expand Down
Loading