Skip to content

Commit

Permalink
add cluster field
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkpc138 committed Jan 9, 2025
1 parent 2ea8e90 commit d98e21d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/design/log_sink.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ spec:
Field | Description
--- | ---
`{{TimeLayout "2006-01-02"}}` | Time based directory layout
`{{.Cluster}}` | Cluster name
`{{.Namespace}}` | Log source namespace name
`{{.SinkName}}` | Lobster sink name
`{{.RuleName}}` | Rule name in Lobster sink
Expand Down
1 change: 1 addition & 0 deletions pkg/lobster/sink/exporter/uploader/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ func (b BasicUploader) templateDir(chunk model.Chunk, date time.Time) (string, e
return template.GeneratePath(
b.Order.LogExportRule.BasicBucket.PathTemplate,
template.PathElement{
Cluster: chunk.Cluster,
Namespace: chunk.Namespace,
SinkName: b.Order.SinkName,
RuleName: b.Order.LogExportRule.Name,
Expand Down
1 change: 1 addition & 0 deletions pkg/operator/api/v1/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func init() {
}

type PathElement struct {
Cluster string
Namespace string
SinkName string
RuleName string
Expand Down

0 comments on commit d98e21d

Please sign in to comment.