github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/internal/operator/boom/application/applications/zitadel/flow.go (about) 1 package zitadel 2 3 import "github.com/caos/orbos/internal/operator/boom/application/applications/logcollection/logging" 4 5 func GetFlows(outputs, clusterOutputs []string) []*logging.FlowConfig { 6 return []*logging.FlowConfig{ 7 getOperatorFlow(outputs, clusterOutputs), 8 getZitadelFlow(outputs, clusterOutputs), 9 } 10 } 11 12 func getZitadelFlow(outputs, clusterOutputs []string) *logging.FlowConfig { 13 return &logging.FlowConfig{ 14 Name: "flow-zitadel", 15 Namespace: "caos-system", 16 SelectLabels: getApplicationServiceLabels(), 17 Outputs: outputs, 18 ClusterOutputs: clusterOutputs, 19 ParserType: "logfmt", 20 } 21 } 22 23 func getOperatorFlow(outputs, clusterOutputs []string) *logging.FlowConfig { 24 return &logging.FlowConfig{ 25 Name: "flow-zitadel-operator", 26 Namespace: "caos-system", 27 SelectLabels: getOperatorServiceLabels(), 28 Outputs: outputs, 29 ClusterOutputs: clusterOutputs, 30 ParserType: "logfmt", 31 } 32 } 33 34 func GetCloudZitadelFlow(outputs, clusterOutputs []string) *logging.FlowConfig { 35 return &logging.FlowConfig{ 36 Name: "flow-cloud-zitadel", 37 Namespace: "caos-system", 38 SelectLabels: getApplicationServiceLabels(), 39 Outputs: outputs, 40 ClusterOutputs: clusterOutputs, 41 ParserType: "regexp", 42 ParserExpression: "/^.*time=(?<time>[^ ]*).*level=(?<level>[^ ]*).*logID=(?<id>[^ ]*).*$/", 43 // WORKAROUND 44 // According to /fluentd/log/out, only 15 labels are allowed. 45 // I had to exclude the container_name as I couldn't figure 46 // out how to exclude certain kubernetes labels when 47 // clusteroutputs extract_kubernetes_labels is set to true. 48 // Also I couldn't set it to false and explicitly include 49 // certain labels. 50 RemoveKeys: "$.kubernetes.docker_id,$.kubernetes.pod_id,$.kubernetes.container_name", 51 } 52 }