mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-21 13:08:07 -04:00
ci: separate logs and metrics indices (#2544)
* separate logs and metrics indices * tidy
This commit is contained in:
parent
0c03076181
commit
9a282df846
4 changed files with 36 additions and 35 deletions
|
@ -29,33 +29,30 @@ const (
|
|||
|
||||
// LogstashPreparer prepares the Logstash Helm chart.
|
||||
type LogstashPreparer struct {
|
||||
fh file.Handler
|
||||
fields map[string]string
|
||||
indexPrefix string
|
||||
username string
|
||||
password string
|
||||
port int
|
||||
fh file.Handler
|
||||
fields map[string]string
|
||||
username string
|
||||
password string
|
||||
port int
|
||||
templatePreparer
|
||||
}
|
||||
|
||||
// NewLogstashPreparer returns a new LogstashPreparer.
|
||||
func NewLogstashPreparer(fields map[string]string, username, password, indexPrefix string, port int) *LogstashPreparer {
|
||||
func NewLogstashPreparer(fields map[string]string, username, password string, port int) *LogstashPreparer {
|
||||
return &LogstashPreparer{
|
||||
username: username,
|
||||
password: password,
|
||||
indexPrefix: indexPrefix,
|
||||
fields: fields,
|
||||
fh: file.NewHandler(afero.NewOsFs()),
|
||||
port: port,
|
||||
username: username,
|
||||
password: password,
|
||||
fields: fields,
|
||||
fh: file.NewHandler(afero.NewOsFs()),
|
||||
port: port,
|
||||
}
|
||||
}
|
||||
|
||||
// Prepare prepares the Logstash Helm chart by templating the required files and placing them in the specified directory.
|
||||
func (p *LogstashPreparer) Prepare(dir string) error {
|
||||
templatedPipelineConf, err := p.template(logstashAssets, "templates/pipeline.conf", pipelineConfTemplate{
|
||||
InfoMap: p.fields,
|
||||
Host: openSearchHost,
|
||||
IndexPrefix: p.indexPrefix,
|
||||
InfoMap: p.fields,
|
||||
Host: openSearchHost,
|
||||
Credentials: Credentials{
|
||||
Username: p.username,
|
||||
Password: p.password,
|
||||
|
@ -134,7 +131,6 @@ type LogstashHelmValues struct {
|
|||
type pipelineConfTemplate struct {
|
||||
InfoMap map[string]string
|
||||
Host string
|
||||
IndexPrefix string
|
||||
Credentials Credentials
|
||||
Port int
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue