mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-18 19:47:54 -04:00
ci: logcollection to OpenSearch in non-debug clusters (#2080)
* refactor `debugd` file structure * create `hack`-tool to deploy logcollection to non-debug clusters * integrate changes into CI * update fields * update workflow input names * use `working-directory` * add opensearch creds to upgrade workflow * make template func generic * make templating func generic * linebreaks * remove magic defaults * move `os.Exit` to main package * make logging index configurable * make templating generic * remove excess brace * update fields * copy fields * fix flag name * fix linter warnings Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> * remove unused workflow inputs * remove makefiles * fix command * bazel: fix output paths of container This fixes the output paths of builds within the container by mounting directories to paths that exist on the host. We also explicitly set the output path in a .bazelrc to the user specific path. The rc file is mounted into the container and overrides the host rc. Also adding automatic stop in case start is called and a containers is already running. Sym links like bazel-out and paths bazel outputs should generally work with this change. Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> * tabs -> spaces --------- Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
7d040c26ba
commit
60bf770e62
39 changed files with 1073 additions and 75 deletions
|
@ -13,7 +13,6 @@ import (
|
|||
"net"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
|
@ -125,7 +124,7 @@ func deploy(cmd *cobra.Command, fileHandler file.Handler, constellationConfig *c
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := checkInfoMap(info); err != nil {
|
||||
if err := logcollector.FieldsFromMap(info).Check(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -281,22 +280,6 @@ func uploadFiles(ctx context.Context, client pb.DebugdClient, in deployOnEndpoin
|
|||
return nil
|
||||
}
|
||||
|
||||
func checkInfoMap(info map[string]string) error {
|
||||
logPrefix, logFields := logcollector.InfoFields()
|
||||
for k := range info {
|
||||
if !strings.HasPrefix(k, logPrefix) {
|
||||
continue
|
||||
}
|
||||
subkey := strings.TrimPrefix(k, logPrefix)
|
||||
|
||||
if _, ok := logFields[subkey]; !ok {
|
||||
return fmt.Errorf("invalid subkey %q for info key %q", subkey, fmt.Sprintf("%s.%s", logPrefix, k))
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type fileTransferer interface {
|
||||
SendFiles(stream filetransfer.SendFilesStream) error
|
||||
SetFiles(files []filetransfer.FileStat)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue