From 1672605efebb153e23fb89aabe160b2bf0403d93 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:19:12 +0000 Subject: [PATCH] Add var generation benchmark (#6028) (#6116) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit be35854b5a7e3af5629a553bd457faacad4b0619) Co-authored-by: Mikołaj Świątek --- internal/pkg/composable/benchmark_test.go | 77 +++++ internal/pkg/composable/controller.go | 45 +-- internal/pkg/composable/testdata/agent.yaml | 7 + internal/pkg/composable/testdata/env.yaml | 50 +++ internal/pkg/composable/testdata/host.yaml | 318 ++++++++++++++++++ .../pkg/composable/testdata/kubernetes.yaml | 25 ++ internal/pkg/composable/testdata/path.yaml | 4 + 7 files changed, 506 insertions(+), 20 deletions(-) create mode 100644 internal/pkg/composable/benchmark_test.go create mode 100644 internal/pkg/composable/testdata/agent.yaml create mode 100644 internal/pkg/composable/testdata/env.yaml create mode 100644 internal/pkg/composable/testdata/host.yaml create mode 100644 internal/pkg/composable/testdata/kubernetes.yaml create mode 100644 internal/pkg/composable/testdata/path.yaml diff --git a/internal/pkg/composable/benchmark_test.go b/internal/pkg/composable/benchmark_test.go new file mode 100644 index 00000000000..4548481f7ac --- /dev/null +++ b/internal/pkg/composable/benchmark_test.go @@ -0,0 +1,77 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package composable + +import ( + "maps" + "os" + "path/filepath" + "strings" + "testing" + + "gopkg.in/yaml.v3" + "k8s.io/apimachinery/pkg/util/uuid" + + "github.com/elastic/elastic-agent-libs/mapstr" + "github.com/elastic/elastic-agent/pkg/core/logger" + + "github.com/stretchr/testify/require" +) + +// BenchmarkGenerateVars100Pods checks the cost of generating vars with the kubernetes provider tracking 100 Pods. +// This scenario does come up in reality, in particular in our internal Serverless clusters, and we've historically +// had bad performance in it. Test data is taken almost directly from a real cluster. +func BenchmarkGenerateVars100Pods(b *testing.B) { + log, err := logger.New("", false) + require.NoError(b, err) + c := controller{ + contextProviders: make(map[string]*contextProviderState), + dynamicProviders: make(map[string]*dynamicProviderState), + logger: log, + } + podCount := 100 + + providerDataFiles, err := os.ReadDir("./testdata") + require.NoError(b, err) + + providerData := make(map[string]map[string]interface{}, len(providerDataFiles)) + for _, providerDataFile := range providerDataFiles { + fileName := providerDataFile.Name() + providerName := strings.TrimSuffix(fileName, filepath.Ext(fileName)) + rawData, err := os.ReadFile(filepath.Join("./testdata", fileName)) + require.NoError(b, err) + var data map[string]interface{} + err = yaml.Unmarshal(rawData, &data) + require.NoError(b, err) + providerData[providerName] = data + } + + for providerName, providerMapping := range providerData { + if providerName == "kubernetes" { + providerState := &dynamicProviderState{ + mappings: make(map[string]dynamicProviderMapping), + } + for i := 0; i < podCount; i++ { + podData := maps.Clone(providerMapping) + podUID := uuid.NewUUID() + podMapping := dynamicProviderMapping{ + mapping: podData, + } + providerState.mappings[string(podUID)] = podMapping + } + c.dynamicProviders[providerName] = providerState + } else { + providerState := &contextProviderState{ + mapping: providerData[providerName], + } + c.contextProviders[providerName] = providerState + } + } + + b.ResetTimer() + for i := 0; i < b.N; i++ { + c.generateVars(mapstr.M{}) + } +} diff --git a/internal/pkg/composable/controller.go b/internal/pkg/composable/controller.go index 32830a479ef..29d596a7650 100644 --- a/internal/pkg/composable/controller.go +++ b/internal/pkg/composable/controller.go @@ -212,26 +212,7 @@ func (c *controller) Run(ctx context.Context) error { c.logger.Debugf("Computing new variable state for composable inputs") - // build the vars list of mappings - vars := make([]*transpiler.Vars, 1) - mapping := map[string]interface{}{} - for name, state := range c.contextProviders { - mapping[name] = state.Current() - } - // this is ensured not to error, by how the mappings states are verified - vars[0], _ = transpiler.NewVars("", mapping, fetchContextProviders) - - // add to the vars list for each dynamic providers mappings - for name, state := range c.dynamicProviders { - for _, mappings := range state.Mappings() { - local, _ := cloneMap(mapping) // will not fail; already been successfully cloned once - local[name] = mappings.mapping - id := fmt.Sprintf("%s-%s", name, mappings.id) - // this is ensured not to error, by how the mappings states are verified - v, _ := transpiler.NewVarsWithProcessors(id, local, name, mappings.processors, fetchContextProviders) - vars = append(vars, v) - } - } + vars := c.generateVars(fetchContextProviders) UPDATEVARS: for { @@ -291,6 +272,30 @@ func (c *controller) Close() { } } +func (c *controller) generateVars(fetchContextProviders mapstr.M) []*transpiler.Vars { + // build the vars list of mappings + vars := make([]*transpiler.Vars, 1) + mapping := map[string]interface{}{} + for name, state := range c.contextProviders { + mapping[name] = state.Current() + } + // this is ensured not to error, by how the mappings states are verified + vars[0], _ = transpiler.NewVars("", mapping, fetchContextProviders) + + // add to the vars list for each dynamic providers mappings + for name, state := range c.dynamicProviders { + for _, mappings := range state.Mappings() { + local, _ := cloneMap(mapping) // will not fail; already been successfully cloned once + local[name] = mappings.mapping + id := fmt.Sprintf("%s-%s", name, mappings.id) + // this is ensured not to error, by how the mappings states are verified + v, _ := transpiler.NewVarsWithProcessors(id, local, name, mappings.processors, fetchContextProviders) + vars = append(vars, v) + } + } + return vars +} + type contextProviderState struct { context.Context diff --git a/internal/pkg/composable/testdata/agent.yaml b/internal/pkg/composable/testdata/agent.yaml new file mode 100644 index 00000000000..3881d930e4a --- /dev/null +++ b/internal/pkg/composable/testdata/agent.yaml @@ -0,0 +1,7 @@ +id: 36806a7e-1981-4a55-a3b6-ec9dd1ad1a4c +unprivileged: false +version: + build_time: 2024-09-12 21:13:27 +0000 UTC + commit: d99b09b0769f6f34428321eedb00c0b4339c202b + snapshot: true + version: 9.0.0 diff --git a/internal/pkg/composable/testdata/env.yaml b/internal/pkg/composable/testdata/env.yaml new file mode 100644 index 00000000000..42c3bc29ac8 --- /dev/null +++ b/internal/pkg/composable/testdata/env.yaml @@ -0,0 +1,50 @@ +API_KEY: "" +BEAT_SETUID_AS: elastic-agent +ELASTIC_CONTAINER: "true" +ELASTIC_NETINFO: "false" +ES_HOST: https://localhost:9243 +ES_PASSWORD: +ES_USERNAME: elastic +GODEBUG: madvdontneed=1 +HOME: /root +HOSTNAME: kind +KUBE_DNS_PORT: udp://10.96.0.10:53 +KUBE_DNS_PORT_53_TCP: tcp://10.96.0.10:53 +KUBE_DNS_PORT_53_TCP_ADDR: 10.96.0.10 +KUBE_DNS_PORT_53_TCP_PORT: "53" +KUBE_DNS_PORT_53_TCP_PROTO: tcp +KUBE_DNS_PORT_53_UDP: udp://10.96.0.10:53 +KUBE_DNS_PORT_53_UDP_ADDR: 10.96.0.10 +KUBE_DNS_PORT_53_UDP_PORT: "53" +KUBE_DNS_PORT_53_UDP_PROTO: udp +KUBE_DNS_PORT_9153_TCP: tcp://10.96.0.10:9153 +KUBE_DNS_PORT_9153_TCP_ADDR: 10.96.0.10 +KUBE_DNS_PORT_9153_TCP_PORT: "9153" +KUBE_DNS_PORT_9153_TCP_PROTO: tcp +KUBE_DNS_SERVICE_HOST: 10.96.0.10 +KUBE_DNS_SERVICE_PORT: "53" +KUBE_DNS_SERVICE_PORT_DNS: "53" +KUBE_DNS_SERVICE_PORT_DNS_TCP: "53" +KUBE_DNS_SERVICE_PORT_METRICS: "9153" +KUBERNETES_PORT: tcp://10.96.0.1:443 +KUBERNETES_PORT_443_TCP: tcp://10.96.0.1:443 +KUBERNETES_PORT_443_TCP_ADDR: 10.96.0.1 +KUBERNETES_PORT_443_TCP_PORT: "443" +KUBERNETES_PORT_443_TCP_PROTO: tcp +KUBERNETES_SERVICE_HOST: 10.96.0.1 +KUBERNETES_SERVICE_PORT: "443" +KUBERNETES_SERVICE_PORT_HTTPS: "443" +LIBBEAT_MONITORING_CGROUPS_HIERARCHY_OVERRIDE: / +METRICS_SERVER_PORT: tcp://10.96.195.62:443 +METRICS_SERVER_PORT_443_TCP: tcp://10.96.195.62:443 +METRICS_SERVER_PORT_443_TCP_ADDR: 10.96.195.62 +METRICS_SERVER_PORT_443_TCP_PORT: "443" +METRICS_SERVER_PORT_443_TCP_PROTO: tcp +METRICS_SERVER_SERVICE_HOST: 10.96.195.62 +METRICS_SERVER_SERVICE_PORT: "443" +METRICS_SERVER_SERVICE_PORT_HTTPS: "443" +NODE_NAME: kind +PATH: /usr/share/elastic-agent:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +POD_NAME: elastic-agent-standalone-99pcr +PWD: /usr/share/elastic-agent +SHLVL: "0" diff --git a/internal/pkg/composable/testdata/host.yaml b/internal/pkg/composable/testdata/host.yaml new file mode 100644 index 00000000000..cfe68ec94d7 --- /dev/null +++ b/internal/pkg/composable/testdata/host.yaml @@ -0,0 +1,318 @@ +architecture: x86_64 +id: "" +ip: + - 127.0.0.1/8 + - ::1/128 + - 10.244.2.1/32 + - fe80::d4de:15ff:fe16:e56/64 + - 10.244.2.1/32 + - fe80::f0cc:dfff:fe9f:1153/64 + - 10.244.2.1/32 + - fe80::3421:32ff:fecb:62ff/64 + - 172.18.0.2/16 + - fc00:f853:ccd:e793::2/64 + - fe80::42:acff:fe12:2/64 + - 10.244.2.1/32 + - fe80::3cba:4cff:fe07:6058/64 + - 10.244.2.1/32 + - fe80::f80a:8eff:fee8:bf5c/64 + - 10.244.2.1/32 + - fe80::c410:faff:fe74:bd86/64 + - 10.244.2.1/32 + - fe80::988c:7cff:fe8b:779d/64 + - 10.244.2.1/32 + - fe80::6c22:9dff:fefc:3fc7/64 + - 10.244.2.1/32 + - fe80::b48d:f7ff:fe49:a3da/64 + - 10.244.2.1/32 + - fe80::a0cb:83ff:fe4e:bfa2/64 + - 10.244.2.1/32 + - fe80::ac96:e3ff:fe49:77a6/64 + - 10.244.2.1/32 + - fe80::3c3c:58ff:fef1:acea/64 + - 10.244.2.1/32 + - fe80::c20:39ff:fec1:49eb/64 + - 10.244.2.1/32 + - fe80::2445:61ff:feb6:67f8/64 + - 10.244.2.1/32 + - fe80::5847:f4ff:fe94:8e78/64 + - 10.244.2.1/32 + - fe80::ac4c:c5ff:fe2b:e734/64 + - 10.244.2.1/32 + - fe80::5cfe:beff:fee6:d20a/64 + - 10.244.2.1/32 + - fe80::bc1e:6cff:fef3:97f2/64 + - 10.244.2.1/32 + - fe80::bc29:77ff:fe9a:6cc5/64 + - 10.244.2.1/32 + - fe80::c020:19ff:fe3e:620f/64 + - 10.244.2.1/32 + - fe80::4412:62ff:fead:a44/64 + - 10.244.2.1/32 + - fe80::28ee:cdff:fe5d:e103/64 + - 10.244.2.1/32 + - fe80::8068:6bff:fea8:efad/64 + - 10.244.2.1/32 + - fe80::605f:c8ff:fe0c:8430/64 + - 10.244.2.1/32 + - fe80::1000:5dff:fecf:668c/64 + - 10.244.2.1/32 + - fe80::6027:7cff:fea4:7f41/64 + - 10.244.2.1/32 + - fe80::40f1:2ff:fe48:1502/64 + - 10.244.2.1/32 + - fe80::2cb9:62ff:fe7c:1a47/64 + - 10.244.2.1/32 + - fe80::48e5:cdff:fe5d:9aa/64 + - 10.244.2.1/32 + - fe80::8c7b:f1ff:fe93:2c46/64 + - 10.244.2.1/32 + - fe80::3c30:3ff:fe7e:530c/64 + - 10.244.2.1/32 + - fe80::887e:f5ff:febe:75f0/64 + - 10.244.2.1/32 + - fe80::c812:7ff:fed5:9a7a/64 + - 10.244.2.1/32 + - fe80::acbf:6cff:fe16:e5d0/64 + - 10.244.2.1/32 + - fe80::e43c:84ff:fe06:36e3/64 + - 10.244.2.1/32 + - fe80::68b4:faff:fe10:591c/64 + - 10.244.2.1/32 + - fe80::10ce:3cff:fe9a:610e/64 + - 10.244.2.1/32 + - fe80::40aa:8aff:fe8e:48a5/64 + - 10.244.2.1/32 + - fe80::3851:84ff:fe97:cf61/64 + - 10.244.2.1/32 + - fe80::f40b:eff:fee4:7ea1/64 + - 10.244.2.1/32 + - fe80::bc77:63ff:fe40:f0cc/64 + - 10.244.2.1/32 + - fe80::2006:baff:fedc:19b8/64 + - 10.244.2.1/32 + - fe80::381b:d7ff:fe57:f364/64 + - 10.244.2.1/32 + - fe80::1810:60ff:fe9c:e5fb/64 + - 10.244.2.1/32 + - fe80::38c2:76ff:fe2b:c8eb/64 + - 10.244.2.1/32 + - fe80::5c4a:54ff:fe93:2e42/64 + - 10.244.2.1/32 + - fe80::84e:5aff:fe72:9a0f/64 + - 10.244.2.1/32 + - fe80::3c71:adff:fe67:63cc/64 + - 10.244.2.1/32 + - fe80::a004:90ff:fe13:9225/64 + - 10.244.2.1/32 + - fe80::d052:75ff:fe52:808b/64 + - 10.244.2.1/32 + - fe80::88c7:8dff:fe2b:e2b8/64 + - 10.244.2.1/32 + - fe80::947d:e3ff:fe7c:8966/64 + - 10.244.2.1/32 + - fe80::94d0:a7ff:fe9b:b562/64 + - 10.244.2.1/32 + - fe80::2480:5eff:fef9:c408/64 + - 10.244.2.1/32 + - fe80::708e:73ff:fefe:9018/64 + - 10.244.2.1/32 + - fe80::481f:61ff:fee4:1bca/64 + - 10.244.2.1/32 + - fe80::3012:c7ff:fe9d:372d/64 + - 10.244.2.1/32 + - fe80::3821:64ff:fee6:b2ab/64 + - 10.244.2.1/32 + - fe80::98d8:fcff:feaa:a00d/64 + - 10.244.2.1/32 + - fe80::10cf:39ff:fe3a:5cf7/64 + - 10.244.2.1/32 + - fe80::d4e9:12ff:fee4:65a1/64 + - 10.244.2.1/32 + - fe80::c7a:30ff:fe41:2c03/64 + - 10.244.2.1/32 + - fe80::50fd:1dff:fe25:1cf0/64 + - 10.244.2.1/32 + - fe80::349f:aaff:fe4a:3c1d/64 + - 10.244.2.1/32 + - fe80::e07d:e3ff:fe16:9215/64 + - 10.244.2.1/32 + - fe80::d8dd:ddff:feee:cdc0/64 + - 10.244.2.1/32 + - fe80::3816:86ff:fe30:7735/64 + - 10.244.2.1/32 + - fe80::349d:b5ff:fec7:3e34/64 + - 10.244.2.1/32 + - fe80::9c20:44ff:fe86:43fd/64 + - 10.244.2.1/32 + - fe80::f422:c7ff:feb2:ffbf/64 + - 10.244.2.1/32 + - fe80::60ff:37ff:fe81:1998/64 + - 10.244.2.1/32 + - fe80::6c59:adff:fe56:828d/64 + - 10.244.2.1/32 + - fe80::2f:24ff:fe77:f4b7/64 + - 10.244.2.1/32 + - fe80::bca4:bcff:fead:8cf7/64 + - 10.244.2.1/32 + - fe80::cc9:c5ff:fe61:5856/64 + - 10.244.2.1/32 + - fe80::d0d6:b4ff:fef3:a4c2/64 + - 10.244.2.1/32 + - fe80::d03a:c2ff:fe29:e014/64 + - 10.244.2.1/32 + - fe80::a087:90ff:fec3:a9f0/64 + - 10.244.2.1/32 + - fe80::34cc:49ff:feb0:574/64 + - 10.244.2.1/32 + - fe80::c409:1dff:febe:3c71/64 + - 10.244.2.1/32 + - fe80::60bb:5cff:fe9e:f751/64 + - 10.244.2.1/32 + - fe80::64e3:dcff:fe33:5c57/64 + - 10.244.2.1/32 + - fe80::33:cfff:fefe:53fa/64 + - 10.244.2.1/32 + - fe80::403e:a8ff:fe88:a285/64 + - 10.244.2.1/32 + - fe80::24f3:cfff:fe90:378a/64 + - 10.244.2.1/32 + - fe80::847b:97ff:fe19:3db8/64 + - 10.244.2.1/32 + - fe80::d0a6:f7ff:fed8:c57/64 + - 10.244.2.1/32 + - fe80::5c8e:d0ff:fe96:d3a9/64 + - 10.244.2.1/32 + - fe80::7450:35ff:fea5:be20/64 + - 10.244.2.1/32 + - fe80::b023:b5ff:fe64:42f9/64 + - 10.244.2.1/32 + - fe80::94ae:a4ff:fe70:764e/64 + - 10.244.2.1/32 + - fe80::1023:78ff:fe04:cc6b/64 + - 10.244.1.1/32 + - fe80::302f:77ff:fe9d:14a5/64 + - 10.244.1.1/32 + - fe80::98a8:3dff:fea3:e99c/64 + - 10.244.1.1/32 + - fe80::a841:a5ff:fef7:e8d1/64 + - 10.244.1.1/32 + - fe80::58b7:7fff:fe80:89fc/64 + - 10.244.1.1/32 + - fe80::1818:31ff:fe3f:b399/64 + - 10.244.1.1/32 + - fe80::9c20:67ff:fe97:56b1/64 + - 10.244.1.1/32 + - fe80::e02f:edff:fe05:1780/64 + - 10.244.1.1/32 + - fe80::2c34:c1ff:fe48:572d/64 + - 10.244.1.1/32 + - fe80::b01c:f2ff:fe39:f104/64 + - 10.244.1.1/32 + - fe80::ac4d:92ff:fef7:a5d1/64 +mac: + - d6:de:15:16:0e:56 + - f2:cc:df:9f:11:53 + - 36:21:32:cb:62:ff + - 02:42:ac:12:00:02 + - 3e:ba:4c:07:60:58 + - fa:0a:8e:e8:bf:5c + - c6:10:fa:74:bd:86 + - 9a:8c:7c:8b:77:9d + - 6e:22:9d:fc:3f:c7 + - b6:8d:f7:49:a3:da + - a2:cb:83:4e:bf:a2 + - ae:96:e3:49:77:a6 + - 3e:3c:58:f1:ac:ea + - 0e:20:39:c1:49:eb + - 26:45:61:b6:67:f8 + - 5a:47:f4:94:8e:78 + - ae:4c:c5:2b:e7:34 + - 5e:fe:be:e6:d2:0a + - be:1e:6c:f3:97:f2 + - be:29:77:9a:6c:c5 + - c2:20:19:3e:62:0f + - 46:12:62:ad:0a:44 + - 2a:ee:cd:5d:e1:03 + - 82:68:6b:a8:ef:ad + - 62:5f:c8:0c:84:30 + - 12:00:5d:cf:66:8c + - 62:27:7c:a4:7f:41 + - 42:f1:02:48:15:02 + - 2e:b9:62:7c:1a:47 + - 4a:e5:cd:5d:09:aa + - 8e:7b:f1:93:2c:46 + - 3e:30:03:7e:53:0c + - 8a:7e:f5:be:75:f0 + - ca:12:07:d5:9a:7a + - ae:bf:6c:16:e5:d0 + - e6:3c:84:06:36:e3 + - 6a:b4:fa:10:59:1c + - 12:ce:3c:9a:61:0e + - 42:aa:8a:8e:48:a5 + - 3a:51:84:97:cf:61 + - f6:0b:0e:e4:7e:a1 + - be:77:63:40:f0:cc + - 22:06:ba:dc:19:b8 + - 3a:1b:d7:57:f3:64 + - 1a:10:60:9c:e5:fb + - 3a:c2:76:2b:c8:eb + - 5e:4a:54:93:2e:42 + - 0a:4e:5a:72:9a:0f + - 3e:71:ad:67:63:cc + - a2:04:90:13:92:25 + - d2:52:75:52:80:8b + - 8a:c7:8d:2b:e2:b8 + - 96:7d:e3:7c:89:66 + - 96:d0:a7:9b:b5:62 + - 26:80:5e:f9:c4:08 + - 72:8e:73:fe:90:18 + - 4a:1f:61:e4:1b:ca + - 32:12:c7:9d:37:2d + - 3a:21:64:e6:b2:ab + - 9a:d8:fc:aa:a0:0d + - 12:cf:39:3a:5c:f7 + - d6:e9:12:e4:65:a1 + - 0e:7a:30:41:2c:03 + - 52:fd:1d:25:1c:f0 + - 36:9f:aa:4a:3c:1d + - e2:7d:e3:16:92:15 + - da:dd:dd:ee:cd:c0 + - 3a:16:86:30:77:35 + - 36:9d:b5:c7:3e:34 + - 9e:20:44:86:43:fd + - f6:22:c7:b2:ff:bf + - 62:ff:37:81:19:98 + - 6e:59:ad:56:82:8d + - 02:2f:24:77:f4:b7 + - be:a4:bc:ad:8c:f7 + - 0e:c9:c5:61:58:56 + - d2:d6:b4:f3:a4:c2 + - d2:3a:c2:29:e0:14 + - a2:87:90:c3:a9:f0 + - 36:cc:49:b0:05:74 + - c6:09:1d:be:3c:71 + - 62:bb:5c:9e:f7:51 + - 66:e3:dc:33:5c:57 + - 02:33:cf:fe:53:fa + - 42:3e:a8:88:a2:85 + - 26:f3:cf:90:37:8a + - 86:7b:97:19:3d:b8 + - d2:a6:f7:d8:0c:57 + - 5e:8e:d0:96:d3:a9 + - 76:50:35:a5:be:20 + - b2:23:b5:64:42:f9 + - 96:ae:a4:70:76:4e + - 12:23:78:04:cc:6b + - 32:2f:77:9d:14:a5 + - 9a:a8:3d:a3:e9:9c + - aa:41:a5:f7:e8:d1 + - 5a:b7:7f:80:89:fc + - 1a:18:31:3f:b3:99 + - 9e:20:67:97:56:b1 + - e2:2f:ed:05:17:80 + - 2e:34:c1:48:57:2d + - b2:1c:f2:39:f1:04 + - ae:4d:92:f7:a5:d1 +name: kind +platform: linux diff --git a/internal/pkg/composable/testdata/kubernetes.yaml b/internal/pkg/composable/testdata/kubernetes.yaml new file mode 100644 index 00000000000..78c208ace9a --- /dev/null +++ b/internal/pkg/composable/testdata/kubernetes.yaml @@ -0,0 +1,25 @@ +annotations: {} +labels: + app: nginx + pod-template-hash: d556c846c +namespace: default +namespace_labels: + kubernetes_io/metadata_name: default +namespace_uid: 65506782-932a-4ed7-874f-4b729b648b05 +node: + hostname: kind + labels: + beta_kubernetes_io/arch: amd64 + beta_kubernetes_io/os: linux + kubernetes_io/arch: amd64 + kubernetes_io/hostname: kind + kubernetes_io/os: linux + name: kind + uid: 5a917c19-0789-419b-9b6d-7cf858e942e3 +pod: + ip: 10.244.2.64 + name: nginx-d556c846c-sk9qt + uid: 02ad1222-6edc-403a-8775-ec2b164a77bf +replicaset: + name: nginx-d556c846c +scope: node diff --git a/internal/pkg/composable/testdata/path.yaml b/internal/pkg/composable/testdata/path.yaml new file mode 100644 index 00000000000..e343968c2c6 --- /dev/null +++ b/internal/pkg/composable/testdata/path.yaml @@ -0,0 +1,4 @@ +config: /usr/share/elastic-agent/state +data: /usr/share/elastic-agent/state/data +home: /usr/share/elastic-agent/state/data +logs: /usr/share/elastic-agent