Skip to content

Commit a1a27bc

Browse files
authored
Merge branch 'main' into baggage-support-and-parent-activity
2 parents e692938 + bfe5c1f commit a1a27bc

File tree

12 files changed

+240
-480
lines changed

12 files changed

+240
-480
lines changed

cmd/logarea/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ func main() {
6666
app := application.New(v1AlphaLogArea)
6767
srv := server.NewWebService(cfg, log, app)
6868

69+
r := v1alpha.NewRetentionHandler(ctx, cfg, log)
70+
r.Start()
71+
defer r.Shutdown()
72+
6973
done := make(chan os.Signal, 1)
7074
signal.Notify(done, syscall.SIGINT, syscall.SIGTERM)
7175

internal/config/logarea.go

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,49 @@
1515
// limitations under the License.
1616
package config
1717

18-
import "flag"
18+
import (
19+
"flag"
20+
"time"
21+
22+
"github.com/sirupsen/logrus"
23+
)
1924

2025
type LogAreaConfig interface {
2126
Config
27+
UploadPath() string
28+
Retention() time.Duration
29+
}
30+
31+
// logAreaCfg implements the LogAreaConfig interface
32+
type logAreaCfg struct {
33+
Config
34+
uploadPath string
35+
retention time.Duration
2236
}
2337

2438
// NewLogAreaConfig creates a log area config interface based on input parameters or environment variables.
2539
func NewLogAreaConfig() LogAreaConfig {
26-
cfg := load()
40+
var conf logAreaCfg
41+
defaultRetention, err := time.ParseDuration(EnvOrDefault("RETENTION", "24h"))
42+
if err != nil {
43+
logrus.Panic(err)
44+
}
45+
46+
flag.StringVar(&conf.uploadPath, "uploadpath", EnvOrDefault("UPLOAD_PATH", "/tmp/files"), "Path to upload files to.")
47+
flag.DurationVar(&conf.retention, "retention", defaultRetention, "Which retention should configured for files")
48+
base := load()
2749
flag.Parse()
28-
return cfg
50+
conf.Config = base
51+
52+
return &conf
53+
}
54+
55+
// UploadPath is the local path where all files and directories uploaded should be stored.
56+
func (c logAreaCfg) UploadPath() string {
57+
return c.uploadPath
58+
}
59+
60+
// Retention returns the file retention time.
61+
func (c logAreaCfg) Retention() time.Duration {
62+
return c.retention
2963
}

manifests/base/api/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
serviceAccountName: etos-api
2121
containers:
2222
- name: etos-api
23-
image: ghcr.io/eiffel-community/etos-api:a98a4f39
23+
image: ghcr.io/eiffel-community/etos-api:3f11cf43
2424
imagePullPolicy: IfNotPresent
2525
ports:
2626
- name: http

manifests/base/executionspace/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
serviceAccountName: etos-executionspace
2121
containers:
2222
- name: etos-executionspace
23-
image: ghcr.io/eiffel-community/etos-executionspace:a98a4f39
23+
image: ghcr.io/eiffel-community/etos-executionspace:3f11cf43
2424
imagePullPolicy: IfNotPresent
2525
envFrom:
2626
- configMapRef:

manifests/base/iut/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
serviceAccountName: etos-iut
2121
containers:
2222
- name: etos-iut
23-
image: ghcr.io/eiffel-community/etos-iut:a98a4f39
23+
image: ghcr.io/eiffel-community/etos-iut:3f11cf43
2424
imagePullPolicy: IfNotPresent
2525
env:
2626
- name: SERVICE_HOST

manifests/base/keys/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
serviceAccountName: etos-keys
2121
containers:
2222
- name: etos-keys
23-
image: ghcr.io/eiffel-community/etos-keys:a98a4f39
23+
image: ghcr.io/eiffel-community/etos-keys:3f11cf43
2424
imagePullPolicy: IfNotPresent
2525
env:
2626
- name: SERVICE_HOST

manifests/base/logarea/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
serviceAccountName: etos-logarea
2121
containers:
2222
- name: etos-logarea
23-
image: ghcr.io/eiffel-community/etos-logarea:a98a4f39
23+
image: ghcr.io/eiffel-community/etos-logarea:3f11cf43
2424
imagePullPolicy: IfNotPresent
2525
env:
2626
- name: SERVICE_HOST

manifests/base/sse/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
serviceAccountName: etos-sse
2121
containers:
2222
- name: etos-sse
23-
image: ghcr.io/eiffel-community/etos-sse:a98a4f39
23+
image: ghcr.io/eiffel-community/etos-sse:3f11cf43
2424
imagePullPolicy: IfNotPresent
2525
env:
2626
- name: SERVICE_HOST

0 commit comments

Comments
 (0)